Books I bought at India Book Fair 2020

This was due since I don’t know how long. The promise I made myself a decade ago that once I start making a good earning, I’ll buy books worth Rs. 10,000 from the book fair. Yea, I was that crazy about collecting books. Collecting, not reading.

Anyhow, I managed to spend roughly 5K of the promised 10K on books from India Book Fair 2020. I decided to go on a week day to avoid crowds. It turned out to be a cold and wet day, but I was slightly excited nonetheless. A nice little, “Running late for office” message was sent to the office group and I asked Google maps to navigate me to Pragati Maidan metro station. Once I parked my rickety old WagonR in the metro station parking lot and headed for the Pragati Maida gates, thankfully there was not a lot of crowd. In fact a little below expectation which made me question, “Are book fairs still popular or that time is long gone along with my childhood?” But once I entered one of the exhibition halls, there were a lot of people.

I tried to visit every stall, but there were just too many. I wanted to scan every book on display, but there were a lot of them. I wanted to spend time in every stall, but there was just too less time. I realized this when I ended up spending about an hour in the first stall itself. As I entered by 4th publisher stall, my hands were already aching with the weight of books I had already bought. Damn, I wish the organizers provided some kind of a shopping cart? I don’t know how many people realize this but more than 4-5 books can get really heavy.

Ok, so here are the list of books I bought.

  1. And the Mountains Echoed – Khaled Hosseini
    Wanted to read this since long
  2. Burnt Shadows – Kamila Shamsie
    The description on the back caught my attention
  3. The court of Owls
    Whoa! A batman novel
  4. Good Motoring – H.Kishie Singh
    Following up on my passion for driving and cars, I couldn’t let go a dedicated book on it.
  5. Yudhisthira – The unfallen Pandava
    For the love of Hindu Mythology
  6. Nanasense
    Looks like a good read
  7. White Fang – Jack London
    I have read Jack London before and the way he writes stories around the harsh snow landscapes is just amazing.
  8. India – Early History
    If you’ve read “Sapiens” before, the first few chapters on how humans evolved is so intriguing. I am hoping this book sheds more light on India specific early human tribes.
  9. Mahabharata – AmarChitraKatha set of three books
    I am big fan of AmarChitraKatha and used to read their books as a kid. I bought these solely for Nostalgia.
  10. Stories from Bapu’s life
    The theme of this year’s book fair was Mahatma Gandhi, so why not.
  11. Mir Space Station
    I hoping to relish a space based fantasy story from this one.
  12. Everest – My journey to the top
  13. My journey to the magnetic north pole
    I am looking for a nice adventure through snow from both of the above
  14. Gautam Buddha
    Want to gift this to Aparna, who’s a big fan
  15. Social life of plants
    This one talks about how plants and trees communicate with each other. Sounds rather interesting.
  16. Random Curiosity.
    I have literally no idea why I bought this one.
  17. Raavnputr Meghnad
    This book had a quite a few posters and was being promoted heavily for some reason. Had to buy it.



Throwback to those college days

I miss ’em.

It has been 5 years since I left college. Six, if you include the last year of college which went down chasing my dream career. The first two years is what I count as one of the best times of my life. The freedom of living away from family. The company of friends. The phase of entering manhood. Best times!

One of my hostel mates got married last week. So have a lot of others in the past couple of years. My turn is not far either. (hopefully.) Looking back, time has flown so fast. Not a happy feeling, but that’s how it is. Change is the only constant. You can only hope that what lies ahead brings good memories for you. Chasing work deadlines and loan payoffs, life has taken a backseat somewhere.

In these circumstances, we have two choices. The first is to accept that our original judgements might have been at fault. We question whether it was quite such a good idea to put our faith in a cult leader whose prophecies didn’t even materialize. We pause to reflect whether the Iraq war was quite such a good idea given that Saddam didn’t pose a threat we imagined.

The difficulty with this option is simple: it’s threatening. It requires us to accept that we are not as smart as we like to think. It forces us to acknowledge that we can sometimes be wrong, even on issues on which we have staked a great deal.

So here’s the second option: denial. We reframe the evidence. We filter it, we spin it, or ignore it altogether. That way, we can carry on with the comforting assumption that we were right all along. We are bang on the money! We didn’t get duped! What evidence that we messed up?

Book Review : The Mahabharata Quest – The Alexander Secret

book cover

Ok. So this book is a sequel to the The Mahabharata Secret. But belonging to a different series. ( of three books ? ) And yeah it’s better.

The first few chapters of the book are really captivating. Gradually, though, the reader will be able to relate to the author’s style of writing from his previous book. A little over the top, filmy, very similar to Dan Brown, only less thrilling. The plot jumps are a little jerky. It’s starts resembling a Hollywood action movie of the 2000s era. ( Helicopters , explosions, secret medical facilities ) New, yet a little deja vu. It also sometimes feels like the book had undergone a lot of editing. Some of the events have been fast forwarded, while some of them have been painstakingly described in detail. ( the retrovirus infecting the bacteria process ) But still this one was much better than the previous book. I actually enjoyed it, considering that it was this author’s second novel.

Full marks for the history references. The way Alexander’s journey to India and back has been reimagined and linked to the Mahabharata tales, is really impressive. Since, it involves Indian myths and legends, I personally enjoyed reading it and was able to relate to it much more than say ‘The Lost Symbol’ with American Stone Masonry as it’s plot base.

