Category Archives: Uncategorized

Intentional Learning

I was going through my phone’s gallery when I spotted a photo of Izma from The Emperor’s New Groove. It took me by surprise, because I discovered the movie just this year and was absolutely in love with it, especially the Izma character. But the image in my phone’s gallery was from 2018 in the form of a meme. Weird internet stuff. Anyway, I digress. So what are we talking about today.

Ah yes, intentional learning.

Growing up, we all have natural interests. Be it art, science, music or dance, or computers (sigh..). We are motivated to learn new things around our interests. And from time to time, we discover new interests. School is interesting in that regard. You’re thrown in between a bunch of other kids with completely different and random interests, and there’s osmosis of interests happening when we see that other kid in the class drawing something or reading a book about the solar system or they see us playing a new game or so.

But that diversity of interests decreases once we enter university. The people we’re with have chosen a similar course and chances are that they had a similar set of interests. There’s still a fair bit of interesting diversity, and it is still possible to meet people from courses other than ours and see what life outside is like.

But for me the biggest difference was getting out of university and starting full time work. Many small to medium sized workplaces hire people of specific types depending on their culture and/or domain, understandably so. Many are open to diversity of thoughts and ideas, but of course not too open so as to not destroy the culture that they’re trying to cultivate in the first place (which, of course, is important but to what extent is a separate discussion in itself). What happens then is that we end up in bubbles of people with similar interests as us.

Of course, like with many things, this isn’t a black or white, good or bad situation. On the bright side, our spiked growth (say a particular hard skill we’re trying to hone) in a field can really skyrocket when surrounded by the right people and mentors. That of course has a very positive impact on our careers and professional growth.

But what I found lacking was exposure to experiences, interests and hobbies that were far outside of my bubble. And since I wasn’t exposing myself to interests and hobbies outside of the ones that already existed, I was also not meeting people who had these drastically different interests or hobbies (or opinions, for that matter).

For this very reason, I am trying intentional learning. The basic premise is very simple. Find a new skill, hobby or interest and just learn to get good enough, what ever that means, but not perfect. So far this year, I’ve worked on my Chess skills, learned some German, learned a couple of songs on Ukulele, tried my hands on sketching and painting and picking up some photography basics now. Of course, the goal is not to become proficient or professional in any capacity, but just experience the joy of being a complete novice in a new field and seeing how far I can take it.

The side effect is that the curiosity and learning muscles stays in good shape for when one has to learn something new (which proved to be useful when studying for a certification exam recently). The other side effect is becoming more conversationally accessible to a wider part of the population, sharing interests with more and more people. Yet another side effect is that it makes one more empathetic and open minded. Playing chess isn’t any more worthy than making memes or playing guitar or learning programming. Sure, some skills are valued more in the world we live in due to a multitude of reasons, but it takes effort to build any skill and as such nothing can and should be dismissed as unimportant or unworthy of pursuing.

The real joy, however, is in the process of learning; going from not being able to do something to being able to, building muscle memory, watching amateur and pro videos of people doing it on YouTube and being able to talk to someone or join communities with the same interest.

And instead of looking at people who’ve honed that skill their whole life and getting sad that you’ll never reach there, find joy in the fact that you can instead get good enough at it and then move on to hundreds of new skills and hobbies, getting a taste of the different ways to be alive, to exist. You’ll also retain this phase of your interest in your memories, which will feel nostalgic when long time from today you encounter this skill or hobby in some form or the other or meet someone embarking on their journey into it.

In closing

I hope that was interesting to read and motivates a few of you to pick up some random new hobbies or learn something totally different, unrelated to your work or life and see how it goes. I am convinced it has some real merits over the demerits. From my perspective, the biggest demerit is that we end up spreading too thin over a bunch of thing, while not mastering anything. Personally, I’m okay with that right now. But depending on where you stand, it may or may not be. But having said that, it isn’t black or white and leaves a lot of room in the middle to play around and see what works best.

Thank you for reading. Following is a personal message unrelated to the article.

I took a long break from writing, but it is good to write something again. If you visited this website in the last four months anticipating a new post, apologies for the delay and thank you for being a super-reader of my blog. Until next time!

Guide To A Sane WordPress Workflow

Like most things in life, WordPress isn’t perfect. But for a publishing platform, it is quite up there with the best in the business. For writing, I haven’t had any complaints so far, but when it came to customization or workflows around maintaining a theme, I was a little lost.

To me it somehow felt very liberating and restricting at the same time. Liberating, because of the ecosystem; themes, plugins, hosting platforms, tons of helpful resources and support. Restricting, if and when you want to build a custom theme and don’t speak much PHP, general added complexity compared to a static site generator, having to deal with hosting providers, updates and added maintenance work.

But depending on the requirements, WordPress might actually make a lot of sense as a publishing platform (well, of course. It powers 40% of the web). My blog used to be hosted on Github Pages with Jekyll as the site generator until I made the switch to WordPress a couple of months ago. What I did struggle with was finding a setup that offered a smooth workflow around managing a custom theme with self hosted WordPress instance.

This article is an attempt at fixing that and aggregating some useful tips. I’ll try to cover the following:

  • A self hosted WordPress website that’s affordable yet stable
  • Continuous deployment pipeline for custom themes
  • Backups that are reliable
  • CDN and caching
  • Securing the website

Let’s get started.

Platform setup

I decided to go with AWS Lightsail one click WordPress install. You’ll find more information on the Bitnami WordPress page about the stack. It is lightweight and runs perfectly fine on a 512MB RAM / 1vCPU instance. Once behind a CDN and page cache, the website can handle a fair number of visitors.

Continuous Deployment (CD) pipeline (optional: Continuous Integration)

This step assumes you have a custom WordPress theme or source code of a theme available on a GitHub repository. You only need to follow this step if you think you’ll be making frequent changes to your theme files and would like to have a pipeline for the automatic deploy of the theme (say, for example, when you commit a change to the master branch of your repository). Alternatively, you can always create a zip file of the theme and upload it manually via the WordPress admin panel if you prefer to keep things simple.

