Happy New Year 2021

Last year, when I wrote the “Happy New Year 2020” post, COVID-19 had just begun its course. Very few people in the world were aware of the full glory of the havoc it was about to wreck on the world. Looking back at that post, I just smile at how oblivious I was to what was brewing in December 2019.

2020 was brutal. My heart goes out to all families that have lost family members due to COVID-19, directly or indirectly. There have been a lot of cases where people couldn’t even stay with their families to say final goodbyes to their loved ones. Just thinking about all of it, saddens me.

In 2020, I’ve learned a lot about many things in life such as passion, being grateful, the kind of person I am, etc. On March 11th, when WHO declared the COVID-19 outbreak as a global pandemic, most companies let their employees Work From Home (WFH). Very soon, I got frustrated being cooped up in the house all day.

One afternoon, around mid-May, I received a marketing phone call from my bank. The bank employee asked me how I was doing, to which, I answered – “Not so great”. I said so because I was just frustrated staying home all day. He asked me if I was sick. I said, “No”. He then asked me if I had lost my job. I said, “No”. That was it. Those two questions just changed my perspective of the whole situation. I realized how grateful I was.

2020 in review

  • January: Most of January, I was in India with my Dad. I had a great time in Hyderabad and I am grateful for the trip. Celebrated Sankranthi at home. Also, started growing my hair long
  • February: Watched Super Bowl with friends. Had a lovely Valentine’s day dinner with my wife. Attended Vir Das’s stand up with friends, in San Francisco
  • March: Started WFH
  • April: Washed my hands so much that my skin started peeling off. Learned to make Hakka Noodles
  • May, June: Sindhu made me a homemade cake for my birthday. It was awesome. Played a lot of board games. Sindhu even wrote a post about it here
  • July: Visited my cute little nieces. Decided to improve my health and stay fit. Started running and functional training
  • August, September, October: Comparing the health data from my previous years, these were the months that I had exercised the most. Also, experienced the worst wildfire impact in California. The orange pic below is an actual photo I took with no filter
  • November: Went hiking at Lands End. Moved to a new apartment. Celebrated Diwali
  • December: My sister and her family came to visit and I had a lovely time with my nieces. Celebrated my 5th wedding anniversary

Resolutions

Last year, I didn’t really have any resolutions. However, this year, I’m working on a few resolutions that I will share over the coming few months.

Hope

Everyone is hopeful that the world will be back to normal with the vaccines being out. From what I have read, it looks like the world might return to normalcy by summer. Hopefully, that’s the case.

To all the essential and healthcare workers – Thank you!!

Here’s to a new year filled with hope, good health, happiness, and positivity! Cheers! 🎉

reMarkable 2

I am a big fan of handwritten notes. I write down a lot while reading, brain-storming ideas, working on code, working on side projects etc. Naturally, I end up going over a lot of notebooks. I have some at work and some at home. To give you an idea, at work, it takes me around 1.5-2 months to finish an entire notebook. At home, it is usually around 3-4 months. That’s approximately 8-10 notebooks per year.

My biggest problem is storage. I am not a fan of storing these notes long term, since most of the notes are only useful at the time of my brain-storming. I usually store just the pages with notes I like to hang on to and throw away the notebook. I’ve always hated doing that.

I digitize my handwritten notes every now and then to store them permanently. This system has been working out ok for me so far. I was hoping to improve this process.

reMarkable 2

In order to solve this problem, I got the new reMarkable 2. I pre-ordered it in early March and after a lot of waiting, got it mid-October. After using it for two months, here are my thoughts.

reMarkable 2 and its Marker with eraser

What I like

I primarily use if for reading pdfs (love the highlighting and notes feature) and writing notes. What I like about it is that it has a distraction-free setup. The limited browsing access is something I really like. The display is great and the writing experience is just enjoyable. The sound that the marker makes while writing emulates the feel of writing on paper. The marker’s writing latency is just too good. It almost matches the Apple Pencil 2.

Writing experience on reMarkable 2

Also, the fact that it’s just a linux box open with the SSH interface, makes it more appealing to me.

The handwritten notes to text conversion feature in the reMarkable 2 tablet works well. I do have to make some changes to the final text, but that’s more easier than writing everything down again from the scratch.

What I don’t like

The price point of $399 (+ $49 for the pencil) seems high for what it offers and might not be right for everyone. I wish it was around $199. I do feel the marker is a bit heavy, but, it doesn’t bother me too much.

