December 15, 2018

My head hurts. It’s 11 pm at night, and I just finished a 3 hour debugging marathon to fix a bug that has been on my to-do for last 2 weeks. What began as a simple list of items not showing up in the browser ended up in an ill-formatted sql caused by mis-match of enumeration in a switch statement in the deep backend. The fix involved changing a single word, but the path I had to take was treacherous and equally fulfilling. The feeling is serene.

December 14, 2018

Reading about work-culture in industries which are unrelated to software is one of my favourite activities. Young Money is an inside story of life as a financial analyst on Wall Street. It’s an easy-to-read and quite entertaining book, which I finished reading in a couple of hours. It reveals the harsh realities of working at the prestigious investment banks in the aftermath of the financial crisis of 2009.

November 14, 2018

Time flies. It’s been almost a year since I joined CityView. Time to see how we perform on the Joel Test, the brain-dead questionnaire developed by Joel Spolsky to measure the quality of a software company. Here we go.

November 4, 2018

In October, I dove deep into theme reading on scandals. Spent the cold nights binge-reading three wonderful books on the major frauds in three different industries. The biggest Ponzie scheme ever, the biggest medical fraud in Silicon Valley, and the collapse of Enron.

November 4, 2018

Since reading Meditations by Marcus Aurelius, I had yet to come across a book with such a high signal to noise ratio. Just finished reading Thinking in Systems by Donella Meadows, and this fits the bill. I had to pause, think and ponder after reading each paragraph in order not to miss the profound underlying concepts. Very easy to read, this is one of those books that changes how you look at the world. This is a (not so) brief summary of the book.

November 4, 2018

Some systems are more than surprising. They are perverse. These are the systems that are structured in ways that produce truly problematic behaviour. Continuing my summary of Thinking in Systems by Donella Meadows, here are some of the common system traps, and how to avoid/fix them.

October 16, 2018

I do suffer from mild anxiety occasionally. A practice of Stoicism has helped me tremendously dealing effectively with those occasional gloomy days which seem to creep up from nowhere. Recently, I started reading about Zen Buddhism, which has led me to works of Shoma Morita and philosophies of Kaizen and Naikan. The more I read about Buddhism and Japanese philosophies, the more I realize how much it overlaps with core values of Stoicism.

September 14, 2018

Just finished listening to Antifragile by Nassim Nicholas-Taleb. I couldn’t take any notes while driving, but the book is so damn good that I had to re-read the book summary by Derek Sivers. Here is a condensed version of his notes, for future reference.

September 14, 2018

I bought a car few months ago, and find myself spending almost an hour commuting to tech park every day, after I moved to downtown. Tried listening to podcasts for a while, but it’s hard to find good ones every single day. Not a big fan of music, either. So, I tried Audible. It is amazing.

August 15, 2018

Gerald Weinberg is one of the programmers who has influenced so much of my thinking as a programmer. He passed away on August 7, 2018, at the age of 84. He had simple, but very profound, Zen-like insights on everything related to software development, programming, and many other disciplines. He has left the software industry with a better understanding of what it means to be a programmer.

June 22, 2018

After procrastinating for years due to its sheer size, I have finally picked up and started reading DDD. This is a must-read for developers of object-oriented software working on a complex domain. I found myself nodding on almost every sentence in this book, relating so much to my work at CityView, which has a super-complex domain of municipal software.

June 18, 2018

Just finished reading “The Meaning of It All” by Richard Feynman. It is based on a previously unpublished, three-part public lecture he gave at the University of Washington in 1963. It contains some absolutely brilliant ideas on uncertainty. My notes/highlights from this book.

May 27, 2018

I have been studying Stoicism for more than 2 years now. The more I read Seneca, Marcus Aurelius and Epictetus, the more I realize how Stoic principles can be valuable when applied to programming. This post is a quick reminder to myself when I am writing software.

April 21, 2018

I read 7 Brief Lessons on Physics by Carlo Rovelli over the weekend. A short read, but jam packed with essential concepts in Physics explained in simple English. The book has a very poetic and philosophical feel, and contains lots of dramatic passages, that a sceptic might think are woo-woo or imaginary. But the book is based on pure scientific facts which are so fascinating that it needs no other imagination or creativity. Here is a summary of my Kindle Highlights and quotes I found interesting.

April 4, 2018

The son of an Indian Civil servant studies hard, gets an engineering degree, immigrates to the United States, and makes it in tech. But wait, there is more to it. Hit Refresh is less about the personal life of Satya and more about the amazing transformation happening inside Microsoft. This is my informal summary of Hit Refresh, an autobiography of Satya Nadella. My notes are informal and contain lines from the book as well as my thoughts about them.

March 10, 2018

I usually don’t read satire, but recently finished reading “The Age of Absurdity” by Michael Foley, and it is one of the best books I read in 2017. It critiques the eccentricities of modern life, revealing some rather uncomfortable truths. I have tried to summarize the book to the best of my understanding, but it is much deeper than my naive first impressions. It will probably take at least a couple more readings, and a lot more life experience to internalize the concepts.

February 8, 2018

