Why is the job not so interesting after graduating from IIT?

When I speak to some of my friends who graduated recently from IIT Madras, often they seem not so satisfied about their work. While most of the reasons they told me were related to deciding on the one thing that they really wanted to do, the root cause of the problem I think lies in the way the system is setup. Precisely, CAPITALISM, very well criticized by Karl Marx. I’m really surprised to witness these things happening. If we look at the reasons that my friends give for not being satisfied:


The job is boring:

As this system is setup on fundamentals of capitalism, it tries to become more and more productive. And that requires humans to do the chunks of tasks that they are doing in companies more and more effectively. One of the most profound drawbacks of capitalism presented by Marx was that the modern work is alienated. That is exactly what is happening again. We see our work more like attaining mastery at something (Specialization) than delivering something that will contribute to the final product the company is making. Marx suggested that, to be fulfilled at work you need to see yourself in the object that you produce. But that’s not how today’s companies operate. They want you to be efficient at a specific task. And inevitably it becomes boring because it’s repetitive.

There will always be alternative choice which is ideal for what you can do in life. To be satisfied about what we are doing right now, we have to imagine our career in the field we work in. Making our brain believe that this is the one thing that we always wanted to do in life, is very crucial. To feel achieved about our work in any company, we should try to get an overview as to how much our work has contributed to the final deliverable.

Finally after contributing so much, if you are looking for credit and applause, well most of the times you won’t be happy. Steve Wozniak was unhappy that people were praising Steve Jobs, while apple computers were created by him. But did you ever hear that? Every great company is built on integrity and collaborative work of all the team members.

Focus on your learning. You can do a lot better.


This is not my passion and I don’t know what is:

We can never find our passion if we keep looking for it and stay unhappy about what we do today. We have to dedicate our time to whatever we are doing completely to find that one thing that we would do regardless. But being the victims of this capitalist economy, we go to work for money and we don’t care about the company that we work for. And this is not something to be ashamed of when all our community values is how much we are earning.

Just forget for a moment that you are working for the company. Think about the future of the company and your role in shaping it. And do you need to be a stakeholder to do that? I don’t think so. Try to be best at what you do there and let’s see how that turns out.

I had worked in IIT Madras placement team for three years and I can say that more than half of people who graduate from IIT Madras won’t choose a career in their core field of study. After placements they would get trained in a new field and eventually put to work. Placements in the college are not a place where you sell your very capable brain for performing in some field that is not connected to you study at IIT. The main purpose of engineering is for us to choose one thing that we can dedicate ourselves to and make our career in that which ideally should be the core field of study. The level of exposure that we get at IIT will enable us to stumble upon different fields to choose one as our passion. But what happens to the four years of effort you’ve put in? Should you just dropout as soon as you find your passion and realize that it is not your core field of study? Should you still finish what you are doing and then focus on your interested area? But what happens to four years of productive life that you’ve spent? All these questions sound very difficult to answer. But one best answer still exists, which is pursuing a career in your core field of study. I can clearly say one thing about academics — That is the only place where your knowledge is respected the most.

This is when, people think about startups. IIT Madras is promoting entrepreneurship. But the question is should it? I personally don’t think it should. If the educational system cannot make individuals love the subject they are studying in, I don’t see a point in their existence. This may be good for people who realize that they are really interested in something else other than the core field but, again what happens to the core knowledge that students gain at IIT? Are they never going to use it again? In that case allowing students to pursue their area of interest in academics sounds better than asking students to take a break for starting up.

You choose what you want to be early on in life. Fixate on something and call it your passion, if you haven’t yet found the one thing that might be your passion.


The work is not so challenging:

The routine work is never challenging if you keep doing it the same way. How about doing it in a more efficient way the next time you do it? Most people working in corporate companies think the work in startups is much more challenging than their work. The grass is always greener on the other side. Currently I work on my own startup and the amount of pressure on me is insane. There is an advantage in working for corporates, the level of clarity that you will have about your work is very high in any corporate company, everything is figured out for you. In startups most of the times you will have to figure out things for yourself, there is huge responsibility associated with it which is again a good thing. If you are a person who wants to forget everything about work life once you get out of the office in the evening, then startup might not be a good choice for you.

Pacing yourself well in this competitive world is very important. Surround yourself with people who evolve quickly. Move fast. Learn fast. You can make it challenging.