Its feature set is perfect for my usage and that was exactly what I was looking for.

Final Thoughts

I think the reMarkable 2 is a fantastic device and I like it. But, I don’t think it is meant for everyone. If you are like me who likes to write a ton, then it might for the right device for you. If you don’t care about the writing experience or are not bothered by the distractions an iPad ships with, then getting an iPad might be a better option.

10,000 Active Users

My Google Chrome extension, Rearrange Tabs, hit the major milestone of 10,000 active users! I never expected this to happen and it goes without saying that I am elated.

I started the project so that I could move tabs around in the browser without having to use my mouse and to satiate my obsessive compulsiveness to arrange my tabs in a particular order. I decided to open source the code so that other users would benefit from it and maybe even build something better. To my surprise, I saw users contributing back to the project and adding new features, which was really cool. That’s the beauty of Open Source.

5.5 years later, the extension has now reached 10,000 active users. The fact that so many users actively use it and like it, makes me feel good.

Thanks to all the contributors of the project. Cheers to all of you and the extension’s userbase! 🥳 🎉

PIT Score

Starting a new project and not finishing it can be quite a discouraging experience. If it ends up becoming something you tend to do often, you lose the motivation to pursue new ideas and that can be bad.

How many times have you started a project and felt like you should’ve picked another one? What if you have a technique to figure out which idea/project to pick next? You should pick the one that you’re more inclined towards. But, how do you get clarity around this inclination?

It’s extremely important to have clarity on why you want to work on a project, how interested you are, and which technology you want to use. I’ve come up with a technique that I use myself for getting this clarity. It’s simple really.

PIT Score

PIT stands for Purpose Interest Technology. I consider these three as the key factors that provide clarity on which idea to pick next. I’ve tried this technique with a few ideas/projects now and I’m pleased to inform you that it has worked really well.

Who is it for?

  1. Do you enjoy working on side projects in your spare time?
  2. Do you have a lot of ideas that you want to work on, but never get around to?
  3. Do you have trouble prioritizing your ideas?

If you’ve answered “Yes” to the above questions, this technique is for you. Although, it is not entirely just for people that fall in to this category.

How does it work?

The technique itself is fairly straight forward. You assign a certain inclination value for each of the key factors, for each of your ideas and calculate the PIT score of each idea and sort them by the score. Here’s how it is done.

I’ll be using the following list of ideas to explain and demonstrate the technique:

  1. Learn Machine learning
  2. Build a web UI for a CLI tool
  3. Write a fun new game

Step 0: Define inclination values for each factor and assign scores

Each of the key factors i.e. Purpose, Interest, and Technology, need a pre-defined set of values that denote your inclination towards the corresponding idea.

Even though you can update these later, it will be rare.

For Purpose, your inclination values could be:

  • Personal use
  • Learning new technology
  • Help solve a problem for others

For Interest, your inclination values could be:

  • Very interested
  • Interested
  • May be with some external motivation

For Technology, your inclination values could be:

  • Very familiar
  • Sort-of familiar
  • Unfamiliar

These are some examples that I’ve come up with. They can be customized and changed per your needs.

Assign a score to each of these inclination values. You need to be careful with assigning scores since they make or break this technique. You can set up a scale for yourself and assign a score from that scale. In the current example, I’ve used a scale from 1 to 10.

Some example scores are –

Purpose:

NameScore
Personal use10
Acquire new skill5
Help solve a problem for others1

Interest:

NameScore
Very interested10
Interested7
May be with some external motivation2

Technology:

NameScore
Very familiar9
Sort-of familiar6
Unfamiliar2

These are just values that I’ve come up with. These are extremely subjective. So, you’d have to define these values appropriately, according to you. For instance, the scores you’d assign to “Unfamiliar” technology or “Acquire new skill” purpose, might be completely different from the scores I’d assign myself. As you’ll see, these scores play a crucial role in computing the PIT score.

Step 1: Apply PIT values to your ideas

For each of your idea, populate the Purpose inclination, Interest inclination, and Technology inclination values.

IdeaPurposeInterestTechnology
Learn Machine learningAcquire new skillInterestedSort-of familiar
Build a web UI for a CLI toolHelp solve a problem for othersVery interestedUnfamiliar
Write a fun new gamePersonal useInterestedVery familiar

Step 2: Calculate

This is by far the easiest part. You substitute the scores for each of the values and calculate the PIT score of each of your ideas using the following formula:

