Posts

Showing posts from May, 2017

The BIllion Dollar Mistake | NPE

Image
TL;DR: null pointers will ruin your life. If you've used Java on a large scale project, you're lying if you haven't faced this dreaded million dollar mistake, first introduced to the world of programming in 1965. It's uglier than a Windows backslash, odder than a ===, far more common than the latest release of a JS library, more confusing than understanding a GC, ever so slightly harder to debug than interger overflows - I'm talking about a programmer's guilty temptation, the horrid null pointer exception. Homer, and computer programmers all around the globe. Tony Hoare, the creator of null very casually says  "I couldn’t resist the temptation to put in a null reference, simply because it was so easy to implement . This has led to innumerable errors, vulnerabilities, and system crashes, which have probably caused a billion dollars of pain and damage in the last forty years. " Very true, Mr. Hoare. Last week, I (finally) re-released Lifehack

The Art of Summarization

At Google I/O, the CEO conveys an entire years worth of work of over 50,000 employees, and also hints at future developments. All in less than half an hour. At a TED talk, the speaker conveys years, if not decades worth of research, their journey and enlightenments. An entire summary keeping the audience as engaged and as attentive as possible in a span of under 20 minutes. - An entire semester is dedicated to doing a project in our University - most students do internships during this period. At the end of the project  we go back to college to present what we did in the 4 months. Every year students complain professors shamelessly thrash students, especially those who do their internships outside of University. They do so rightly. Having sat through 15 such presentations of my batchmates, students just don't know how to put their point through! Presenting what you've done for 4 months in 10 minutes is an art. You have to give them a background of where you're w

C'est La Vie

I learnt a funny lesson recently. This is not a rant, but really something anyone should note for the future! TL;DR: Put Sunday as your last working day - even though it isn't a working day . I sent an email during my last week of internship stating Friday, 28th April would be my last working day at the company. Accustomed to receiving the same amount every month over the past 5 months, I noticed a 2 days cut this time. I was surprised - I didn't take an ungranted leave, and I swiped every day of the month - I even worked on a couple of Saturdays. Why'd they cut? So I did what anyone else would do - I wrote an email to the woman who handles finances and asked her quite politely as to why this was done. "Rishabh, you notified us that 28th April would be your last working day. Hence, you have not been paid for 29th and 30th April." "Whaaa! But that's extremely silly! Those two days were weekend days, they aren't even official working days! And the

A Sophomore's Guide to the Summer

I can't stress enough how important it is to work on self projects when you're in college. Everything you learn and do then goes a long way. You have all the time in the world, and have the chance to explore as many things as you'd like. Here's a list of simple projects that I did / wish I did in my 4 years at college. [OS, OpenGL] Use opengl to make a city of your file system. Basically, something like nautilus (Ubuntu's file manager GUI) but a 3D model where buildings represent folders and trees represent files. You'll learn a lot of opengl in this which is a really handy tool in the graphics stack, and you'll understand basic file operations. View an implementation by Nikhil Marathe here . [OS, FAT] This was something we had to do for the OS course in colg but was a weekend project and it was so much fun. A FAT table visualizer - ie, a visual guide as to how the FAT table changes over course of thousand iterations of rename, creation and deletion

Organization Skills 101

I've wanted to write this down for a long time. Here's how I use my laptop. All folder names are lower cased. This helps when traversing folders using your terminal - it's unnecessary having to press Shift every time you want to go to ~/ D ocuments, for example. (Except it doesn't matter anymore, now that I use ZSH as my default terminal). Plus, to me, lowercase on the terminal is aesthetically pleasing, for reasons unknown. All my written code resides in one folder - the ~/code folder . The code folder is then divided into multiple directories - all named on programming languages, which contain workspaces/project names within (remember, they're all lower case). Larger projects that grow over time, or span over different languages, or become my primary projects are sent into ~/code/primary. Oh my zsh . It's awesome. The thing about using IntelliJ all the time is, you expect autocomplete everywhere you type/code. ZSH has an amazing context based tab autocom