Happy New Year 2026: New Resolutions and planning

Year 2025 have been very fruitful for me. I got to meet new people, strengthen some friendships and also move ahead in career. Overall it was good.

Now we are in 2026 and thus begin the new season of plannings and taking resolutions that I may or may not fulfil. At least the streak has been like plan and forget about it for many past years. Contuing the tradition this year as well I did some planning and some parts of it I can share on my blog. These include my health, some money and relations.

First health, Currently I have BMI 34.2 which is very high for me. This distorts my looks and at a certain level my confidence. Thus this is the first priority to get the BMI about 25. I know it will take a lot of time but hey I have got whole year ahead. Apart from these I have also learnt few additional grooming skills that currently does not look good because of the fat but maybe later I can use them to further enhance my persona.

In terms of other health indicators, I have perfect health, all vitals are good. no signs of any diereses as of now. I would like to keep this part as it is.

Second on the money side, In 2025 I earned okay amount, but almost all the earnings are gone to other people in the form of lending. I know for certain that about half the amount will never come back or If I force recover it I will loose long standing friendships. So I got the lessons and starting this year, I will only lend money If someone is hospitalised otherwise there are banks and they can use the credit facilities there. Earning part I am not so worried because there is no point earning money If you cannot keep it.

Third the relationships, So far all going good in personal life. With few people in close relationship, I want to improve certain things and my behaviour around them but the triggers are strong and I sometime loose it. This year I wish to create an environment of proper communication and clear past misunderstandings also (recover some of my hard earned money, Hopefully!).

For Technology and skill improvement, I am working on my T shape skill chart. I will attach the image here.

I do not plan in absolute terms of implementation, only the “What” is planned. The “How” I want to figure out on the go. As complete planning steals the joy of life. and uncertainty is the reality.

Let the new year bring happiness and positive vibes in our day to day lives. Happy New Year.

Update cache when DB table updates

For a long time, this is one of the well known issues in computer engineering to “evict the cache” and regenerate it. I too face it time to time.

Recently I got a requirement that when a table gets a new row inserted. the metadata cache must update in all the running instances that are connected to that database.

My first thought about it was simple, when we issue an insert at that time, we will make a service call after committing the transaction that will refresh the cache. But this only updates at single pod and also there is no guarantee that the table will be updated only via application. A developer can manually update it or write a patch in run it.

The second thought of using a scheduled task that will poll the table time to time and update the cache. This will work for sure, and also easy to implement. easy to give justifications but too many database calls is also not good. If I increase the interval, there will be lag in detection, if not then too many calls.

I started hunting for some event based mechanisms to handle this scenario. I know that there is ‘pg_notify’ in PostgreSQL , it is possible to have something similar in our database as well.

I found three approaches.

1. UTL_HTTP

https://medium.com/@amilaupendra5/how-to-call-https-apis-in-pl-sql-procedures-with-utl-http-package-06a1ad5547ab

https://docs.oracle.com/cd/A97385_01/appdev.920/a96612/u_http.htm

2. DBMS_AQ 

https://www.oracle.com/in/database/advanced-queuing

3. CQN

https://docs.oracle.com/en/database/oracle/oracle-database/19/adfns/cqn.html

After comparing the pros and cons of these techniques I am going with CQN to get a notification when a table is updated, I will listen on the results changed model and issue a refresh command when this occurs.

Happy coding.

An SVG Round-trip

Yesterday, I was given a task to correct the logo images in DEV instance for the text based logos. We were rendering text converted into SVG and then loaded as an image in the header.

The rendered image was clipped from the right edge and was not rendering the logo correctly. Seemed easy fix so I just got it assigned to myself. and my journey started.

Attempt 1: removing the dynamic width from the SVG.

This immediately fixed the clipping issue but now the generated image has white-space at the end and taking more space in the header.

Attempt 2: increasing the width by a fixed number of pixels.

This solved for the problem at hand, but for other texts that were working, are now broken and has extra space at the end.

Attempt 3: generating, rendering and then cropping the image

Too complex and heavy operation, downvoted.

Attempt 4: Creating a viewBox of a certain size and aligning using the preserveAspectRatio and text-length attributes.

Did not work well for me. Although it can solve the issue.

Attempt 5: Scaling to 90% so that it can fit.

Scaled down to 90% using ‘g’ tag, but again same issue more white-space at the end and smaller fonts.

Attempt 6: SVG inside SVG