Finally I’ll conclude with one of my greatest learnings during my stay at IITM — Love what you learn. Love what you do. Know why you do what you do.
Do not study for monetary benefits. Choose the company you wish to work in, rather than giving them a choice to choose you in placements. This way there is sure shot chance that the company that you wish to work in, will select you.

These are all my observations and perspectives. Need not be true for everyone. Please do share in comments if you have alternate thoughts.

Why I think teaching is the most respectable profession

Think of the whole human race moving forward by gathering knowledge, making deductions and framing insights. As we move forward, the magnitude of total human knowledge increases rapidly and the boundaries of human knowledge are pushed forward. It will be tougher for the younger generations to get a clear understanding about everything around them. What teachers do in contrast with researchers (who really push the boundaries of knowledge), is that they find ways for the younger generations to consume this knowledge in an organized fashion. And relating this to what Edward De Bono tells us in his book ‘Lateral Thinking’, the order of information arrival to a human brain plays an important role in how an individual frames his insights. The work that teachers do, makes it easy for students to reach the boundary of human knowledge in an effective path and will then enable them to push it further.

I found it a little hard to learn something for teaching someone, but eventually I realized that that is the best way of learning anything. It all narrows down to how well one can explain what he/she knows. But to articulate insights, one needs have a very clear understanding. Everyone has their own perspective towards a piece of knowledge because, every one of us look at any form of knowledge from different focal points. For some it is easy to understand anything only if they know the bigger picture of why that particular piece of knowledge exists, and for some it easy easy to grasp when they deal with different pieces of knowledge separately. Regardless, the teacher has to look at the piece of knowledge from where the student is looking at, to answer his questions and clear his doubts.

My mother was a teacher and I observed her carefully to think about teaching in these terms. And that’s why I respect teaching the most!

Get closure notation in xcode by double clicking

This is a great time saving tip I have found while watching the Stanford iOS lecture series by Paul Hegarty. When defining a function with just one closure as an argument, we can use the closure notation for the sake of neatness.

