- India would be home to innovative companies like (say) Apple and Google .
- At least one popular language (like, say, Ruby), Operating Sytem (like Linux) , or widely used tool (like say, emacs) would be invented by an Indian. .
- People all over the world would expect a newly announced fantastic advance in software to have an Indian (vs an American) origin. At least afew "iconic" thought leaders (of the calibre of Linus Torvalds or Steve Jobs) would be Indian.
- Many Indians would be publishing the "killer books" in various subfields of software theory and practice. Take the best technical book you have read. Now imagine it having an Indian author to see what I mean.
- India would have annual events like the DARPA Robotics Car Race, with relentless pushing forward of the frontiers of knowledge and possibility every year.
- The most talented and ambitious students from other countries would apply in droves to Indian Educational Institutions and the selection commitee would have the luxury to pick and choose the best.
- Harvard and MIT would learn from IIMs and IIT and try to imitate their methods and "best practices".
- Bangalore would be the California of the world, with the most innovative people , companies, and ideas finding their natural home there.
- People all over the world would want to immigrate to India and acquire Indian citizenship. Our consulates in the USA and UK would be forced to impose quotas on work and other immigrant visas.
- The core of a new software system would be designed and implemented in Bangalore and the "janitorial" work would be "outsourced" elsewhere. (Yes, I see you ROTFL :-) I told you this is all imagination. A man can dream can't he? :-))
Ravi Mohan's Blog
Sunday, May 07, 2006
A Thought Experiment
I recently had a conversation with a friend who works in ICICI, one of the largest banks in India. Contrary to my "image" I am deeply interested in Business and the "enterprise"; I belive the practice of outsourcing the software at the heart of an enterprise to body shops flogging mediocre programmers is indefensible. My friend was kind enough to enlighten me on how banking really works and the context in which Indian Banking operates. The next few blog entries will be devoted to insights which spun off rom that conversation. First though, I'd like to focus on the gaps between image,ideal and reality
As with all industries (e.g the outsourced software "industry") there is an image, ("intellectually challenging work done by extremely bright people trying to change the world" in the case of the Indian software industry) which people outside the industry believe and a not-so-cool reality which only insiders are aware of. The reality of India's software "industry" is that most "hackers" working in it are comparable to the illegal immigrants from Mexico who come to swanky Wall Street offices early in the morning to vaccum and dust. The difference is that the average mexican immigrant who does these jobs does not fool himself into thinking he is doing "cutting edge" work.
The interesting thing is that beyond these two perceptions ("What does IndustryX look like from the outside?" and "What is IndustryX really like (from the inside)?") there is another question "What could IndustryX be like if we tried to really deliver superior customer value and create first class working environments and did first class work?".
Very few companies are trying to envision and implement the last question in any industry,whether it be software, banking or anything else.
Let us do a thought experiment and envision a future in which India did less of the "janitorial" programming, and becomes a true "software super power". In such an imaginary point in the multiverse,
Tuesday, April 18, 2006
Everything Old is New Again - The Ruby DSL hype
Update: I've received a few mails asking how to go about creating dsl s "the right way" in Ruby. If you are in Bangalore, I suggest you attend the Ruby DSL talk at the Agile India 2006 by my friends Badri and Sudarshan (both Thoughtworkers). Such things are best learned by demonstration than reading about it and the Badri and Sudarshan are probably the best people in Bangalore to learn from.
If you are not in Bangalore find someone who knows and ask him to teach you. :-)
[Rant]
These things have been true from the dawn of programming languages
The next time someone tries to tell you how he created this uber cool "dsl" in ruby AND that this takes some fundamentally new technique, laugh in his face.
Ok , biting your tongue and walking away quietly is almost as good.
DSLs like any other programming technique, when used appropriately gives some beneficial effects. But it is no panacea and a casual perusal of the net will reveal a bunch of atrocious dsls . Beware the hype and snake oil.
[end Rant]
- A language with a built in eval function allows you to transform code into a parse tree at runtime.
- To the degree that the language has a uniform/flexible syntax, this transition between code and data is painless
- All language transforms consist of two steps . First you convert a string into a data structure called a "syntax tree" . This is called parsing. Then various transformations can be done on this data structure to produce the effect you want. Thus the string "2 + 3" can be converted into a datastructure like "{ operator: "+", operand1:"2", operand2:"3"}". Then you can define various transforms that work on (or "visit" in oo terms) the components of the data structure and do whatever you want. e.g : (pseudocode) def print(anAst) puts anAst.operand1,anAst.operator,anAst.operand2 end def printReversePolish(anAst) puts anAst.operand1,anAst.operand2,anAst.operator end def evaluate(anAst) return anAst.operand1 + anAst.operand2 end anAst = parse("2 + 3") print(anAst) => 2 + 3 printReversePolish(anAst) => 2 3 + evaluate(anAST) => 5 and that is all there is (conceptually) to any langauge transform.
- Ruby "DSL" s allow people who haven't studied the fundamentals of computer science to think they are discovering something new and amazing. Yes, Ruby allows a somewhat seamless mixing of "pure" ruby and "dsl" code, but this is just as true for any langauge with a built in eval and clean syntax. (lisp, forth, even smalltalk). The built in "eval" takes care of the parsing (as long as the syntax does not vary too widely from ruby syntax)
Saturday, April 08, 2006
Learning from a Master{Class}
I attended a series of lectures on technical topics today and here are my "take away points" in no particular order.
- "Service Oriented Architecture" is an empty buzzword label designed to squeeze money out of unsuspecting clients
- Good ideas (e.g: "role playing" a presentation) needs to be executed flawlessly to be effective and cannot be substitute for a belief in what one is speaking about.
- Having one set of people selecting topics and another set of people being "volunteered" to speak is a terrible way of attempting to deliver a great speech/session.
- Having original insights arranged in a logical structure is key to a good speech. Presentation skills provide a final finish.
- Insight arises from taking the time to rigorously think about what is important, and by asking "why" for things everyone takes for granted.
- Here is a way to test your "hacker quotient" (assuming you are a programmer). How much of your code is written by you wanting to code it vs having to code it?
- If a series of sessions is to be arranged on a single theme, care should be taken to have them rise to a peak, in terms of quality of content and speakers. An abrubt decline in (relative) quality drives the audience away (fast).
- If you don't have a good, genuine question to ask the speaker after a speech, for God's sake, shut up and sit down. Nobody thinks you are smart if you ask vague, inchoate and stupid questions .
Wednesday, April 05, 2006
The Rest Of The Year - Plans
I just rolled off a Telecom Fraud Detection project that saw the successful deployment of one of my core foci - Artificial Intelligence. My next project in 2006 will be in my next major focus area - compilers.
I can't talk too much about this in public yet but I can say that till about August middle/September beginning (tentative deadline) I will be building a production quality compiler for some custom hardware. Large parts of this project (if not all of it) will be open sourced at the end of the project, once the code base is stable enough. Parallelly I hope to help one of my friends bring out a product, and do a serious upgrade of my mathematics skills.
Life is good.
[Context Switch]
If any readers of this blog want to meet me, the Agile India Conference, (where Rajesh and I are doing a linked pair of talks on Robotics) is a good chance to do so.
I shall be talking about language design issues in robotics and Rajesh, on the problems of implementing custom firmware . There are many other interesting sessions on the agenda ( I particularly look forward to KD's speech on the impact of Culture on Agile Practices - knowing KD, this promises to be a real blast), so if you are in Bangalore (or can get to Bangalore, don't miss the fun. (Registration will open later tonight).
Update : Registration for Agile India 2006 is now open.
Friday, March 31, 2006
The Storm Before the Calm
As of May the 6th of 2006 (the final day of the Agile India Conference, where I am speaking on "The Design And Implementation of Robotics Languages"), I am completely abandoning all connections to the "offshored software" world. No more agile/extremeprogrammng/tdd, no more j2ee, no more "offshore teams" delivering "superior business value" using "best practices" crap.
Paul Graham said,
"If it is possible to make yourself into a great hacker, the way to do it may be to make the following deal with yourself: you never have to work on boring projects (unless your family will starve otherwise), and in return, you'll never allow yourself to do a half-assed job. All the great hackers I know seem to have made that deal, though perhaps none of them had any choice in the matter."
Now whether I am or will ever be a "great hacker" aside, "you'll never work on boring projects, and in return, you'll never allow yourself to do a half-assed job." seems a fantastic principle to live by (it helps that I don't have a family I need to keep above the starvation line - Oh the blessed joys of bachelorhood :-) ).
Once you cross the age of 30, you are in the second half of your life. It is horrible enough that I spent one decade caught up in the "offshored software" paradigm. One decade - think of it and weep. A decade of dedicated practice would make you world class in anything you choose. One could be a world class athlete, musician, martial artist, dancer,writer, film maker... whatever! And I spent it writing "plonk this data off a database and put it on a set of dinky webpages" systems.
Shakespeare got it right when he made Macbeth say "And all our yesterdays have lighted fools,
The way to dusty death."
And it is a very seductive bargain - in the beginning - money for nothing, multiple trips abroad (ignoring the fact that you are roughly in the position of a Sepoy in the Old army of the British Raj, occasionally sent abroad to shed your blood in the Empire's mysterious wars), all the trappings of a "successful" life. Time blurs and you wake up to find yourself either a second grade "project manager" type implementing commands from across the seas (and trying desperately to convince yourself that you are now in a superior position compared to the lowly blue collar techies, having forgotten what little you knew) or yet another burned out "techie" having no skills beyond "j2ee" or "perl and php".
Spending any more time in that world would mean I am frittering away what remains of my life. The Red Pill came just in time, methinks.
The number of genuinely good programmers and the amount of true innovation in India is astoundingly low, for all the talk of being the "21st century superpower". The "pseudo geek" profile many people unwittingly take on is very low on substance and very high on deception.
But it is not all doom and gloom. The less something exists, the more the opportunity to create it.
The mistake,I've found, is in thinking, like many Non Resident Indians do, that "I'll go home next year (and meanwhile, endure another year of meaninglessness)". Of course "next year" never comes. If one plans to "go home", the time to do it is right now.
From Snow Crash,
" Until a man is twenty-five, he still thinks, every so often, that under the right circumstances he could be the baddest motherfucker in the world. If I moved to a martial-arts monastery in China and studied real hard for ten years. If my family was wiped out by Colombian drug dealers and I swore myself to revenge. If I got a fatal disease, had one year to live, and devoted it to wiping out street crime. If I just dropped out and devoted my life to being bad."
I am way past 25, but "devoting my life to being bad" sounds good anyway.
Saturday, February 25, 2006
The Importance of Having Friends Who Disagree
Paul Graham says, in one of his essays (emphasis mine)
"....Why do you need other people? Can't you just think of new ideas yourself? The empirical answer is: no. Even Einstein needed people to bounce ideas off. Ideas get developed in the process of explaining them to the right kind of person. You need that resistance, just as a carver needs the resistance of the wood.
This is one reason Y Combinator has a rule against investing in startups with only one founder. Practically every successful company has at least two. And because startup founders work under great pressure, it's critical they be friends....."
In my experience, this need for "friendly resistance" extends to far more than creating startups. Every time you have a new idea, you need people you can bounce it off. To get any real benefit out of this process you need people with a complex combination of characteristics.
They should
- have firm (but not rigid) opinions on their own
- have logical reasons for those beliefs and be able to articulate them clearly
- are driven by ideas and not ideology
- not attach their egos to their opinions.
- be willing to concede a valid argument even if it forces them to possibly re-examine their beliefs
- know how to listen
Tuesday, February 21, 2006
Yet Another Math Milestone
A few days ago, I discovered an error in the mathematics of a paper (on neural network optimization) being prepared for publication by a very eminent scientist. My drawing attention to this discrepancy in the proof has led to a total recasting of the approach to the problem and I will be now listed as a co-author of the paper.
Hmm yeah. Whatever. So how is this significant?
Well this is the first time I have used my skill in mathematics (vs my skill in programming) to contribute significantly to a scientific effort. In an old blog post I had theorised that the acquisition of "mathematical thinking" would follow a four step path. I said ..
- the first step in mastering math is be to learn to read the notation. just like learning the syntax of a new programming language
- the second is to grasp the reality expressed by the notation at a gut level , like understanding the paradigm and patterns lying underneath a programming language , like ,say ,beginning to grok "oo"
- the third is to use that understanding to create new possibilities
- the fourth is to use a programming language to embody and refine those possibilities , thus creating programs that do what has never been done before.
Saturday, February 11, 2006
Wir sind alle Dänen
This is the rare "political" post. Those not interested, move right on.
Enough is enough.
In my opinion it is foolishness to initiate a "clash of civilizations". But if there is a battle line forming by virtue of some people insisting that their religious laws should apply to people of other religions (or no religion) then I know on which side I stand.
Anyone has the right to be "offended". That does not give them the right to kill, burn and issue threats. Fwiw, I do not believe in Islam, Mohammed, his "sacredness" or infallibility, etc etc. The people who protest most at this "disrespect" have laws in their own countries that officially forbid the practice of any other religion. If you carry a Bible or Bhagavad Gita into Saudi Arabia, it will be seized and shredded at the airport. How dare they protest against any "disrespect"? First practice this "respect to other religions" and then complain your religion isn't respected.
Kennedy once said "Two thousand years ago the proudest boast was civis Romanus sum. Today, in the world of freedom, the proudest boast is 'Ich bin ein Berliner.' All free men, wherever they may live, are citizens of Berlin, and, therefore, as a free man, I take pride in the words 'Ich bin ein Berliner!'"
Today, all free men, no matter where they live, are citizens of Denmark.
Wir sind alle Dänen.
Update: This post has generated a lot of feedback mostly by email (some people seem afraid to express themselves in public. hmmm...) .
One comment on this blog (subsequently deleted by the author) said "There's also the trap of 'they don't respect my religion/beliefs/whatnot so why should I respect theirs?'. That's the point where civilized conversation breaks down." .
This is a little naive. You can't have a conversation with people who don't follow the norms of "civilized" conversation and are not interested in a conversation. This most often happens with people who are convinced that their truth (religion/prophet/Holy Book/ideology/ whatever) is infallible. There should be no tolerance of the intolerant.
From an article by the editor of Jyllands-Posten (the Danish newspaper that published the cartoons) (emphasis mine)
"Has Jyllands-Posten insulted and disrespected Islam? It certainly didn't intend to. But what does respect mean? When I visit a mosque, I show my respect by taking off my shoes. I follow the customs, just as I do in a church, synagogue or other holy place. But if a believer demands that I, as a nonbeliever, observe his taboos in the public domain, he is not asking for my respect, but for my submission. And that is incompatible with a secular democracy."
So yes, this kaffir maintains that anyone who demands rights and respect that he is not willing to give to others is a hypocrite.
And while I may not (or may) be impressed with Islam or its Prophet, (that is my privilege in a free society), my stance is not anti-Islam but anti-hypocrisy.
People (of any religion) who say "respect my religion" should extend respect to other religions (and to atheists). There is no one way "civilized debate".
Saturday, February 04, 2006
Old Laptop, Meet New Laptop
Wednesday, February 01, 2006
Indians are cheap, not free!
When you are an independent consultant, you see a lot of crazy people. The most dreaded monster in this bestiary is that of the Non-Resident-Indian-Trying-To-"Develop Products"-In-Bangalore.
The game generally goes like this.
Some desperate Indian working in the USA on a regular job (note that he is NOT a venture capitalist, businessman etc) gets what he thinks is an "Awesome" idea. The he discuses this with some equally clueless friends and they hammer out some technology choices (j2ee , .net whatver). After a few weeks/months of this they decide they want the software done "cheap". Even companies which charge very little money per developer hour (say TCS) wouldn't give these folks the time of the day so they ask their friends in Bangalore to reccomend "top grade" independent developers.These poor innocents recomend people they know to be good developers and have left the corprorate rat race to work independently.
Now the fun begins. The Independent Consultant (IC from now) gets a call from the USA saying "MR X who you worked with in Company ... reccomended you as a top notch developer. We have this awesome idea that we need you to develop in "asp /.net" within 3 months. We also are looking for junior developers, testers and maybe a Project Manager. Do you think you can help us"? The consultant, if he has been independent for a while, has seen this dance many tims before and immediately asks "Do you guys have any money or is all this wishful thinking?"
There are a few different answers to this. Sometimes it is "yeah we can pay 5$ per hour for the first 24 weeks " ( I am NOT joking!!!). Or alternatively , "you see we are just starting out blah blah so we don't have much ready cash but we have all these highflying VCs lined up and if you can work free for the first 6 months then you have millions of dollars in equity".
Duh . Yeah Right.
Some of the more ... emmm .. subtle folks wants the IC to work for them without knowing what the "cool idea " is. After all a "cool idea" is very valuable right? We once encountered an "idea man" who offered to join our company as a "Project Manager" ("since it has been a long time since I coded anything") while looking for funding and in the meanwhile he would let us pay him an "industry standard" salary.
Stupidity is the one thing which REALLY has no limts.
Monday, January 30, 2006
To Teach is To Learn Twice ... And More
I am sometimes asked by clients to implement Artificial Intelligence based solutions to problems involving massive datasets, real time requirements etc. A non trivial part of this work is to transfer the knowledge of AI algorithms and the underlying maths to the client's programmers. After doing this a few times, I now have a clearer idea of some of the difficulties involved and some partial solutions for them.
- Problem 1 : Transferring Mathematical Intuition Using AI effectively often demands a deep understanding of the mathematics underlying whatever AI 'paradigm'/algorithm you use. For e.g. to even think about whether Neural Networks are a good solution for a problem, one needs to understand Linear Algebra at very intuitive level. To many people maths == a set of equations or symbols to be manipulated. And this manipulation and re arrangement of concepts to achieve precise effects is something programmers are naturally good at and so this tendency is even more deeply rooted in good programmers. For e.g., a lot of us have learned the equation F = m * a , where 'F' is Force, 'm' is mass and 'a' is acceleration. And to get through our exams we treat this as some kind of pluggable system in which two quantities are known (or can be derived from the given data) and the third has to be derived. This looks fairly simple. To check whether you understand the reality underlying the equation ask yourself this - "Does Force cause acceleration? Or Vice versa? Or both? Why? When?". The use of equations to *calculate* a quantity is different from being able to think effectively in terms of the concepts underlying the equation. To use mathematics effectively one has to constantly translate between the world of mathematics and the domain of the problem. Very few people(including mathematicians) feel the need to acquire this skill. People who use mathematics to get work done (e.g. Physicists/ Astronomers/ Race Car Designers) acquire this skill out of sheer necessity. Forcing oneself to translate (and asking students to translate) back and forth between English(without using mathemetical terms) and Mathematics is a valuable exercise. (try doing this for a simple differential equation and you will see what i mean) Thus, it isn't possible for someone to grab a few equations out of the latest AI/Pattern Recognition/Robotics etc book and apply them straight away to solve real world problems. To even know what is possible takes an understanding of the mathematical undepinnings of the various "families" of AI algorithms and this intuition takes a long time(at least for folks like me) to acquire. If programmers are just shown some algorithms or mathematical proofs, it is very unlikely they will be able to program an effective system or even maintain a system to meet changing environments. This is complicated by the fact that intuition may take a few years to acquire but has to be transferred in a week or less. While there is no perfect solution to this, I find that one can transfer large "chunks" of intuition through carefully selected (sequences of) motivating examples. In my first "iteration" of teaching, I said (in effect), "o.k. here is the (basic) theory. This is the algorithm in pseudocode. Use this and you will get the results you want". Everyone seemed happy but the whole effort "thrashed " for quite a while before delivering the (astoundingly effective) results. So these days, I try to instill an understanding of the theory distinct from the programming effort. More of a "teach how to fish" while giving the student enough "fish" so he doesn't starve till he learns to fend for himself. Thus instead of just throwing out the algorithms for (say) prediction and monitoring of data streams using Markov models, I start with real world examples of prediction vs monitoring and slowly feed in the maths (equations first, trivial programs next, then proofs, then real world programs). Given sharp "students" (as most of the programmers I interact with on a daily basis are, (Thank God!)) this works suprisingly well. I sometimes feel I am spinning a rope bridge across yawning chasms but the notion of a "slice" through a system works just as well in mathematics as in agile "story card" based implementation. Once a few cables are thrown across, programmers feel brave enough to explore the abyss a few feet at a time without too much assistance.
- Problem 2 : Getting beyond "right" and "wrong" Sometimes in spite of my best attempts at simplifying and communicating, my "students" (I think of them as peer programmers rather than as students, hence the quote marks) sometimes misunderstand and "screw up" the concepts and write strange programs or advance baffling arguments. In the beginning my response was "That is NOT what I said! THIS is what you need to do. PLEASE look at the examples/notes/code. Aaaargh!!!! Not Again! ". A more effective way is to try to figure out what the student's mental model is, faulty though it be. So now, instead of reacting to a totally off track argument by (mentally) banging my head on the nearest wall, I say to myself "What he says makes sense to him. So what mental/model thought processes has he adopted which causes him to see the world in a fashion that makes this argument logical?". The moment I can identify this precisely I am able to come up with an illuminating example that demonstrates the error. And sometimes it turns out they are on to something important and it is my perceptions that need fixing. "Learn Twice" indeed.
- Problem 3 : Ability to Do != Ability to Teach Sometimes the "teaching" gets so fatigue-inducing that I think to myself "I could have coded up all this in one tenth the time it taks me to communicate to someone else". My client, (being wiser than I) insisted on the teaching approach. What I have realized that many people (including Yours Truly) know how to do many thngs but are not often able to explain how they do them or teach others to do likewise. When you teach others you have to know each concept in a crystal clear fashion and also grok all the inteconnections between the concepts. Teaching often involves re-arranging concepts in increasing order of complexity and interdependence, seeking real life and programming examples that illustrate each facet of a concept with great clarity and slowly transitioning into complex real world problems and solutions. After teaching others, I understand many things at a much deeper level than I used to. That being said, teaching consumes massive amounts of time. I have to work 10 hours or more to prepare for a three hour "lecture". Thus "teaching" conflicts with "doing". For the time being, I'll focus on being a programmer more than a "teacher" type but I wonder how others manage. There is a lot more I could write but this post is long enough. In another entry I will look into the difference between "Real world" and "Toy" AI.
Wednesday, January 25, 2006
Some people really get it..
from Xooglers
Sergey once asked a large assemblage of Googlers what our greatest corporate expense was. “Health insurance!” was one answer shouted back. “Salaries!” “Servers!” “Taxes!” “Electricity!” “Charlie’s grocery bills!,” came back others. “No,” said Sergey. “Opportunity cost.” He explained that the products we weren’t launching and the deals we weren’t doing threatened our economic stability more than any single line item in the budget.
How insightful is that? No wonder Google has no problems hiring good people.
Laptop Wars 3 - And the Winner is
an IBM -Lenovo Thinkpad z60m. The model I chose is a marginally less powerful (and less expensive) than the one reviewed in the article I linked to, but I have added some goodies like a hot swappable battery. I paid less than 2k $ for a jazzed up to the gills Thinkpad.
The macbook finally lost out because (a)I don't want to pay good money for beta testing apple's new hardware architecture (The G4 powerbook is too underpowered, and (soon to be) abandoned by Apple anwyay, not to mention terrible display issues on some of them which Apple pretends not to notice). (b)reliability issues with a macbook are likely to be life sucking given the atrocious customer service here in India. If I lived in the USA or Europe I may have been more tempted by the macbook.
IBM has excellent customer service in Bangalore and I have taken out a 3 year warranty. (130$ vs 340$ for the macbook). The Thinkpad outmatches the powerbook in sheer ruggedness. Hopefully in a couple of years Apple will have worked the kinks out of their new hardware choices and I will wait till then to drink the Apple Kool Aid.
My new laptop is on its way to my friend (who lives in the USA) and I should get my hands on it in early March and I will post my experiences installing Linux on the new laptop then.
Sunday, January 22, 2006
Laptop wars 2 - Macbook Pro Vs IBM Thinkpad
A brief update.
I am now thinking of buying either a MacBook Pro (if it comes out before Feb 28, the day my friend - who will bring it to Bangalore- leaves the USA) or an IBM/Lenovo Thinkpad (extremely well suited to Linux - multiple sources confirm that suspend to disk and power management work well and the Thinkpad has a reputaion for rugged construction). The Macbook will cost me about 2600$ (including taxes) and the Thinkpad should be about 1200$. The trouble with the macbook of course is that it is based on new hardware and Apple has historically had problems with new hardware with the 12 in iBook G3 having a particularly horrendous history.
In either case, I'll be buying the machine from the USA. Prices in India are insane with a surcharge of almost 25% on any model, the macbooks being particularly pricey. For that kind of price differential I could buy a 20 in cinema display in addition to the macbook. Anyone returning from the USA can bring in a laptop with no customs duty thus making it cheaper by about 25-30%. Duh! Am I the only one who thinks that is a particularly stupid way to run an economy? And India is going to be the 21 st century SuperPower? Yeah Right!
Saturday, January 14, 2006
The Agile Religion and the need for Merciless Pragmatism
Does anyone else get the feeling that "Agile" is now a religion with its holy books, many patriarchs, its churches, and commandments? ("Thou shalt work in pairs"). It is just a set of useful practices, master them, adapt them, use what works, discard the rest and get on with life.
The moment 'agile' becomes some kind of religion with itinerant preachers of the Holy Word attempting to convert the unwashed heathen to the worship of the True God, its time to step back and take a hard look at what is being attempted. Kent Beck made a list of practices which he found useful. Later a whole bunch of marketing was thrown at it and we have the present situation where people speak of "true agile" , "distributed agile" "xp 2nd edition vs xp 1st edition" and so on.
Another factor often ignore is that most of the "agile" methodologies (to use the word loosely) have their origins in the world of enterprise programming where teams of programmers wrestle with coding up systems for banks, insurance companies etc. Thus there are a lot of assumptions built into the extreme programming and other agile methods which simply don't hold in other contexts.
As a simple example, think about "Customer" and "onsite customer" in the context of a massive open source effort like the Linux Kernel. These terms just don't make sense. Any efforts to twist the meaning of the word to mean "the community" etc just robs the word of any meaning.
There is an even deeper notion of the separation of "what to program" (the customer) from "how to program" (the coder).A "luminary" who spoke on Agile recently said "Programming is all about taking knowledge from others and converting it to code". (Really! I am NOT making this up!)
"Take knowledge from others". Bzzzt! Cluelessness Alert! This may be true in the practice of consulting/business app/enterprise programming etc today but not necessarily elsewhere (Kernel hacking, scientific programming, compilers, embdded programming etc)
I think this view of the programmer as some kind of "coding body" with the "domain knowledge" residing elsewhere is deeply embedded into many "schools" of "agile". More about this in another blog entry but this separation of "what" and "how" has many built in assumptions about the context in which programming occurs.
There are whole worlds of programming outside the "enterprise" world where the 'agile practices' apply very tenuously, if at all.
And even within the enterprise programming domain, agile /xp/ whatever-the-latest-buzzword should be constantly (re) evaluated, adapted and modified, not adopted and propogated mindlessly (I have been guilty of such behaviour in the past and use this blog post to unreservedly apologize to my victims).
If I want some kind of religious experience I can go to my nearest Descent-Of-The-Holy-Spirit-Scream-and-Yell-And-Speak-In-Tongues- Church. When I go to work I want logic, pragmatism and rationality.
I have adopted the "constantly growing test suite","refactoring" and "continous integration" ideas from XP to my work and jettsioned the rest. It is simply impossible to "pair program", do "test driven design" etc in the context in which I work.
TDD is, in retrospect, an insane approach to design. But more about that in another blog entry.
To conclude, the "agile" schools of programming do have many useful ideas. But "agile" is neither a scientific theory (like Relativity) nor some kind of Divine Revelation. They are just a list of practices which work(ed) for some people in some contexts. Beware of "Agile Consultants", "Agile Enablers", etc. Lock that chequebook away and do some focussed thinking and experimenting. Pragmatism trumps religious fervor any day.
Tuesday, January 10, 2006
PowerBook Vs Linux Laptop
I have always wanted a powerbook. And with some "out of band" money coming in from a consulting assignment, I was planning to buy one.
I actually wanted to buy one pronto and if I were not waiting for Steve Jobs's address tomorrow, I would probably have bought one.
After I got home I was reading some reviews of the PowerBook and came across this.
WTF?
I have to pay Apple a premium price so they can dump bad hardware on me? My Compaq Presario 2100 has been treated very roughly over the last 3 years and still works without a hitch.
I am now inclined towards getting a good Linux laptop and am now waiting for my friend (and Kernel Hacker) Mridul Jain to reccomend a good laptop for Linux. I particularly require hibernate (to disk not to RAM) to work well and flawless power management.
Later in the day I'll investigate the display problems in detail. I am hearing more and more horror stories about Apple's machines which makes me very leery of buying them in a country with terrible consumer protection laws.
Update : the PowrBook is definitely out of the picture. Linux forever!
Sunday, January 08, 2006
Startup !
It is official. My friend Rajesh and I just shook (virtual) hands over an interstate phone connection on an agreement to create a startup company.
Right now there is just the intent to create a startup. We were talking of various ideas and suddenly it was "Hey why don't we start a company and do this instead of talking about it?--Yeah ! makes sense! Let's do it. Pick a day to launch--How about April Fools Day?--I like it! ".
So don't ask "What are you building? " (I wouldn't tell you anyway :-)). We have, as always, many ideas being kicked around and both of us are quite ...errr... unstable in different ways so what we are doing will probably get nailed down hours before the launch of the company (slated for Aril 1, 2006 ,the Paperwork Gods consenting). I would expect that there will be a stealth mode for quite some time after the official launch. I have quite a bit of stuff to wind down before April.
I am looking forward to this. The dynamics of a Jedi/Sith alliance promises to be interesting. Our strengths and personalities are very complementary.
Oh yeah. I am finally getting that 17" PowerBook as well :-).
This is going to be fun.
Friday, January 06, 2006
What is your company's M/E ratio?
In simpler words, how many managers do you have per engineer? Look around you . Count the number of managers in your floor/division/office. Count the number of people who actually write or test code. Divide the former by the latter. That is your M/E ratio.
Now reflect on this snippet from this very interesting essay
"...For instance, you can do what Google does, and give each manager 200 direct reports, rather than the classic 7 or 8, so your management overhead grows with the log base-200 of the number of engineers, rather than the log base-8. That's the kind of clever thinking that comes from hiring math-y Ph.D.s, you know..."
As a thought experiment, imagine that your organization hired brilliant engineers and every manager had 200 of them reporting to him and that your CEO, CTO , and the seniormost people in the organization were all PhDs or well known hackers. What do you think might happen? I believe most "don't rock the boat and get my huge salary for pushing paper" type managers would flee in horror. With 200 reports, they won't have the time to harass people and act like the Dilbertian PHB. They might , you know, really add some value! I think you will end up getting really good managers (no, "good manager" is NOT an oxymoron. They are rare but they do exist).
And more importantly with log-base-200 growth rate, the empire building politics playing manger will be relentlessly squeezed out.
In the last company I worked at, this ratio was about 1/8. Would have been much better, in retrospect, to have had an M/E ratio of about 1/20 (at least). Something to keep in mind if I ever get to create a multi billion dollar company.
I think the biggest favor Google has done the world is to prove that an engineer centric, low manager count, ignore-wall-street-and-please-the-customers company can make a lot of money. So no matter what their eventual fate, you can be sure a new generation of entrepreneurs will be paying attention. And learning.
Thursday, January 05, 2006
Monads And Causality
Geenerally I don't post "just links" on my blog. But this time I'll make an exception, because these are very lucid explanations to difficult questions.
Question 1 : How do I explain Monads to a programmer without resorting to mathematics (Category Theory)? (This in turn came out of an email exchange with Peter Van Roy about explicit state vs monadic state (as used in Haskell))
The answer is here.
This is the best answer I've ever seen which skirts Category Theory and various Haskellisms completely.
Question 2 : How can you really know if one factor causes another? (This came out of a conversation I had with a programmer working on a probabilistic classifer [I am working with them on integrating Machine Learning into their product suite])
Here are two sets of slides explaining the approach pioneered by Dr Judea Pearl at UCLA. To oversimplify, a new operator is added to probability theory with a separate semantics. This is a bit beyond standard probability but quite enlightening once you "get it".
On admitting what you got wrong
from Jeffrey Shallit's blog.
....Blondlot's tale is a cautionary one. By contrast, I offer a case where the proper behavior was displayed, from Richard Dawkins' 1996 Richard Dimbleby lecture:
A formative influence on my undergraduate self was the response of a respected elder statesmen of the Oxford Zoology Department when an American visitor had just publicly disproved his favourite theory. The old man strode to the front of the lecture hall, shook the American warmly by the hand and declared in ringing, emotional tones: "My dear fellow, I wish to thank you. I have been wrong these fifteen years." And we clapped our hands red.
Admitting you are wrong is a basic part of the mathematical and scientific ethic. ...
I think it ought to be part of one's personal ethic too.
So here is a (tongue firmly attached to cheek) list of what I was wrong about. Be warned, this is a jumbled list of "lessons learned" and is intrinsically very subjective. Don't expect any coherence.
- Ruby has a perl flavor.
- Ruby is way better than Java.
- A software developer in Bangalore can't do innovative, interesting work and make good money.
- Developing Enterprise Software, especially "outsourced" software is a worthwhile career.
- A knowledge of Mathematics/Programming Language Theory -insert other 'deep' subject here- is unnecessary to build good software.
- Mathematics is boring
- There is plenty of time to find out what to do in life and there is plenty of time to do it.
- Objects are the best way to design programs.
- Programmers are logical people and not prone to delusions and religious mania.
- Agile Methodologies will work (better than what they are already doing) for most teams/products.
- Most managers have a clue about their work/organizations/what their jobs are all about.
- It is impossible to make massive amounts of money doing nothing/ by making other people miserable/delivering negative value (see above).
- All managers are technically clueless.
- In practice, Management, specially in the offshored software world, really adds value and is not a big con game.
- It is impossible to combine being a manager (to get those massive salaries while doing nothing important) and a techie (to retain a of self worth and give life meaning).
- Dilbert is fiction.
- One person can't change the world
- You have to be extra ordinarily talented to change the world.
- The software industry is immune to political correctness fads because it is populated by logical, edcucated people (witness the noise around "diversity" or "we need more women in software")
- Engineers can't master business and are bad at "reading the market", "understanding business value" etc and need support in the form of analysts/managers.
- Some behaviours are so morally dubious that people who indulge in them exist only in fiction . Even if such people exist in the real world, they are very rare and you won't encounter them.
- If you know a person well, you can predict what he or she will or will not do.
- Talented people have a greater probability of being morally upright.
- In real life the good guys don't always win.
- Believing in God is better than being an atheist/agnostic.
- Being an atheist/agnostic is better than being a believer.
Saturday, December 31, 2005
The perils of Java companies
Joel Spolsky writes on the perils of Java schools.Read it. It is an excellent article.
Now dwell on the fact that many of the same conclusions could apply to you if you have never developed a piece of software in a language other than Java or C#. Have you ever created a 5000 line + program in a language other than Java/C#? Do you know (as in wrote some decent programs in) any paradigms other than OO? Do you really know OO? (If you've learned only Java you probably don't). Do you work in a Java(C#) company?
With a new year dawning, it is a good time to make a resolution to improve your programming skills. Alternatively you could just "climb the ladder" and slump into "project management" or "iso/cmm".
Monday, December 26, 2005
Year End Retrospective
Over the last year or so, I have worked alone. This was a nice change from being part of a "globally distributed team", attending stand up (and other) meetings, endless 'pairing' sessions, and other "agile" practices.
As the year draws to an end, I think it maybe worthwhile to explore and clarify what I learned and how I changed.
First, I am now utterly disgusted with 'off shored enterprise' coding. I was never really comfortable with the bland projects that wash ashore in this domain. Too often the projects were utterly boring, in spite of working with some of the best companies and people. The last year has been fantastic in terms of the challenge and complexity of programming and I hope I never have to work on a leasing/banking/insurance/blah database-to-web-and-back, C#-or-java, offshored-to-save-money-by-hiring-tonnes-of-cheap-coding_bodies project in my life again! So help me God!
Second, working on some extremely tough problems have taught me to tone down my enthusiasm for (a) "OO" and (b) "agile". Don't get me wrong, there is much that is valuable in both but these days I see their limits with painful clarity. Now, I see Objects as one (vs the only) way to tackle a problem and while I still follow some of the agile practices (like unit testing and Continous Integration), I am very skeptical of the value of "pairing" etc, outside the simplicities of the "enterprise app" domain.
Third, I am now very focussed on three major themes - (a)learning to create "tough" programs(kernel hacking is tough, creating a normal insurance app in j2ee is not), (b) applying "deep theory" to practical ends (applying Bayesian Classification to spam filtering vs design pattens/mock objects/what have you in a standard business app) and (c) working towards being *really* good at programming, in global terms (and not just be another cheap Indian offshore programmer, or even worse , manager).
More concretely, in the coming year I plan to deepen my knowledge of AI and Compilers and also learn to hack hardware,besides acquiring more mathematical understanding.
2006 looks glorious! Happy New Year all.
Update: Thanks to Teju's comment, I've thought about this a little more.Here is a quick checklist of questions
- Is your project interesting? Do you feel exhilarated or bored when working on your project?
- Are the people on your project there because of their expertise or are they there to increase billing? If you left the project would it be hard or easy to replace you? How unique are your skills?
- Do you learn new things every day or do you just do the same things over and over again? (this is characteristic of most offshored "enterprise" work, imo)
- If you had all the money you wanted, would you still choose to work on this project? Or would you do something else?
Saturday, December 10, 2005
What Mr Fowler Really Said
Martin Fowler's post on "Humane Interfaces" has set off a maelstrom in the 'blogosphere'. (He has referred to some of the more interesting posts in his updates to his entry).
As is typical in the world of software, the original points were soon lost in a cacophony of arbitrarily drawn battle lines (java vs ruby, open vs closed class systems, Java's List interfaces vs LinkedList class etc).
This is what I understood from Martin's post. (Heavily paraphrased. Don't blame Martin for any butchery I commit on his prose)
...There are two approaches to designing interfaces. One I (Martin) label the "Humane" approach. Another is the "minimal" approach. Here is an example..{ } .. The distinctions between these approaches are worth thinking about. I (Martin) lean toward the humane approach...
As readers of this blog know, I am all in favor of subjecting opinions to logical scrutiny. But I fail to see how this can be any clearer. It seems fairly obvious that (a) the example used is just that - one example and (b) either approach can be used in any language. Where did "Java vs Ruby" come from? What am I missing?
[rant] I am getting fairly irritated at the lack of clear thinking prevalent in the software world. Aaargh! [end rant]
Sunday, December 04, 2005
Why a Lexus is Not An Acceptable Ferrari
Eric Kidd explains on his blog why he thinks 'Ruby is an Acceptable Lisp'.
His thesis is debunked very effectively in the comments section of his blog entry. What I find fascinating is the thinking behind this position.
Let us look at how Eric tries to assert his position that Ruby is as dense (or occasionally denser) than Lisp. He first creates an example of a lisp function , then writes a ruby equivalent which is marginally shorter, while brushing off the capabilties of lisp (reader macros in this case) because "it is not commonly done"!
First , this thinking is fallacious. The fallacy is called "Biased Generalization". From the Nizkor Project,
Description of Biased Sample
This fallacy is committed when a person draws a conclusion about a population based on a sample that is biased or prejudiced in some manner. It has the following form:
- Sample S, which is biased, is taken from population P.
- Conclusion C is drawn about Population P based on S.
Thursday, December 01, 2005
Availability Update
I am not available for consulting assignments till (at least) the end of March 2006. Before writing to me to enquire about availability, do read this first.
I have just started a very interesting project which attempts to integrate machine learning into a massively successful product suite.The size of the data sets and the business requirements make this fairly challenging.
This, when added to my existing commitments (including some very interesting Open Source work), leaves me no time to take on more work till end of Q1 2006.
How Agile Dies
Bill Caputo writes
Perhaps the Agile of today -- represented by things like the Microsoft TDD article, the attempts by many consulting firms to make Agile a methodology (instead of set of principles like it used to be), and the increasing adoption of "Agile" by big IT -- deserves this criticism, but the Agile movement I remember held their observation as a premise.
*That* agile movement seems to already be dying out, but its echoes might still carry the message (if not recognize the messengers) When you see people offering to "enable" half wit teams for outrageous amounts of money, and "agile" becomes another merketdroid buzzword on the same level as 'ISO 9000 certified' or 'CMM Level 5', you know you'd better call for a priest to administer the last rites. Many companies in Bangalore are eagerly "developing an agile practice", which (but of course!) goes hand in hand with ISO 9000/CMM Level X /Whatever other BS 'methodologies' are already in place. One of my friends, who works in 'Big IT', recently responded to "So what do you do?" with "I work in Organized Crime. I am part of an international syndicate that cons businessmen out of insane amounts of money and delivers little value in return". Heh!Sunday, November 27, 2005
Tech Company Caste Systems
From Businessweek
The suits inside Google don't fare much better than the outside pros. Several current and former insiders say there's a caste system, in which business types are second-class citizens to Google's valued code jockeys. They argue that it could prove to be a big challenge in the future as Google seeks to maintain its growth. They deem the corporate development team as underpowered in the company, with engineers and product managers tending to carry more clout than salesmen and dealmakers.
So a 'caste system' in which 'business types' are second class hurts?
How about the 'caste system' in place in most companies where the suits are on top? I guess that is the 'natural order of things' ? :-)
The outlines of the 'caste system' in place in most 'India Development Centres' can be deduced by examining one expense item - tickets for international flights. Most 'business types' fly first or business class while the 'India Developer Assets' are packed into Economy Class. To see something even more interesting, examine what kind of tickets are bought for Caucasians vs Indians.
Do I mind any of this? Not really. Any game is played in a particular fashion because all players agree to play it that way.
It is upto people playing the game to make sure the rules are fair.
What bothers me is the intellectual dishonesty in the implication that "business types on top" is natural but "techs on top" is not. I would have thought that the effectiveness of any company's internal structure would be judged by how successful it is. And by that metric Google is outstandingly successful. So may be the 'new caste system' is 'valid' after all?
I wonder if anyone is working for a "casteless" company? What would such a beast look like?
Update: Slashdot has picked up the businessweek story
Thursday, November 24, 2005
I Love China!!!!
From mini-msft
"... Shanghai: the same week various posts come out discussing working with Microsoft engineers in China, also noted by Dare, I took a moment to do a deep dive understanding how things are going over there and what kind of work is getting done. Seems as though most people are very happy with the high quality, hard-work, and ability to deal with Microsoft-Redmond's capricious rearchitecture du jour coming out of China. I haven't heard much in the way of complaints at all, as compared to working with Hyderabad. Microsoft India had best watch out - you guys might get outsourced to China, lending a whole new modern usage to Shanghaied. ..."
Go China go!!!!!!
Tuesday, November 22, 2005
Conversations and Deeper Issues
Brian Marick writes about Story Cards which contain only the name of the story, thus encouraging developers to talk to the customer before writing code.
This resonates with me for two reasons.
- I have seen "agile" projects start out by writing story titles on story cards, then add "supplementary" MS Word documents, then write even more bloated documents etc, and then people start saying "but that is not in the document" ,"let us update the document" etc.
- These days, I am very leery of what I see as an artificial split between "analyst" and "developer".
DabbleDb Dazzles
DabbleDb "combines the best of group spreadsheets, custom databases, and intranet web applications into a new way to manage and share your information online". It has smalltalk(Squeak ? ) and Seaside on the backend and is simply mindblowing. Watch the dabbledb movie(warning 113 Mb .mov file) if you haven't already.
Friday, October 28, 2005
An Exercise In Writing Part 2
I have taken the rewriting for clarity exercise one step further.
The original paragraph is
"We have seen how interpreters can be used to model and explain the behaviour of programming languages. The explicit treatment of environments serves to explain scope and identifier lookup rules and the modelling of procedures as closures explains how procedures use lexical scope to make their behaviour independent of the environment in which they are invoked. Our interpreters are written in scheme, but are suitable for implementation in many other languages because they use ordinary data structures and procedure calls."
My best effort so far (without adding any extra information) gives
"We write interpreters to understand how programming languages work. How we design the components of an interpreter determines how the corresponding features of the defined language behave. For example, how we implement environments defines the rules of scoping and identifier lookup. If we model a procedure as a closure, we can grant it lexical scope, freeing its behaviour from its invocation environment.
All our interpreters use ordinary data structures and procedure calls. So we can implement them in any language (including Scheme)."
Thursday, October 27, 2005
An Exercise In Writing
(comments are still off)
I am making an effort to improve my writing. Here is a sample of what I have been doing.
In the following exercise, I take a murky paragraph(from EssentialsOf Programming Languages, First Edition,Chapter 8, "Continuation Passing Style") and try to systematically make it clearer. (The technical content of the passage is irrelevant. I am concerned here with sentence and paragraph structure).
The original paragraph
1."We have seen how interpreters can be used to model and explain the behaviour of programming languages. The explicit treatment of environments serves to explain scope and identifier lookup rules and the modelling of procedures as closures explains how procedures use lexical scope to make their behaviour independent of the environment in which they are invoked. Our interpreters are written in scheme, but are suitable for implementation in many other languages because they use ordinary data structures and procedure calls."
Getting rid of the nominalizations and passives gives
2." In previous chapters we learned how interpreters model and explain programming language behaviour. First, we focussed explicitly on environments to understand scope and the rules for identifier lookup. Then we modelled procedures as closures to understand how lexical scope enables procedures to have behaviour independent of the environments in which we invoke them. So far, we wrote the interpreters in scheme, but we could use many other languages because they all use ordinary data structures and procedure calls."
Splitting off the "writing in scheme" idea is into its own paragraph, and eliminating the irrelevant sequencing gives
3."Writing Interpreters is the best way to model programming languages and learn how they behave. When we focus explicitly on environments, we understand how scoping and identifier lookup works. If we model procedures as closures, we can understand how lexical scoping enables a procedure to have behaviour distinct from the environments in which we invoke them.
So far, we wrote the interpreters in scheme, but we could use many other languages because they all use ordinary data structures and procedure calls."
Now there is a concept gap evident between the first and second lines. Plugging that gap and rewriting the 3d sentence to eliminate the irrelevant "we", we get
4.
"Interpreters model programming languages and explain their
behaviour.To understand language features we need to study the structure of interpreters implementing those features.If we focus on environments, we understand scoping and identifier lookup. Modelling procedures as closures clarifies how lexical scoping makes the behaviour of a proceudure independent of the environment in which we invoke it.
So far, we wrote the interpreters in scheme, but we could use many other languages because they all use ordinary data structures and procedure calls."
I don't like the phrases "(lexical closures) make the behaviour of procedures independent" and "environment in which we invoke". So I replace them.
5.
Interpreters model programming languages and explain their
behaviour.To understand language features we study the architecture of interpreters implementing those features.If we focus on environments, we understand scoping and identifier lookup. Modelling procedures as closures clarifies how lexical scoping frees a procedure's behaviour from its invocation environment.
So far, we wrote the interpreters in scheme, but we could use many other languages because they all use ordinary data structures and procedure calls."
Now the paragraph is as clean as I can make it, but so far I have treated it as a standalone chunk of text with no relation to the rest of the chapter. I fix that (these modifications depend on understanding what the author intends to teach in this chapter), and smooth away the abruptness of the second paragraph, and remove an ambigous "they" (they = interpreters? languages?) to get the final version
6.
Interpreters model programming languages and explain their
behaviour.To understand language features we study the architecture of interpreters implementing those features.
If we focus on environments, we understand scoping and identifier lookup. Modelling procedures as closures clarifies how lexical scoping frees a procedure's behaviour from its invocation environment. To study recursion, exceptions, and other language features involving transfer of control, we should study an interpreter that explicitly maps control flow using continuations.
So far, we wrote the interpreters in Scheme and they all use ordinary data structures and procedure calls. So we could, in theory, use many other languages. In practice, we .."
At this point, I can't think of anything else to do (well I could change the rhythm of the sentences to avoid a staccato effect. But here I am concerned with sentence clarity not rhythm). So I stop.
Friday, October 21, 2005
Blog Lockdown
I have disabled this blog temporarily.There will be no new posts for about a month (or two) and comments have been turned off. Mostly, it is because I am too busy and will often be away from the net during this period. I also find myself increasingly dissatisfied with the pathetic level of my writing skill. Maybe a short break will give me some clues as to how to get to the next level..
I am available by mail. If anyone writes in, I will (eventually). respond.
Thursday, October 20, 2005
Balloons, Pins, Ego
A thought experiment.
Picture yourself holding a set of helium filled balloons, of various sizes and colors. They all have a string tied to their base and you hold all the strings in your hand.
Each balloon has a label on it which names one of your "attributes". Say "Indian","American", "good programmer", "employed", "iit" (;-)), "thoughtworker", "ai hacker", whatever.
Now ask yourself if you are holding those ballons very tightly , to the point where you can't let go (or can't bear to see others jab it) or do "you" exist independently of the balloons you hold?
I just did this experiment for myself , and found that I get irritated when people prick a balloon labelled "rational" . In other words, I get irritated when people accuse me of behaving irrationally, accuse me of implying things I didn't etc.
Of course this is stupid. My rationality or irrationality has nothing to do with whether people say I am irrational or not.
Fairly obvious huh?
I found this "which of my balloons is being pricked?" a valuable question to ask myself whenever I start feeling irritated, angry, cornered etc.
And then prise those fingers apart and let the balloon float free.
or confidently wait, knowing the ballon is unassailable and unbreakable.
Or just enjoy the "pop" and smile
Wednesday, October 19, 2005
IIT Grad == Excellent Programmer?
This is something I have never been quite able to resolve. Logic says (hey the IIT BTech guys apparently work through SICP early and if that doesn't upgrade your programming skills I am not sure what will) they should be better programmers. And Google India apparently hires only IIT Grads, so there is probably something to that argument.
On the other hand, in my experience, this "superiority" of IIT grads never really showed itself as a real world phenomenon. Most (but not all) of the really good programmers I see, seem to have a BSc (or other non-BTEch-CompSci) background, and are almost uiversally self taught programmers.
While I was in Thoughtworks, I even went through this strange phase in which TW interviewed about 40 IIT Grads after a company that used to hire only IIT grads went bust, and ended up making an offer to one guy (and he was very very good. I knew him from my Aztec days. He eventually went to July Systems)
It is all very puzzling. Because I do know many bright people from IIT but they are almost all in the USA. So maybe that is one explanation? The best folks from IIT go to the USA and the people a Bangalore based company interviews are probably the "lesser" ones of a batch? Especially in the "enterprise" space? I really don't know. But is there really such a huge difference in the capabilities of people who studied in the same batch?
Of the 40 or so people TW interviewed,(and didn't hire), one interview really stands out. There was this guy who claimed a lack of knowledge of "enterprise" coding but was, in his own words, a "specialist in Compilers and Mathematical/Scientific Programming". The interview team consisted of me(very very interested, and fairly knowledgeable in compilers) and a colleague, JK Werner who graduated in Mathematics.
Those days, In Thoughtworks, one of the guidelines for interviewing was "If people don't know something, that's fine but what they say they know, they better know and know well". So the candidate not knowing "enterprise" stuff was fine(It is all fairly simple anyway and an otherwise competent programmer can pick it up fast).So JK and I proceeded to have a conversation about compilers and math and the interview was .... terrible. This person was just mouthing "buzzwords" without having any deep knowledge.
question(me):- "Ok so after lexing and parsing you get an AST what do you do then?"
answer:- "hmm... I am not sure.." (his cv claimed he'd written a full fledged "parallel compiler")
question (jk): "Your cv says you have worked extensively with Vector Spaces, so here is simple question to start off. What is an Eigen value"?
answer:"hmm well I never got that far" (!!). (as per his cv he did all sorts of fundamental Linear Algebra related stuff)
This was the most disappointing interview in my life. Other interviewers narrated horror stories of "Senior Architects" who didn't know what "classpath" was!
So I am forced to conclude, being bright, and getting through IIT(those entrance exams are tough) and even working as "Lead" or "Architect" or whatever on large projects does not necessarily make you a good(forget great) programmer.
Also "enterprise" work and that too in India is probably not attractive to the average IIT graduate who has so many more interesting options.
So these days I just dismiss the educational background and look at coding skills exclusively.
Still, it is all very strange. If anyone has any insights, please enlighten me!
Update
Joe Williams was kind enough to point out a possible misinterpretation (you can see Joe's comments in the comments section).
What I am saying
- I used to think IIT graduates (and students) were way above average in programming ability.
- I expected, given a fair (but tough) interview, about 35 (of 40) or so would get through. When only one did, I was forced to re examine my belief (see above)
- When I examined the best programmers I knew and their schools, I found that most(but not all) were BSc/non comp-sci graduates.
- This is possibly a perception issue. I am asking for clarification
- Logically , I now believe that programming ability and schools are not correlated
- TW(India) is an uber cool company
- Anyone who doesn't get through in TWI is a poor programmer
- Most IIT folks we interviewed didn't get through
- Therfeore IITs suck and any IIT ians are poor programmers
Monday, October 17, 2005
And Miles To Go - Part One
This post could be titled "How Paul Graham's Writing Makes me Weep With Frustration With Its Elegance And Conciseness" but that is probably too long a title.
The point is still valid though. In his latest article, I find he has articulated in simple, crystal clear sentences, ideas I have been wrestling with in wretched futility for months.
Here is a simple example. When I went back to Thoughtworks for a visit recently, someone asked me "You have been doing some interesting ( == non j2ee, non enterprise) work for a year now So what did you learn?" And I said (among other things) "Math is important.". But then the thoughtworker asked "But isn't Math just another domain for the "analyst" to master? Any domain expert who deals with a domain will know what exactly he wants calculated and how. Why should we developers delve into the underlying theory? In other words isn't Math just a domain? "
I instantly saw that there were deep chasms dividing the world of enterprise software from the kind of code I write these days, but I couldn't find the words to bridge those chasms. I mumbled weakly that "Understanding math somehow makes your thinking better". Neither the questioner nor I were satisfied.
Now see how elegantly Paul expresses it(emphases mine). After saying that letting your mind wander is often a good source of ideas, he begins to wonder why that is so.
"....What happens when your mind wanders? It may be like doodling. Most people have characteristic ways of doodling.....Perhaps letting your mind wander is like doodling with ideas. You have certain mental gestures you've learned in your work, and when you're not paying attention, you keep making these same gestures, but somewhat randomly.In effect, you call the same functions on random arguments. That's what a metaphor is: a function applied to an argument of the wrong type....The habits of mind you invoke on some field don't have to be derived from working in that field. In fact, it's often better if they're not ...
Are some kinds of work better sources of habits of mind than others? I suspect harder fields may be better sources, because to attack hard problems you need powerful solvents. I find math is a good source of metaphors good enough that it's worth studying just for that."
And there is what I should have said when people asked what good Math was. Math gives you more "primitives" to operate with and more ways of combining them. So do programming languages like Erlang and Lisp (which I was forced to turn to when the problems I was working on got too hard to handle with Java or Ruby). Math (and some programming langauges) are indeed "powerful solvents" that give you more ways of perceiving a problem, more choices on how to deal with those problems and overall a much richer field of possibilities.
Duh! I had to wait for Paul Graham to write that up and when I read the above quoted sentences I was shouting at myself "Exactly!! That is what I wanted to say"
Here is an ultra simple example of what I experienced. I needed to build a fairly complicated Neural Network with avery abstruse Training Scheme. For a long time I used the habits of thought I had picked up in years of "Object Oriented Thinking" and thought of a neural network as an "object having properties X and Y , with behaviours A and B , consisting of n Layer objects, each having properties blah and behaviour foo.. A Training Method is a Strategy Object that decides ..." and so on.
The people who I was talking to were primarily mathematicians and scientists and soon a communications gap yawned and we were all getting frustrated. Now I could have insisted they grok Objects or I could just learn the underlying math. I chose the latter and gritted my teeth, clenched my muscles and jumped into the Linear Algebra and Calculus needed to understand neural networks and .... found it quite interesting. Nothing like the nonsense poured down our throats in college. I was now using the best books, written by the most talented folks in te field, to learn, and I was applying the knowledge I gained to solve a very tough problem. And soon I saw that understanding Vector Spaces and Differential Equations allowed me to see
neural networks in a new way. As I told a friend sometime later, a Neural Network is a set of Equations and every training scheme solves a problem in Topology. There is no way I could have come to that understanding without harnessing the underlying math. No amount of "Domain Modelling" or "Extreme Programming" or whatever would have given me the understanding needed to tackle the problem.
And that is why today when some people look at the work I do and say "dude , I don't want to study all this math stuff. Too dry for me. Lisp is too hard as well, leave alone all this concurrency stuff. But I want to learn AI too.I will just use TDD and Java", I just smile to myself. Unlike most "enterprise" work, in production strength AI (and most other "tough" fields I would imagine), not understanding the underlying domain deeply enough to acquire an intuition for what will work and what will not, just wastes time. Without the new perceptions opened up by grokking the "powerful solvents"(and it will take about a year of work to get to that point), one is just as blind as ever.
And it needed Paul Graham to make it all clear in about 5 sentences.
I have also come to see that the Analyst/Developer split is very dangerous, even in 'Enterprise' software and leads to substandard software. But that is a topic for another post.
Sunday, October 16, 2005
Yet another "apprenticeship pattern"
Earlier, I wrote about an 'apprenticeship pattern' I discovered.
Here is one more .
Be good at something other than Programming
If you plan to be good at programming, take up the practise of another discipline- music, painting, a martial art, woodworking, it doesn't matter - just pick one that interests you.
Many top notch programmers are very good at other things. Paul Graham is a painter. Peter Norvig is a mathematician. Eric Raymond is a Pistol Shooting expert.Richard Stallman says "My hobbies include ... international folk dance, flying, cooking, physics, recorder, puns, science fiction fandom, and programming;" (While I have never seen Stallman dance, people who have, assure me that he dances very well indeed)
While there are exceptions, (more on this below), I would be very skeptical about someone who claimed to be a good programmer ('hacker', if you will) and who is not skilled at something else as well.
Many people have written about this from different angles. Paul Graham says,
"...Hacking and painting have a lot in common. In fact, of all the different types of people I've known, hackers and painters are among the most alike.
What hackers and painters have in common is that they're both makers. Along with composers, architects, and writers, what hackers and painters are trying to do is make good things."
Eric Raymond says in How To Be a Hacker,
"... Train in a martial-arts form. The kind of mental discipline required for martial arts seems to be similar in important ways to what hackers do. The most popular forms among hackers are definitely Asian empty-hand arts such as Tae Kwon Do, various forms of Karate, Wing Chun, Aikido, or Ju Jitsu. Western fencing and Asian sword arts also have visible followings.... Develop an analytical ear for music. Learn to appreciate peculiar kinds of music. Learn to play some musical instrument well, or how to sing...
"
The one apparent exception I have seen to this 'pattern' is when truly exceptional programmers seem to have no hobby (besides programming). My friend Anand Babu, would seem to be an example of this.
Anand spends significant amounts (or all) his free time writing code and is the creator of truly significant programs. If, like Anand, you are the author of code that makes a significant difference to millions of people, then you probably don't need this 'pattern'. Geniuses don't need to follow rules or patterns anyway.
Otherwise, in my experience, serious practice of music, for example, might help you become a better programmer than grinding through yet another J2EE app.
Monday, October 10, 2005
Gloom And Despair
Eight years ago, I was writing code like
public class PaymentProcessor {...}
A year and a half ago, I was writing code like
public class PaymentProcessor {....} (oh yeah, this time there was a class PaymentProcessorTest backing this up)
I was gloomily reflecting on those wasted years when I came across this snippet (from news.com)
"... Stanford University's Racing Team has accomplished a historic feat of robotics, finishing first in the DARPA Grand Challenge, a 131.6-mile driverless car race that no artificially intelligent machine has ever conquered before. ... Onlookers were wide-eyed watching the vehicles work their way through the extremely tricky course even though much of the race they could see only by wide-screen TVs in the spectator tent or by a real-time mapping tent.
For example, people in the spectator tent watched on with awe when Stanley drove over and down Beer Bottle Pass, which has 1,000-foot drops and hairpin turns. The packed crowd cheered when the car made it around the first switchback and then began chanting "Stanley, Stanley" as it drove down. .... "
Now that is real programming. While Providence was kind enough to set me back on track, I still can't get over how many years I wasted on "enterprise" code, essentially writing the same web->db->web routines over and over and over.
I am depressed.
Sunday, October 09, 2005
Back to Step One
I have played (ok, fiddled with) a steel string guitar for several years now. While I have a classical (nylon string) guitar and have worked through a good part of book 1 and book 2 of Federick Noad's classical guitar series, I never became very good at it. While I could play some pleasant sounding tunes, no matter how hard I tried, I could never sound like Julian Bream or Segovia. Their playing had a richness and lushness which I could never match.
So I put away the nylon string guitar and never used it much. I thought I was doing something wrong and even went to a teacher, but that didn't help very much, because while he gave me some good advice, I still didn't get the guitar to sound like I wanted it to. Gradually, the pressures (and the monotony) of a fulltime job meant that I ended up not playing very much at all.
Recently a friend sent me a copy of the Pumping Nylon DVD. I also happened to read George Leonard's fantastic book, Mastery. Combining Scott's guitar advice with the "Mastery" notion of maintaining total awareness and relaxation transforms the simplest steps into a discipline of fantastic depth.
Consider the simplest possible action on the guitar, that of plucking a string with a finger nail. Before, I would just pluck it and the note would sound. Scott suggests a four part motion - place the finger on the string, apply pressure, pluck, and "empty out" or consciously relax the plucking finger, each to be practised to perfection before combining them. Performing this as four distinct steps with the "mindfulness" advocated in Mastery is a very challenging exerscise.
Relearning the guitar is simultaneously easier and harder than learning for the first time. On the one hand, you know quite a bit already - how to move from one chord shape to another, how to play staccato or legato and so on - but on the other, everything you know is ever so slightly "off" or just plain wrong and thus demands a totality of focus to train your reflexes in the new grooves.
So there I am, plucking the same note over and over again, marvelling at how small changes in the angle of attack or pressure yield infinite variations on a single note. After a few dozen (hundred?) repetitions, there comes a moment when everything "clicks" and my finger flows on and off the string and a perfect, golden note shimmers in the stillness.
And for just that one moment, I do sound like Julian Bream.
Friday, October 07, 2005
I.need(true).someMoney();
The "code should be readable" principle, like any other, can be taken to extremes.
Recently, someone advocated replacing (junit's) assertEqual(5,obj1.getValue()) with
Result.Of(obj1.GetValue()).ShouldEqual(5);
Yet another suggestion I heard was to replace assertTrue(x > y) with Should.be(true).that(x).greaterThan(y) !!!
A class called "Should" with a method called "be"?
The best reaction I heard was from a friend who said,
"I can write a program to substitute spaces with "." and put a "()" at the end of requirements written in English. That would be better than this lunacy. Thus I.need(true).someMoney() :-p"
Remember the language where you could just "express business requirements in English" without "developer speak" coming in the way? Yes, COBOL.
This ridiculous notion that code should look like English comes from a misunderstanding of the "Objects model the domain" principle.It also makes sense to those who have only (an imperfectly understood) Object Oriented Paradigm in their bag of tools and frequently those who can only "speak" Java (although I have seen this happen to some self proclaimed "smalltalk experts").
I once worked on a project where the "Chief Designer" was Object crazy and we ended up creating Objects that replicated all the components of a relational Database imperfectly. Thus we had classes like "Table" and"Query" right in the code, with all sorts of fancy tree creation (and tonnes of Visitor classes)to create simple "Select *" queries as objects. We even had a ridiculous "FieldedBusinessObject" class that was essentially a glorified Hashtable, with well over 300 fields and methods with the interrelationships laboriously hand coded. All in the name of "OOD" (and in a "100% pure XP" project too !!!). I pity the client who paid good money for this hogwash.
Genuinely understanding a paradigm means knowing what it is not good for, just as well as how to apply it effectively when it is suited.
Using an object structure to create a poor man's version of a very ambigous spoken language like English is a warning that the practitioner probably shouldn't be programming live systems in the first place. Doubly so when this misunderstanding is couched in terms like "Ubiquitous Domain Language", which have very precise meanings and context, totally unrelated to such foolishness.
If you must have a totally unrelated language embedded in your code, it is far better to learn how interpreters and compilers work and and how to embed sublanguages in your code (no,XML is NOT a good way to do this!) Yes, that means learning some "esoteric" computer science theory.
If you ever find yourself contemplating classes like "Should" with methods like "be" (coming soon to a framework near you! I am NOT joking), find the nearest wall, bang your head thrice on it, very very hard. Do this enough and you'll be ok! Or at the least you will soon not be able to do much harm.
Alternatively, the nearest walmart is probably looking for checkout clerks.
Subscribe to:
Posts (Atom)
