free html hit counter
Posted on: Friday, January 27, 2023 by Rajiv Popat

How Learning Touch Typing Can Help You Learn New Skills.

Ever since I started using a computer I've always used three fingers on each hand to type. At 60 to 70 Words Per Minute (WPM), I've always been, what I like to call a self-taught typist with a respectable typing speed.

I always wanted to learn how to type faster and be one with the machine. The keyboard is one ubiquitous way we engage with our machines and our typing speed should not come in the way of expressing our thoughts. This is one reason why I always wanted to touch type and type faster than 100 words per minute.

104wpmscreenshot

Last year I learned how to juggle and described some of the principles of learning anything new using juggling as an example. I also tried to apply those same principles and learned how to touch type. With touch typing, things were a little tricky though.

The most annoying part? If you are at a respectable speed (50/60/70 WPM) using your customized typing style with just two or three fingers, learning how to touch type will set you back when you start and that will be extremely frustrating.

From a learning perspective here is how learning how to touch type is very different than picking up a new skill (say, for example, learning how to juggle):

  1. The Fear Or Unlearning: With touch typing, you have to unlearn what you already know and take a lot of steps backward. The moment you start to touch type, your typing speed will drop like a rock. If you've never done touch typing, the moment you swap your typing style with touch typing and start using something like the typing club, your typing speed will most likely drop, from 50/60/70 WPM to 20 or even 10. That genuinely freaked me out.
  2. No Turning Back: Once I ‘mostly’ started using the right finger on the right key for a few hours, I realized that I was forgetting my old style of typing and my speed had fallen to about 30 WPM. Given that I had started forgetting my old typing style, this meant that there was no going back. I was in this middle place where if I didn't get better at touch typing, I would be stuck with 30 WPM for life! This freaked me out even more. This also meant that, unlike juggling or driving, typing will have to be a skill I learn using an immersive approach rather than a gradual one.
  3. Immersive Learning:  This was different than juggling or learning how to drive where you can just spend 30 to 40 minutes a day to slowly rewire your brain for a couple of months and let those neural pathways get formed naturally. With touch typing, I knew that I could not afford to be unproductive at work for weeks and so if I was not back to my old speeds (or at least respectable ones) over a weekend, come Monday morning and I would resort back to my old typing style. Hence, the need for immersion. I spent more than 25 hours on a single weekend using the new typing style and got back up to about 50/60 WPM over the weekend itself.
  4. The Point Of Doing It Right: When I was back at 60 WPM I took a step back and asked myself, "What did I achieve?" - I mean I wasn't faster than before, so what was the point of spending over 25 hours over the weekend to change my entire typing style? The answer was fatigue. With my earlier typing style, I experienced hand fatigue in just about four to five tests. Now I could do a typing test over a few dozen times and feel zero typing fatigue. Later I did stumble up research which explained why distributing the typing load over ten fingers makes it easier for you to type and why you experience less fatigue.
  5. Switching Gears From Immersive To Gradual Learning - With 60 WPM I was now ready to switch to the new typing style permanently and switch gears to gradual learning to increase my typing speed further. With just 4 to 5 typing tests during breaks everyday, I was on to 70 WPM the next month and 90 WPM in a couple of months. 90 WPM is where I hit a wall but my goal was to hit 100.
  6. The Law Of Diminishing Returns - At 90 WPM I could feel the law of diminishing returns kick in and I had to work extremely hard to gain even a couple of words. Focus on accuracy and spend hours on it, because when you are typing 90+ WPM you cannot afford to correct your mistakes.

    90wpmacuracy
    I had to learn and use shortcuts like CTRL+Backspace to delete the whole word instead of deleting one letter at a time and use other similar shortcuts and techniques and put in hours of practice over the weekend. Finally last weekend I reached a level where I could, for a reasonable number of tests, break the 100 WPM barrier to confidently say that it was not a flook.

The Point? There are two. If you are a programmer or closely work with a computer, you should give touch typing a shot, because you may have your typing style and you may be decently fast, but if you are not using all ten fingers, touch typing helps you type faster with lesser fatigue to your hands which is a good thing in the long term. And second, touch typing will introduce you to some aspects of learning that picking up a new skill like juggling or driving may not teach you.