Assuming you have a theme hosted on GitHub, you’ll need to make use of Travis CI to build your code (if there’s any CSS or JS that needs to be transpiled), test it (if there are any checks) and then upload the files to the AWS LightSail instance using secure copy (scp). Following are some resources to help you get started.

Backups

For backups, I’m using a couple of strategies but I think either one should suffice for my usecase.

AWS Lightsail snapshots

I’d recommend enabling automatic daily snapshots of your instance in AWS Lightsail. So if things go very south, you will lose 1 day’s worth of data at most. Since my blog’s content is rarely updated, this means this works near perfectly.

WPVivid WordPress plugin

WPVivid is a nice plugin that offers more precise backups, meaning you can choose to backup just your database, or files, or both. It also has cron functionality and offer 12 hourly backups (more frequent if you’re a paying customer). WPVivid allows you to transfer the backups to Google Drive, AWS S3, Dropbox among many other third party providers.

Server health monitoring and alerts

I’m using New Relic to monitor the health of the WordPress instance. It isn’t necessary as AWS Lighsail already comes with basic dashboards for monitoring CPU performance and burst usage (giving a rough idea about whether the server is sweating under load), but if you’d like to go a bit fancy with the whole monitoring thing and set up alerts for throughput, error rate etc, New Relic is quite good.

New Relic really shines at showing you the external services your instance is talking to, database operations and the CPU usage share per plugin that you have installed on your WordPress website. That information can help you debug any services / plugins that are slowing down your website or doing something strange behind your back.

AWS metrics
Metrics in AWS Lightsail
Metrics in New Relic
Metrics in New Relic

Both AWS Lightsail alerts and New Relic alerts support multiple channels, so feel free to use SMS, email, Slack or whatever your preferred way of getting alerted is.

CDN and Caching