func functionName { () -> Void


While writing this code xcode pre-populates the function with valid types. By default it will suggest you something like:

func functionName ( handler:(Type) -> Void ) 

The “handler:(Type) -> Void” will be highlighted for us to write some code there. And now the tip is, we can remove the parenthesis and double-click on the highlighted part to get to the closure notation.

Not very hard to remember and use this and it definitely saves a lot of time.

Notes on Swift programming language by a ‘flying snake’

This is my personal notes and reference on Swift programming language. I’m a hard core pythonista. I had to learn Swift and develop an iOS app, so started learning and one good thing I did is to note down patterns and information about Swift that are new to me. I guess, now you understood why I named the title as “Notes on Swift programming language by a ‘flying snake'”. Okay enough of chatter, here’s my notes:
  • “variableName: Type?” can be used to create optional variables for which the values are not determined at the time of declaration
  • In swift parameters passed to a function are treated as constants by default.
  • We can make the parameters variable type by explicitly writing var.
    • func myFunction( var age: Int ){ println(age+1)}
  • Type inference won’t happen while declaring the parameters of a function in case if default value for that parameter is provided.
  • When calling a function with a parameter value which is different from default specified while declaring a function, we need to provide the name of the parameter. Although we can leave it blank in which case default value will be taken.
  • An array can hold only one type of values.
  • Mutable when created with var and immutable when created with let
  • Type annotation while defining an array: var myArray: [String]
  • All keys should be of one type and values of one type, although both types can be same.
  • Type annotation while defining an dict: var myDict: [String:Int]
  • Mutable when created with var and immutable when created with let
  • Setting a value to nil deletes the key value pair.
  • Are more like simple arrays, but values can be accessed by dot notation through index of numbers or strings if explicitly defined.
  •  Are variables for which the type and default value is not decided while defining them.
  • When interpolating optional inside a string, Swift will print “Optional(value)”. To avoid we can include ! followed by optional variable. For example \(optVariable!)
  • Upper case first letter case is suggested to use.
  • Used to create a type with choices. For example:
               enum ChoiceType {
                    case OptionOne
                    case OptionTwo
               var myChoice: ChoiceType
               myChoice = .OptionOne // or
               myChoice = ChoiceType.OptionOne
  •  Can be used in switch case where you define the limited number of choices available
  • Equivalent to lambda functions in python
  • Can be stored in constants and passed around
  • To ensure a closure taken in nothing and returns nothing we can use this syntax: { ( )->( ) in //statements }
  • ARC is used in cleaning objects that are not in use but, to ensure the cleaning happens we can use deinit()
  • self which is generally used to as a reference to a particular instance of a class is not necessary in Swift, unless there is a conflict in naming properties
  • ‘final func’ can be used to avoid the methods to be overridden. Similarly ‘final class’ can be used on classes which are not expected to be overridden
  • Properties in a class are of two types: stored and computed. Computed properties have getter and setter closures
  • Nesting classes(actually there is no concept of nesting in Swift but relating to Python the syntax is the same; you write class keyword before defining a method or property) allows us to create class methods which will not have access to instance level data/variables. However they have access to class level properties
  • Lazy properties can be used to skip processing a class property in case it is process heavy, while instantiating  the class.
  • ‘lazy’ keyword can be appended to make lazy properties. the only rule here is that all the lazy properties are ‘var’s. This might be beaches Swift is assigning nil to this property while instantiating and changing it later. ‘let’ gives a compile error.
  • Remember class level properties we discussed earlier? Apart from get and set we have some observer closures we can define which are called right before and after setting a property respectively
  • Structures are value type, meaning value is copied when assigned to different variable. Whereas in classes reference is copied.
  • We can create structures by ‘struct’ keyword. We can change any class into structure
  • Structures can neither be inherited nor inheritable
  • Structures cannot have deist method
  • All the operators need either one space or no space on either side
  • ‘…’ is a closed range operator and ‘..<‘ ‘..>’ are closed range operators used to create a range of numbers
  • ‘??’ or nil-coalesce operator can be used in case of assigning a value to the variable if the value is not nil, or some other value if that is nil. For example ‘var test = t1 ?? t2’, if t1 is optional variable and is not set then t2 will be assigned to test.
This list keeps growing and I’ll add my notes on advanced topics like protocols, extensions, generics etc., soon.
Feel free to add anything you find interesting in Swift programming language by commenting below.

Best way to learn Django

Answer by Arun K Reddy:

The best way to learn any library/module is to first look at the documentation and then go through the source if you are proficient in the language it is written in.

Adding to what Gunjan has answered earlier, these are some of very broad aspects you should look into in Django, not in any order of preference:

  • Request – Response cycle
  • Authentication flow. One of the main reason for Django’s popularity
  • Class inheritance and meta-classes and how Django uses them to embody it’s philosophy. Trust me, you will be amazed.
  • Django in relation with conventional MVC frameworks
  • Try breaking some conventions that Django has imposed(Actually it doesn’t), or let’s call it ‘explained’ in it’s documentation. For example write model classes in views file, sounds stupid I know, you get what I intended to say: break rules and see what happens
  • Try some other light weight framework like Flask and then relate the req-res cycle with the one you implemented in Django
  • Check the source of built-in apps like static pages app. This way you can get some confidence that you are doing it the right way
  • Check the correct way to make any Django app fully portable
  • Tweak the default templates served by Django by overriding
  • Read “two scoops of Django”

If you find anything alien in the above list do Google and do not tend ignore it. I wanted give you a list of things you should look at. And regarding the differences, I think the best place to look at would be release notes in the documentation.

How should I learn Django? Are there any major differences between Django 1.4 and 1.7?

SSH tunneling from terminal

In my last post about the-story-of-ssh-tunneling, we’ve seen various use cases for tunneling. In this post let’s discover some extremely easy ways to tunnel without using any tools like putty, kitty etc.

First we need to get rid of the tools like putty we use for tunneling:

What if I say it can be done with a single command? Let’s have a look at the command:

ssh -L 1234: username@ipaddress

L stands for listen, it tells our local system to keep the port open and tunnel all traffic through it to the specified ip address( on port(1111). Just to recap, we do this when this local computer we are on, cannot access this particular address( and the remote machine (ip address at the end of the command) can access it. Note that in case we need to access a website that we cannot access in local computer, then we can change 1111 to 80 (80 is the default port on which web pages are served) and type http://localhost:1234 to access the website. We use ports other than 80, when we want to access some application serving on different port, for example proxy servers.

Now that we have tunneled using our terminal, you need to keep the terminal open to keep the connection alive. All we have to do is to send this process to background. That can be done by adding a flag ‘f’ to the ssh command. The command will now be:

ssh -N -f -L 1234: username@ipaddress

The -N flag asks to establish the connection but not to make it a login shell.

As we have successfully sent the process to background after logging in of-course, what if we want to monitor/see/kill this specific process? There is a command to see these processes:

pgrep ssh | xargs ps

Here pgrep will search for the processes which have ‘ssh’ included in their names and pipe it to xargs which will take the stdin and pass it to ps command which will give a detailed view of processes. You can kill a process by saying:

kill process_id

You can see the process ids in the detailed view given by ps.

I’m still lazy to execute this huge ssh command again and again. One thing I can do is to check history but the right way to reduce this command to some known word is by using aliases.
You can add following to your ~/.bashrc file. ~ stands for home if you are not aware.

alias tunnel='ssh -N -f -L 1234: username@ipaddress'
alias tunneldown='pgrep -n ssh | xargs kill'

We are using the -n flag in pgrep to get the latest from the results, assuming that you didn’t open multiple processes after the first one.
Once you add this to your .bashrc file, execute

source ~/.bashrc

to update the shell we are using with the commands we inserted in .bashrc. Then you can peacefully do tunnel or tunneldown to connect and disconnect.

One additional thing that can be done is to set global proxy settings by issuing multiple commands under same alias. We can use && for that. I would leave that for you to figure out.

How critical is it to build a business plan for a startup?

Answer by Arun K Reddy:

Let me start this answer by asking you a very fundamental question. Did you ever learn something to teach someone? I've been doing that for 2 years now. Try doing it in this perspective next time when you learn something.
You would find this way of learning something is very different than all the learning you did until now. The difference I found is clarity and the emphasis on details and patterns. The same would be true if you start writing whatever you have learnt already.
Coming to business plans, regardless of whether you are following a lean startup model or the traditional business models, when you start writing you will start untangling all the intuitive assumptions 'the defaults' that you've made when you were moulding your idea in your brain. You will gain more clarity which will enable you to pitch your idea to anyone at anytime you want. You will uncover all the defaults in your brain and start analysing the strategy required.
And businesses are obviously not like you learn something and start doing it on your own. You've got to inspire people to believe in what you believe.
So my advice for you is not to think of it as a requirement for applying to some incubators, accelerator programs etc. Filling the business model canvas can help.

View Answer on Quora

Custom render method to pass request context

I’m sure you might definitely have faced problems with checking whether a user is logged in or any other session data associated with request in templates. This is a workaround. There may be some shortcuts packages which include this kind of render methods, but this is the easy way.

#usage - from projects.shortcuts import render_template

from django.template import RequestContext
from django.shortcuts import render_to_response

def render_template(request, template, data=None):
    "Wrapper around render_to_response that fills in context_instance for you."
    response = render_to_response(template, data,
    return response

Overriding save() method in Django models.

Recently I’ve encountered some troubles in overriding the default model save() method in Django. Let me give the example code first following which I will discuss some things you need to keep in mind while doing this.

import os
from django.db import models

class ModelClass (models.Model):
    name = models.CharField(max_length=100)
    email = models.EmailField()
    hash = models.CharField(primary_key=True, max_length=32)

    def create_hash(self):
        return os.urandom(32).encode('hex')

    def save(self, *args, **kwargs):
        #check if the row with this hash already exists.
        if not self.pk:
            self.hash = self.create_hash() 
        self.my_stuff = 'something I want to save in that field'
        super(ModelClass, self).save(*args, **kwargs)

There are three things to be really taken care of here:

1) We have to call the parent class’s save method in the end with the populated fields with your data (Obvious).

If you are overriding the save method for automatically/logically insert a field which in this case is the hash field you definitely need to set the blank option to True.This is because save method won’t be called until all the fields are populated and validated. So, Django thinks that the hash field is required and raises an error.

2) Save method is called when django creates and as well as when it updates the row.

Which is why we are checking for the pk if it already exists in the database otherwise django would create a new hash and store even when the row is being updated.

3) We’ve taken hash as the primary key.

If you have one more field here called user which is a OneToOne field to auth.user, removing the primary_key option for hash variable sounds good but even before that Django automatically restricts the duplication based on user field so, you might need to modify your unique hash creation accordingly.