The new experiences of unlearning, freaking out, adhering to right techniques, believing in the process, immersive learning etc. that you have as you touch type will transition to other learning endeavors that you engage in future. Today, this is where I am:

104wpmstypingspeed

At 104 WPM (my fastest typing test thus far on 10fastfingers), I'm not just better at typing than I was before; I am better at learning new skills than I was before. If you have your very own typing style and you don't use all your fingers, may I suggest you give touch typing a try? It may not make you the fastest typist, but It'll teach you much more than just typing.

posted on Friday, January 27, 2023 10:06:21 AM UTC by Rajiv Popat  #    Comments [0]
Posted on: Friday, November 4, 2022 by Rajiv Popat

Problems Needing Binary Tree Searches Are All Around Us.

The other day someone asked me why I was going through masters curriculum at this age. Their argument:

Most of what you are learning is theoretical and useless. What’s the point of revising data-structures at this point in your life?

Then last week, someone at work was working on a specific problem. In the last release they had 21 check-ins and one of the check-ins had introduced a bug. The team was trying to find which check-in introduced the bug.

To find the erroneous check-in, they were applying each check-in one at a time to the old codebase and then running the application to see if the bug could be reproduced. When I heard that they were doing that I spontaneously responded with:

You’re trying to use linear search algorithms to solve a problem that would be solved much more efficiently and with much less time complexity using a simple binary tree search.

What I meant was that instead of taking each check-in one at a time applying it and then running the code, the team could have just taken the first 11 check-ins together, applied them on the server in a single shot and then tested. Either ways, if the bug was found or not in the first 11 check-ins, we would know if we should look at the left side of the tree or the right side of the tree and with that one attempt, we would have eliminated 10 tests right away. That’s 10 times of applying check-ins, firing a build, running the code and trying to reproduce the bug.

binarytreerealworld


Put simply, you merge 11 check-ins in a single shot and run. If you find the bug, the bug lies in one of the check-ins between check-in 1 to check-in 11 and if you don’t find the bug you know the issue lies with check-in 12 to 20. And then you repeat this process depending on which side of the tree (1-11 or 12-21) the bug lies in. Exactly how the binary tree search algorithm works.

During the times of Covid a collogue of mine had pointed me to an article that showed how you can apply binary tree search to do effective Covid testing and save a bunch of testing kits. It’s the exact same logic. If you have 100 blood samples, mix the first fifty samples and test. If you don’t find Covid in the mixed sample you’ve just saved yourself 50 test kits. If you do find Covid, mix the first 25 samples and do another test. Again, binary tree search.

Of course we don’t hand write code for binary tree search in the real world when we are coding these days. Most modern day languages provide us out of the box search functions which use the most efficient algorithms under the hood.

But that doesn’t mean we can’t see binary tree search as a thought construct. Real world Binary tree search based use-cases exist in our day to day life, and identifying them, helps you solve these problems way faster, even when the problems have nothing to do with writing code. Problems that benefit from binary tree searches, are all around you. The real question is, can you spot them?

Oh and yes, there is a point of revising some of your data structures at any point in your life because that knowledge itself is not as useless or impractical as you might think it is.

posted on Friday, November 4, 2022 9:47:07 AM UTC by Rajiv Popat  #    Comments [0]
Posted on: Thursday, November 3, 2022 by Rajiv Popat

The Art Of Knowing That You Don’t Know.

An old Chinese proverb reads:

He who knows not and knows not that he knows not is a fool, avoid him.

In reality however, most of us, don't know. And we don't know that we don't know. What a professional phycologist would call, “lack of insight”. Putting it colloquially, when it comes to skills and competence, most of us suck. And we don’t know that we suck.

And why do we lack insight about how good we are at most things? Because the neural circuits required to become good at a craft are the exact same circuits required to qualitatively judge how good you are at that craft.

Put simply, if you don't have the brain circuits to draw well, you also lack the neural circuits to help you evaluate just how bad you are at drawing. This also means that if you learn just a little bit of drawing, you start believing you know a lot about drawing and your brain starts to think of yourself as an artist. This happens because with your limited knowledge of drawing, you can only see painting with limited scope of putting the brush to paper and you still don't know the intricacies of the craft.

