Tuesday, September 13, 2011
Life's Little Things: Board Shorts
Sunday, September 04, 2011
Toolset
Inspired by The Setup and Pratul’s post, here is how I ‘get my work done’.
Hardware
I currently use a four-core i7 15" Macbook Pro with 8GB of RAM and a 500GB HDD. I love it. For backups I have a Western Digital 160GB hard drive. I use cheap Skullcandy earphones when I need them (I usually prefer speakers).
Operating System
I used to be on Arch Linux until I got the MBP. Now I use OS X Snow Leopard. I still run Arch + KDE on a VirtualBox instance to occasionally hack on KDE. With 8GB of RAM, both keep running snappy :)
Running OSX might come as a surprise considering my FOSS roots. But my software stack is such that it makes no difference what UNIX I use really.
Software
Considering I use the computer all day, the number of applications I actually run is tiny.
I use Firefox for browsing. I hide all chrome except the tab bar, and use the excellent Pentadactyl extension to get vim key bindings and other keyboard driven goodness to Firefox.
For viewing PDFs, I use Preview. The rare photo management is done with iPhoto. Music needs are satisfied with Clementine (my iTunes resides in the Trash), while VLC handles video.
I do use the excellent Notational Velocity for note taking and idea jotting and the like. It fast, it stays out of the way and is easy to sync if I have to.
iCal, synced with Google Calendar, is used for todos and submission reminders.
And that is all the GUI apps I usually run. Which is why it doesn’t matter what UNIX I use, since most of my work is in the shell.
Office suite you say? I find Google Docs suffices, to the point that if somebody sends me MS formats, I upload them to Google Docs. The Gmail web interface is also unbeatable so mail stays there.
Accessories include Dropbox, Temperature Monitor Lite, gfxCardStatus to manually control which graphics card is in use, ShiftIt to position windows, afloat to allow ‘Always on Top’ like KWin, Growl for notifications and Tunnelblick for VPN management.
Now we come to the terminal. My terminal emulator is iTerm. I have only one window running maximized, with tmux acting as my ‘window manager’ for shells. It has a slightly customized statusbar, with the solarized colour scheme. The shell is zsh with a custom zshrc based on stuff I pick up around the Internet, with the zsh-git prompt.
This exact same terminal configuration is also available in the Linux VM (including vim configuration) so that I don’t need to switch my behaviour for the different OSes.
For IRC I use irssi although I use it as a total newbie.
And the rest of my day is spent in vim. I do all my long writing in vim — code, articles, blog posts, configuration files — everything. I use the molokai theme rather than solarized for the editor.
Vim plugins
First Tim Pope’s pathogen is indispensible to easily manage other plugins.
a.vim is a convenient little script to toggle between headers and sources.
ack.vim allows the invocation of ack from vim and presents the results in the Quickfix buffer. I map the keystroke ‘sd’ to ack.vim.
fugitive is useful for Git integration with vim, but I don’t use it that much yet except to do blames.
fuzzyfinder is another indispensible script for me. I map ‘sf’ to fuzzyfinder so I can quickly invoke that.
Other plugins I use include nerdcommenter and vim-surround.
My Dream Setup
I would love a standing desk in my hostel room with an external monitor connected to my laptop, the way I worked at Mozilla. I am considering buying a Netgear Ultra 2 NAS to have redundant storage and sharing. Otherwise the MBP works great and is sufficient for now.
Monday, July 25, 2011
Harry Potter and the Deathly Hallows Part 2
I first saw DH2 on Friday night, and my thoughts after watching it were:
On Wednesday night I saw it again, determined to find out why I disliked it so much, and whether I was just being too hard on it. Interestingly, most Potter fans seem to have liked it this time, which was not the case before. Mike Patterson though has this interesting writeup pointing out in very specific instances why the movie was bad. I myself have only raised my rating a couple of notches. Seen independently, the movie is decent, but after multiple readings of the book and ten years of association with Harry Potter it is plain bad.
To get the good parts out of the way, the Prince’s Tale was beautifully done, Alan Rickman brings his marvellous portrayal of Snape to a great ending. The movie was visually pretty good, and Hogwart’s defending itself was well done, though a bit artificial in the performances of the professors.
But in the bid to add action and drama to the movie, certain themes of the book were pushed aside, and that made this movie just another action thriller. There was some weak acting in places and just terrible situations too, but to focus:
Imperio
We start at Gringotts and Harry casts the Imperius Curse on the goblin. To lend some perspective, use of the Unforgiveable Curses is akin to murder in the Muggle world. Harry has demonstrated countless times before that he is not comfortable with hurting others (Expelliarmus anyone?). In fact, it is Griphook who has to put the idea in his head.
“Act now, act now,” whispered Griphook in Harry’s ear, “the Imperius Curse!” – Harry Potter and the Deathly Hallows, Page 531 of the US edition
and
And another memory darted through his mind, of the real Bellatrix Lestrange shrieking at him when he had first tried to use an Unforgivable Curse: “You need to mean them, Potter!” – Harry Potter and the Deathly Hallows, Page 533 of the US edition
The use of Imperio in the book is an act of desperation, because certain things are simply evil, even in the magical world, and making a person go against his will is one of them. In the movie, we aren’t even shown Harry’s face as he casts the spell, and when Ron casts it again in the depths of Gringotts, he does it trivially. Obviously you cannot explain thought processes on screen, but a touch of hesistation, an expression, goes a long way into conveying the seriousness of the act. After all the goblin does die in the movie due to the curse.
Wands
Wands are the crux of the books, the one way humans get access to magic. They are ‘alive’, and bond and grow up with the wizard. Wands are respected, even Death Eaters don’t just destroy their enemy’s wand. The breaking of the holly and phoenix feather wand is immensely important. That wand has kept him alive 6 years. Its breaking is also symbolic of how Harry has to sever connections with Voldemort to defeat him. The re-joining of his wand is the last thing Harry does in the book, signifying a new beginning. Where is the holly wand in the movie?!
Now to turn to the Elder Wand, the Deathstick, a wand with more lore than any other. The scene in the Headmaster’s office in “The Flaw in the Plan” is to show that Harry has the selflessness to give up that power and accept Death, but he still does not destroy it because it is an artifact, and Harry realizes that and puts it back in the grave, aware that its power is not really neutralized just yet.
In the movie, he just snaps it and throws the pieces away. You DO NOT snap a wand!
The Kiss
“Is this the moment?” Harry asked weakly… – Harry Potter and the Deathly Hallows, Page 625 of the US edition
Ron and Hermione do not kiss because they destroyed a Horcrux! The Kiss serves multiple purposes in the book. Tension between Ron and Hermione has been brewing since Book 3. Ron has always been attracted to Hermione, but she holds back, unsure of Ron’s seriousness. Book 6 and 7 are about Ron maturing and starting to think about others. Ron abandoning Harry and Hermione and then returning is the test of his growth.
Meanwhile Hermione has always been the one to watch out for others. She also has a fanatical desire for equality of all species. Rowling clearly wanted to point out against discrimination in our society, and what better way than to use a Muggle-born girl with no pre-conceptions. S.P.E.W. is just her being formal, but all through Book 4-7 Hermione has stood up for the down-trodden – even when Kreacher is lying she supports him.
Ron remembering that the house-elves need to be rescued flips the switch. It convinces her that Ron truly has changed and is capable of the compromises required in a relationship. Second his acceptance for something she supports is crucial for her to commit.
The Kiss was not spontaneous, it was building up for 4 books. The only thing spontaneous was the absurdity of the situation. All of this was lost in the movie.
The Flaw in the Plan…
was badly dealt with.
So there is the most powerful wizard of all time, he has the most powerful wand of all time, WHY would he try to rip out Harry’s face with bare hands?
And why would you show both Bellatrix’s and Voldemort’s bodies as some kind of container for their souls, so that once the curse hits, they just disintegrate? Voldemort was after all, only human and the falling of his frail body with “mundane finality” was supposed to indicate this.
Then the theme of love and remorse that is a cornerstone of the book is never raised. That Voldemort’s spells are no longer binding on anybody because Harry has effectively ‘pulled a Lily’ on everyone is skipped. That love and sacrifice defeat Death is ignored. I would have loved to see Voldemort scream “Accidents” like he does in the book, to show his ignorance of “house elves and children’s tales, of love, loyalty, and innocence”.
Expelliarmus and Avada Kedavra, Harry and Voldemort’s trademark moves were for a reason. For Voldemort it represents his conviction that Death is the worst damage you can inflict, while Disarming fits Harry’s character of not wishing death even to his attacker. In the movie the spells were never uttered (and we know that Harry is bad at non-verbal spells). The spells seemed to be different too, since Avada Kedavra does not disintegrate the body.
Dumbledore
Ah, were to start with this. Book 7 took this great great man that was Albus Dumbledore and tore him down, producing the flawed human every one of us is. Harry and Dumbledore are two characters shaped by death and Dumbledore’s reaction proves opposite to Harry’s reaction for a while. Dumbledore is the man who campaigns for equality, non-discrimination and all other things that are Voldemort. He is the character who brings out the deeper flaws in the wizarding world to casual readers. And contrary to being all this through wisdom, Rowling gave him these attributes by making him a man filled with remorse.
Rowling is trying to show throughout the books is that its the choices that matter!
If that wasn’t enough, Dumbledore is linked to the Hallows and Horcruxes and essentially scripts this entire storyline in a very high-level manner. His theories about the connection between Harry and Voldemort and how Magic is connected to conscious phenomena like Love is the only channel the reader has of deeper insights into the Wizarding World. To drop all mention of Dumbledore in the movie was representative of Hollywood’s bid to add only action and bling to known blockbusters, creating movies that do not make the reader think or disturb them.
Many readers judge of the power of a book by the shock it gives their feelings. – Henry Wadsworth Longfellow, Kavanagh, Chapter XIII.
In re-reading this article, I feel I haven’t been fully able to convince the reader due to a lack of writing skills. I’d take that up in specific comments if any :)
Summing it up the books are about death and love and innocence and good and evil, but also about moments and small scenes that create intricate characters in our minds, and frame unspoken laws about the world of the book. You cannot make a good movie without keeping those in mind.
Friday, July 01, 2011
Simulating the Facebook Wall in Google+
books, so I'm not going to say anything about what I think of it and
all that. But a couple of friends have been wondering how to do something like
the Wall in Google+. The fine granularity of sharing means
that you can directly use your Stream as a wall in G+ which is very
convenient. If you are a programmer think of it in terms of Pub-Sub
with highly configurable channels. To write on someone's wall, just create a new post, and share it only
with them. That way only that person sees it in the stream
which is effectively what a wall is. But a mutual friend can see the
wall post in Facebook. How do you do that in Google+? That is what
a circle is for. I think the real value of circles is as disposable
ribbons around friends. You can pull and push people into them as
required,
create temporary circles to share among really small niches or over a
set of overlapping circles and so on. Tip: LIke Facebook uses @ to mention names, Google+ uses, quite obviously, + What I would love to see is the ability to put one circle inside the
other and so on, so that information shared with outer circles leaks
to
inner ones, but not the other way around.
Tuesday, June 14, 2011
6: Time for a change
It’s been a month now since the semester is over, but when you are sitting in California, and visiting amazing places on weekends, writing blog posts isn’t the highest priority :) But the 6th semester deserves 10 blog posts and atleast one is mandated.
6 not only had a personal highs, but in general wrought a lot of changes. I’ve begun taking a lot of pictures this semester. I always thought it was stupid of people to shoot images like crazy, but it turns out that photos are a very good way to trigger memories about past events. I also started scribbling down little notes about memorable days. Not only are they a great resource when writing posts a few months later, but you can capture your state of mind at that point which is impossible later. This is an outcome of the approach to the end of the college and seeing the emotional situation of the seniors during their final semester.
I’ve been torn between making this post a chronicle of events or focusing on deeper things, which I don’t write very well about. Apologies to the two friends whom I chided on not writing good enough entries. It is hard work :P.
Even semesters usually start with Synapse, and boy was this year’s Synapse blazing. The only reason this paragraph exists is so I could use the word blazing. But Synapse does not fit where this note is going, although it served as the beginning for many of the things that happened.
Life this semester was like American television shows, one larger story arc with lots of action in between :) That arc is of course trying for internships on two sides of the world. On the 22nd of March when Mozilla hired me past midnight – that was an EPIC moment! Living in Silicon Valley, working on Firefox and getting paid for it is a dream I never even considered, and it all became true in two hurried months of interviews with the nicest people, and visa procedures that make you an expert in filling up forms. I guess, now that I’m hired, I can reveal two interview gaffes I made. One of my interviews was during conf.kde.in when I was in Bangalore, with my Ahmedabad phone number. This meant I was on roaming. I conveniently forgot about the charges it entailed and was surprised when the call dropped half way through discussing hash tables. The second ‘disaster’ was on the final interview. Due to some time-zone blunder I was woken up by the interviewer and proceeded to give the interview in a most uncomfortable manner. That I still got the job seems like a bit of a shock now. (Note: Do not let the interviewer in on the fact that you’ve just woken up. Continue asking questions about the company until you are awake enough to deal with the technical parts.)
Most of my college life has been an attempt at improving some or the other part of my personality. Being more impulsive has been at the top of that list. I used to be too much of a planner with an inbuilt cron daemon and all that, and if you continue with that you can miss a lot of the fun parts of college life. With the switch I’ve lost a lot of sleep, but it was well worth it. The outcome – memorable all-nighters which had nothing to do with studying, going to a movie the day before the exam because it was a three day international film festival and spending a lot more time away from the computer. I now think this is also an attempt to break down every stereotype associated with me in college, and since the t-shirt incident last year, I’ve been performing brilliantly at it :)
As if determined to give me more reasons to be impulsive, India put on a massive World Cup win! I don’t really like cricket, but the crazy atmosphere in college, the constant cheering and the euphoria when the cup was won, was absolutely remarkable, and I think the Nikhil of yester-year would not have attended the matches.
The other change has been to experience as many things as possible, which means eating in new places, travelling around, attending just about everything I could. This has been at the cost of certain responsibilities, which might be seen as bad by others (ie. not holding enough OSID sessions) but I’ve finally decided that it is more important for me to be personally satisfied with what I am doing than to conform (again) to those stereotypes that the old Nikhil has built up.
I do not mean that I want to shirk my achievements. It feels good to know that you’ve set certain examples that others follow and to be a guide when jumping into the difficult world of FOSS development. This year, over 8 students were selected for Google Summer of Code from DA-IICT, and to know that me, Aditya and Dinesh had a part to play in it felt really good.
While I was having fun, the KDE India community ticked off its dream of having a conference here. conf.kde.in was a very special occasion because it was the first time the KDE community had a India conference. Pradeepto and Shantanu and others in Bangalore put in a ton of effort , and the eV provided full support, which led to a wonderful conference with well known KDE speakers and some great food :) The response was tremendous and some of the effects are already visible with the number of Summer of Code and other contributors who were conference attendees. My own contributions have been at an all time low and it seems it will be that way into the summer, but the motivation has not dwindled only due to the wonderful people.
Academically this semester was a personal disaster. I had really easy courses for the most part, but I did not like the amount of effort I put in. The parts which I thoroughly enjoyed, I did really well, but for the most part I was a pig-headed ass, and that has to change. I did get a 9.4/10 overall though :)
The software engineering course was Shakespeare all over again. I feared it, then I mocked it, then I rebelled against it, then I just mis-quoted it in desperation :), and in hindsight I respect it. It was a hard lesson in managing a team, getting work done and staying with one piece of software for four long months and polishing it. It proved to me that the hacker style of coding is not enough on its own to produce good software.
Finally, in my ‘thoughts document’ (see SEN ke side effects!) that I mentioned at the beginning, there are certain names of people that have affected or inspired me in college. While writing this I’ve been deliberating on whether now is a good time. It’s not, but two groups of students do deserve a special mention:
The Press Club – We’ve had an excellent year with readership through the roof and high-quality articles. The batch of 2007 has been the principal force in rejuvenating the magazine and the main source of the more argumentative and well analyzed articles. At the same time you’ve been humble mentors and this is getting really fluffy so thanks a lot is all I’ve got to say.
Special Ops – Ah, what to put here about the weirdest bunch of juniors and some batchmates, some of whom I got to know only this semester? Thanks for letting me enjoy the World Cup, listening patiently to my PJs, playing TT, and not treating me like a senior. Now just stop calling me bhaiya and we are cool. Also remember, you are all 10 pointers :)
There are other people, but I don’t want to embarass them and they don’t come under any group :P You know who you are.
If you’ve made it till here and know me, you may be surprised at how this post has played out, considering I’m the un-emotional, hug-less boy. Do NOT raise this slew of changes in a face-to-face discussion with me (especially you Mama and Baba :)), in some things I’m still closed source.
Monday, May 02, 2011
Interning
Why not a GSoC again?
Having over two years of FOSS contribution and 7 years of usage and having done a GSoC previously, I could have done one again. While a GSoC is an invaluable experience, it is not the same as an internship. GSoC is excellent at improving e-mail communication skills and long distance collaboration and giving a feel of the open source development style. But it is not the same as going to office, talking to people, having lunch together and hanging out. In addition internships usually will be in a city or country other than the one you live so it can be a great excuse to explore a new place. So if you’ve already done a GSoC, getting a different sort of experience is way more important in my opinion. So I didn’t apply at all this year. Besides I was confident that my experience would serve me just as well to get into the kind of companies I wanted.Have a good CV
Spell-check, design it well and put in only relevant things. If you are a good singer don’t put that in just to have stuff to show in a IT company. On the other hand positions of responsibility should always be highlighted. FOSS contributions top the charts in startups and other ‘cool’ or cutting-edge companies.Start early
By luck or resolve my best move was starting to look for internships in December for an intern to start in May. Keep in mind that HR departments are busy places, resumes can take time to process and sometimes do get lost. Wait for a week for a reply when you submit your CV, then ping them aggressively on IRC, Twitter and e-mail to ensure you aren’t forgotten. Interview procedures can take upto a month and for international interns there are visa procedures that take time. Finally you are likely to get rejected by the first few and you should have time to apply for more. In any case companies with established internship programs have information available on their websites and start each season with prior planning.Decide what you want to work on
The first two companies I applied to were Google India and RethinkDB. The RethinkDB folks were very positive about international interns. I had two interviews in early January which went ok. I was rejected, which in hindsight I know was due to me not really being passionate enough about what they were doing. So I narrowed down to the two specific interests I currently have.- Javascript engines and low level APIs
- concurrency, distributed networking and web-scale computing.
Stick to a few companies.
Interviews are always stressful because you have to think on the spot. If you are trying internationally they will be at very bad times (most of mine were at 6am and 10pm). Companies hiring solely on phone interviews will usually take atleast three interviews. In addition you will have to prepare atleast a bit for them. This adds up to a lot of things to do. So stick to a few companies at a time. Prioritise which company you want to work for if hired by multiples companies. When you agree for interview times, make sure you convert timezones properly and that you don’t have any appointments more important than the interview at that time. Finally, remember you have a life too :) I gave one of my interviews at conf.kde.in, and another during Synapse. At such times be very careful with scheduling.Research
Off-campus internships (ie. ones you find on your own) are the way to go. The college will always aim for what is good for a majority of students, or towards established companies. But if your area of interest is niche you can do a much better job looking on your own.Try to find out as much as you can about what interns do in the company. With some searching you can usually find blog posts of former interns which can be very informative. Talk to people in the domain. If you are a FOSS contributor ask fellow IRC users about intern opportunities or experiences.
Based on my areas I finally applied to:
- RethinkDB
- Google India
- Directi
- Opera
- Mozilla
Be confident, but ready for rejection.
During the interview what matters most is being able to keep up a continuous stream of conversation going to show that you are capable of thinking. So if you tend to think mentally for 15 minutes and then produce the answer in a flash, it would be good to think out loudly. If you are confused, clarify the question, it does not penalise you. Remember that in interviews no one expects perfect code, and classes and documentation. If you miss edge cases thats fine, performance – not an issue until the interviewer actually asks you for a better algorithm. Graph and string algorithms are a favourite of interviewers. For algorithms the TopCoder tutorials are a good read. For C++, the C++ FAQ is invaluable. In fact I suggest always having that page open during the interview. For C++, templates and virtual functions tend to be a question spot. In addition, know the warts and good points of your favourite language. If you have FOSS projects, be ready to explain what they are, and how you implemented them. One favourite interviewer question is, “What was the hardest part to implement?”. In such a case be prepared to explain in as general terms as possible, since the APIs you use may not be something the interviewer has experience with.A typical telephone interview will last 30 minutes to an hour. Half of that time will be the technical interview and the other half when you can chat with the interviewer. A full recap of my interviews with each company are beyond the scope of this article, but suffice to say that I was lucky to have extremely nice interviewers. Google insists on algorithmic questions which you’ll usually answer via a shared Google Docs. Remember that in a phone interview it is important to know how to approach the problem. Since you have access to a computer, once you know what to do, you can look up your existing code or use the internet. Just keep discussing the approach on the phone and speak with utmost confidence. The interviewer may try to misguide you. For Mozilla and Opera the interview was purely on former experiences and some C++ stuff. Use the chat time later well. Good questions to ask are about prior interns, what they do, how they find the company etc. If you know their name before the interview, see if you can find out about them on the internet.
Get to know and learn from the interviewers
My most memorable interview was the fourth one with Mozilla when due to some daylight savings confusion I was woken up by the interview call. Desperate to get myself sane, I asked him a few questions before I let him start the technical round. After that I spent 45 minutes discussing spidermonkey and Mozilla’s general plans with Luke Wagner. It was a very humbling experience. If you can show the interviewer that you are passionate about the products and do you homework, there final review is much more likely to be glowingly positive. Finally they can tell you about some implementation features, constraints etc. that can be interesting to know about even if you never join that organization.Congrats, now get to work!
After all this, I hope you get selected somewhere. I can’t really write the part about how to handle it if you get rejected. So what happened to me?The response order was:
- RethinkDB reject – January 16, 2011
- Directi reject – March ??, 2011
- Mozilla accept – March 22, 2011
- Google accept – March 25, 2011
- Opera reject – March 28, 2011
A note to DA-IICT students specifically! Our placement cell has an odd policy where when you apply for one or more internships through the placement cell, you are bound to accept the offer of whichever company accepts you first. So if a ‘better’ company delays their interviews, and a ‘lesser’ company hires you already, you are screwed.