PITscore = Pscore + Iscore + Tscore

Here’s how the table would look like –

IdeaP scoreI scoreT scorePIT score
Learn Machine learning57618
Build a web UI for a CLI tool110213
Write a fun new game107926

Step 3: Sort

Sort the ideas by the PIT score in descending order. Voila! Your projects are now sorted by a score that provides clarity on which idea you’re most likely to finish once you start. This is due to the inclination you have towards the project or the idea.

IdeaP scoreI scoreT scorePIT score
Write a fun new game107926
Learn Machine learning57618
Build a web UI for a CLI tool110213

This sorted list provides clarity around the friction you’d face in order to start a project.

Higher the PIT score, lower the friction.

As you have probably noticed, even though the interest level is “Very interested” for the project “Build a web UI for a CLI tool”, the PIT score ended up being pretty low. This is due to the fact that the technology is “Unfamiliar” and the purpose is “Help solve a problem for others”, the scores of which are pretty low in the given example. Just by looking at the original list and assuming that you would want to start with that project would’ve been a mistake. On the other hand, “Write a fun new game” has the highest PIT score, even though the interest level is only “Interested”.

A spreadsheet can be a convenient option to maintain this list and the scores. Bonus, use spreadsheet functions to automate the calculation and sorting process. This is what I currently do. Building a simple web page to handle this would be really easy, but, it had a very low PIT score 😉 and so I avoided it.

Important

In order for this technique to work, you need to be careful while picking the scores for the inclination values.

Extensibility

You can extend this technique to add more factors to your ideas, finer-grained inclination values, and better scoring.

Applying this technique to my personal list of projects surfaced a lot more information about my projects. I was happy with the outcome.

Safe way to calculate the mid in a range

Given a range, calculating the mid is a straight forward process.

mid = (low + high) / 2;

But, there’s a problem with this line. Adding two large positive numbers can result in an overflow, if the sum is more than the max positive number.

One way to fix it is to use the following:

mid = low + ((high - low) / 2);

This’ll prevent the expression from overflowing to a negative value. I’ve read this line in random code so many times and wondered why anyone would want to write it this way instead of the simpler and more straight forward way I mentioned in the beginning of this blog. It wasn’t until I read this lovely blog post that I understood the reason behind it.

North

I got an email this morning, with the subject “North + Google” from North. According to the email, Google had acquired them. A quick Google search about the company pleasantly surprised me that it was Thalmic Labs. I didn’t realize Thalmic Labs changed their name to North.

I still remember getting excited when I received one of their very first few devices back when they launched and were still small. It was called Myo armband. It seemed really promising.

I played around with it for a few days and wrote a tiny application to track hand gestures and control my OS with the gestures. It was fun. Then, I got busy with other things and completely forgot about the product and the company. I knew they had potential.

I am quite happy for them and believe that Google will use North’s resources wisely. For me, personally, reading the email reminded me of how much I enjoy working on fun side projects. I am glad that hasn’t changed one bit even today!

FIFA 20

I love Football and I play FIFA 20, especially FIFA Ultimate Team (FUT), a lot. I love the game in spite of the awful patches EA Sports releases to screw up the gameplay often times.

FUT in FIFA is a fun mode where you can build your own club with players from different clubs/nations/leagues. I enjoy curating my team. I tweak around the instructions you can apply to a player and see how the player performs during a match. It’s really fun.

Here’s my current starting XI –

https://www.easports.com/fifa/ultimate-team/web-app/?showoffId=iZTFynS2nTqM1:FFA20PS4

So far, my pack luck has been great this season. I’ve packed Leo (94 rated CL untradable), Cristiano (93 rated CL untradable), Rijkaard (90 tradable Prime Icon) and Kante (89 rated untradable). I’ve managed to pack even Salah (90 rated untradable), Mahrez (89 rated ShapeShifter untradable), Lemar (87 rated FUT Birthday untradable).

Continue reading “FIFA 20”

Decade In Review (2010 – 2019)

Every year, I write a Happy New Year blog post to recap my previous year. I’ve been doing this every year since the past 10 years. It sort of became a tradition. Now that we’ve entered a new decade, I thought it’d be fun to start writing a blog post to recap my previous decade. This will be my first Decade In Review blog post.

My life completely changed in the past decade. I experienced a lot of ups and downs (I lost my Mom 💔). I learned a lot of valuable life lessons. All the difficulties I faced made me a stronger person. It has been a humbling experience. I feel very fortunate and am grateful for that.