As you spend years drawing, the nuances of the craft open up to you and for the first time you start realizing the vastness of what you don't know. The irony here? It is only when you become a decently good artist, that you realize that you are a really bad one. In the chart below for example, you don’t reach the “I know nothing about this” realization till you are substantially competent at a craft.

dunningkrugerskillgraphThis is why as people become better at any craft their self rating in that craft keeps coming down. The less you know the craft, the higher you rate yourself in it. The more you know the craft, the more you know what you don’t know and the less you rate yourself.

There is a name for this. It's called the Dunning Kruger effect.

It's why managers with literally no organizational skill, can give you a long lecture on how you should organize your tasks better. It's why CEOs and founders, give coding advice to programmers who have coded for two decades, without blinking an eye or without realizing the inherent underlying irony and humor in the entire situation. It's why the most unproductive guy in the room usually goes around telling everyone how unproductive they are.

The effect may seem funny at one level, but ignore it and it has the potential of ruining companies, relationships, careers and even destroying lives. Its why the movie The Big Short (loosely based on the book which in turn is based on real life housing industry collapse) begins with the caption from Mark Twain:

whatgetsyouintrouble
One way to overcome the Dunning Kruger effect, is to have actively develop insight of how we can all fall prey to the effect. Mindfulness, and simply accepting that the effect is a scientific reality and happens to all of us, is a good starting point.

For example, I had driven for few years in the US; but I recently learned how to drive in the streets of India and after a month of practice, I genuinely started believing I knew everything my driving instructor knew. Then one fine evening, I had to brake a manual stick shift car on a hill slope without using hill assist. That’s when I realize how misguided my evaluation was on how much driving I really knew.

Another approach, is respecting results and payouts. Put simply, don't pass judgements on working styles of people who are more effective than you and particularly those who are paid more than you are in a given field.

The simplest way to start this practice, is by stopping to give commentary on how that expert soccer, baseball or cricket player ‘should have’ hit the ball, next time you are watching a match and they miss scoring.

Then take the concept to your professional life.

For example, stop passing remarks on how your multi-millionaire CEO should run his company and instead try to learn from him on how he runs his company and makes millions.

Working with an expert designer? Don't tell him to change the color of your website to light blue because dark blue just doesn't "feel right" to you. You feel you have a sense of esthetics, but in reality it's just Dunning Kruger effect at play, making you think that you are a designer. You’re not. You know nothing about the science of esthetics. Something your designer has probably read and practiced for years.

Instead, ask questions. Why did he pick dark blue? What was his rational? What basic rules of designing has he used. Practice humility. Learn from him rather than trying to teach him the craft he has already practiced for multiple decades and you know nothing or very little about.

Insight, humility and genuine curiosity are three biggest weapons you have against the Dunning Kruger effect and given how dangerous this effect can be to your professional and personal growth, I suggest you use all three.

posted on Thursday, November 3, 2022 2:12:36 PM UTC by Rajiv Popat  #    Comments [0]
Posted on: Friday, October 28, 2022 by Rajiv Popat

Digital Minimalism: You Decide What’s On Your Phone.

More and more cell phone manufacturer are maximizing their profits at the cost of the customer. Cutting down chargers and cutting down on headphone jacks are two new trends. But one trend that annoys me most is loading of bloatware by the manufacturer. Preloaded software which the users simply cannot uninstall. If you are stuck with a phone where your manufacturer decided that they want to push additional bloatware on your phone because they are giving you a phone at a slightly cheaper price, you have three options:

  1. Live with the bundled apps and services – In which case you have a slightly annoying experience; and in all likelihood whatever little you saved in cash, you will end up paying for with storage, battery life, the control that you have over your own device and your own privacy.
  2. Load a custom ROM if your phone supports it – In which case a lot of apps (banking and otherwise) will crib about your phone being rooted or having a custom rom and you won’t be able to use those.
  3. Debloat your phone with ADB – In which case you get to remove most of the bloatware the manufacturer added to your phone, by tethering it to your laptop and firing the ADB commands from your laptop.

