Akshit Grover Software Engineer turned Product Manager A blog for someone who likes watching what's under the hood.

Docker tips & tricks

Docker has revolutionized the cloud environment. Any company which operates any kind of cloud environment uses docker either to test or to deploy production workloads. Knowing the importance of docker, it is still tedious sometimes to work with the CLI.

There are many commands and options which are not much explored but turn out to be in handy while working with docker. We are going to discuss a few of those commands in this blog post.

Why do I think, Time complexity of generating all permutations of a string is O(n!)

I was working on a problem statement related to permutations of a given string when I came across this question of its time complexity. Working up a solution myself I got O(n!), Which in turn is incorrect according to the “Cracking the Coding Interview” which was referenced in one of the geeks for geeks posts. It claimed the complexity to O(n² * n!), Where n is the length of the string. To verify the result I sought answers in forums (StackOverflow, wiki, etc.), Even here people were not sure about either of the two.

Image

Docker Secrets in/out

Docker in version 1.13 introduced the concept of secrets. For any application managing configuration variables, ssh keys, passwords, API keys etc. is a crucial part, This data is not be disclosed to anyone outside the authority.

Initially this data was set manually by setting environment variables on the node (which is a part of the swarm), But setting this data on all the nodes turned out to be quite a tedious task, I mean one can also copy a config file but again how many times will you copy the same file on different nodes, But why would anyone copy when you could put all these variables either in your YML stack files or Dockerfiles (NOTE: Anyone can have access to your data when you push your image to docker hub), YML stack files is not a good option as pushing sensitive data on websites like Github (A must to work in a team) is not what is preferred and YML stack files are to be shared for the application to work.

NodeJS Streams

Nodejs a very popular javascript runtime environment known for it’s asynchronous nature and server side application development. It has many core modules or say paradigms which are not well explored yet and are used in every application (sounds a bit confusing right?), One of such core modules is Stream.

Everything in nodejs is about efficient process handling (multiple requests) on a single thread. As a nodejs developer one just has to think about the application, everything else, such as efficiency, multiple connections etc. is taken care of by nodejs.

One such module which lets us handle data flow be it binary or objects, asynchronously is Stream.

Nodejs Logo

Linux Environtment Variables

Before we go on reading about environment variables in Linux, I would like to make a not that around a month back “I was a hardcore windows supporter”, Though it is gospel truth that developers must use Linux, I never supported the fact (windows user “GUI Lover :P”). A few days back don’t know what came to mind, I shifted to Linux (also installed KDE “GUI Lover :P”), And trust me when I say this Linux is love. It gives you a lot of features to handle your machine at the core, Configure it according to your needs. One such feature which I found most useful is Environment Variables.

Image

Pass by Reference in Go

I started using go a few weeks back and still exploring go concepts, trust me when they say “Go Will Make You Fall In Love With Programming” this is actually true, you will love writing go code :)

Sample Code

Okay, So about this article, As I said I am still a beginner, A few days back I was reading a few blogs and came across this concept of pass by reference in go

Under The Hood Of HTTP

You drive a car, go to office, withdraw money from the bank, deposit money in the bank, prepare a dish etc. Everything you do is done by following certain rules and principles.

Similarly, When you browse on internet, visit websites, submit forms, login on facebook etc. are done following certain rules and principles (implicitly) you don’t get to know that you are following them but your computer and the internet are making sure that you do. These rules are and principles are specified under a protocol i.e. HTTP (Hyper Text Transfer Protocol)

Image

Realtime Communication with Sockets

Today most of the applications which delivers information are driven by Real time communications, ever used what app? Whatsapp’s unique selling point is Real time communication which in turn uses sockets.

What do we mean by real time communication?

Well it is no different than conversing to a person physically but here you use a network and device to connect to it, so that you can use the bliss of sockets. Sockets are the key to drive real time communication for almost 98% of the applications.

NoSQL Technology Breakdown

Today, it is not hard to believe that, Millions of terabytes of data is created every single day, With this exponential growth of data industry it was time for the industry to move towards something which is better than SQL to handle tons of data, You got it right NoSQL.

Basics of Docker

Docker Logo Docker is a container provider, It is used to containerize your project. What do we mean by containers or containerize, Some Big Techie Words. Don’t worry we will get along with these easy.

To understand docker in a single line

Docker Provide Us With A Virtual Environment Which Narrows The Gap Between Development And Production Environment.