Highlights 🎉

  • 👨‍🎓Graduated with a Master’s Degree in Computer Science
  • 👨‍💻Became a professional Software Engineer
  • 🤵 💍 👰Got married

Influences & Inspirations 🙏

Here’s a list of people who’ve influenced or inspired me to be a better version of me in the past decade –

Interesting Trends 📈

  • 🏃‍♂️Increased emphasis on health and fitness
  • 👨‍💻Transitioned into the role of a Senior Software Engineer
  • 📚Picked up the habit of reading books
  • 📝Blogged consistently every year for over 10 years
  • 💻Created and contributed to open source software

Honorable Mentions 🎯

(this weirdly makes me sound like WatchMojo)

Individual Years 📆

Only the past decade –

Then -> Now 👻

Here’s to taking it as it comes in the next decade, cheers! 🍻

Happy New Year 2020

Happy New Year 2020! 🎉

Holy cow! 2019 went by real quick. The theme I chose to go with for 2019 was Consistency. Whatever I did, I just wanted to do it consistently. Leading a disciplined life has always been something that I strived for, but, I never really put in my effort in the right direction. To lead a disciplined life, consistency is the key. Humility also adds a lot of weight to it.

The way I arrived at this decision was completely unexpected and accidental. In January 2019, I decided to come up with a resolution for the rest of the year. In order to do this, I made a big list of things I wanted to do. Then, I prioritized the list of things to figure out which one meant the most to me. I jotted down all the pros and cons of picking up a particular resolution from the list. I put in a lot of thought into this, since, picking up a resolution meant that I had to follow it through for the rest of the year. After a point, all the things I prioritized bubbled up the fact that I needed to be more disciplined about whatever I did.

I mean, by definition, a New Year’s Resolution means

A firm decision made on New Year’s Eve or New Year’s Day to do or refrain from doing something over the course of the coming year

Thus, I ended up discarding all my specific resolutions and sticking with a high-level resolution of being disciplined.

After carefully assessing my year, I feel like I did a decent job at maintaining consistency. I could’ve done better, but, I’m getting there. I’ve at least got the basics down. So, I can use this experience and knowledge to get better in 2020.

Highlights of 2019

→ Started at Adobe.

→ Went on a 3 day 32 mile backpacking hike/camping trip to Havasupai. Hiked to Havasu falls, Mooney falls & Beaver falls. It was an amazing experience. Highly recommend the hike.

Havasu Hike
Me, after finishing the Havasu Hike

→ Built a few fun open source projects.

→ Achieved my personal best at writing the most number of blog posts in a calendar year.

→ Built a sustenance plan in order to stay fit.

That’s about it. Hope you all have a Wonderful and Happy New Year/Decade.

Whiling away time on an International Flight

Location: 41,000 ft in the air

I’m visiting India after 2 years and my first flight is via Dubai. It’s a 14 hour flight and I’ve decided to try something new this time. I usually like to watch movies during my flight. So, I’ve decided to do just that, except, this time, I’m planning on blogging my reviews of all the movies that I watch during the flight.

Let’s see how this one goes.

Uri: The Surgical Strike

Rating: 4 out of 5.

It’s about India’s Surgical Strike. Worth a watch. I liked the screenplay of the movie. I didn’t get bored at any point during the whole movie. On to the next one.

Diego Maradona: A documentary

Rating: 3 out of 5.

This is just a documentary about World Champion, Maradona. Even though the documentary felt very long, it was good. Learned a lot more than I knew about Maradona, especially about Napoli, Italy, and Serie A during the late 80s.

Ad Astra

Rating: 1 out of 5.

Mostly picked this for Brad Pitt. After watching the trailer it seemed interesting and oh boy, I was so wrong. The movie is about how an astronaut learns that his father, another astronaut, is alive, after decades of believing that he died during one of the space missions to Neptune. Even though the idea of the story was fresh and even interesting, the movie itself was pure torture. Hope the next one is a better one.

Aladdin

Rating: 3 out of 5.

As a kid, I grew up watching Disney’s Aladdin cartoon. I liked the movie. Can’t tell if I liked it because it was better than Ad Astra or if I genuinely liked the movie. Either way, I enjoyed it.

At this point, I was really exhausted. I watched way too many movies back-to-back. Thought a little sleep might fix that and did just that. I did watch another movie after waking up.

Angel Has Fallen

Rating: 2 out of 5.

