on Mar 6th, 2011On the importance of Legacy and being open minded

“You never know where you are going, until you know where you’ve been”

There is a big message in that quote. The message being, never underestimate the historical context behind a certain field of study. Take any occupation, a student starts out learning the history behind the field and understands why certain things are done a certain way. The pressure for jobs and commercialization of college education has completely ignored the importance of the historical context and are running with (what educators term as) nextGen syllabus, which helps students secure jobs in the industry.

Just yesterday, I was involved in a debate about doing away with C and C++ in Under graduate Computer Science in favor of languages like Ruby and Lisp. Learning Ruby and Lisp will guarantee you jobs, but not the understanding of why those programming paradigms are so powerful. One can never understand why C++ was a game changer if they didn’t know C, or why Java was so much better compared to C++. Same is the case with the Ruby. One will never understand the power of  a dynamic language unless they have used static  compiled languages. In the recent past I have met fresh graduates who have not done either C/C++ or Java but have directly used Ruby and NoSql stores instead of a RDBMS. Would I be comfortable recruiting such folk? I don’t really know. But one thing is for certain, the historical context should almost be an imperative when it comes to technology. In a talk by a senior consultant in my company, he highlighted how they would write code on paper and pass it to a typist who would type on a terminal and run the program. I developed a whole new respect for IDEs.

There is a completely orthogonal view of the world. People with a lot of historical context become really close minded to change and picking up newer technologies, and newer ways of working. During the last two months, I have also been working on a social collaboration platform to be deployed as a platform for knowledge management in my company. The early reactions from youngsters has been phenomenal. The 30+ crowd is still trying to get their head around this concept and in more than one occasion, I have found myself trying to explain how this would be a new way of working and dealing with information overload. I am reminded of reading books about how people were averse to the introduction of the Typewriter, or how in the later part of the 20th century, people were skeptical about the introduction of PC’s in offices. Industrial automation also created a similar furore as most experts (at that time) thought it would displace human labor and create massive unemployment.

Knowing all of this historical context helps me understand that skeptics aside, the new social way of working will definitely redefine the way of working in an enterprise. In my opinion, the power users of any sort of information system (be it consumption or delivery) will be uncomfortable with the thought of losing their way of consuming information. Picking up a new technology would mean learning new tricks, skills and reworking to get to the status of a power user. But change is inevitable. One has to trust the wisdom of the crowd and become more open minded to change, and accept changes in the way of working, technologies used and so on.

on Jan 30th, 2011Continuous Deployment : My first experience

After following a lot of discussions around the devops role, I was eager to put my new found knowledge to use. After i attended a talk by Jez Humble about his new book Continuous Delivery, I was fascinated by the concept of a fully automated deployment script for applications. I am still yet to get my hands dirty with infrastructure automation tools like Puppet and Chef but wanted to give Continuous Deployment a shot. Eventually, I hope to utilize this deployment script , along with Puppet and Chef code, and make a self deploying machine configuration. First, the problem.

One of my side projects has a very active code base. We use Git as our Source Code Management system and Hudson for Continuous Integration. Since most of the application backend is pretty stable, the bulk of the changes on our trunk are mostly changes in logic, new features , enhancements and bug fixes. We also run a dogfooding instance where we push the latest changes and test our changes. On our Linux server, we use Tomcat as our app container, MySql and Cassandra for datastores, Solr for indexing and all builds use Gradle. Till now, pushing changes was a manual task. Here is how I automated this task. @prateeksha , who is a unix command line ninja, was kind enough to guide me through the entire process.

Pushing changes involved , updating the code base to the latest master branch, doing the database migrations and restarting the App Container. Though I still have to get my head around database migrations, here is where automation stands now.

- The continuous deployment script can either be triggered by a git Post-Receive hook or by using a Cron Job.

-  If triggered by a Cron job, we need to poll git for changes. I found this neat little script that figures out whether there have been changes to the source repository and prints out the status of the repository.The script is shown below:

#!/bin/sh
        remote=$1
        o=.git/remote_cache.$remote
        n=$o.new$$
        git ls-remote $remote >$n
        if [ -f $o ]
        then
                if diff $o $n >/dev/null
                then
                        echo "No Changes"
                else
                        mv $n $o
                        echo "Updated"
                fi
        else
                mv $n $o
                echo "New remote remembered..."
        fi

If the return value from this script is “Updated” then changes from Git are pulled, Gradle build scripts are run, and the app container(Tomcat) is restarted. Using Hudson’s wonderful API’s, you can check whether the latest build of the entire project is successful or not. If it is successful, we can either take Hudson’s build artifact, or build the project again and deploy it.  Also, a small little utility extracts the log information, date and time of the push and presents it on the App itself. At any point in time, if you want to know what version of the App is actually deployed, you can see a version page which displays deployment time and commit log. Screen shot below.

Version infomration of the Continuously deployed Application

Click to Enlarge - Version info of the App

This has been my first experiment with Continuous deployment, I still need to understand and solve the migrations issue. Next? More experiments with Chef and Puppet coming up.

on Jan 8th, 2011Shutter – open source alternative to skitch

Shutter for Ubuntu

Shutter is an open source alternative to Skitch, which is a mac only advanced Screenshot utility. This tool will help you capture screenshots  in sections, full screen or multi-monitor mode. You can then do some minor modifications such as adding annotations, highlighting specific regions, adding small icons , free form drawing , cropping etc. It’s a great utility especially on Ubuntu and will save you the time learning other advanced tools like Gimp. It is also well maintained and is a fairly small install with all its dependencies. I use it intensively especially my work involves a lot of Prototyping, User Experience Design and WireFraming. Great find indeed!

