Posts

Showing posts from May, 2024

Ship Faster, Fix Less: A Guide to Continuous Testing

Image
  Before I jump into Continuous Testing, let's touch base on what testing is, along with how and when it plays a crucial role. Testing phase provides you with feedback which will help you determine if further changes are needed. Faster feedback is better for you. Why? Because by going down the wrong road too far, you risk having to rework more than you originally developed. In some cases, it may not be possible to fix the defects because the feedback came in two days before your scheduled deployment. So, what do you do? You push the defects into production, hoping to fix it someday. Will defects always get fixed in production? You know the answer! What is continuous testing? Continuous testing is a process of software testing in which an application is tested at every stage of software development life cycle (SDLC). It aims to shorten the systems development life cycle and provide continuous delivery with high software quality. Why does it matter? The process of software develop...

Build an HTTP server using BunJs and Prisma

Image
  In this guide, we'll be leveraging two powerful tools: BunJs and Prisma. Together, they provide a robust foundation for constructing modern, scalable, and efficient web servers. But before we dive into the technical details, let's take a moment to understand what BunJs and Prisma bring to the table. Why use BunJs? BunJs is a really lightweight, fast, and highly customizable HTTP framework for Node.js. It helps in simplifying the process of creating web servers. On the other hand, with Prisma, interacting with databases becomes more intuitive and less error-prone, thanks to its powerful features like auto-completion and type checking. Setting up our project First let's install Bun toolkit, with following command: - npm install -g bun Now let's create our project directory: - ├── controller/ │ ├── comments.controller.ts │ ├── post.controller.ts │ └── user.controller.ts ├── prisma/ │ └── schema.prisma ├── services/ │ ├── auth.service.ts │ ├── comment.service....

Decoding Network Traffic: The Vital Role of Telemetry in Understanding Network Activity

Image
  Telemetry, in simple terms, is like having a conversation with machines or systems located far away. It's about collecting data from these distant sources to better understand how they're performing. Think of it as a health check-up, but for machines or systems instead of people. This technology plays a crucial role in a variety of fields. In agriculture, it helps monitor crop conditions; in healthcare, it keeps tabs on patient metrics like blood pressure and blood sugar levels; and in weather forecasting, it's indispensable for predicting mother nature's next move. So, it's a bit like having a network of digital spies scattered in different areas, each sending back valuable information that lets us peek into the functioning of systems we can't be physically present at. Telemetry in IT In the world of technology and complex software, telemetry is crucial for software optimization. It involves collecting data from various software deployments to understand perf...

Create Stunning Parallax Animations on Your Website

Image
 Have you ever come across a website that made you scroll over it again just to see the motions and transitions and made you GASP, thinking how hard it must be to create these amazing animations, One such animation I saw on keploy website, the parallax effect which made me go through there Developer section twice! Let's dive into creating that spellbinding parallax effect together, transforming your website into a journey your visitors will want to take again and again(and raise its retention rate🤫). Why GSAP Stands Out GSAP can animate pretty much anything JavaScript can touch, in any framework. Whether you want to animate UI, SVG, Three.js, or React components, GSAP covers you. While you might think, "Can't we just use native CSS for these animations, then why load an extra library ?", but believe me, after using and exploring GSAP you will fall in love with it! The simplicity and power of complex animations it provides! It can ease challenging scroll-triggered ef...

Redirecting DNS Traffic in Docker Containers Using Tc-BPF

Image
  The adoption of eBPF (Extended Berkeley Packet Filter) has revolutionized high-performance applications, tracing, security, and packet filtering within the Linux kernel. Specifically, TC-BPF, a type of eBPF program attached to the Traffic Control (TC) layer, has emerged as a powerful tool for packet manipulation in both ingress and egress. This blog delves into the practical application of TC-BPF to redirect DNS queries in a Docker environment. The intricate workings of Docker networking involve network namespaces, veth pairs, and a bridge interface, all contributing to the isolation of containers. Docker employs its own DNS server, and understanding how it intercepts DNS queries through iptables is crucial for our redirection strategy. The TC-BPF program, attached to both loopback and eth0 interfaces, plays a pivotal role in this redirection process. We explore the use of the bpf_redirect_neigh helper function for efficient egress redirection, ensuring correct MAC addresses for...

Adding Colour To The Log Output Of Logging Libraries In Go

Image
  Logging is an integral part of software development, providing developers with valuable insights into the behaviour and performance of their applications. In the Go programming language, various logging libraries, such as the standard library's log package or third-party options like logrus , zap and zerolog , facilitate the generation of log output. While the primary goal of logging is to convey information, the traditional black-and-white log messages can sometimes make it challenging to quickly discern critical information amidst a sea of logs. Need for colouring logs Prioritisation and Highlighting: colour can be used to prioritise and highlight critical information. For example, error messages or warning logs can be displayed in attention-grabbing colours like red or yellow, making it immediately apparent when an issue requires urgent attention. This facilitates a faster response to potential problems. Enhanced Readability: colours can improve the overall readability of...

Scram Authentication: Overcoming Mock Testing Challenges

Image
  In the vast landscape of cybersecurity, authentication stands as the guardian of digital fortresses, ensuring that only the right individuals gain access to sensitive information and services. Imagine you're at the entrance of a top-secret facility, and you need to prove your identity to the security personnel. In the digital realm, this is precisely what authentication mechanisms do – they verify your identity before granting access. When it comes to databases, making sure that the right programs have access is super important for keeping things safe and organised. At first, I thought databases might use a method called JWT tokens for this because it's popular and strong for security. However, I found out that there are different ways of authentication based on the connection state. Token Based Authentications: Token-based authentication is a method where users or applications receive a special "token" after initial authentication. This token is then used for fur...