I watched Gerard Butler’s Olympus Has Fallen and London Has Fallen movies. So, picking up Angel Has Fallen seemed like a no brainer. It’s about how his character in the movie is set up and how he overcomes it to prove his innocence. It was okay. It definitely wasn’t a great movie.

That wraps up my first flight. I’ll try to watch the El Classico on my next flight.

I am on my connecting flight now. I guess I have time for another movie.

The Hustle

Rating: 1 out of 5.

I felt like watching a comedy movie and picked The Hustle. It’s about how two con artists meet each other and run a long con. Sadly, the movie was disappointing.

And just as I was done, I landed in Hyderabad!

The most critical feature of Instagram

Instagram is a simple and fun application. The simplicity of the application is what led to its success. It is extremely addictive.

However, its most important feature or lack thereof, is the regram functionality. Instagram doesn’t allow users to just repost the same image from another user natively. The absence of this functionality is just wonderful. Users can definitely install third party apps that support this functionality, but, Instagram doesn’t support it natively.

As a user, your feed is usually pretty clean. There’re no non-sensical memes or random images showing up in your feed. You definitely can subscribe to them, but, you don’t see them unless you specifically subscribe to them.

Personally, I think this is great. It keeps the app very focused and clean.

Dashboard

A while ago, I wanted to build a data aggregation service that’d allow its users to fetch data from a set of data sources defined by them. I wanted to allow the users to configure the data fetch interval for each source. This led to the birth of the Dashboard project.

Dashboard is a data aggregating web application that provides a way to customize and display the aggregated data. It’s an open source project. The code is hosted on GitHub.

Dashboard
Dashboard

Features

  • Webhook support to receive data
  • Fetch data from various sources at different intervals
  • Plugin support to enable extensibility

Use Cases

Dashboard can be used to display any arbitrary updates from various sources. Some specific use cases of Dashboard can be –

  • Keeping track of health of endpoints
  • Display data received from Git hooks
  • Monitor blogs for updates

The possibilities are endless.

Stack

The application backend is written in Go. For this use case, Go fits perfectly well and I really like Go. The current implementation of frontend is in vanilla JS (I feel primitive just saying that 😜). However, I do plan on using Vue or Preact.

For details regarding the future of the project and more, please check out the README file of the project.

Focus

Before I started working on this project, I made sure I focused on 3 things:

  1. Simplicity
  2. Extensibility
  3. Data parsing/display

Every time I took a decision around a particular feature implementation, I went through this list to ensure none of these aspects were sacrificed.

Simplicity: I wanted to make the app very simple to setup, configure, and use. I put in a lot of emphasis on the simplicity of the application. There is no database. The installation is pretty straight forward. Just download the binary file and run it. Thank you, Go!

Extensibility: I made sure to allow users to write their own plugins. These plugins are shareable. Users can display data from whichever source they want to via these plugins.

Data parsing/display: Once we fetch the data from a source, we need to have control over which parts of it we want to display in the UI. The user should be able to display only the data that matters. Right now, this is static. But, I’m working on a solution to allow users to map data.

Development

The project is under development and is still in Alpha stage. I plan on working on it in my free time. Any contribution to the project is welcome.

License

As always, I’ve open sourced the project under the standard MIT license. GitHub: https://github.com/mohnish/dashboard.

Hope you like my project. Feel free to contribute to the project. Cheers! 🍺

WordPress 5.3

After, what seemed like a long wait, WordPress 5.3 is finally here. Right on time. Congratulations to the WordPress team. I just finished upgrading my blog to the latest version of WordPress. I’ve been waiting to try out the final version of the brand new TwentyTwenty theme that ships with the latest version of WordPress.

My blog is currently running the TwentyTwenty theme. There are a few noticeable UI glitches, but, I’m OK with them. I definitely don’t want to switch back to the old theme because of these bugs. I’m sure these will be fixed soon. I haven’t investigated these bugs yet. These could even be caused by any of the plugins I’m using.

Continue reading “WordPress 5.3”

Apple Watch Series 5

Before continuing to read this post, I would like to clarify that this is not an in-depth review of the Series 5 (S5) nor is an actual comparison of Series 5 against a Series 4 (S4). This is more of an observation based on the specs mentioned on Apple Watch’s website.

Most of Apple’s products are amazing. I love my Apple Watch. I watch all of Apple’s product announcements with a great deal of enthusiasm. Naturally, I was really looking forward to yesterday’s Apple event. The introduction video is really impressive.

