Gaurav Chande

Breakneck learner, technology lover, product person, maker of things, firm believer in Comprehensivism. Ex-Shopify Engineer.

Page 2


What is ‘Rack’ in Ruby/Rails?

Lets start with a basic browser-server interaction. Say you’re developing an app with Rails (or any other Ruby web framework) and it has a page located at ‘http://localhost:3000/users’ that displays all users. The ‘/users’ request is going to go to your Rails server asking to show all users.

Behind the scenes, this HTTP request that the browser sends looks like this:

// Request by the browser

GET /users HTTP/1.1
Host: localhost
Connection: close

And, the response sent by the server looks like:

// Response by the server

HTTP/1.1 200 OK
Content-Length: 25
Content-Type: text/html
<html>
...
</html>

Now, say you’re a web server. You have this Rails app loaded in you. And some browser came to you with that request having path ‘/users’. As a server you understand this HTTP request. But you don’t know what to do with it. You have to give it to your Rails app, because it knows very well

Continue reading →


Yang of Technology. Yin of Design.

The True Way transcends the minutia of Skill. There is no “Technology”. There is no “Design”. There is only a vision of how mankind should be, and the relentless resolve to make it so.

– Bret Victor

Continue reading →


Steve Jobs cared *intensely* about market research. Video proof.

Many people who are new to computer/software business make the right choice of learning from great people in the industry. But, you gotta be really aware of what values you choose to incorporate in you. This is because those same great people learn from their mistakes all the time, but they seldom go back and correct their famous words.

Steve Jobs once famously mentioned, “I think Henry Ford once said, ‘If I’d asked customers what they wanted, they would have told me, "A faster horse!"’ People don’t know what they want until you show it to them. That’s why I never rely on market research.” These words are often glorified by newbie entrepreneurs. To tell you the truth, following this “wisdom” can be the most dangerous thing you can do to your startup.

First of all, as far as I know, Steve Jobs said that before being ousted from Apple (which was when he was still learning to be an

Continue reading →


How to feel at home in a new country

Wise people have said that switching countries, specially continents, is one of the best things one can do for personal growth. I don’t know about that yet, but I know this: it is fun. And, it is hard (especially if you haven’t travelled abroad much before). But I think I’ve found a secret recipe to this, based on my own experience.

I moved to Toronto from Mumbai almost exactly couple months ago. It’s been quite a ride so far. I’d say I’m very close to feeling at home. Based on this funny little article on The Culture Shock Model, I’m on stage 4. So what is the best way to overcome the hurdles of settling?

You probably must’ve read and heard from some people that in order to settle in a new country, you must ‘socialize’, ‘explore’, ‘get to work’ or the most vague one i.e. ‘get out there’. These are all good things to do and almost everyone does them, but there’s one experience that’s

Continue reading →


Be your unapologetically weird selves

The most important piece of advice I can give you on the path to happiness, is not just be yourself, but be your weird self. It takes too much energy to be other than your weird self. We spend too much of our lives living up to the expectations of others.

We buy things we don’t really want, with money we don’t really have, to impress people we don’t really care about. Forget that. Forget what other people think. Everyone here is weird, admit it. We each have our quirks. Celebrate those. Be goofy. Tell corny jokes, dance awkwardly, express your half baked thoughts. But most importantly, laugh about your failures.

It’s our collection of screw ups and idiosyncrasies and memories and stories and lessons learned, that make us weird and interesting. Weirdness is why we adore our friends. Weirdness is what binds us to our colleagues. Weirdness is what sets us apart and gets us hired. Be your

Continue reading →


_why’s thoughts on Programming

I do not write tests for my code. I do not write very many comments. I change styles very frequently. And most of all, I shun the predominant styles of coding, because that would go against the very essence of experimentation. In short: all I do is muck around.

So, my way of measuring a great programmer is different from some prevailing thought on the subject. I would like to hear what Matz would say about this. You should ask him, seriously.

I admire programmers who take risks. They aren’t afraid to write dangerous or “crappy” code. If you worry too much about being clean and tidy, you can’t push the boundaries (I don’t think!). I also admire programmers who refuse to stick with one idea about the “way the world is.” These programmers ignore protocol and procedure. I really like Autrijus Tang because he embraces all languages and all procedures. There is no wrong way in his world.

Continue reading →


The futility of absolutes

A friend recently shared a Derek Sivers TED talk on keeping your goals to yourself and was raving about it. I watched the 3 minute talk and I was quite disappointed because I just didn’t like it. Keeping your goals to yourself instead of revealing to others so that there is a better probability of achieving those goals? Really? Now, I really like Sivers and I learn a lot from his work but this is not about him or the topic of his talk.

This is about the absolute truths and extremes we all keep finding and believing. I’ll tell you what, it doesn’t matter. It doesn’t matter if 10 people became successful by following a particular method that you’re not following. It doesn’t matter if 20 psychologists have a theory based on how well it works. There are endless such ‘principles’ you would come across; many of them even contradicting each other. And there would still be exceptions

Continue reading →


Two types of programmers

There are fundamentally two groups of people in the tech industry: there are left brained science type programmers who can write amazing amounts of complicated code with ease; and then there are the right brained creative types. While left brained programmers may be 2-3x as fast when writing code, the right brained programmers can use their creativity to come up with elegant solutions that only require 1/5th of the work.

Continue reading →


Yii vs. Rails

Yii vs. Ruby on Rails is something I have been trying to interpret since a long time now. After some failed attempts of asking this on forums, I thought, lets come back to this when I’ve worked with both.

I have been using Yii framework (since six months) on client projects and Ruby on Rails for personal projects. I started exploring Ruby a couple of months ago and been fiddling with Rails since a month. The fact that I can use both the frameworks easily (for different applications) almost everyday, gives us our first inference. The frameworks are not very different, at least for the most common tasks. They are trying to help us make web applications speedily, and they are doing it in much similar ways. In fact, Yii has credited Ruby on Rails for much of its ideas.

Both have features like ActiveRecord, MVC, I18N, Migrations, Scaffolding, Caching, Testing, etc. But, similarities don’t

Continue reading →


Initial commit

After an entire year full of “no, I’ll never do it” type of thoughts, I think I’ve finally found the motivation to do it. That motivation is, ‘not having much to do’. I’m talking about blogging. I’ve always thought blogging is not for everyone. That everyone starts enthusiastically, but more than half of the them end up writing for the sake of it. Either for marketing purposes, just habituated or the most common category viz. uninspired to do real work.

Lets look at this quote from Patanjali,

When you are inspired by some great purpose, some extraordinary project, all of your thoughts break their bonds; your mind transcends limitations, your consciousness expands in every direction and you find yourself in a new, great and wonderful world. Dormant forces, faculties and talents become alive and you discover yourself to be a greater person than you ever dreamed yourself to be.

So the

Continue reading →