Given the three choices, ABD is a healthy middle ground. The overall process is rather simple.  To start, you turn on developer mode on your phone and enable USB Debugging in your developer options. With that done, you just download the ADB zip file, unzip it, add it to your system PATH, and assuming that you have USB drivers for your phone installed on your machine, you should be all set.

Connect your phone to your computer using a USB cable and you should see it if you fire “ADB devices” on your terminal.

adbdevices

Now that you’re connected, you can literally shell into your phone by using “ADB Shell” and you can see what you have on your phone by doing a “pm list packages”

adbshell

Once you spot the package you want to remove, you can remove packages (even most ones that are bundled by the device manufacturer) using – “pm uninstall -k --user 0 [package-name]” (without the square brackets).

The overall process is really straight forward, but if you don’t like the idea of firing these commands manually, turns out, there is also an Open Source UI based Debloater that does exactly this using a simple intuitive UI.

adbdebloater

The Universal Android Debloater actually gives you suggestions regarding which cryptic app-name maps to exactly what features on your phone, so you know what you are removing.

It also recommends removal of certain apps and services, which I like to review closely before removing. And then, I typically switch to unlisted categories, search everything by the name of manufacturer, review which one of those services I don’t need, and get rid of them. No, I don’t think anyone needs a proprietary app-store just to make their phone manufacturers feel better. Most folks, will be surprised by the level of telemetry and tracking software these manufacturer are installing on your device. All of this, comes at the price – shorter battery life, storage, overall sluggishness of your phone and your privacy. If you go through a typical list you’ll be surprised to see the kind of crap some manufacturers pre-load on their devices. The debloater should allow you to get rid of most of this stuff.

Milage might vary, depending on what and how much you remove, but I typically notice anywhere between 500 megs to 1 GB of storage reclaimed, battery life shoots up dramatically and the phone is a lot more responsive.

Now a days I’m comfortable with it enough to actually strip out launchers that the manufacturers provide completely off the phone and install something like Niagara Launcher. You can install any light weight minimalist launcher of your choice.

Some folks go extreme and strip out everything, including play store and google services to turn their android phone into a dumb-phone with limited pre-installed apps that they need. Folks have claimed to get a week of battery life with extreme Debloating. But like I said, milage will vary.

For me, I do a conservative de-bloat and just remove the things I don’t need. My phone goes from a day of battery life to around a day and a half. That’s still 50% battery gain, around a gig of extra space and a snappier phone in general which is slightly more private. But what’s most satisfying, is the power to decide what apps are loaded and run on the device.

Like all good things, de-bloating comes with it’s risks that mostly revolve around overdoing it, so always backup your data before you start. That way if you remove something you actually need or mess up something, you can reset your phone. What you remove, comes back on factory reset since the actual installers in android reside on a dedicated system partition. That is what makes de-bloating slightly safer than dumping a custom rom. This also means once you reset your phone and restore your data you can be exactly where you were before you started de-bloating.

If you are still using apps forced on you by your manufacturer, being made to see ads on a phone you bought with your own money or simply want a lighter snappier minimalist version of your phone without rooting it or loading a custom rom, de-bloating your android phone might a relatively safer option. Go give it a try.

posted on Friday, October 28, 2022 2:52:10 PM UTC by Rajiv Popat  #    Comments [0]
Posted on: Friday, October 21, 2022 by Rajiv Popat

The Fallacy Of Being Independent.

Overheard someone say this on a call in a café:

Why should be depend on or work with them? As a team we’re not dependent on other teams!

Even at an individual level, the Idea of a ‘self made man’ (or woman) seems to be catching on. Men and women hold their head highs when they proudly proclaim:

I’m not dependent on anyone! I don’t like depending on others. In my entire life, I’ve not taken any favors from anyone.

Even though these statements provide a sense of accomplishment, the fallacy in the idea, lies in evolution.

A few million years ago, when we were nomads, much like elephants or monkeys, we sapiens, lived and moved in herds.

groupofmonkeyseating

And for some reason, if you were ousted or out-casted from your tribe and the herd moved on without you, no matter how powerful you were, you would, in all certainty, be lion lunch within a day. Your chance, of surviving in the wild for more than a week, without ‘depending’ on others in the herd was minuscule at best.