Continue reading “Apple Watch Series 5”

Goodbye, Google Analytics

Google Analytics

I decided to switch back to using WordPress as my blogging platform this May. At the same time, I also took the decision of removing Google Analytics (GA) from my blog. I wasn’t sure if it was a good idea. So, I thought I’d remove GA for a few months and see if I miss its value.

I used GA primarily to identify which posts attracted the most readers and calculate the bounce rates. After a while, I felt like I didn’t really need this information, since, I wasn’t really doing anything with it. I just wrote about things that I thought were interesting. I was never motivated by my blog’s user engagement, to write about topics I wasn’t interested in.

Continue reading “Goodbye, Google Analytics”

Raspberry Pi 4

A few hours ago, the Raspberry Pi Foundation announced the latest version of their awesome single board computer, Raspberry Pi 4 Model B. I am stoked.

Raspberry Pi 4 Model B board

As shown in the above image, it has dual monitor support at 4K. They switched the power supply to use USB-C and has Bluetooth 5.0 connectivity.

Raspberry Pi 4
Raspberry Pi 4 with dual monitor support at 4K

The new version comes with support for 1GB, 2GB, and 4GB of RAM. That makes it a powerful desktop computer that’s smaller than my phone.

I cannot wait to try this out and work on something fun.

Building a Coffee Pot Monitor using Raspberry Pi

I love coffee and side projects. I wanted to solve a coffee related annoyance that I faced on a regular basis. This post is about how I built a Coffee Pot Monitor, to track the coffee level in a coffee pot, remotely, using a Load Cell, HX711 amplifier, and a Raspberry Pi.

The Annoyance

Imagine yourself being busy with something important. You take a quick break to grab some coffee and walk over to the break room only to find an empty coffee pot.

Oh, the horror

There’s no way for me to know the amount of coffee left in the pot, without walking over to the break room and checking it out. The coffee pots we have at work are opaque. So, it’s not possible to know the amount of coffee left in the pot by looking at it.

Initial Solution

I came up with a solution to my problem. A camera mounted near the coffee pot would stream the video data to a Raspberry Pi. Using Computer Vision on this stream, I can identify when someone uses the coffee pot. When someone pumps the coffee from the pot, my algorithm decreases the coffee level in the coffee pot by a static value (one cup). A dashboard, which can be accessed via a URL, displays this data in realtime.

There’re several drawbacks to this approach. For starters, my algorithm assumes that every person pumps exactly one cup of coffee. Now, consider the case of an empty, opaque coffee pot. A person tries to pump coffee and realizes there’s no coffee left. In this case, my algorithm still decreases the coffee level by a cup even though no coffee is pumped.

To say the least, it is a convoluted approach.

I knew it was a convoluted idea. I wanted to build it anyway.

One fine day, I shared the idea with a friend from work, Rajesh. He liked the thought behind the project and suggested an improvement.

Improved Solution

Rajesh suggested using the coffee pot’s weight to calculate the coffee level. That was it. Suddenly, it became obvious. It’s a great way to track the volume of the coffee in a coffee pot.

The potential of the project got us both excited. We submitted the idea to the quarterly Hackathon at work. Long story short, we won the first prize for our implementation of this idea.

Tools

After some research, it became clear that we needed a Load Cell along with a Hx711 load cell amplifier. I immediately ordered it from Amazon along with the Raspberry Pi 3 B+.

Setup

First, hook up the Load Cell to the HX711 as shown in the image below:

Connecting a Load Cell to a HX711 amplifier
Connecting a Load Cell to a HX711 amplifier

Next, connect the HX711 amplifier to Raspberry Pi as follows:

  • VCC to Raspberry Pi Pin 2 (5V)
  • GND to Raspberry Pi Pin 6 (GND)
  • DT to Raspberry Pi Pin 29 (GPIO 5)
  • SCK to Raspberry Pi Pin 31 (GPIO 6)
Connecting a HX711 to a Raspberry Pi

That finishes our hardware setup. Let’s move on to the software side.

We use the HX711 python library in Raspberry Pi to read the Load Cell data from the Hx711 amplifier. Every three seconds, the Raspberry Pi posts the data to Firebase. A simple static HTML page serves as the dashboard by displaying the realtime data from Firebase.

The build

