Category Archives: programming

The right way to implement producer consumer pattern in Java

The producer consumer pattern can be “easily” implemented in Java using one of the BlockingQueue classes. The producer puts work into the queue and consumer takes work from the queue. We start two separate threads for the producer and consumer. … Continue reading

Posted in Computers, programming, Software | Tagged , , , | Leave a comment

Using WSL – Windows Subsystem for Linux

I keep forgetting it so it deserves a post of its own. To access the Ubuntu directory from Windows Explorer type: Also run: to create a directory on c:\ from where you can access the WSL filesystem refer this. How … Continue reading

Posted in Computers, programming | Tagged | Leave a comment

How to process data in Google BigQuery?

In this post we discuss some of the ways the data in BigQuery can be processed. First, for those unfamiliar with it, what is BigQuery? BigQuery is Google’s OLAP (Online Analytics Processing) database. In my previous company, we used Hive … Continue reading

Posted in Computers, programming, Software | Tagged , | Leave a comment

StackOverflow Developer Survey 2022

The SO Developer Survey for 2022 is out. Some things that struck me as odd: I just can’t believe that people hate MATLAB. I love it. Similarly I was surprised to find out that R and PHP are dreaded languages. … Continue reading

Posted in Computers, programming, Software | 1 Comment

Query Google BiqQuery from a Scala console app

Objective How can we query Google BigQuery from a Scala console app? Step 1 – Create project on Google CLoud, enable billing, Install Google Cloud SDK, initialize and authenticate Refer to online documentation for how to do all this. You … Continue reading

Posted in Computers, programming, Software | Tagged , | Leave a comment

AsciiDoctor: Inspecting Environment settings of Ruby

Within the docker-asciidoctor container you can see Ruby settings like so

Posted in Computers, programming, Software | Tagged | Leave a comment

Installing Bash4

A new macbook pro comes installed with bash version 3. I needed to install bash 4 to be able to use the bash debug vs code extension. To do this run brew install bash once its done you will need … Continue reading

Posted in Computers, programming, Software | Tagged | Leave a comment

Debugging java out of memory exception

Read http://stackoverflow.com/a/35963059/147530 to understand the nuances esp. if you are getting this error: Real world example: Needed to debug a service that would cause an OOM exception after running for a while. Wrote following script to periodically make requests to the … Continue reading

Posted in programming, Software | Tagged , | Leave a comment

Linux & Bash Tips

Normally by itself the terminal app displays bash in the tab title and its not very useful if you have a large number of tabs open and want to know e.g., what is the pwd in each of the tabs. … Continue reading

Posted in programming, Software | Tagged , , | Leave a comment