My Rating : 2.5 out of 5
For : History references and reimagined explanations ( samudramanthan )
Against : Weird editing. No emotional connect. Jerky plots.

Book Review : The Mahabharata Secret

So, I got reading after a while. Well not after a while coz I keep reading here and there. But yeah, a fiction book after a while. This is what I thought.

The book did not stick out as different or gripping. It’s your pretty standard Indiana Jones script. It was very predictable right from White being Murphy ( spoiler alert ) and Radha and Vijay falling in Love. Pretty standard stuff. The only marks it will be getting from my side will be for the history research. That too very little.

The book starts off with the murder of a nuclear scientist, whose nephew, Vijay, comes back from America ( Duh! ) to solve the mystery around it. He also gets emails from his uncle about a secret from the time of Ashoka relating to Mahabharata that needs to be protected. Eventually he solves the clues in his uncle’s emails and with the help of a scholar old guy who is good at old languages ( perfect! ), an athletic friend ( nice! ) and the old guy’s daughter ( lovely! ) he’s able to track the secret down. With terrorists from LeT and AlQaeda on Vijay’s trail, you have the perfect recipe for an adventure novel.

But unfortunately, the story writing falls short of expectations. There are some weird events thrown in here and there which don’t really go with the plot. Out of place humor between Colin and Vijay adds to the “wtf?” effect. The only thing that gripped me was the history part; when the author goes back to ancient times and writes about a secret brotherhood, the lost chapter of Mahabharata and ancient warfare technology.

My rating : 1.5 out of 5
For : A bit of interesting history
Against : Predictable, Hollywood-ish, zero-thrill

integrating phpdotenv ( .env ) files in CodeIgniter 3.0 using hooks

Screen Shot 2016-01-26 at 7.03.31 PM

So we all know one of the tenets of the 12 factor app is to store config in the environment. CodeIgniter allows production and development config and database files to be stored in separate directories. But they all reside inside the git repo and therefore not really safe for storing sensitive values like database connections params or auth codes.

In comes phpdotenv, a really clean way to achieve this. Laravel already implements this and it’s fairly easy to do the same in CodeIgniter as well. Here’s how :

Enable Composer

You can skip this step, if you already have Composer integrated to CI.

Composer makes PHP awesome. Although you can implement the above without composer but this method is way more elegant. The following config flag has to be turned on in your application/config/config.php file:

$config['composer_autoload'] = true;

Next create a composer.json file inside the application folder with the following contents :

After that you need to run composer install inside that directory. Here I am assuming that you have composer installed globally. The other options of course, is to download the composer.phar file (here’s how) and run php composer.phar install. But make sure not to add composer.phar to your version control. It’s not meant to be there.

I would recommend installing composer globally, here’s how you do it.

Add Hook

Now we create a pre_system hook to load phpdotenv. This is the most appropriate hook as it is called right after loading composer and before the controller. Here is what my application/config/hooks.php looks like :

And then enable hooks in application/config/config.php as it does not come enabled by default:
$config['composer_autoload'] = true;

A dirty way to do it would have been calling the same code in index.php file. But changing the core files of a framework is almost always a bad idea and makes upgrading/debugging very difficult.

Create a .env file

The hook code was configured to load the .env file from inside the applications folder. You can change that if you want.

And that’s it, you can keep separate .env on your production servers and on your dev server. The values can be accessed via either getenv() or $_ENV superglobal variables. Here is a sample .env file

Nice. So that does it. Let me know if you have something to say in the comments.


[typerush] the dilemma

To develop as a Product guy or to develop as a Tech guy??!

There are major differences in the approach.

A product guy will focus less on the backend technologies used, accepting a barely working prototype with acceptable design and focussing more on shipping the product out to beta testers so that things that matter can be prioritized. Look and feel will be important. Evolving usability and virality factors will be the prime focus while technology will take a back seat.

A tech guy will look to try out platform candidates before finalizing one on the basis of performance. He will try to incorporate state-of-the-art tools to make the technology stack look impressive. A few learnings on the way will be welcome and will be given dedicated bandwidth. Some delay to launch will be fine.

Is this the reason why product guys and tech guys almost always end up debating? May be.

[typerush] Upgraded framework

So in the latest change-set, I’ve upgraded our framework CodeIgniter to 3.0.4. Wasn’t hard since the custom code footprint was relatively small and nothing was changed in the core files.

Next I want to complete the multiplayer part as soon as possible. Before that some challenges, that I can see are:

  1. How would someone keep track of all the rooms that he has been in
  2. What happens when a user exits a room. Do we save the room data? If yes, then how is that accessible.
  3. Need a proper sanity process of the real time feature so that nothing is breaking.

Also in my list are some infra changes

  1. Doing JS and CSS versioning during deployment.
  2. Keeping environment related config items separate from the common config items.

There are some feature addons as well :

  1. A performance card at the end of every run.
  2. An option to mark a track as difficult or easy.
  3. The progress meter to be based on characters instead of words.
  4. Better UI

Security Measures:

  1. Applying continuous sync with server to prevent hacking of score.
  2. Setting a max value for speed, just to make sure data does not get corrupt.