Fear of Git

The intention of this article is not to explain how Git works. It is just to explain how Git should be approached.

The beginning

In 2010, I got introduced to Git. Git was a buzz word then. Just skimmed through its features and thought how could there be any other source control not having all these.

I was saying to myself, Git is the most obvious way any source control should work.
But that was a pretty immature thought, because I did not know what is actually happening inside Git.

Later, was working in Git with the so called basic ...

View comments.

more ...

Blog story

In this article, I wanted to share about various people and factors motivating me to start this blog and the tools I used to make it live.

Fizer, who runs www.chennainerd.in insisted me to start writing and was ready to publish my articles in it. He emphasised on creating a brand on the internet, which can in-a-way be achieved through blogging. He was patient enough to do the proof reading and educated me about hacker news for taking it to larger audience. It is only because of his influence this blog is live.

Software Engineer's Life Manual ...

View comments.

more ...

Proxy and port forwarding

This article is more like a case study on when to use proxies and when to just stick to simple port forwarder. Also discusses in detail on what each of those is, and the tools falling under each category.

At office, we have our solution - basically a bunch of HTTP services, deployed on openstack which is not directly accessible from external network. We were asked to use a jump server (a.k.a jump box/jump host) - a server in the middle which has access to both, private network of the solution and the external network.

For using the services ...

View comments.

more ...

Dockerfile CMD vs ENTRYPOINT

I had difficulty in understanding the difference between CMD and ENTRYPOINT in Dockerfile before I did the below experiment. Hope this will help someone like me who cannot understand the difference from the documentation or stackoverflow.

Consider the below docker file

[ythulasi@YTHULASI-M-C341 01.BusyboxWithCMD]$ cat Dockerfile
FROM busybox:latest
CMD ["cat", "/etc/passwd"]

Let's build an image and call it busy_cmd_image

[ythulasi@YTHULASI-M-C341 01.BusyboxWithCMD]$ docker build -t busy_cmd_image .
Sending build context to Docker daemon 2.048 kB
Step 1 : FROM busybox:latest
 ---> 2b8fd9751c4c
Step 2 : CMD cat /etc/passwd
 ---> Using cache
 ---> e4df0d0c0d67
Successfully built e4df0d0c0d67

Now, we ...

View comments.

more ...

Random Rationalized

I had a requirement to have random numbers generated in a C application.

#include <stdlib.h>
#include <stdio.h>
int main()
{
  int i = 0;
  for (i = 0; i < 5; i++) {
    printf("Random number %d  =  %ld\n", i, random());
  }
  return 0;
}

I ran the code once and saw that random numbers were getting generated.

But to my surprise when I ran the code second time, I saw the same numbers getting printed.

What??? Does it mean random numbers are predictable? If so, why is it called random? Random and Predictable words literally contradicting each other.

But I remember using random.random ...

View comments.

more ...