Experience with Go workspace

Introduction Go 1.18 added the workspace mode to Go, allowing you to work on multiple modules simultaneously without having to edit the go.mod file. Module is a folder having go.mod file Earlier if you are working with multiple modules the flow would look like below Make the change in module1. Update the go.mod file of module2 with replace directive for your local, unpublished changes. Make the changes in module2. Before pushing to remote remember to remove the replace from the go.mod. What workspace allows you to do is allow you to access the changes from module1 in module2 without updating the go.mod files. Thus allowing developers to fully focus on writing code, only when you are going to complete your local development flow and are going to push to remote, we need to update the version tag of module1 in module2’s go.mod file. ...

February 10, 2024 · 3 min · 430 words · Rajkumar Gosavi

The documentation conundrum

Introduction In this world of information as a software engineer we have some great resources that guide us and provide us with information required for our daily activities. Some of the references available to us are: stackoverflow.com medium.com Engineering blogs written by an organization or by an individual Github Repositories Recently some LLMs like ChatGPT, Bard etc. Youtube/Tutorials/MOOC Private Groups. And many more Now there is one specific resource that I missed out that is the Official Documentation for the piece of software in use. This post is all about my observations in the recent years. ...

August 12, 2023 · 3 min · 583 words · Rajkumar Gosavi

Using Truth Table in Development.

Introduction Truth tables are the foundation of boolean algebra and are required for logical reasoning and software implementation. All the if else statements we write, irrespective of the programming languages, use boolean algebra. One such scenario became the inspiration for this particular short post The Initial Details To display some orders on a page where users have access to multiple filters, such as search box - to search the order directly using some identifier date range filter - to get orders with a specific date range status - to get orders with a specific status and many others ...

February 3, 2023 · 3 min · 471 words · Rajkumar Gosavi

JSON datatype in postgreSQL

Introduction PostgreSQL provides us with a datatype to store JSON data. This datatype can be helpful in lots of situations giving us a way to store some dynamic data. Further PostgreSQL provides us with two types for storing JSON data json jsonb They both take almost identical set of inputs but the major difference is that in the efficiency. The json data type stores the exact copy of the input text which the processing functions must reparse on each execution. On the other hand jsonb data is stored in the decompressed binary format which makes it slightly slower to input due to the added overhead of conversion, but significantly faster to process since no reparsing is needed. ...

August 11, 2022 · 5 min · 915 words · Rajkumar Gosavi

Using Constants in PostgreSQL queries

Introduction Imagine we have a long query which has a lots of conditions, and many of the conditions has some kind of comparisions with literals instead of some other record value. Example: SELECT * FROM users u where (u.name='some name' or u.age=12 or u.email='qwe@qwe.qwe'); For example sake we are taking the name, age and email as constants. Imagine these literal values used multiple times in the query. We will have very untidy query. ...

November 30, 2021 · 2 min · 268 words · Rajkumar Gosavi

Introduction To Data Structures

In this post we are going to look at What are Data Structures and Abstract Data Types Why do we need them How can we create our own simple ADT Let’s get started What are Data Structures and Abstract Data Types and Why do we need them In any program there are lots of operations being performed ranging from simple addition to complex ones. These operations have a very basic thing in common regardless of their scale. ...

November 5, 2021 · 5 min · 899 words · Rajkumar Gosavi

Number Systems

Number Systems Here we are going to take a look at the following Number systems which are used extensively in computer science Decimal Binary Octal Hexadecimal Introduction Basically, all the systems are used for counting, thus allowing humans to measure things. Every system that we are going to see will have a radix/base. Radix / Base - the number of unique digits, including the digit zero, used to represent numbers [1] ...

September 5, 2021 · 5 min · 1041 words · Rajkumar Gosavi