Sometimes, we need to find out if an element is a member of a given set or not. There are many algorithms which solve this problem. However, many are not efficient for large datasets and restricted memory. A good example is a dictionary on an iPhone. While typing, the application needs to verify if the word is in the dictionary or not. The dictionary is huge, and there is just not enough RAM to hold all words. How to find out all the typos? Luckily, there’s a way.

February 7, 2018

While medical science has given us the ability to extend life, it does not ask – or answer – the question of if that extended life still has meaning. I read this book last year, but never got around to summarizing my notes. It is written by Dr. Atul Gawande, the author of “The Checklist Manifesto”. In this book, Dr. Gawande calls for change in the way medical professionals deal with illness and final stages of a patient’s life.

January 29, 2018

History, it seems, is always ending today. I came across a good paper in the science magazine about a common illusion which might be related to programming.

January 24, 2018

A really good talk by Ryan Singer about the design process at Basecamp. It is quite old, but still useful. In under half an hour, he designs a simple yet beautiful web-page from ground up, starting with the requirements, moving on to model, screen, design, html/css and finally coding it up.

January 12, 2018

Whenever a hash function results in a hash which has already been used, it results in a collision. There are two common techniques to resolve hash collisions, namely separate chaining and linear probing. I had a weird idea to combine both of them and creating a third technique called separate probing.

December 31, 2017

A really good introductory book to big ideas in Physics, by Richard Feynman. It is very approachable, and can be read by a high-school student as well as someone doing a PhD. He explains some really advanced concepts by relating them to everyday objects and events in life.

September 29, 2017

We may think we are being rational when we make decisions, but the factors and biases that affect our behavior are so subtle that we don’t even know we are being irrational. Not randomly, but “Predictably”. My notes on this wonderful book by Dan Ariely.

August 19, 2017

I have been a long time fan of Jason Fried and David Heinemeier Hansson of Basecamp. Last week, I decided to give Basecamp a go for my personal projects, and was floored by the fantastic customer service.

August 3, 2017

Due to the wildfires in all over British Columbia, usual blue sky in Victoria is turned into a smoky orange haze. Here is a beautiful picture of the sunrise my friend captured from Mt. Douglas.

July 30, 2017

Here is a comparison and a quick reference for using AJAX and POSTGRES in front-end Aurelia and back-end Node.js. I found myself searching for this code each time I wanted to access databases and make api calls. Hope it’s useful.

June 6, 2017

Nowadays, most of the machines have at least 4 core processors. When we program an application, it usually uses one core, which is massive underutilization of the full power of the machine. We look into Java 6 Executor Pattern to improve the speed of an algorithm utilizing multi-core parallelization.

May 17, 2017

May 9, 2017

In this article, I discuss a fundamental algorithm to find out the most influential nodes in a social network.

May 8, 2017

Though I don’t use Facebook, recently I have been studying how social networks can be exploited to influence a large population of people. It’s fascinating to see how many people will buy a product just because someone they admire and follow on social media promoted it. In the 90’s, it was Michael Jordan and Nike, now it’s all the Youtube vloggers and Instagram celebs. If you are a marketer, this is a golder opportunity to promote your product instantly. If you are a user, it’s the time to ask, am I getting influenced by people I follow?

February 25, 2017

If your server is running on localhost:3000, and you try to make an api call from localhost: 9000, you will get “No Access-Control-Allow-Origin header present” error. To get rid of this error, we need to enable CORS on the server. How do we do that?

February 11, 2017

Getting the position of ticks in D3 is not as simple as inserting a function in the tick generating function. This is primarily becasue we get the ticks ready made when we call the d3.axis() function. However, using transform attribute it is possible to get the offset location of each individual tick.

February 1, 2017

Imagine you are a marketer, who wants to promote a product. You are using social media, say twitter/instagram to promote a product. Though Twitter is free, let’s assume you incur a cost for each twitter account which you use to advertize that product to their followers. Ofcourse, you will want to reach as many people as possible, while minimizing the cost of using the promotion. In graph theory, this is an influence maximization problem.

October 30, 2016

I recently worked on an interesting feature for WaterWorth. It gives the user the ability to download a D3 chart and save it as a JPEG or PNG, so that it can be used for reporting purposes. In this post, I will try to explain how we can convert a D3 tool to an image.

August 7, 2016

If you have used D3 for a while, you are definitely used to the sequence of select/selectAll->data->enter->append. Most of the time, we just copy that piece of code from the online examples. In this post, I will try to summarize my understanding of D3 selections. I believe knowledge of how selections work behind the things can enable us to create more interactive charts in D3.

July 20, 2016

The word ‘mentor’ comes from Homer’s Odyssey. During the ten years that Odysseus struggled to return home from the Trojan wars, Mentor served as a surrogate father to Odysseus’s son Telemachus.

June 11, 2016

Last two weeks were very happening for WaterWorth. I learned a great new technology D3, and we successfully built our first chart from ground-up, without relying on any third party library.

March 3, 2016

I had an interview with a Software Engineer from Google last week. It was a mock interview, and I was one of the 5 students selected by Google in the UVic CS department. It was a really nice learning experience, enjoyed every moment of it.

February 20, 2016

I had a tough time understanding MVC in college when I first heard about it. Here is a good analogy that I found useful to understand it.

October 10, 2015

For my first blog post, I would like to say “Hello World” in my favourite programming languages.