My go-to CDN for any personal website is Cloudflare and that is what I’m using here. I didn’t have any problems with the admin interface behind the CDN and all seems to work very well. I have a page rule that overwrites cache control headers from WordPress and forces everything under /wp-content/* to be cached.

For page caching, I’m using a plugin called WP Total Cache. It was the most popular performance optimization plugin and was recommended to me. It has a “Page Cache” option which needs to be enabled and set to use disk as cache store.

Security

To secure the Lightsail instance, I’m following some basic good practices and a plugin to help me set up some blocking rules.

  1. Lightsail instance is as close to stock as possible making sure there are no random packages installed from my side on the instance.
  2. Disable port 80, and if you’re using a reverse proxy CDN like Cloudflare, only allow Cloudflare IPs to your origin server.
  3. As with Lightsail, WordPress installation should be close to stock with minimal plugins.
  4. Wordfence WordPress plugin for
    1. 2FA authentication
    2. Banning incorrect login attempts, or login attempts using generic usernames like admin, administrator or root.
    3. reCAPTCHA on the login page (you’ll need API keys from Google)
    4. Disable xmlrpc if you’re not planning on using apps. Enable 2FA on it, or disable login via xmlrpc.
    5. Go through all the options that Wordfence has to offer and use whatever makes sense for your use case. I found them to be quite useful and intuitive.
  5. In general, keep stuff up to date.

Conclusion

That’s it for this article. If you have any questions or suggestions, please feel free to write to me. Thank you for reading.

The Best Time Of Your Life Is Right Now

Humans are fragile creatures. The illusion of stability and control we have in our lives is comical. Our mind seems to have mastered the art of separating itself from the world events. We almost know it. It is hard not to if you spend any time on internet social medias or any form of conventional news sources. Unfortunate things happen, lives end or get ruined for reasons so trivial that’d make you not want to believe it.

Yet, when it comes to our own lives, we’re fairly certain about our timelines. There’s career, that promotion, getting a house, getting married and so on. There’s always the end of life to be content with what we have; be grateful. Now’s the time to be at unrest, to complain and wish for more, to hustle. And not like it is our fault. The society is truly designed to make you feel exactly this way, discontent at every single stage of your life. Get good grades or you’d not get into a good university, study hard or you’d not have a good job, work harder or you’d not get that promotion, don’t plateau in your career or you’d not be able to afford a house, keep working to be able to enjoy a happy retirement and so on.

And what if you’re still not able to enjoy your life finally at 65? Oh those are just the guidelines, too bad it didn’t work out for you. Guess what, it is called 1% for a reason. Try again in the next one. And of course, thank you for your participation in the rat race.

So, what’s my point?

The point that I’m trying to make is that if something is important enough to you, do it without waiting for some special phase of life to come by. No one knows how tomorrow will look like. If this entire pandemic has taught us anything, it is that we have no control over the future, not tomorrow and much less months or years in the future. The present is the only thing we have for certain, so why not make the best of it; by treating it like it is the peak of our health, wealth, social skills and so on.

And how do we do that?

By being grateful for what we have. It is only when we consciously  recognize how lucky we are to have all the things that we do, do we start valuing it. Being able to move around on your own, see, hear, talk, travel, read, write, meet friends, drink coffee, enjoy a sunset or snow; little things that many people might not have the good fortune to experience.

The world is like a nasty slot machine. Luck plays a huge role in almost everything we do, and it starts right at the moment you’re born. We are the product of our circumstances. There’s not much we can do about that, except that we recognize our privileges and act accordingly. Have a chance to do something good for someone? Do it. Realize your actions might’ve caused hurt? Apologize. Have people that pull you back? Filter.

Time really is the only real currency that we have. While it does seem like a tragedy to not know how much more of it do we have left, I think it is a blessing in disguise. Think of the last time you had a deadline for an assignment. Did you wait for the very last moment to do it? If you’re like most people then probably yes. That’s probably what would happen if we knew exactly how long we have to live. We would procrastinate everything until the last moment, wasting away most of it. Fortunately for us, we don’t, and each day can be lived as if it is the deadline for that life’s assignment, doing the things that matter the most to us.

So to summarize, there probably will never be a better time to do certain things, and that’s if you’re lucky to live a full life without many problems. If you’re in your teenage years, you probably have the time to learn something thoroughly, spend time with friends and family, have fun, see clearly if you’re into that. If you’re in your twenties, you have the best balance between intelligence, energy, time and maybe some money too. Later in life you get better with relationships, your emotional intelligence grows and the life experiences you accumulate make you wiser while you’re getting rusty physically. Basically, we live through different interpretations of ‘peak’ throughout our lives, and there’s no one big peak that’s going to solve all your problems and make you happy.

So make the most of your now; make memes, draw comics, write code, learn music, dance, sing, make someone’s day, be vulnerable, be nice, prioritize yourself, talk to random strangers and share stories, gift without a reason, sleep, cry, hug, do whatever you have to. But make your now count.

Thank you for reading!

Life Goes Full Circle – Blog Back To WordPress

Happy new year all!

We’re finally out of 2020, yaay! It has been, for lack of a better word, an interesting year. Not intending on becoming Abhi News Network, I’ll spare you from having to read about the events of the past year for the thousandth time. Like many people, I realized my full nerd potential and learned how to live indoors for weeks at a time. I also unlocked a new hobby, Chess. Some other things like traveling and in-person events definitely took a backseat but can’t do much about that.

This short post is about moving this blog back to WordPress. I say back, but the fact is that this website was never on WordPress. I started this blog on ghost.org back in early 2014, but had to quickly move it away from there in spite of absolutely loving Ghost (mostly because of the $5/month fees). Next up was Blogger before finally settling on GitHub Pages which, by the way, if you’re just starting out with blogging and can find your way around git on a terminal, you should give a try. Now, feeling the need for a much more elaborate CMS, I’ve migrated to WordPress running on AWS Lightsail. It does cost money, but this time I can afford it.

Before this blog existed, I used to write on WordPress on an older blog. That feels like an eternity ago, which it was in internet time. I used to write about latest smartphones and compare them against each other (nothing that actually needed to be done by hand, now that I think about it; 8mp vs 5mp camera, 1gb vs 2gb ram and so on). I would walk into Samsung stores and try to make ‘hands-on’ videos of their latest phones. I can’t imagine doing that today, mostly because of how much the smartphone industry has expanded since 2012-13. Also because it doesn’t interest me anymore.

With WordPress, I hope to be able to write on the go using nothing more than just a browser. “On the go” might take some more time to become a normal everyday phrase again, but when that happens, I’ll be ready with my Thinkpad and a backpack. To not need a text editor to write Markdown/HTML, terminal to commit and push, and to see previews without a developer server would be very liberating. I’m excited about this future.

I’ll end this article with a nice picture I took today. Hope you enjoy looking at it as much as I did looking at Stitch in my house today.

Thank you for reading!

A Tale Of Internet Speeds

Similar to the last two articles, this one is about the little improvements I’m making to my workstation. So far, I got a gaming mouse and a mechanical keyboard, a nice desk pad and a 24in full HD monitor from Dell to add to my existing setup (while we’re at it, do checkout my setup page here).

For this one, I’ll be talking about internet speed, and the upgrade associated with it. This upgrade is special in more than one way and hence, I want to go into a bit of history, my history with internet bandwidth.

Ever since adolescence, internet has been a basic necessity for me and the people from my age group (even before it becoming a source of livelihood for many of us). One of my first memories of the internet is this screen:

I distinctly remember this from my first computer*, an HP desktop PC with a Pentium Dual Core processor and 1 GB RAM, since it also had 100Mbps LAN card. Not knowing the difference between hardware capabilities and internet bandwidth, I naively assumed that when I get a broadband connection, that’s the speed I’ll see. But little did I know it would take more than a decade to reach this milestone.

*which practically didn’t exist by the time I started writing on this blog, and as a result there’s very little, if any, mention of my first computer here.

Life at 10KB/s

Back in those days, in around 2008-2009, we didn’t have broadband at home. My PC was barely 6 months old and I had realized that there’s only so much GTA Vice City one can play and be entertained.

My dad had this Nokia Expressmusic 5310 phone that supported Edge network, so slightly faster 2G. I figured out that if I can get internet on that phone, I could use the CD that came it to tether internet to my PC. I remember it was INR 98 or 99 for unlimited 2G data then.

It worked, but the speeds were really miserable. On a good day, keeping the phone on the window sill, I would get around 10KB/s or 80kbps which is close to the promised speed of 16.8KB/s or 135kbps. At those speeds, speed test websites like speedtest.net just don’t load, much less show you your network speeds. Facebook, which people used back then, took more than a couple of minutes, literally, to load. Needless to say, Youtubing or any sort of video streaming was out of question.

Even download small files, like a couple of megabytes, was a challenge, and I would almost never download directly using the browser. I would always use the fancy bloated download managers which supported resume functionality and parallel connections (not like it made a difference, but who knew).

I was on Windows XP, no firewall or antivirus software, downloading these shady browser plugin and download mangers. Those were the wild days!

Nmap download adventure

One incident worth mentioning is the download of Nmap, a network scanning tool. It was around 15MB in size, and believe it or not, it took me many months worth of trying to finally download it. The download would always fail and no download manager helped. But when it finally did, my joy knew no bounds and it genuinely made me happy. It is a bit weird that I still remember it so vividly, but it was special in a way.

So anyway, the struggle continued for a while. For the next couple of years I would ask friends or my aunt to download me anything that was more than 20MB in size.

Emergence of broadband

I finally got a broadband connection. It was a 2Mbps connection capped to 1GB of data. 1 whole gigabyte of data for the whole month. It definitely improved things a bit, but on the whole it was still painful. Now the internet was fast enough to watch a Youtube video in 720p. But if I did, that’d pretty much be the only thing I did that month.

I ‘upgraded’ to a 512Kbps unlimited connection which was a lot better. This was, in fact, my first real broadband. Usable, and unlimited. 65 kilobytes a second isn’t bad, especially for browsing the web or download a GB or two of data overnight. That also started this whole phase of my life when night time was download time. I remember the disappointment I used to have after checking the download progress first thing in the morning and realizing the download failed halfway through.

But yes, the internet was within reach.

Real broadband speeds

I changed ISP a couple of years later as the first one was too bad in terms of service, and got a local one with Google and torrent peering. Basically, any website owned by google would work at higher speed, which would typically be around a couple of MB/s. Even speeds of up to 40mbps weren’t unheard of, as long as you’re able to find it on a Google service. This same ISP later upgraded my connection to some 8mbps for free.

That was my first time breaking the 1MB/s barrier. Major achievement.

The upgrades after this were incremental, if I’m being honest. I think I was at 25mbps by the time I left for Germany. After settling down here in Germany, I opted for a 50Mbps link. 50Mbps is exactly like 16Mbps for 90% of the time (unless of course you’re downloading stuff in a hurry).

So in that sense, I already knew that going 100Mbps isn’t going to bring any meaningful change to most of my surfing habits. But it does feel like a big change, psychologically. Remember that image from before, the one which says 100Mbps speed on the LAN interface status page? I’ve finally maxed that out, a little over 11 years later.

My 13 year old self might find it unimaginable to think of what a 12MB/s broadband connection feels like, which is a bit of a jump from his humble 10KB/s flaky dial-up connection tethered off a 2G mobile phone.

Edit – 31/07/22

I moved into a new flat that supposedly has a gigabit internet connection. I’m getting 500+ mbps speeds consistently which is unbelievable. I also got a phone that supports 5G which also pulls data at rates upwards of 500 mbps. I’m living the dream!

In closing

I’ve mentioned this a few times before, but I’ll do it again. Adulting, getting a job and living on your own has little meaning to it if you don’t realize those childhood dreams, which for me is overkilling on tech stuff and buying 8 year old laptops off ebay.

Having said that, I might actually make use of the bump in upload speed, which does bottleneck my offsite backup plans. Stay tuned for updates on that front. Also, downloading ISOs and doing system updates are a delight these days.

Finally, I’d probably never feel the same level of joy that I felt on getting a real broadband after years of doing sub-10KB/s on mobile data. But that makes me think of all the things that I’m getting started on, my professional career, a new language that I’m learning, Chess, or anything that I’m a newbie at. With each passing milestone, the next one becomes a little less exciting. Keeping that in mind, I should try to celebrate any incremental progress that I make in any of these things. That was just a long way of saying that the journey matters more than the goal.

Thank you for reading!

Chess – Basics

So recently I got interested in Chess, and by recently I mean 6 months ago. I learned some important beginner’s lessons along the way and I planned to document them in non-technical language in this article.

I’m assuming you know the very basics, like how the pieces move and what castling is, which is exactly how much chess I knew when I started. If not, go outside (on the internet) and learn the basics. Then create an account on lichess.org or chess.com and play around 10 games with other people. Then come back to this article.

So assuming that we’re on the same page, let’s start!

Stages of the game

A chess game can be visualized to happen in three stages; Conveniently–start, mid and end game. You can be mindful of what stage the game is in as there are certain things you can do in each stage to give yourself a slight edge in the game.

When you start, you try to develop the pieces as quickly as possible and castle. That means all pieces are ready to jump into action; whether attack or defence, and your king’s safety is ensured.

Midgame, depending on your position, you exchange pieces and try to get a better position. Make sure you’re either up material (pieces or pawns), or you have a better hold of the position and control more space on the board.

Endgame is when both sides go all out using whatever positional advantages they’ve created previously. It is also common for endgames to just have king and pawns, maybe a minor piece as well. In this case, both sides try to push their pawns and promote them to Queens (or any other piece but usually the Queen, and the first side to do it usually wins).

Pre game

Know value of the pieces: Not all pieces are as valuable. Pawns are unit value, that is 1. Knights and Bishops are 3, Rooks are 5 and Queen is 9 units each. When exchanging pieces, these values should be taken into account. It generally doesn’t make sense to sacrifice a Rook for a Bishop. Of course, there are times when you’ll want to do it (especially if you have a forced checkmate in place).

The value of your pieces changes depending on your position and the stage of the game. You can read about it on Wikipedia but you will also learn these things intuitively once you have enough games under your belt.

Starting tactics

Castle early, ensure king safety before anything: I used to frequently go for material (i.e. trying to win pawns or pieces) and space before castling which generally doesn’t end well. Once your opponent is done developing their pieces and castling, you’ll end up playing a very defensive game if your king is in the center of the board with undeveloped pieces.

Develop pieces as early as possible: Move all pieces out of their initial position, ready for attack or defence and connect rooks early in the game.

Don’t move the same piece twice in opening: In general, you should avoid moving a piece more than once in the opening as the goal is to develop pieces fast. Of course, exceptions are when your piece is attacked or if the other side offers a gambit (a pawn or minor piece sacrifice to gain positional advantage).

Develop Knights before Bishops: Another general rule of thumb as both Knights can develop and simultaneously control central squares which is usually a good idea.

Rooks work better when connected: Rooks are developed when they’re connected (both Rooks are defending each other). Another common tactic is to double rooks on an open file (a column on a Chess board without pawns) to mount a powerful attack.

Doubled Rooks on an open file are very powerful in infiltrating enemy territory

Aim for center control: It is generally a good idea to control the center four squares of the board. There are exceptions, however, as with certain openings we can aim for control over one side of the board and continue our attack from there.

The highlighted squares are important and you should try to gain control over them

General tactics

Don’t keep pieces in pin: If your piece or pawn is pinned, meaning a more valuable piece is behind it, it is good to unpin the piece (move the piece that’s behind it). This is especially true with king. You don’t want your king to be on the same file as your opponent’s Rook or Queen, and same diagonal as your opponent’s Bishop. If the other side brings their Rook to the same file as your King or Queen, move it away even if there are pieces in between.

White to play: The d pawn (pawn on ‘d’ file) cannot capture the Knight as the Queen is hanging and the Rook on d8 is xraying it. It is best to unpin (get away from the Rook’s file or Bishop’s diagonal) as soon as possible.

A piece that has moved a lot is worth more than an unmoved piece: If your knight has been moving around the board, it is generally in your opponent’s favour if they manage to exchange your active piece for their dormant piece.

A piece that covers more area is worth more than a piece that covers less area: Similar to a previous one, if your Bishop covers and controls a beautiful diagonal, your opponent might want to get rid of it by exchanging their unused piece for your beautiful Bishop. Try to protect your active pieces.

If you control more space, don’t trade pieces: If your pieces control a lot of space on the board, you should avoid trading pieces.

If you’re crammed, exchange pieces to create room: Conversely, if you’re crammed by your opponent, try forcing exchange of pieces and pawns to create some room for your pieces to develop.

If defending, defend a piece as many times as it is attacked: If you want to defend a piece or pawn, defend it as many times as it is attacked.

If attacking, attack a piece as many times as it is defended plus one: If you’re the one attacking, mount an attack such that the other side runs out of ways to defend.

Two pieces are better than one piece: It generally doesn’t make sense to sacrifice a Bishop and a Knight for a Rook, or two Rooks for a Queen. It is, generally speaking, better to have two pieces instead of one (use the point value of pieces to decide if the exchange makes sense, but remember that active pieces are more valuable than passive ones).

Avoid back rank issues: If you don’t defend the last rank (where your king usually resides), a Rook from your opponent might simply deliver a checkmate (since the pawns in front of your king might be unmoved leaving no room for your king to escape).

In this position, if White isn’t careful, the Rook on a8 can deliver a checkmate which is why you must make an escape route for your king or have a defender on the last rank

Capture with pawns towards the center: Generally, if you capture with a pawn, you want to capture towards the center of the board if that’s an option.

Knights belong in the center of the board: It is usually not the best idea to move the Knight to a corner of the board as they cover fewer squares from there. They say Knights on the rim are dim. This applies to most pieces but especially the Knights.

As you can see, a centrally positioned Knight controls many more squares than a cornered Knight

Avoid creating pawn islands: An isolated pawn is one that isn’t connected with your other pawns. Such pawns are liabilities and weaknesses, and hence should be avoided (or sacrificed for positional advantages). In general, try to have as few pawn islands as possible.

Black has 2 pawn islands and white has 4. Black is to be preferred here.

Avoid doubled pawns: Doubled pawns are two pawns on the same file. As with pawn islands, they are weak and can become a liability in the endgame. It is said that a Rook’s favourite meal is a doubled pawn and is best to avoid doubling your pawns.

Grab any open files for your Rooks: When pawns are traded, they leave behind open files. Be quick and place a Rook behind an open file to gain control over the entire file. Later you could also double Rooks on the same file for a powerful attack.

A Rook on an open file covers a lot more square compared to a rook behind pawns

Avoid exchanging the fianchettoed Bishop: The fianchettoed Bishop is supposed to defend the weaker squares around the King and control a long diagonal. You shouldn’t exchange it in early or mid game if that’s an option.

The Bishop on g2 does a nice job of defending the weaker squares around your King’s castle.

Know thy Bishops – Bad Bishop vs good Bishop: A bad Bishop is one that’s obstructed by your own pawns, ending up looking like a pawn itself (and not controlling much space). A good bishop covers a nice long diagonal.

Notice how Black’s Bishop is nicely controlling a diagonal while White’s Bishop is essentially a pawn

Bishops and Knights are equal, except…: Bishops and Knights are both 3 points, but Bishops are usually preferred when the board has few obstacles, while Knights are preferred when the position is very tight. In general, a Bishop pair is always something you’d want to save if you can.

Be mindful of forks: Forks come when two pieces are attacked by an opponent’s piece and we lose one of them anyhow. Knight forks are common and can be tricky to spot. A fork that comes with an attack on the King and the Queen is called a royal fork.

Here, black will lose a Rook
A royal fork

Next steps

From here, you should learn some of the openings and endgames. Openings will help you quicky get to a position where all of your pieces are mobilized and ready, and also know what’s on your opponent’s mind depending on what they play.

Endings are important to know how to actually win most games. Many games might not end with you having a bunch of heavy pieces storming your opponent’s king. On the other hand it would be quiet and tactical, and you should know how to best make use of the couple of minor pieces and pawns that are on the board.

In closing

Hope you enjoyed this article on some beginner tips for levelling up in Chess. If you’d like to play Chess with me, challenge me on lichess at lichess.org/@/abhn.

Thank you for reading!

24 Years Old And Other Stuff

The 3rd of this month marked the completion my 24th year of existence, 24 revolutions around the sun, 24 years of the limited time that we are all handed when we board this earth train.

These were 24 years of great health, a relatively problem free life and great learnings. I’ve met and became friends with some amazing people who’ve made me question my priorities and values. Speaking of priorities, they’ve changed as well, although whether for the good or otherwise is something only time will tell. From someone who read and preached science (and be annoying sometimes), to becoming obsessed with my desktop PC and learning security (and be annoying most times), picking up social skills and learning how to talk to people (if you’re surprised this is something people need to learn separately, you’re probably not friends with many nerds), getting into web and open source, getting a full time job and so on. Life has had its share of twists and turns but it has been a joyride so far.

So how does it feel to be 24 years old? I think it is a superb feeling. Many things are changing, mostly for the good. People take you seriously, sort of. You feel the added responsibility when making decisions; decisions about your life and about those who surround you. People also seem to trust you with your decisions, which is nice. It feels like, finally, you’re in the driver’s seat. Eating what you like, taking care of your health and fitness and those kind of things have also picked up pace. On a health related note, I did a fair bit of outdoor sporting this year after around a decade long pause. With a sample size of one, I also think that the tendency to do things to please others, in general, goes on diminishing as we age.

At some point, I realized that some regrets are better than others. Regretting your decisions is better than other people’s. Similarly, regretting doing something is often better than the regret of not doing it. You also realize that many problems that you face are actually your choices. You can’t escape problems, but you can choose the ones you’d like to tackle by making conscious choices.

In the past couple of years, I’ve become a bit more independent; earn enough to support myself and my hobbies, and lived alone in my own flat. Moving to Berlin was by far the main highlight of this year. Like I keep mentioning, moving to a new city is like being handed a blank book. You can correct your past regrets, and try to be the person you always wanted to be, and not worry about your past self’s image in other people’s mind conflicting with the new one (for reasons which I’d not try to justify, I find it similar to starting a new code project versus fixing a legacy one).

And as always, with the added authority comes added responsibility. I noticed that I think longer before making decisions or even simply speaking, since those things now have consequences (and some people, my parents included, sometimes count on me to do the thinking). Overall, the theme of the last couple of paragraphs is that 24 is a good age to gain some autonomy, confidence in your self, control over your life and explore a bit. Not physically, necessarily, but philosophically, in the sense of what your values are, what do you expect from the people around you and what do you give them in return.

Thank you for reading!

Mumbai To Berlin

Not many nice things can be said about the lack of planning things out. But if I had to, one of them would be that it really makes up for some uncertainty in life. Not necessarily good or bad, but makes things interesting from time to time. One such interesting phase that I’m living through is my time in Berlin. Do you know when you’re living through something, knowing that it is going to be memorable when you look back at it from the future? I’m kind of in that moment.

The iconic Fernsehturm (TV tower) in Alexanderplatz

My humble workdesk in Delhi. Second day of work. Naively wishing I was home enjoying vacations.

I couldn’t help but draw parallels between my arrival here in Berlin and some two and a half years ago in New Delhi. It felt similar to me in many ways. An unknown place, a completely different set of people I was going to spend time with, interact with. Back then, I was scared because I didn’t know the people, I didn’t know what I was going to work on, and I didn’t know if I’d fit in. This time around, with some experience from the past, I was excited for the very same reasons. The ‘what is the worst that can happen?’ questioning philosophy kicks in and makes things interesting (and once you watch this amazing video on Optimistic Nihilism by Kurzesagt, that mindset only strengthens). It also keeps you relatively safe while giving you much wider set of options than what would normally be available. (is this a greedy approach?)

Being An Expat

(Note and 2023 edit: For various reasons, I am no longer particularly fond of the word “expat”. I exclusively refer to myself as an immigrant. I wouldn’t edit the text to reflect that, but this note should suffice to reflect my newer thoughts)

So I’m an expat now. What’s the big deal? I think the big deal is the added responsibilities that comes with moving out. You are your own boss, and while that sounds all sunshine and rainbows, it really isn’t. From making your own tea, washing your own cloths to deciding how much money needs to go for rent and if the bread you’re buying at the supermarket strikes the right balance between cost and nutrition. Trust me, you don’t want to jump straight into it without some training-wheel exercise first.

The next thing is the experience. Moving to Berlin is something new, something I’d never experienced before and probably never would have if I hadn’t put some work into it. Experiencing something new is beneficial in many ways, and when that something new is a culture altogether, it teaches you a lot. And culture is not all there is. There’s the work style, interacting with colleagues, making friends, commuting and many such things. Now, I’m getting to experience how little things work out in not one, but two countries. And then that will lead to a lot more parallel-drawings which eventually end up widening my horizon. I feel that’s a good thing.

I intend to do good work whilst I’m here, make a positive impact on the people around me and my company and in doing so, learn invaluable lessons in life, tech and else. I’ll keep this blog updated on more interesting experiences from Germany, but in case you have any specific questions, my email address is on the about page.

On People Living In Their Home Cities

Before closing this essay, I’d list down one important thought.

I had never understood people; friends, seniors and industry veterans alike, when they said they wish to live close to their hometown with their families and commute from home everyday. I mean, why would you have restrictions for yourself, right? Aren’t you excited to live in this shinny new city and make money?

I feel my thoughts have changed, and changed for the good. Now I think I can empathize with them. It is a very valid reason and goal and while I may or may not make such a decision, I’ll have huge respect for anyone who does. It must take a lot of courage to go that way.

In Closing

Berlin is a beautiful city. The people are amazing, you have all sorts of food options. The streets are great for casual walking, like they’ve stood there still in history. Occasional posters and banners remind you of the history of this place. The way history is preserved in the architecture here, yet staying on top of the globalization game, is commendable. And sometimes, I just pause and think, how on earth did I make it here!

A snowy evening in Friedrichshain

So here’s to my new journey. I hope, with the usual ups and downs, things work out well. I hope to learn more and share my learnings with you. Embedding the video mentioned above, if you’d like to give it a watch. Thank you for reading!

Hum Developers Kab Banenge?

I was sitting at my office desk as usual, besides the window enjoying the cool breeze of post 6 pm friday evening of a summer day, 7 floors in the sky, at our office. We’re now 2 regulars in the office, and while it does get a little boring at times, there are also times when I appreciate the silence, the sound of wind through the little window on my left, the occasional rattling of helicopters passing by. That desk and that window are really interesting, my gateway to a different world where I just sit 15 minutes at a stretch staring at a distant building, the lights on its terrace blinking harmoniously. The occasional helicopter, and the people inside of it. Where must they be heading? Are they appreciating the fact that they’re inside that bird that countless individuals like me adore from the ground. I don’t know.

And just like that, I get to think about my own self. My thoughts four and a half years ago, in the first year of my college. There was so much excitement of getting into computers formally, finally. Now I could actually read interesting stuff off the Internet all day long and call it studying, without raising my mum’s eyebrows. I had a friend with whom I could share my technical side, which wasn’t much then, to be honest. Programming was the new thing and we knew we needed to learn this wizardry. Why and how we never thought of. There wasn’t a lot of knowledge within, not even speaking of wisdom, startups were unheard of, and life’s goals were defined in terms of what to learn next and ‘let’s see if we can solve this interesting puzzle with code’. It just was this raw energy that we had then, a kind of purity towards learning, the way opposite magnetic poles attract; no stray intentions.

It always brings a smile on my face thinking of those days. That purity towards the thing that you love, not asking why or if it will help me figure things out in the ‘big picture’ or will it look good on my portfolio, just that desire to go do it, to learn that absurd thing that has been obsolete for half a decade; why, because why not. I clearly, very clearly remember the happiness I felt after learning enough C to write basic programs, enough Python to flaunt my first ‘full stack’ web application. I learnt much later what full stack was, and even later that it was a job title. It was nice being able to make those things. We did whatever we thought was cool at that moment, anything that would tickle our curiosity.

In the midst of all of this, there was always a question I remember asking myself and my friend: ‘Hum developers kab banenge?’ All we knew was that a ‘software developer’ gets paid to do the kind of things that we do as hobbies. We had seen in total one software developer by then. He was Asa Dotzler from Mozilla. He was a nice person, but then we saw him as God because he could write code, you know. We kept on asking the question, but then sometime later, we stopped. Life got busy, everyone dashed towards their personal goals, the bigger picture and all that adulthood stuff. Suddenly, all of us were identified as developers, got hired as software engineers and started working for a monthly paycheck.

We were there before we even knew we were, and things aren’t much different on this side of the fence. Only now, you have to work whether or not you feel like working, your hobbies come in secondary to your professional goals and your life starts to revolve around this weird hierarchy of going from bottom of this growth ladder towards the top, occasionally changing the ladder. I guess that was all part of the package that we never bothered to explore properly. Or perhaps all of this is the optional bit that we took because everyone else was taking it, and maybe, with some courage we can get rid of this extra weight slowing us down and be those balls of raw energy that we were in college, being the ‘developers’ that we always wanted to be. I don’t know which one it is, but I guess we’ll eventually find out.

Thank you for reading.

Recommended: Career Advice – Moxie Marlinspike

Trek To Brahmatal (Uttarakhand)

Hello! It has been more than a month since I shared something here. Although there has not been much, I’d like to share my experiences of the trip I went on last month. It was one of those trips that I’d remember for a very long time.

Since our first trek in the Sayadri ranges in January 2016, I and my friends had this big wish to go on a Himalayan trek. Finally, in October last year, we decided that Bramhatal would be it. (Not embedding maps because it was too much effort. Also, heavy images ahead. May take some time to load. Patience!)

There were a few reasons for this. Firstly, it was an easy trek. The only real challenge was a bit of high altitude sickness, but it was marginal. Secondly, it was the same group that we went to Sandhan Valley with, so there was this trust factor. Thirdly, it was scheduled for January, hence there was no chance it would coincide with our term tests.

We started preparing for the trek from November, regularly running 5kms to increase our stamina. We also booked our train tickets, to and fro. Then the long wait began. It was my first trip out with friends and I was really excited. We literally spoke about it every single day in college, all 4 of us. We were scheduled to depart on 21st January to Delhi. The last week was the most difficult. I couldn’t sleep at night, for the thoughts of what was about to come kept me awake. I’m sure Ankit, Manasi and Jyotirmay felt the same. Last two days were reserved for shopping and packing. Not much though, since we were not going to bath for the next 10 days anyway!

Saturday 21st – The journey to Lohajung

Finally the day came, it was a Saturday. I took my 13kg backpack and left for Thane where all four of us met. We had to leave for Delhi that day. So we left for Hazrat Nizamuddin from Mumbai Central. The journey was a bit hectic, for our seats were separate and the train was crowded with unreserved passengers. But the views outside the train made up for that. Really enjoyed the transition from a comfortable 27 degree Celsius in Mumbai to a chillish 15 something in Delhi. We got down by 7 in the evening, and then by the Metro, we headed for the ISBT bus station, from where we were to board a bus for Kathgodam, Uttarakand. Had some Palak Paneer at the bus stand and boarded the bus. The bus journey was comfortable enough, but the cold wasn’t. By the time we reached Kathgodam at 6 in the morning, the temperature had already dropped below 10. The coldest I had ever experienced. I was shivering like I never did before. Talking was not possible because my facial muscles had just refused to coordinate.

Just 20 meters away from where the bus stopped, we met other guys from our trek. There was a jeep awaiting us, which would take us from Kathgodam to Lohajung (our base village), a little town in the Chamoli district of Uttarakhand, a ten hour drive through the ghats, terrifying and nauseating. Trust me when I say this, it was a very beautiful town. Look just about anywhere and you’d have a wallpaper like scenery, old houses, beautiful people and snow covered peaks in the background. And it was cold. I believe it was 6-7 degrees when we reached there. Walking barefoot on the floor wasn’t possible. The water would numb your hands if you dared to touch it, so washing face was out of question right away. We were welcomed with hot Pakodas and tea. The food there was surprisingly good. Great Dal, Rotis and Sabzi. Rice and a sweet dish at the end. So our trek leader briefed us about the next day. We had to start early in the morning to reach the Bekatal lake by afternoon. We were introduced to the kitchen staff who would carry all the heavy equipments on Donkeys (Kachhars) and make us good food throughout the trek. Also, we had a local guide, Ranjeet dada, who, in spite of being a Redhat Linux certified professional, preferred to be around the mountains rather than Linux boxes. A really cool guy who loved to talk and tell stories. He runs his own ISP in the Van village of Chamoli, and had quite a lot of knowledge about networking and *nix in general. We packed our stuff, and went to bed early.

Tuesday 24th – Trek to Bekatal

We started at 8 am, after having a good breakfast. It was through the town, walking on mud roads to the top. It was not difficult, but exhausting. We continued to walk for some 6 hours that day, taking short breaks every 5-10 minutes, occasionally taking long breaks. We had to ascend some 1000-1500 feet on that day, on a trail of some 5kms. We reached the camp by 2 and were given Rhododendron juice. It was too good, and addictive too. Drank some three glasses of it before I had to stop myself from refilling the fourth time. Then it was lunch and we rested in our tents for a while then. In the evening, we went to explore the Bekatal frozen lake nearby. Seeing a frozen lake is a magical experience. It was just like the one Bear Grylls features on his show ‘Man vs Wild’. It was awesome!

At night, we lit up a bonfire for some heat and had fun around it, all of us. We were served dinner around it (which we insisted since we didn’t want to go away from fire). The food was great and guess what, they made us dessert at 9,500 feet. It was fruit custard, and it was delicious. We chit chatted around the fire after dinner and at around 10, we were served ‘hot drinks’. No, it wasn’t alcohol, but Bournvita. It was delicious.

Wednesday 25th – Trek to Bramhatal

We started early again. Had a good shit (seriously, a challenge in the woods ;P), brushed my teeth and had breakfast. Left for Bramhatal. After an even more exhausting day, we reached Bramhatal. The routine was the same on reaching, juice, lunch, rest, tea and then we set out to explore Bramhatal which was some 15 minutes away from the camp. It was beautiful. The night was similar, with bonfire and good food. The next day was summit day.

Thursday 26th – Summit day

It was the Republic Day. We did our morning rituals and gathered near the India Hikes campers. We hoisted the Tricolor, sang the national anthem and took some photographs. We were some 25-30 people together, and it definitely was the most memorable Republic day mornings ever. We then started the walk to the summit. It was at 12,500 feet, and the thinness of air was evident. It was not the longest walk, but definitely the most tiring. We kept walking and at around 12, we reached the summit. It was the top of a mountain, snow covered, surrounded by grasslands on three sides and Himalayan ranges on the fourth. One can see Mt. Trisul (22,000 feet) and Nanda Gunti (19,000 feet) from the summit. It was a clear day and we made full use of it. We hoisted the tricolor again on the summit and took pictures.

The descend took some two hours, and we reached the camp by 3. The rest of the day was just usual stuff and the next day was back to basecamp, Lohajung. It would have not been any more interesting from here, if it wasn’t for the sudden snowfall that started when we were about to go to bed. The temperature dropped to 2 degrees and we were all dancing, when it began to snow. We ran into our tents and slept, assuming we were covered!

The Tricolor on the summit. Nanda Gunti on the left and Trisul on the right!

Friday 27th – Back to Lohajung

So that night, at around 1.30, the tent broke down. The weight of the snow on top of it was too much for it to handle, and it fell on our faces. The ice cold surface of the tent was touching my forehead and nose, but I only woke up at 5 am. My reflex was to call for help, believing that the tent has got buried under the snow. Thankfully it wasn’t exactly buried, but just broken. We spent the next two hours holding the tent with one hand and trying to sleep. It was terrifying!

Daylight made its way in, and we tried to open the tent to see the situation outside. It was seriously frightening, for the grasslands and plains that we saw a day ago had all vanished and replaced by dead white snow. It was snowing so heavily that it took me an additional 15 minutes to gather courage to move out of the tent to take a dump. That was the most daring shit I had ever taken; a foot of snow, chilly winds and -6 degrees. It was nature at its best and worst, simultaneously.

I spoke to our leader and casually told, ‘No way we’re going to descend in this weather, right?’. He said we have to, no options. We cannot survive here. My heart sank. He told us to get ready in 30 minutes and we did. Slowly, gathering courage, we started walking in that foot deep snow, following the footsteps of the person in front. Snow was getting collected on our shoulders and bags and it felt great, but also added weight and had to be shaken off. It was probably the bravest thing I had ever done, walking on the slopes with snow hitting my face on one side but maintaining the balance so that I don’t slip and go sliding all the way down a thousand feet. It was for real.

This went on and on for the next 7-8 hours, which were quite easily the toughest 8 hours of my life, slipping and falling multiple times and thinking ‘I don’t want to die here’ to myself. My shoes, socks and pants were all wet, and my hands had become numb due to the snow. Our faces had turned blue. Finally, we reached the base camp at about 4. I took a bath since I was feeling very, very dirty. It was a bad decision, because after that I was shivering so much that my mouth just lost any coordination that was left. It was all kha-kha-kha-khaana ki-ki-kither ha-ha-hai. It was fun. I slept for some time then. I woke up to a great non veg dinner, Gulab Jamuns and more Bournvita.

After dinner, the entire team had a good chat. We were given ‘High Altitude Trekkers’ badge for completing the trek, and ranked amongst ourselves who performed the best on the trek. Then it was story time by Ranjeet dada who shared some of his experiences and the lifestyle of the people in that area. Amazing.

Saturday 28th – Back to Kathgodam

The next morning, we had some Maggie and black tea, took some group pictures with the staff. They packed out bags on the top of a similar jeep and we set out for Kathgodam. It was better this time, since I enjoyed the scenery and didn’t feel nauseated. Just and hour before reaching, we learned that our train got canceled. We took the public transport buses, and started our journey back to Delhi. We reached Delhi at around 2 in the morning.

Sunday 29th – A day in Delhi

Knowing the reputation of Delhi, we decided to spend the night at Hazrat Nizamuddin railway station, so we took a cab from ISBT to Hazrat Nizamuddin and spent some time there, in the waiting room, which was already filled up to the brim. Here we got a chance to freshen up for the upcoming day, so we used it. At around 6 am, we kept our huge backpacks in the cloak rooms, taking the essentials with us, we started our Delhi expedition. We explored a lot of good places that day; Connaught Place, Guru Bangla Sahib, Raj Path, Jan Path, Rapid Metro (Gurgaon), JNU campus (just outside), Hauz Khas village, Chandni Chawk, Red Fort and then back to Hazrat Nizamuddin, in that order. We boarded the Deheradun express that night and reached Mumbai early morning on Tuesday.

Seriously, what a trip!