on Dec 16th, 2010De-Google yourself

A trend I am seeing nowadays involves people De-Googling themselves. The intention is to not let one public company own all of your private data. By data, I mean everything from your private Email, Calendar , Blog feeds, web search personalization, facebook tracking etc. Luckily I happen to know a few of them who de-googled themselves. Here’s how they did it, and the tools they used.

- E-mail : It is very hard to let go of Gmail, its wonderful conversation threading and spam filter, but it is possible. For a meager $6 a year you get your own custom domain name, something like mine, riteshnayak.com. Then comes the $24 a year email hosting account. You can run multiple email clients like SquirrelMail, Horde or Roundcube. Rackspace also provides their own web + desktop email and calendar services for $2 a month.

-  For reading blog subscriptions (via RSS) there are multiple desktop clients that are available. Newsgator and Opera’s Blog reader come to mind immediately. If you want a web based solution just like Google reader, try the self hosted Feed on Feeds.

- Another important thing would be to make sure your activities are not tracked while you are online. There are multiple ways of achieving this. You could start by using the private browsing mode on Firefox, IE and Chrome. You could also get extensions like Disconnect, which disables any third party tracking.

Thats it for now! If you have tools of your own that you use, please share them via comments.

on Apr 27th, 2010Interviews Schminterviews

In the last three weeks, I have panel interviewed about 3 people and have reviewed about 4 others in their interview process. I must say, I am surprised at the level of technical skill most of these candidates exhibit during the interviews. People with lot more years of experience than me go dumb founded when asked trivial questions. I handled interviews for  developer positions and have found it extremely difficult to spot talented people.  There are some, who are really talented,  but cannot express themselves. And then, there are people, who don’t know shit, but act all Chuck Norris on the interviewers. Are you really determined to find talented people? Then here is what you do. Here are some things that you might like to read as well.

  • The Resume: Oh! this one is tricky. Instant brownie points if the resume is LaTex generated. Reason? Well any person who has worked with LaTex would have had to do it for authoring a paper. Any person who understands the effort and rigor involved in authoring papers surely deserves points.   I like a resume to be simple, short and precise. A 7 page resume isn’t something that I am interested in seeing.  Two or three pages at most.  Here is what I look in a resume: The objective should not look copy pasted and should be something original. I also like to see hyperlinks on a resume; I would definitely like to explore a little more about the stuff that you mentioned in brief. It builds curiosity and that’s good. And no, I don’t care if you won the second place in your high school bharatnatyam competition or if you organized your college fest.
  • My first question would be the fizz buzz question. The question loosely reads as follows: “ Your task is to print numbers from 1 to n. For every multiple of 3, instead of the number you print fizz and for every multiple of 5 buzz, and for every multiple of 3 and 5, you print fizz buzz“.  Take any language that you comfortable with and solve this problem. This is like a tard filter which will let me not waste my time with posers. You will be surprised at the number of people who fumble doing this.
  • I wont really care if you have worked with JMS, XML, J2ME, AJAX, SSRS, SSIS, JSB, WCS, JSTL, HTML, DHTML, XHTML, MOSS, SOAP, BO, WPF or any other such acronym. These are just technological deltas which you will eventually have to use. My question will always be as to why did you use such a thing. What were the benefits and such.
  • If you are interviewing for the role of a developer who works on web technologies, get your basic HTML, JS and CSS right. Brush up on some HTML5, learn about the different security models of browsers, cross site scripting etc And please, for gods sake, know what the boundaries of a web application are. I am sure to throw in the ” Can you connect to a android phone using Javascript” question and I don’t expect the answer to be YES.
  • I have always felt writing programs is always about algorithmic aptitude, intelligent manipulation and handling of data and optimization. So there will be one question in each one of these topics, at least. Make sure you know your data structures really well. I have heard answers about hashmaps being stored sequentially, binary search time complexity being O(n), hashtable complexity being O(n) and so on. According to me programming is all about data structures and making conscious and intelligent choices about them. Also, knowing how to solve a problem is not an end to a problem. See how you can optimize your solution. I am sure to ask an optimization question.
  • Design : If the position is for a senior developer, I will surely ask an Object Oriented Design question and on conceptual modeling of data. If you don’t know normalization , ACID properties of data , then read up. Its used in the real world and if you cannot model a student-library database, you seriously have to consider an alternate career.
  • Off beat:  I am always pushing to see if a developer is passionate about his or her work. I am sure to ask the person, “What according to you is the best project you have done and why do you think its awesome?”. This you should answer for at least 5 minutes and should do so passionately.
  • Contributions to Open Source is definitely a plus. Even if you released a project that no one other than you downloaded and used, its better to put that in your resume to earn brownie points.
  • If I have the time and the resources, I would encourage another round of coding. In their favorite language and IDE, but without being connected to the internet. Or I would love to give them pre written buggy code that they should help me debug. That’s more of a hands on approach and it helps in a couple of ways.
  • 1. Most dev’s like to write code and would not like to read pre-existing code. Most of the times though, its not possible to keep writing new code, you will have to look at old code and debug it.
  • 2. A developer good at debugging is always an asset to a teaam.

Well, this mostly what I tend to do in an interview. If you have more interviewer/interviewee specific points, questions, share them with me.