>

Entropy and Life

Life needs energy to survive. Energy is needed to perform basic life functions like movement, hunting and gathering, protecting from prey and natural elements. It is converted from one form to another. Eventually, the energy within the living organism is expelled from the organism while useful work is performed. Why and how energy for life? Work is done when there is change in energy. In other words, energy has to go somewhere, so work gets done....

3 min

Presenting with Emacs Org-mode

Emacs org-mode is an emacs major mode used for note keeping, project planning and for creating documents and articles. It has many export options from markdown to pdf to latex. While all this is great for document generation, it can also be used for creating presentations with org-reveal. Still, this needs a browser and sometimes you really have more text than a few bullet points and want a simpler option to just focus on the text under each heading by narrowing to each heading as you present....

2 min

ChatGPT is an LLM and not an LMM (yet)

While I was refreshing some concepts in statistics, I came up with a problem I thought I could ask ChatGPT (talk about attention deficit). I am still using the cheap ChatGPT3.5, so what I am about to show may not work on the expensive ChatGPT4.0. Here’s an example on how it can mislead while solving math problems and one should already have an inkling how to solve the problem (or atleast have an estimate of the answer) to do some prompt engineering to finally get to a solution....

3 min

Extending life of a Mosquito Bat

Mosquito bats work great for killing mosquitoes and flies. Until they don’t work! They hardly last one mosquito generation. It turns out that the rechargeable battery in them go bad fairly quickly. So as a small hack, I took out the cheap battery they come with and replaced it with a decent rechargeable LiIon 3.7v 2200mah one. You have to modify the battery housing a little bit by carving out some extra bits of plastic to make the 18650 type battery to fit....

1 min

A container does not need an OS

Apparently a container does not even need an OS whereas VMs do. Container != VM, but I never stopped to think about this before. Processes within the container can directly talk to the kernel on which the container is running. Most containers are built with a base OS image. Turns out you can create an image without a base OS by pulling the scratch image, that contains nothing. Let’s create a small c program that is statically compiled....

2 min

Analyzing Kubernetes container based scaling

Kubernetes Horizontal Pod Autoscaling provides a way to scale up number of Pod replicas in a deployment based on per-pod metric thresholds set by the operator. Most often the per-pod resource metrics (like CPU and memory) are used to scale the pods. The utilization value is computed over all the containers in each Pod. Starting with v1.20, Kubernetes started offering HPA scaling based on container resource metrics as an alpha feature (as of the time of this writing)....

3 min

Expectation of distances of random points on a circular disc

I came across this probability problem and thought it was interesting. What is the expectation of distance (from the center) of a circular disc to uniformly distributed random points on the disc? If you pick a random point (or throw a dart) on a circle, there are more chances of the point landing somewhere between the center and the perimeter of the circular disc. Intuitively, this is because there are more points on the disc, i....

1 min