Garbage collection -> {“It clears out the old to make way for the new”​}

Living as Techie for more than 25 years now starting with college days, technology terms surpassed any other terms in my memory and mind.

Here I am trying to see the most important aspect of a computing platform for sustainability, resource management from different angles, technical and non technical.

C/C++ Programmer

In C/C++, programmer is responsible for both creation and destruction of objects. I have written lab exercises in C/C++ but never an enterprise or system software. It needs a lot of proficiency. A developer needs to be very precise in terms of managing the resources and had to spend long hours debugging a core dump or memory hours (based on what I heard).

If there are errors, results will be given very soon. Once it break we can fix through logs and debugging. Memory errors are not easy to trace, but possible otherwise we would not have been here.

Almost all of the Operating systems, device drivers, and many many system programs are written this way by brilliant developers. #kudos to them.

Java Programmer

Java having a built in garbage collector, which takes care of finding and destroying objects for the developers. Life is easy. We still get OOM (out of memory errors) but can be fixed with plenty of tools available.

Java was originally built for small appliances with bare minimum memory, it was very important to have an excellent GC. It was great from beginning and many new researches introduced different types of applications spanning across small devices to rockets.

GC is an important technical interview question and most of us keep refreshing the concepts and it just works as I have seen. Some of the cool learning points are about types of references like Strong, Weak, Phantom etc and its relation to GC.

Cloud Native Programmer

With the main stream arrival of container technology and container orchestration along with cloud based computing, everything is stateless and ephemeral.

In essence life is short and life is about moments it lives. Doing things one after the other in an enjoyable way (a bit of village philosophy).

Still GC does its job for the time application is running. Good job.

UI Developer

As in Java, UI development using JavaScript is also blessed with the systemic cleaning up of the unused memory following algorithms like Reference-counting garbage collection or Mark-and-sweep algorithm.

Need to talk to a pure UI developer on their experiences about memory issues.

Social

Cleaning up the unused and making way for the new is a natural necessity.

Velocity at with nature does it is slower than the speed of waste human generation. GC in nature comes in the form of flood, cyclone in small scale and pandemics like we see today in the form of COVID-19 is an example I would say.

Its a nature reaction to clean itself from the devastation done by human and a reminder for the humanity to live in respect of the nature.

We don’t know the GC algorithm nature has, but it comes and it does it job.

The End