Home ¦ Posts ¦ Books ¦ Articles ¦ Talks ¦ Notes

About

Hello, My name is Amit - I am interested in programming, software tools, systems and infrastructure. A lot of what I explore in software makes it to my blog posts, articles, books, talks and GitHub repositories. If you would like to get an email everytime I write something new, please subscribe to my newsletter. You can contact me via email, on Twitter and on LinkedIn.

Blog posts

My post recent posts are below. So far, I have written about C, Fedora, Golang, Infrastructure, Python and various others.

Sorted Sets in Redis from CLI, Python and Golang

In this post, we will see a demo of sorted sets in redis. I just learned about them and I think they are really cool! This post shows how we can play with sorted sets first via the redis-cli, then from Python and Golang.

                            ┌────────────┐
 .───────────────.          │            │           .─────────────.
(    Redis CLI    )   ───▶  │   Redis    │  ◀─────  (    Golang     )
 `───────────────'          │            │           `─────────────'
                            └────────────┘
                                  ▲
                                  │
                                  │
                           .─────────────.
                          (    Python     )
                           `─────────────'

We …


Python: Using specific git commits of third party packages

After a fair number of furious impatient attempts to try and use specific git commits of third party packages in my Python software, I finally have been able to make it work. I went back to the drawing board - basically reading setup-vs-requirement.

Applications

This is what I did:

  • If you …

Why RPC in Microservices instead of HTTP?

The Freelancer.com REST API is powered by a number of backend services. The API itself is powered by a Python HTTP server which communicates with the other services (Python, Golang and PHP) via RPC calls implemented using Apache Thrift. It is only during the past 2.5 years that …


C/C++ Scientific Programming Libraries and Tools

math.h provides basic mathematical functions as part of the C standard library and are also usable from C++. However, it needs to be supplemented with custom libraries when advanced numerical functionalities are desired. In this article, we shall take a look at two such libraries - the GNU Scientific Library …


Data in C and CPython

In the last two articles (Data in CPython and Data in C), as it turned out, I discussed two fundamental points in each language:

  • What happens in an assignment operation (such as a=2)?
  • Are separate copies of data created or references passed to the original when they are sent …

Resource Acquisition Is Initialization (RAII) in C

GCC's C compiler allows you to define various variable attributes. One of them is the cleanup attribute (which you can also write as __cleanup__) which allows you to define a function to be called when the variable goes out of scope (for example, before returning from a function). This is …


Data in C

In C, the data you use in your programs will usually fall into one of the three basic categories: int, char and float. Data in C has no existence without an associated memory location labeled by an identifier, usually referred to as a variable (the term variable is a bit …


Data in CPython

When writing programs in Python (CPython), you have access to data types such as a int, str, tuple, list and a dict. It is fairly obvious what each of these data types would be used to represent: an int data type would represent an integer and a list would represent …


Quick and dirty debian packages for your Golang application

In this post, we will learn about a quick and easy workflow for building and deploying your golang applications as Debian packages. The packages produced will not be official quality DEB packages.

Assumptions

I have been using dep for dependency management, and I assume that you are doing the same …


Your options for monitoring multi-process Python applications with Prometheus

In an earlier article, Monitoring Your Synchronous Python Web Applications Using Prometheus, I discussed a limitation of using the Python client for prometheus.

Limitation of native prometheus exporting

prometheus was built with single process multi-threaded applications in mind. I use the term multi-threaded here to also include coroutine based concurrent …

© Amit Saha. Built using Pelican. Customised theme based on the one by Giulio Fidente on github.