We need two pieces of wood. One of the pieces, acts as a base to place the coffee pot. The other acts as a stand for the Load Cell. These are placed on either sides of the Load Cell. In my case, a colleague of mine, Vijay, helped with cutting out these two pieces of wood.

  • Top view of the equipment
  • Side view from an angle
  • Load Cell positioned between two wooden planks
  • Load Cell zoomed in
  • Load Cell connected to the HX711 amplifier and Raspberry Pi
  • Another view of the Load Cell

Architecture

Architecture
Data flow from Load Cell to the user’s browser
  1. The Load Cell reads the weight of the coffee pot
  2. HX711 module amplifies the Load Cell data and sends it to Raspberry Pi
  3. Raspberry Pi posts the data to Firebase
  4. Firebase publishes this data to all the clients
  5. The browser displays the updates

How it works

There is a one time setup process. First, weigh the empty pot on the Load Cell. Let this weight be w1 (min). Next, weigh the coffee filled pot on the Load Cell. Let this weight be w2 (max). At any given point of time, the weight of the coffee pot ranges from w1 to w2.

Every time someone pumps (or pours) coffee from the pot, the weight of the coffee pot decreases. This data is published to all the clients using Firebase. It’s as simple as that.

Here’s the final product:

Coffee Pot placed on the wooden platform
Coffee Pot placed on the wooden platform

Here’s an animation of the dashboard getting updated in realtime:

Dashboard getting updated in realtime

Conclusion

The entire cost of setting this up is approx. $45. It’d be great if we could build this at a much lower price. That way, it can be more affordable and practical. I’ll soon open source the code behind the project and provide the GitHub link to the repository.

Featured image courtesy: https://unsplash.com/photos/KixfBEdyp64

Google Fi Review (2019)

Google Fi
Google Fi

After ten years of using AT&T, I switched to Google Fi and here are my thoughts. Before I start my review, here’re some details you might be interested in. I use Google Fi on an unlocked iPhone XS. I knew very well about the limitations before I signed up for the service. So, here is my review of Google Fi on iPhone.

Application

I’ve been a Google Voice (GV) user since the past ten years. I love the service. I’ve used it for my voicemail and for making international calls to India. I liked the voicemail transcription feature too. This is a pretty common feature now, but, GV pioneered it.

Anyway, I was able to sign up for Google Fi online from this page here https://fi.google.com/signup and apply for the SIM card installation kit.

During the application process, you’re presented with the following 3 options:

Sign Up form
Sign Up form

If you select Use another number you own and use your current phone number, you’ll lose your GV number for good. I didn’t want to lose my GV number. So, I canceled the sign up process and logged in to my GV account and transferred my GV phone number to another Google account of mine. Once I did that, I restarted my Google Fi sign up process. Now, the form looked like this:

Sign Up form part 2
Sign Up form part 2

Everything else was pretty straight forward. The SIM card itself is free. It ships in a week or so. Since, I wanted the SIM card ASAP, I chose to go with the $15 expedited shipping option. I got it the very next day.

Activation

Once I got hold of the Google Fi SIM card, I installed the Google Fi app from the iOS App Store. I placed the SIM in my iPhone and opened the app. I was able to follow through the steps and have the service activated within 5 mins. Yep, it was that quick and simple. The app guides you through the process of setting up SMS/MMS/Voicemail on iPhone.

Caveats

In order to check voicemail, you need to check the Google Fi app. The native iOS Phone app doesn’t have access to the voicemails. Personally, this wasn’t a big deal. I never really used AT&T’s voicemail on my iPhone anyway. I always used the GV app to check my voicemail. The only difference now is that I need to check my voicemail in the Google Fi app.

Billing

I am all praise for Google in this section. Google nailed it with the UI. Honestly, I didn’t expect anything less from Google. It is extremely minimalistic and easy to understand your Fi plan. AT&T on the other hand, I had to watch this video to prepare myself before I opened my AT&T account.

Rocky Balboa Inspirational Speech

I had to tap through 5-7 different screens to get any information that made sense to me.

See how clean the UI is? Good job, Google.

International Calling

I absolutely love how Google Fi supports international calling from the United States. This basically renders my GV account useless. All the features of GV that I loved are baked into Google Fi. General information about international calling can be found here: https://fi.google.com/about/international-rates/

Speed Test

I performed a speed test on fast.com and here’re the results for Google Fi LTE

Google Fi LTE speed test results from Fast.com

The results are pretty good. I tried streaming videos (YouTube) and audio (Apple Music) with positive results.

Conclusion