Everyone understood the significance of being dependent on others in the herd, we acknowledged that dependence and we reciprocated by acting out our responsibilities and respecting the older and more powerful alphas in the group. In return for the protection they provided us, we provided them with respect, support and our protection; the interdependence loop was closed and we made it thus far in-spite of having rather weak bodies compared to any other predators in the wild.

Then came in modern media – with stories of self made men and women who don’t take favors from others and are not dependent on others. The stories gave us a dopamine spike and soon, we became echo chambers for those messages.

Dependence on each other is what fundamentally defines any relationship; be it personal or professional. I’m a programmer, you depend on me for code and in return I depend on you for my very survival and food. If we work in a team or are in a personal relationship, the dependence on each other is even higher.

If your claim to fame is that you’re ‘self made’ and that you’ve never been dependent on anyone; well, let me just say that if your ancestors in the savannahs thought like you do, you wouldn’t even have existed to have that chain of thought.

Celebrate dependence. Ask for favors. Be shameless about how dependent you are on your loved ones, your team, your company, your clients and everyone around you. And then, reciprocate. Because without interdependence, we never stood a chance. We still don’t.

posted on Friday, October 21, 2022 10:44:23 AM UTC by Rajiv Popat  #    Comments [0]
Posted on: Wednesday, October 19, 2022 by Rajiv Popat

The Art Of Working With Constraints.

Why should I limit my blog post size to a page? Why should my YouTube video be a specific duration? Most mainstream arguments in favor of constraints are wrong. "You should limit your post to one page because after that, people's attention span starts to dwindle" - wrong.

There are many bloggers who write long-winded articles which people love reading. Anyone who says that YouTube videos should not be more than 15 minutes because people have short attention spans, needs to see a lengthy Joe Rogan podcast or a Andrew Huberman’s podcast.

HubermanDuration

You never use constraints to help your audience. As an artist you use constraints to help yourself.

A 12-minute TED video is not 12 minutes because the TED audience is not intelligent enough to hold their attention span for more than 12 minutes. That time constraint is not to help the audience. It is to help the speaker. It helps the speaker compress years of insights into 12-minutes, forcing them to leave out the non-essentials, get rid of stuff that doesn't matter and focus on the core idea ensuring that the video is content rich and power packed. As Antoine de Saint-Exupéry, the author of The Little Prince, says:

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.

If you are sketching, the lack of colors in your art is an opportunity to express your art in shades. If you are writing, a constraint on word count "frees" you to say more with less.

Cooking? A constraint of a vegan, oil less diet is not just to make your dishes healthier. It's to force you think creatively and make dishes tastier.

Working on a project? The constraint of timeboxing is not just for speed. It's for killing procrastination and shipping better quality.

Self-imposed constraints sound limiting for artistic endeavors, but once you embrace them and see them as a creative tool rather than limitations, your art changes. Your outlook changes. Everything changes.

(This post is less than 2000 characters).

posted on Wednesday, October 19, 2022 6:54:29 AM UTC by Rajiv Popat  #    Comments [0]
Posted on: Thursday, August 4, 2022 by Rajiv Popat

Making Neovim Work Like Visual Studio Code On Windows

I did a video on configuring Neovim on Linux to make it work like Visual Studio while doing .NET development. You know, intellisense, that nifty break point based debugging, the code refactoring options and everything else that you get with Visual Studio or Visual Studio Code, but only with Neovim on Linux.

My point? The OS space and the IDE space has been democratized. It’s a level playing field between companies and developers now have complete choice. Like vim or neovim for than Visual Studio? You don’t ‘have to’ use Visual Studio to do .NET Development. When that happens everyone wins, because having the freedom to choose, is a good thing.

Some folks who saw that video remarked that they love the idea of using neovim as a powerful IDE but aren’t ready to switch the OS and move completely to Linux yet. Like I said, the OS space is democratized. So if you want to mix and match and do .NET development on Neovim and still use Windows as your operating system, power to you. This post will give you some pointers in that direction.

You start by installing Neovim on Windows from here.

