Hi šŸ‘‹,

I’m Shubham

Senior Engineer - Software Development (MTS)

This is the corner of the internet where I share my learnings, thoughts and experiences.

Here are some interesting things that caught my attention recently.

Hugo context

- 4 mins read

Series: learninghugo

What we did and what we will do? Previously, we were successfully able to render our home, single and list pages. When we started templating, we looked into a term called, context. We worked with site context and page context and I assumed they are just like references. This post is meant to explore more on context and get a deeper understanding. Context The Context is the object available to you at anytime.

Designing my own theme in Hugo - II

- 4 mins read

Series: learninghugo

What we did and what we will do? This is a part blog in which I am documenting my learning process of creating my own theme in Hugo. Previously, we went through the basic flow of creating a theme. My current theme is poison theme and we replaced the theme with our new theme which we named, “awesometheme”. But unfortunately, after applying the new theme, the rendered page was blank.

Designing my own theme in Hugo - I

- 4 mins read

Series: learninghugo

Hugo is all about themes Hugo is a developers dream of static sites. Whether you are planning on a new blog site or maybe a documentation for a product, you can easily launch a static site using Hugo. The most powerful feature of Hugo is its simplicity. It is designed to separate your content from styling. This means you can write your content in normal markdown files independent of all the website pages and layouts.
What is Julia? Julia is a scientific programming language. It is close to R and Python in syntax and scripting feel. But it is more like a light weight MATLAB. I was going with Gilbert Strang’s lectures on Linear Algebra and as always, you can’t learn if you are not experimenting. I searched for any language support for MATLAB in Doom Emacs. Instead I saw this - ;;julia ; a better, faster MATLAB.

Object pool design pattern in Java

- 3 mins read
What is it? The object pool design pattern exposes a manager to manage a pool of reusable objects. The idea is to keep a know number of reusable objects (with a hard limit to initialize some more lazily). Whenever someone need the object from the pool, it will ask the pool manager. If there are free objects, the manager will engage one for your. If there aren’t any free objects but the hard limit is not breached, then the manager will initialize a new object and provide you.

Make String a Subsequence Using Cyclic Increments

- 2 mins read
This is the LeetCode problem number 2825. Cyclic increment This is when you increase an entity by an amount and when you reach the end you circle back to start and continue the count. If a is increased cyclicly by 1, we will get b. If a is increased cyclicly by 2, we will get c. But if z is increased cyclicly by 1, we get a. By 2 we will get b.

Downloading a single file from 2 independent apps

- 4 mins read
Understanding the problem Let’s say you have a very large log file. And you want to create an app that can analyze this file and generate insights. Also, let’s say you want to create an another app that can simulate the work by reading the logs one-by-one. Both these apps are dependent on the same log file. Now, there are 2 scenarios. App1 starts, downloads the file and then App2 starts.

Reflection API in Java

- 3 mins read
Where is this used? This is used to analyze/modify the behaviour of a class at runtime. Using this, you can view or change the private/public fields at wish (without exposing any getter/setter). Personally, I have used this in one of our projects at GreyOrange to write unit test cases. Using this in main code is a big no-no as it exposed you critical fields to the world. Main Class Let’s create a main class for which we will write some test cases.