Showing posts from August, 2017

The Security Function

We lost a OnePlus3T dev phone at work earlier this month. This upset me a lot, but later when I reached home and performed my customary routine of locking my cycle to the side railing, I questioned myself if I really have to go through the pain of locking the bicycle every single day - it's added effort and maybe even for no use. Much of security feels that way - 99% of the times nothing will happen, but the day it does you'll curse yourself for not being more careful. I tried coming up with a model to justify whether the daily time spent on securing these valuables was worth it. Here's a simple mathematical equation.  (Securing Justified) =   Price (precious_object)   - Price (things_bought_to_keep_it_safe)   - [ Value (daily_time_spent_to_keep_it_safe) x (#_of_days_from_purchase_till_theft) ]  If >> 0, yes, you should definitely go through the pain of securing your valuable everyday. If ~ 0, you could probably do without securing it. The amount of

Blog update & A Writer's Dilemma

I haven't written in a whole month and a half, courtesy my 70 hour work week, and weekends away at my friends'. I have a huge list of things I'd like to write about  scribbled [1]   in my Google Keep - there are things from over a year ago now that I haven't published, and wish I did for they seem less relevant to me now. For example, I made a list of qualities I wished to see in a Professor at University and never ended up publishing - but now that's in the past and what seems more relevant to my life at this moment is writing about how startups should function and a list of qualities I'd like to see in my work mentor. This is what I call a writer's dilemma. What were once  matters of consequence [2]  make little sense to write about now, and never will I come back to the time when these things hold as much relevance as they did at the time they were thought of and noted. Anyway, to rid myself of the guilt of not having written in so long, I spent the m

Java the Right Way

For over 3 years, I've been writing code in Java, and have worked on several projects which have grown to a moderately large number of classes. Apart from learning the syntax from a book in Grade 11/12, I've never formally learned  how to write quality readable and maintainable code.  The current project I am working on spans in all directions; it's an event based system, there is a lot of input coming from simultaneously running threads, there's Java-C interaction, there are multiple communication channels over different network mediums, there's an entire high-speed display rendering mechanism, and a lot more. The size of the project is sky rocketing and without a structured architecture, the code will not be maintainable in the foreseeable future. So, just as any other engineer would do, I've bought myself a copy of trusty Effective Java to formally learn how  to write code that scales.  Before I read this book, here's as much my 3 years of