It worked but was ugly, needed more changes.

Attempt 7: Get a break, walk around the building and a cup of hot coffee.

I was just staring at the code at this moment, had already restored my changes multiple times and I was at the same place where I started. Soon i realised that the clipping is happening because the calculation of the required width could be buggy.

I checked the code, we were calculating the required width using canvas API by setting the font and then measuring the width for the text rendering.

The font was “Some font”, but in the svg text element had a font family “Some font Bold, Some font”. I updated the same font family in the context and now it started working as expected. It was a font setting issue.

I took many hours to fix this very tiny issue but learnt a lot of SVG images, how they are created, how it works and how we can leverage to scale text. This was a good refresher for me but the pull request only contained one line and my boss might not be happy that I took that much time to solve it.

Links:

https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/viewBox

https://developer.mozilla.org/en-US/docs/Web/SVG/Reference

https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/measureText

https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/g

Why do we use Git? Can we live without it?

When we start writing code, it is mostly single-file programs. We compile them with the locally installed compiler, run them with the command line, and observe the output. Almost all programming starts here.

Once we grow from this, we start writing programs that need more than one file. Very soon, it grows beyond the controls of simple file management and manual compilation; at this point, we need an IDE. An integrated environment that handles all the complexity of compiling, running, etc, and gives us a nice editor to write the code, highlighting the code on the way, giving us positive feedback on our program while writing.

We stay at this stage for a long time. For almost two to three semesters, we enjoy this stage. The IDE is our friend and we defend it on Reddit channels like anything. The IDE wars go hot, and we are almost on the verge of getting ready to physically beat people to make them endorse the same IDE. But after a few years, this obsession goes away, because with age comes wisdom.

Now we are at the stage where we need to make changes, comment out, delete code, test it. It does not run, and now we have to restore the file to what it was before. But we do not have that version with us. It is already gone.

What we need exactly in this scenario is an SCM. source code management tool. There is more than one tool available. But the most popular among us is “GIT SCM”.  https://git-scm.com/

This is a plain-text version management tool. We write code, once done, we add those files in staging. We double check that these were the changes we needed to do (GIT highlights the diff). We write a message (write proper git messages) and them run commit. That’s it.

It will save the diff of the text in a commit and give it a hash value for managing this commit – we can cherry pick, merge, or revert this commit using the hash. There are a ton of features available, I recommanded you to go and explore the man pages. https://git-scm.com/docs

Now you are fine with the git setup and write the code with more confidence as you know I can always revert it to previos version. You are happy, your teacher is happy.

After a few years, or at the door step of your university, you will get a job and you will become a software engineer in a company with multiple developers in a team. You need more collaboration, not just in real life but also in terms of writing software.

Git comes to the rescue again, with the remote repository configuration. There is a big repo hosted somewhere. we all cut a branch from there, work on this branch locally, test it, and push to remote. Raise a new PR to the target branch and send it for review. If all is well, your PR will be merged into the destination branch. Sometimes, you and another coworker will make changes to the same file. Your PR will be in conflict state, and you need to resolve this. But at the end, there is a  process where we know what the change is, who made it, and how to fix it. definitely not possible without a source code management tool.

Popular remote repository hosts are GitHub, BitBucket, and GitLab. You can also do some of them on your own (Your company will handle this; you do not need to worry, but for personal projects, I would not recommend hosting it yourself, as homelabbing is an expensive hobby, and saying from experience, you can buy a car for that money.)

Explore https://github.com/  https://bitbucket.org/product/

Now, let me share more stories around it. When production reports a bug, the first thing your lead will check is the git blame. Who made this change? Now, if your team is sensible, they will try to find the root cause of this and pick an available developer to fix it; otherwise, they will call you out of bed to first humiliate you and make you feel guilty and fix it in the next half an hour. So whatever you build, make sure you make it robust and cover all features.

Summary: There is no survival without Git in the current industry work environment. Learn it as early as possible in your studies and career. Here are some good learning resources. Happy learning.

Git explained in 100 seconds – youtube.com/watch?v=hwP7WQkmECE&pp=ygUDZ2l00gcJCQMKAYcqIYzv

Git and GitHub full course – https://www.youtube.com/watch?v=rH3zE7VlIMs

Pro Tip: Do not fight over tools and language wars. Work with whatever is available within your organisation and use it for building something that brings value to the customers. Tools do not matter much in the end.