While I’m missing out on the automatic carrier switching feature of Google Fi by using it on an iPhone, I still like the service. So far, the signal reception hasn’t been bad. The data speeds are pretty good. I just hope Google comes up with a solution to make automatic carrier switching work with the iPhones soon.

Working on Side Projects

Working on Side Projects can be really fun. But, you know what’s not fun and sucks? Not finishing the project and abandoning it (also, Global Warming). This is a very common problem and most of us struggle with it.

It gets trickier. Once you lose interest in the project and abandon it, guilt kicks in, as if we don’t have enough issues to deal with already. At this point it becomes really annoying having to fight with your conscience about the abandoned project. You don’t feel like working on it and at the same time you can’t really leave it. It’s just pure bliss at this point. 😇

One fine Sunday afternoon, you gather your thoughts and try to focus on your project and trim it from an ambitious project to a simpler project. You feel good about yourself for having found a way to deal with the problem. That’s when you notice a cool new tool. BAM! Suddenly, you notice all of your efforts and the interest you managed to build up, going down the drain. Can you stop it? No. What do you do instead? Go ahead and try out the cool new tool that’s going to make your life so much more awesome. What about your project? That can wait. You’re confident that you will be able to come back later and finish your project using the cool new tool.

Three months go by and you are finally at a point in your life where you feel confident and comfortable to say goodbye to your project and move on to a new one.

Moving Fast and Breaking Things

In the past, I’ve started a lot of projects and miserably failed to finish them. I even thought of moving fast and breaking things. In reality, that didn’t really work. It’s definitely not because the philosophy is flawed. It’s because my perception of the philosophy was flawed. I’ve realized what I was doing wrong and corrected it over the past few years. I’ve tried a lot of things and didn’t really find anything helpful.

Reasons for Abandoning Projects

After spending a lot of time thinking about why I kept abandoning my projects, I noticed a common theme and was able to compile a list of reasons that made me abandon my side projects.

Lack of Prioritization

Imagine working on a project where you have tasks that are not prioritized. You have no idea which task you’d work on after you finish the current task. It’s hard to continue working on something while not knowing what needs to be worked on next. Also, give yourself enough time. Make sure your deadlines are reasonable. Be extremely honest with yourself when setting up deadlines.

Unfamiliar Tooling/Technology

If you use tools that you’re not familiar with, you spend a lot of time learning to use them. After a few days, you find yourself working on an entirely different project – Learning to use the New Tools. Understand what’s important to you, learning the new tools, or completing the project. I know that these don’t have to be mutually exclusive, but, that’s how it is most of the time. If picking up a new tool is fairly quick, that’s absolutely fine. It’s unlikely that it’d distract you. Or, at least try to minimize introducing too much of new tooling into the project.

Not knowing the value

If you ever try to work on something that you’re not interested in and just think that it might be useful for others, chances are that you might never finish the project. If you truly understand how a project might be of value to you, it’s likely that you’ll stay interested in finishing the project. Your project doesn’t even have to be brand new. It could be something that has been implemented over a hundred times by others. When in doubt, just ask yourself, “Why am I doing this?”.

Perfection

Yep, perfection. Perfection is a major distraction. If it’s a side project and you’re the only one who’s going to be using it initially, don’t aim for perfection early on. This can work against you. Instead, make it an iterative process. This reminds me of the following quote:

If you’re not embarrassed when you ship your first version, you waited too long.

Matt Mullenweg, CEO of WordPress

Also, this is a perfect segue to the next reason for abandoning projects.

Lack of Iterations

If you think of a project as a whole, the project scope becomes too much to handle. Instead, you can build it in several iterations. Ship the Minimum Viable Product (MVP) first. Iterate on it later. Shipping the first version is very important. I do it with all of my projects and it has been very effective.

Lack of context

There have been times when I started a project, worked on it for a few days and stayed away from it for a week or two. When I came back to the project, it felt like I was missing the context from where I left off. So, I started journaling my thoughts regarding the project right after I stopped working on it. The next time I got back to the project, I’d read through my thoughts and pick up from right where I left off, with very little effort. This technique made me stay consistent with my projects.

I’ve struggled staying focused on side projects and abandoned a lot them in the past. Identifying these bottlenecks helped me optimize my process of working on side projects. Before publishing this post, I had all of these reasons as a checklist that I’d go through before starting any side project, as a reminder to be careful with these bottlenecks.

What bottlenecks do you face when working on side projects? Let me know in the comments section below.