Like Linux you now have package managers in windows. Neovim is available both on chocolatey and winget  so whatever package manager rocks your boat, you should be able to install neovim using a single command. Instructions here.

Unlike Linux, the neovim initialization file in windows is @ C:\ Users\ [Your_User_Name_Here]\ AppData \Local \nvim \ init.vim (without the spaces).

The file for my configuration on windows 11 is here. You can download it, tweak it and place it in the folder above to quickly configure your neovim. Don’t forget to do a “:PlugInstall” to install all the plugins configured in the file automatically.

I’ll not cover the different components you need for .NET development on Nvim. This video already covers that. Let’s just focus on the changes when it comes to windows.

You’ll probably need to install python for Nvim for some of the plugins to work. You do that by installing python, pip and then doing:

pip install neovim

Once you do that, most plugins that depend on python should work.

Strangely enough, unlike Linux, McAfee on windows sees FZF as a virus and blocks it. I let the guys at FZF know, turns out they have worked on getting this whitelisted, but McAfee continues it’s little quirks; so your milage might vary. For me McAfee still has an issue and because my organization enforces McAfee, I had to move to ctrlp for searching files. The overall idea is the same, Fuzzy search for file names.

Then, I had to strip out Ag, because there seems to be no support for Ag on windows. The documentation for using Ag in windows is practically non-existent. So fuzzy search inside files is a problem and doing “search in entire solution” (like I often do in visual studio) is hard. We have to tackle this separately using something else. Enter Ack.

The plugin installation for Ack is here and the ack installation is here. The URLs have detailed instructions on how to install for windows. You have to install Perl for this to work if you don’t have that already. Once the Ack Plugin is installed you should be able to Fuzzy search contents inside all files in your current folder or solution by doing Ack [search_term]. For example below I am doing a search on the word manger inside my entire codebase using

:Ack manager

I see the line items (with files names) where the search item was found and I can navigate to each of the search result by using my arrow keys and preview it using enter / return key.

acksearch

So far if you’ve followed my entire series of videos on this topic and used my configuration file you should be able to write .NET code on neovim inside of windows. You should have full intellisense, code refactoring options like you have in visual studio, fuzzy logic based file navigation, fuzzy file search and even debugging.

Oh, and don’t forget to get a nice nerd font with ligatures to make that console and your Neovim based IDE prettier.

Again, if you haven’t seen the full video series on dotnet developing using neovim, I highly recommend you watch that here. Rest of the steps for setting up neovim as the IDE for .NET are the same in windows even though the videos use Linux.

With just the tiny tweaks described in this post .NET Development using Neovim pretty much works, even on Windows. All the richness of C#, familiarity of Windows and the productivity of Neovim. Enjoy.

posted on Thursday, August 4, 2022 3:14:25 PM UTC by Rajiv Popat  #    Comments [0]
Posted on: Sunday, June 13, 2021 by Rajiv Popat

An Open Source Vaccine Tracker For CoWin In India.

The Indian government recently rolled out an excellently made website for scheduling vaccines for all Indians. However a lot of private hospitals are following irregular or different times during which they open slots and because of the demand of vaccines the slots often fill up literally in seconds of opening up.

Today if you are looking for slots manually you are at a huge disadvantage compared to folks who might have automated the process.

Here is a quick python script we wrote to continuously poll co-win servers every x seconds and play a music file on your disk as soon as a slot meeting the criteria is found.

thousandtyonecowintracker

I know a lot of bots are available in telegram but most of them are closed source and by the time they notify you, it’s often already too late. This is open source, free, can run on your laptop / desktop (anything that runs python and play sound files, like a raspberry pi, technically should be able to run this), can be configured to run on parameters you like and can notify you instantly by playing music of your choice.

The Github URL contains the script source, Installation Instructions and documentation on all the variables you can customize.

Hope this makes tracking and scheduling vaccines that much easier.

Genuine thanks to the Indian government and Co-win team for keeping the API’s not just open, but easy to understand and really clean so that writing scripts like this one becomes possible.

posted on Sunday, June 13, 2021 6:53:51 PM UTC by Rajiv Popat  #    Comments [0]