Skip to main content

Posts

2023

Unlocking Docker's Power With Go: A Developer's Perspective - Part 1

·11 mins
Introduction to Docker Go SDK # In the introductory section of the blog post, we will provide a comprehensive introduction to the Docker Go SDK, highlighting its purpose, benefits, and relevance in the context of building Docker applications using the Go programming language. Brief explanation of Docker Go SDK and its benefits # The Docker Go SDK, also known as the Docker Engine API for Go, is a powerful toolkit that allows developers to interact with Docker and perform Docker-related operations using the Go programming language. It provides a set of APIs and functions that enable seamless integration with Docker, empowering developers to manage Docker resources, automate tasks, and build Docker-centric applications.

Improving Code Quality with Testify in Go: A Deep Dive into Testing

·13 mins
Introduction # Testify is a popular testing toolkit for the Go programming language. It provides a wide range of assertion functions, test suite support, and mocking capabilities, making it a powerful tool for testing Go applications. Testify aims to simplify the process of writing tests and improve the quality of test coverage in Go applications. Testing is a critical aspect of software development that helps ensure that the software behaves as intended and catches bugs early in the development process. Writing tests can be time-consuming, but it is essential for delivering a reliable and maintainable software system. Testify can help make testing in Go more efficient and effective.

Most Common HTTP Response Header with Examples

·6 mins
Introduction # HTTP response headers provide additional information about the server’s response to an HTTP request. These headers are essential for web developers and server administrators to ensure efficient and secure communication between clients and servers. In this blog post, we will discuss some of the most common HTTP response headers and provide example values for each header.

Introduction to FFmpeg by Basic Common Examples

·8 mins
Introduction # Okay, so I have encountered ffmpeg in my early career already. And now, although I have got away from that industry, I still love to do some physics simulation for refreshment. If you have worked with 3D software before, you might know that we render the output in image sequence or simply called frames. To do anything with my simulation, I need to convert that sequence of images into a video.

Getting Started With NodeMCU Development on Ubuntu

·5 mins
Introduction # At the time I’m writing this post, the Internet of Things is not a new thing. If you own a vehicle, and it connects to the internet in some manner, your vehicle manufacturer is already gathering so much data with planted sensors in the vehicle. It’s not only about your vehicle or your phone. IoT is used in tracking the orders you have booked at your favorite e-commerce site. You as an enthusiast can also automate certain aspects of your house.

Why Use WSGI/ASGI When We Have Nginx?

·4 mins
Introduction # When it comes to deploying Python web applications, a common architecture involves using a web server like Nginx to handle incoming requests, while the Python application itself runs on a separate server. In this architecture, the web server serves as a reverse proxy, forwarding requests to the Python application server and then returning the response back to the client.

OpenTelemetry for the First Timers

·7 mins
Introduction # Let us start by asking this question: What is observability and why do we need telemetry? Although observability and telemetry might sound like interchangeable words to use, observability is the whole thing that consists of instrumentation to viewing the metrics. Here telemetry is the instrumentation part. And in this post, we are majorly going to talk about this part only.

__str__ vs __repr__ in Python and When to Use Them

·3 mins
Introduction # In a previous post, we have done a comparison between __new__ and __init__. In this post, we are going to do something similar, but with a different pair. For those who don’t know, __str__() and __repr__() are two dunder methods which you can override in a class to change the way class is represented. These two little functions have been a source of confusion in my early career. Let us first go through them one by one and let us understand what they do first. Then we’ll do comparison among them with respect to their similarities and differences.

Exploring Rootless Docker

·6 mins
Introduction # Why rootless docker? “Rootless” Docker refers to running Docker containers without granting the Docker daemon full root privileges on the host system. This can provide added security, as it reduces the potential attack surface and damage that could be caused by a malicious or compromised Docker daemon. In normal Docker usage, the Docker daemon runs as the root user, which means it has complete access to the host system. While this is necessary for many Docker features and functionality, it can also represent a significant security risk, especially when running untrusted or unknown containers.

How to Control Philips Wiz Bulb Using Go

·5 mins
Introduction # I have always been conscious about privacy and it was the sole reason I wasn’t early adapter of smart home devices. This changed when I bought Raspberry Pi. I learned that I can make my Pi hub to all the smart devices at my home. And this is how I bought 9W Philips Wiz light; the cheapest one I could get in the Indian market.

First Month With My Raspberry Pi

·5 mins
Introduction # It’s no longer than a month since I bought a Raspberry Pi. Pi 4B to be precise. In this post, I’m going to log how I spent my 1st month with it. Setup the Pi # When I decided to buy Raspi, I decided not to go with the kit. The reason was the model I was looking for, which is 8GB Model B wasn’t available in India. And finding a kit for it would have been more challenging.

2022

How to Write Classes in Golang

·3 mins
Introduction # I have seen many people coming from Python background struggling with Go. What I have obeserved it they write code that is limited to writing functions and calling them. They never leverage design constructs such as abstraction, encapsulation, inheritance, composition etc. I can understand their pain because I’ve been in the same boat. In today’s post I’ll compare how we write classes in Python vs how we do the same thing in a Go way.

Testing HTTP Requests with Postman

·4 mins
Introduction # In Postman Premier - The Minimal Postman you need to Learn, I posted the minimum of Postman you need to learn. In this article, I’m going to expand on that knowledge and dig more into the response. In this post, I’ll be asserting the response on certain values and response codes and more. What are assertions and how to use it # Assertions are nothing but test cases we give to a particular request. In the previous post, we already have seen that each of the requests has a Tests tab. There we write code in JavaScript, judging specific parameters of the response.