Blog

Be Chill. It’ll make you smarter.

Advice Coding By Neil Sarkar Nov 11th |

So as Lead Developer of Vaynermedia (n.b.d.), naturally you would expect my first official blog post to revolve around cryptic subjects geared towards techies and to be unaccessible to you, well, we call you guys “normies”. But fear not, read on. It may get a little hairy at points but all in all this post is for YOU, the internet consumer. The reason this, and the majority of my posts, will be geared towards normies is threefold:

  1. I’ve always felt that the primary job of a programmer is not to memorize esoteric details of programming language and standards, but rather to *communicate* effectively. Cesar Millan talks to animals, I talk to robots; you can call me The Computer Whisperer. At the end of the day your effectiveness as a programmer is defined by:
    1. how adept you are at communicating with the machine — your skill level in efficiently using the languages and technologies at your disposal to accomplish your (or your client’s) goals.
    2. how clear you are at communicating with, hear me out now, human beings. if you can’t tell your client or your boss what the capabilities of the machine are and advise them in an educated manner as to what’s in their best interest given the underlying complexity of programming for the internet, then it really doesn’t matter if you can write a twitter client for the commodore 64 (no offense, bro. I actually think this is f’ing sweet)
  2. I’ve found that the most useful technical blog posts are short little code snippets where the author barely knew if it was worth posting them. As such, any time me (@neilsarkar), @calebrown, @kopecwins, Sameer, or any of the other sweet developers+designers here discover a juicy little morsel of nerdy information, we will be sure to post it short-form. I’ll reserve these long-winded ramblings strictly for matters that would interest you normies, cos I love ya!
  3. If you’ve ever spent any time on Stack Overflow (<3 <3 <3), you’ll know that pretty much any subject you may have helpful tips on, somebody else has already covered more thoroughly and convincingly. And THAT WAS WEEKS AGO!. So yeah, long story short, I’m petrified of writing a post that’s trite for geeks…for those of you who haven’t experienced nerd backlash, it’s brutal.

Ok, no more prefacing. Time’s up, let’s do this. Today I want to talk about a feature of the framework Ruby on Rails, which is based on the flexible and awesome programming language Ruby. I added Ruby on Rails to my arsenal after coding primarily in PHP for three years and I LOVED Ruby on Rails from day one. Why? Because Ruby on Rails is *chill*. It tries to, as much as a programming language can, live by my personal mantra: “Don’t worry about it, it’s fine”. Let me illustrate what I mean with an example:

For you normies to understand the next paragraph though, I’m going to have to briefly explain how a Server/Application/Database interact to form a website. Imagine a restaurant. The Server (e.g. Apache, Nginx etc) is the Waiter. He takes your order (url) and sends it to the kitchen, and when the food (webpage) is ready, he brings it out to you. The Database (e.g. MySQL, Oracle etc) is the food storage freezer. Cold and unfeeling, but it contains the raw materials that the restaurant is dependent on. The Application (e.g. Ruby on Rails, PHP, C#, Java etc) is the chef. She takes the order from the waiter, goes to the freezer and gets the raw meats and vegetables that go with the recipe, prepares the exquisite dish you ordered, and sends it back to the waiter.

Got it? Good. Now, most programming languages have to go and get everything they need for the recipe on their first trip to the freezer. If you forget to include an ingredient in the recipe you define, the chef will FLIP OUT and send back a mangled mess (error page). Ruby on Rails though, uses something called Lazy Loading. It doesn’t fetch your associations until you need them unless you explicitly ask for them at the beginning. In the restaurant analogy, it’s an improvisational chef. It can put ingredients together on the fly, and doesn’t need to stick to a strict recipe script. (N.B. BEFORE all you nerds get on my case, realize that I am oversimplifying this greatly for the benefit of our human counterparts and this analogy has no implications with regard to performance or anything else, just trying to illustrate a point.)

Now, I immediately identified with this methodology because I am a practitioner of it IRL. See: “On an Ivy League Campus, Slacker Neil Sarkar Offers a New Point of View”. I know it may be unconventional, but I’m a strong believer that lazy loading or lazy evaluation is a more efficient mentality. Freeing up brain space by only retaining information that is absolutely essential allows you more computing power for problem solving. In tech terms, RAM > Conventional memory. In human terms, Effectiveness > Completeness. I mean >>>>>>, it’s not even close.

Here’s a simple real world example of lazy evaluation in action: when a girl at the bar tells you her name, don’t even try to remember it. First off you probably won’t need it five minutes from now anyway, your game’s not that good. Secondly if you do end up hanging out then hey, thats something to keep the conversation going. It’s not like she’s going to forget her own name…she’s keeping track of that information so you don’t have to until you need it.

OK so that was a crude and somewhat sensationalist example, but do you know what I am saying? As long as information is a google search away, you can stop cluttering your brain with knowledge that you don’t need RIGHT NOW, because in the event that you do need it, you can always go back and look it up.

My advice boils down to: treat life like a game of Rummy 500. If you’re not going to be using what’s in your head some time in the next couple turns (hours), get rid of it! don’t look back! it’s already in your subconcious so you can fetch it if you need it. The average person is waaaaay too averse to destruction. It’s by cluttering up the attics of our minds with useless information that we unnecessarily burden and stress ourselves and become easily overwhelmed. The world is overwhelming and stressful enough, don’t do it to yourself. Because the bottom line is you only live once, and when you feel the reaper’s embrace, you don’t want to be stuck holding those aces. Trust me, I’m a Programmer.

Filed Under: Advice, Coding

Author: Neil Sarkar

Neil loves people and freedom and hates hyperbole more than anything else in the world. Before arriving at VaynerMedia, he worried that the contradictory nature of his technical abilities (coding, math, explaining how microwaves work) and his humanistic passions (philosophy, business, stand-up comedy) would limit his ability to achieve in either one. However, working with the rest of the team quickly taught him the inherent value and massive potential of bridging robots (code) and humans (business)
  • A man after my own heart. A fantastic read, I'm forwarding this on to all my pure-techie colleagues...
  • Steph
    Great blog, Neil :) I'm so proud !!! Keep 'em coming. And amazing use of Spec article.
  • Chris @ Rizzo Tees
    My head hurts now. That means you're a smart guy!
  • Barnaby
    Hey Neil, Nice blog post. I love the analogy, "treat life like a game of Rummy 500." It's probably one of the best analogies I've heard in a long time.
  • I completely forgot I was quoted in that Spec story on the Sarkar philosophy of life. How's it going, Neil? I liked the restaurant simile, but the information efficiency of neglecting to remember the names of people in bars was even better. You always have been the best guy I know with metaphor.
  • ya that article is a blast from the past right? i wish the online version had the pictures in it still, they were phenomenal. hope cadwalader is going well mang
  • GREAT INFO and very well written!! Easy read and very informative. I love your analogies
  • hey thanks a lot man, I appreciate it...it's actually my first blog post ever. And you know, about the analogies, I never really noticed myself but I've been getting that a lot recently.

    Thanks again for the kind words man
blog comments powered by Disqus