Ravi Mohan's Blog
Friday, November 16, 2007
Meet "Spineless"
Spineless is a small Django app my friend Manoj whipped up to help me keep track of my books. People generally borrow books from me and I have a hard time remembering who took what when. Even after giving away almost all my 300 or so java/j2ee/dotNet/"agile"/"enterprise" books, I still have a few hundred books lying around in Bangalore and more in Trivandrum. I have entered the first 50 or so books into the app (actually I type some keywords and the app looks up the books in Amazon and grabs the details and plonks them into a database). There has been some demand for something like this, so all who asked, enjoy! I'll keep adding books whenever I find the time (which is a commodity in very short supply right now :-( ).
One of my friends asked me to enter my book list into Library Thing, but I have a visceral dislike of "social networks". Maybe too strong a mental association with Ruby on Rails, I don't know exactly why.
And before you ask, the name doesn't really refer to books' spines or anything to do with books really. It has to do with a private joke about something someone we know said recently. Manoj liked it so much that he named the app after it. Mention "optimization" to Abey or me and we'll roll around laughing. Mention "Spineless" to me or Manoj and you'll get the same reaction. Commemorating stupid things said by intelligent people (or vice versa) is a bit of a tradition in my circle of friends. What's life without people to make you laugh ?
Thursday, November 15, 2007
Fish Eye Plans
One of the emergent effects of my time management meta focus is that I have I call a "fish eye" plan.
I know in great detail what I will be working on in the immediate future (say the next few days). Next week, I know, but in less detail.I know what I'll be working on next month, but at a higher level of abstraction. Next quarter, even more abstract, but I *do* know what I'll be doing. So if you ask me what I'll be doing in (say) March 2008, I'll have an answer. Not many people can answer that question. This is a very refreshing change.
This is not to say that plans won't change. They will, but you know what they say about failing to plan.
What pleases me the most is that I didn't set out to do this. I just followed Dr Randy Pausch's "system" of time management (with many tweaks and some significant additions from elsewhere) and it all just fell out.
Life is good.
Question: Is anyone in Bangalore (anywhere in India will do at a pinch) doing significant programming in Haskell? Mail me please. Thanks in advance.
Wednesday, November 14, 2007
I won't go seal hunting with you
I told someone a few minutes ago "I think you are very capable and like you a lot but I don't trust you one inch". (Yeah I do say things like that in real life :-D).
After the (very unproductive) conversation was over, I was trying to recollect where that phrase/concept came from. It was certainly not an original thought/phrase and I was sure I read it somewhere. Turns out it was from Edward de Bono who said (paraphrased) "some languages have one word which says 'I like you very much, but I would not go seal-hunting with you'." so one can say (in that language) "I [word] you" where [word] has the meaning of the phrase above.
I forget the book he used the phrase in but iirc, the context was that sometimes if we lack the precise word for something, we need to repeat a long phrase.
This holds in technical conversation too. We don't say "change the structure of the code without changing the behaviour", we say "refactor". In the absence of the word "refactor" we would probably use the longer phrase, till someone got tired of it and invented the word.
Back to seal hunting. In this case, the context was one of doing a startup together and I suggested the phrase as an explanation why a few people don't "openly talk" to him, while the other people do talk to me "openly". Note that this doesn't mean that person X *is* untrustworthy. All it means is that I (and a few other people) *think* that in a crunch, X wouldn't stand by us and would do what's best for him vs what's best for us.
Is not trusting someone a problem? In a normal context, not at all. We all work with people whose competence we admire but we wouldn't want to trust them to keep our objectives and safety in mind when the stakes are high. We just add a double dose of caution, keep our guards up and are careful with words around that person, read the fine print very carefully and so on.
I am not very sure that would work in the context of a startup though. In a startup (from what I've read, not that I've ever founded a startup, though I've been employed in a couple) the pressure is so intense that one doesn't have the time to do all this armor donning and being careful. Founding startups is not like seal hunting -it is like hunting Great White sharks or the aliens from the movie "Predator".The founders absolutely *must* trust each other to do the right thing when the bullets (or harpoons or laser beams) are raining down.
Another thing that I noticed from the conversation was the use of phrases which don't really mean anything but are invitations to games (in an Eric Bernian, Transactional Analysis sense - the person proferring the invitation doesn't often know what he is doing, from a group dynamics perspective).
For e.g the conversation started with "I don't want to jeopardize our friendship but .. " and I was thinking "What friendship? we aren't friends - we were never friends- We are professional acquaintances who speak about technology occasionally and have met at a couple of parties".
To me a friend is someone who you have let into the "inner courtyards" of your life. You can have many positive, enriching relationships which are of a lesser intensity than a friendship, but the word does have a defined meaning and it didn't make sense in this context.
That opening phrase puzzled me for a while, but then I realized that he didn't really mean it either. It is just a phrase the meaning of which depends very much on the context of its usage, in this particular instance meaning something like "I am very uneasy about the fact that people don't relate to me like they relate to you. I am going to vent my feelings a bit but I don't know how you'll react to that, so I'll just use this phrase and hope you believe " maintain friendship" is the reason I am screaming".
Real friends don't need to use those kind of weasel phrases and would say something like "I don't know wtf you are doing, but I am concerned" or something to that effect. I try to avoid these meaningless phrases as much as possible, not because it is a particularly noble thing to do, but because I don't want to clutter a conversation with superfluities. "Say what you mean, mean what you say" is a surprisingly effective, not to mention efficient means of communication.
If you keep an open mind you learn something from the most trivial incident. I learned a few things today. Not too bad for a 20 minute conversation. Not bad at all.
Tuesday, November 13, 2007
A list of topics
My focus on Time Management has affected how I write on this blog. Earlier, when I felt strongly about something or when I was feeling bored, I'd just dash something off. This wreaks havoc with schedules and "getting things done",and I have often stopped writing for a few weeks, months whatever. But this is dissatisfying in its own way.
Now, when I think of something that I feel like writing about, I just add it to a list (on a wiki, if I am at a computer, in a small notebook if I am not) and carry on with what I am doing. When a "write a blog post" size chunk of free time comes around, 15-20 minutes, typically) and I am working on the comp, I just pick an item off the list and write about it.
The style of writing is different than it used to me because I am writing against a timer. More direct, less textured, which is probably the appropriate style for a blog post. The longer wait between conception and recording also allows the good ideas to percolate and the bad ones to show their unworthiness.
For anyone who is curious, my present topic list (this is a continuously mutating entity) looks like this.
- San Fransisco vs Bangalore - the right place for software startups?
- The Idea Bottleneck and how it really isn't [DONE]
- Stealing a leaf from Paul Graham.
- SICP Stumbling Blocks
- A Billion Dollars And Then?
- Topic List on a Wiki [DONE]
- Practical SICP - How SICP helps in real life projects
- Derivative Trading as Programming Pedagogy
- Growing into a (technical) book
- Memorizing Shakespeare (and Shaw)
Monday, November 12, 2007
Someone stole my cell phone
so if you are reading this, and are on my phone list, please send me your phone numbers to repopulate the address book on my new cell phone.
Thanks in advance.
Update - I got a new sim card but decided not to get a new phone till I complete my research paper.Meanwhile, please use email.
The Idea Bottleneck That Isn't
One of my friends was talking about doing a startup in Bangalore. This is a conversation that comes up regularly. I tried to get a startup off the ground twice, but failed because the people who I wanted to work with didn't live in Bangalore and I didn't want to move.
Those attempts isn't what this post is about. Because this friend was talking about a startup, and wanted some people to work with him , I spent some time talking to other friends who might be interested (I am well connected to interesting, technically capable people who are hungry for success and money).
One question I keep hearing is "What about ideas? Do you have an idea?". I have never understood this question. Generating decent ideas has never been a problem for me. I could generate 20 workable ideas in 20 minutes. And repeat that exercise a few times before I need to pause.
The first time I encountered this "idea bottleneck" concept I didn't pay it much heed. But then someone I respect said I was not paying enough attention to "finding an idea" if we were to attempt that hypothetical startup. So I reached into my mental pile of ideas and gave him an idea to work with, while we work through other issues. He seems happy about it and sent me a link showing that a company with a similar idea (actually a trivial subset) had been acquired for 50 million $ cash.
Another friend heard of this and said "Dude, how can you give up your idea like that? What if he rips you off? Be careful"? First, the friend I told the idea to is a decent chap. Second, I don't really care if he (or anyone else for that matter) "rips me off".
My operating concept is that having ideas per se isn't all that important. It is the actual execution that matters and so I am not afraid of people "stealing" my ideas. It isn't as easy to do that as many people think. The idea I suggested to my friend, for example, sounds simple but there are all sorts of interlocking little problems that all have to be resolved perfectly for it to be successful. I can imagine someone spending a few months (and a few hundred thousand dollars) in an attempt to get it to work and not getting anywhere, because he isn't aware of what to tweak to get a particular effect or how to fix a subtle "error". In fact if anyone can execute the idea better, faster or more comprehensively than I can he is welcome to it.
Paul Graham says it better than I can (in news.ycombinator).
.... if we told everyone about everyone else's ideas, it wouldn't be as bad as you might think. Secrecy is not as important as beginning founders think, because (a) ideas are less valuable than they think, and (b) the most common form of death for startups is suicide, not being killed by competitors."
The last sentence says it all.
Update: One hour after this was written, the proposed startup project committed suicide :-D.
R.I.P :-D
Friday, November 09, 2007
Experiments with Time Management
After viewing Randy Pausch's lecture on Time Management, I've been experimenting with various time management practices. (yeah I know how management-ey and buzzword-ey that sounds, sorry). It helps that I am going through the busiest month in my entire life, so I am more motivated than usual to make this work.
The most successful habit I've adopted is to put a money value on my time. As Randy says in the first few minutes of his talk, people are generally willing to give you their time, but not their money. If you ask people to spend a quarter of an hour to help you arrange the furniture for a talk, they will happily do so, but they won't hand over 10 $ for no obvious reason.
Once you start putting a dollar value on your time, though, strange things happen. For example, I decided not to attend Barcamp. (I'd registered, I cancelled it). Say an hour of my time is worth say a measly 25 $ (being a cheap outsourced-to Indian programmer). Travelling to and from Barcamp, and attending 3 or 4 sessions would take, at a minimum 6 hours. 6 * 25 = 150 $.
Would I spend 150 $ to attend Barcamp? Not on your life! To be honest, there are other disincentives also - I really don't want to attend a meet which is so "implementation lite" - where there is so large a focus on things like search engine optimization (!) and blogging.
People actually think blogging is a big enough deal to form "collectives" about blogging? - there is even a "collective" for "radical ideas" -- yeah right, that makes sense .. NOT. The mind boggles. I consider blogging the intellectual equivalent of writing a post-it note. I cannot imagine self-identifying as a "blogger" and making a big deal out of it. God have Mercy.
Back to Time Management. Since I don't (in general) attend phone calls from unknown numbers/people when I am working, I don't have interruption issues. And once I concentrate on something, it is hard even for people (even if they are sitting right next to me) to jerk me out of the zone - I don't hear anything when I focus on work so they'd have to nudge me, and risk getting a laptop thrown at their heads) so I didn't benefit so much from that part of his talk. But the money value of time is an excellent perception to have. Would I spend 50 $ to have a good conversation with a friend/someone doing interesting things? definitely.
He is also right about keeping a time journal. The result of such an experiment is the most horrifying document you will ever see in your life. The good news is that with such an abysmal base, you can make substantial improvements in a very short order.
To round things off, a couple of snippets from a Phil Greenspun article.
Ask a wage slave what he'd like to accomplish. Chances are the response will be something like "I'd start every day at the gym and work out for two hours until I was as buff as Brad Pitt. Then I'd practice the piano for three hours. I'd become fluent in Mandarin so that I could be prepared to understand the largest transformation of our time. I'd really learn how to handle a polo pony. I'd learn to fly a helicopter. I'd finish the screenplay that I've been writing and direct a production of it in HDTV."
Why hasn't he accomplished all of those things? "Because I'm chained to this desk 50 hours per week at this horrible [insurance|programming|government|administrative|whatever] job.
So he has no doubt that he would get all these things done if he didn't have to work? "Absolutely none. If I didn't have the job, I would be out there living the dream."
Suppose that the guy cashes in his investments and does retire. What do we find? He is waking up at 9:30 am, surfing the Web, sorting out the cable TV bill, watching DVDs, talking about going to the gym, eating Doritos, and maybe accomplishing one of his stated goals.
Retirement forces you to stop thinking that it is your job that holds you back. For most people the depressing truth is that they aren't that organized, disciplined, or motivated.
This is so true it is not funny. And one doesn't have to retire to encounter this phenomenon.I know many people who drop out of the 9-5 rat race for various reasons ( startups, research , search for the meaning of life .. whatever), and then find that months and years pass with nothing substantial being achieved.
Another interesting suggestion from the same article.
publish a public Web diary of what you do every day, thus discouraging you from wasting time because you'll be ashamed to admit that all you accomplished yesterday was a 15-minute oil change and a trip to Target
That is a very interesting idea, but a little forbidding, exposing one's lack of productivity to the world. But I should probably grit my teeth and try it for a month or so. If you want to see what this would look like for someone who is really really good at what he does (vs humbler mortals like you and me) see John Carmack's dot plan files (warning - Flash, sorry I couldn't find an html document of these and I am running out of my "write a blog entry" time slot). There's even a theory that these (Carmacks' plan files) were the origins of the present day blogs, no matter what Dave Winer says.
While I don't quite have the guts to "dot plan" my puny daily efforts, I could probably list down what I plan to do each month on the first day of the month and a report on the last day of the month detailing what actually got done.
So, as an experiment, here is what I need to do this month (November 2007) (client work excluded - privacy concerns blah).
- Research - Solve the last 2 issues, code, write up research results into a paper and send out for review. Hard deadline of 24th Nov
- Write a Reinforcement Learning library for the friendly folks at at the DRDO. This is a a lot of work
- Implement the algorithms in chapters 9-12 of AIMA. (First Order Logic and planning, for anyone working through the book). Release the next version of the AIMA Java code.
Tuesday, November 06, 2007
Hackers Month of Learning Haskell aka X Y Month
The local newspapers are all going crazy about National Novel Writing Month. Apparently NaNoWriMo is some kind of cultural phenomenon in which random people commit to writing 50,000 words in a month, hopefully finishing a (substantial part of a ) novel.
I am not sure any worthwhile novels actually get written this way. If you won't do it anway, you probably won't do it just because other people are also doing it but the idea has its possibilities. The "national" doesn't make sense in a networked world, so we'll replace it with the variable X.
Instead of novel writing we could do something more fun so we'll call it Y.
Let X = { .bunch of adjectives...} Let Y = { ..bunch of verbs.. }.
so we could have "Personal Month Of Derivative Trading" or whatever.
From the nanorimo website,
Valuing enthusiasm and perseverance over painstaking craft, NaNoWriMo is a novel-writing program for everyone who has thought fleetingly about writing a novel but has been scared away by the time and effort involved.
I can certainly think of analogues in programming. many people want to learn Haskell, (say) but never get around to doing it because at any given point of time, there are more important things to do. maybe someone should declare December to be "Hackers Learn Haskell" month and ask anyone participating to write, say, 500 functions in Haskell in a month. Or work through SICP completely. Or whatever.
from the nonwrimo site, Because of the limited writing window, the ONLY thing that matters in NaNoWriMo is output. It's all about quantity, not quality. The kamikaze approach forces you to lower your expectations, take risks, and write on the fly.
Make no mistake: You will be writing a lot of crap. And that's a good thing. By forcing yourself to write so intensely, you are giving yourself permission to make mistakes. To forgo the endless tweaking and editing and just create. To build without tearing down..
Programmers write a lot of crap code anyway so at least that part won't be new.
Sunday, November 04, 2007
The Algorithm Quotient of a Software Project
Still thinking of the DARPA Car Races, it strikes me that a project's dependence on algorithmic innovation for a successful outcome is in direct proportion to its "interestingness" froma developers point of view.
Think about it. All the cars that autonomously traverse 160 miles of desert or travel through an urban environment while obeying traffic rules have essentially the same hardware. The difference in performance is about how algorithmically sophisticated the *software* of each car is.
On the other end of the spectrum most "enterprise" projects are algorithmically trivial (I said "most" so if anyone's ego out there is tied to his knowledge of JSP or whatever, spare me the righteous indignation) and the most complex data structure used is often a hashtable.
I don't think this is always a valid heuristic, but it might be valuable to rank projects on the scale of the algorithmic complexity involved in each (which in turn probably depends on how close the project comes to exploring the unknown, as the DARPA race efforts do), and then by how compelling they are and see if there is a correlation.
In my experience, while enterprise projects have their own set of problems to be solved, they are rarely algorithmic in nature (vs economic or scheduling issues for e.g).
Another supporting factor might be to see if interviews for the interesting dev jobs focus heavily on testing algorithmic knowledge. At first glance this seems to hold as well. If you are interviewing for Google Research, you probably need to be great at algorithms. If you are interviewing for Wipro, not so much - a knowledge of the contemporary buzzwords (agile, xp, tdd, ruby dsl blah) should get you through.
Watching the DARPA Car Race
It is almost 3 in the morning here in Bangalore as I type this. I've been watching the webcast of the DARPA Car Race. This years challenge was for the autonomous ( == no human control) robot cars to accomplish three sub-missions in an urban environment, following all traffic laws (obeying traffic signs, recognizing and conceding right of way etc). This task is a magnitude tougher than finishing a 130 mile autonomous drive in the desert, with zero human control, which was the goal of the DARPA 2005 car race.
Stanford's entry, Junior, just pulled in to the finishing area. While it isn't yet clear who won (because this is not a first past the post race), I'd put my money on Junior. (His (its? :-) ) predecessor Stanley won the 2005 Grand Challenge. This is history being made before our eyes.
The sight of the cars driving themselves, with the steering visible through the windows turning with no human hand at the controls is .. exhilarating... exalting... too cool for words. This is **REAL** programming in action. The people who made this happen are just incredible. Congratulations to all!
How lucky does one have to be to live in these times?
Now to drag myself off to bed (and dream of autonomous vehicles).
Saturday, November 03, 2007
Is that office work?
So, it is late at night and two of my friends are talking to each other. One is a programmer, a very good one, and the other is a manager, I have no idea how good a manager he is.
The programmer is multi tasking, carrying on a conversation in one mental thread and working on some code in another. As the conversation ebbs and flows, his attention also focuses more or less on the code as appropriate, sometimes muttering to himself, sometimes whooping out loud, sometimes ignoring the code and focussing on the conversation.
The manager gets more and more curious as to what exactly the programmer is doing and finally blurts out "Is that office work ? something you have to deliver tomorrow?" . The programmer looks confused and says " No, no it is just something that I am fiddling with". Now the manager looks confused.
And in that moment, *I* understood something. Many people think of programming as work. It sounds very normal and rational when you write it out like that, but most good programmers I know don't think of programming as something you "do at work". Programming is a means of expressing oneself, which also *happens to be* something people pay for. And this is lost on some people who can't imagine "working on" something outside the office..
Just to be clear this has nothing to do with managers vs developers. I can imagine a manager poring over company balance sheets or whatever to find a good investment opportunity and some random programmer who doesn't write a line of code outside office hours asking the same question and getting the same answer.
The difference is something more fundamental. People either have something they work on in their free time or they don't. Now that I think of it, a staggering percentage of the people I know would just switch on the TV, or pick up a book, or idly surf the web or pick up the phone and call someone when they have a couple of hours of free time. The person who picks up a guitar, or writes a program, or analyzes a balance sheet or writes an essay is much rarer than the first variety. Many people don't work *on* anything outside their office hours (and then wonder why "life is boring".
I am sure many people say "yeah so what?" but as someone who has many irons in the fire and is always "working on" something or the other, it was a big revelation to me that most people **don't** have more things to do in life than time to do them in.
One lives. One learns.
As usual, once I finish writing a blog entry I find someone expressing the idea better than I can.
Excerpts from Dan Russell's essay on marathon running (you should read the whole thing).
I don't know how many people have told me that I'm crazed. But the reaction I get when I tell someone I'm running in the Boston marathon is either a "that's wonderful -- how exciting!" or a "you must be out of your mind..."
Usually, it's the latter. And if the person I'm talking with is not a runner or bicyclist or someone who enjoys the pleasures of a workout, then the conversation usually turns toward the health hazards of rigorous exercise. I've been told to watch for vitamin depletion, unexpected calcifications, loss of sensation in the private bits, shin splints, and even unexplained loss of sleep. It's touching, really, especially the ones that are worried about vague causal factors like "getting the body too riled up..."
....So it's hard to explain sometimes why you'd even want to run so far. ..Don't mistake me, running the marathon will be tremendously exciting; there's nothing quite like the sensation of running into the chutes at the finish line, all of the cheers, hearing your name and time called out over the PA -- it's a little like being born and first love and finally getting permission to stop all at once. It's relief, desire and fulfillment borne over the past several months all condensed sweetly into that final few minutes of running.
But as someone one said about practicing the viola, "the epiphanies come in practice." Don't mistake me, running the marathon will be tremendously exciting; ......So I've been running six days a week for the past year just to make it to Boston. Or have I? Seems to me that running is about, well, not to put too fine a Zenish point on it, running. Like anything else, once you've put enough hours of practice into a skill, the doing of the skill transcends the normal, pedestrian everyday experience. Once you get past the first thousand hours or so, the act of running becomes larger than the little aches and pains of physical motion. When I run, I'm moving over terrain; I glide through topography; my body becomes the vehicle that transports me through space. This is an odd, almost out-of-body feeling that starts to happen when you run long miles for training. More than a few times I've run and had the feeling that it would be fun to explore down this road; so I turn, and run down this road. Natural enough, but when you're running 18 or 20 miles, these side roads and random ventures can be two or three miles long each. That kind of distance really begins to change the nature of the experience. You cross towns on a whim and run over sizeable chunks of real estate just to see what's on the other side. On more than one occasion I've run north around a mountain or decided to shift to another watershed during a run. It's the change in scale that's so quietly dramatic. You stop worrying about distance and begin thinking about time -- "if I go this way, will it take another hour?"...
Exactly! And that is what my programmer friend was doing. Exploring. What happens if I try this? And then that? The pleasure from the act of exploring is something that my manager friend, who has nothing comparable in his experience to validate the process against, doesn't quite understand. (Note: This doesn't make him a bad person). So he falls back to "Is that office work"? or in other words, "where are you running to? Can't you get a taxi ?"
To "learn AI"
first learn basic mathematics.
I keep getting asked this question and I keep saying the same thing - to three people in the last week, for e.g, two of whom were working through (or planning to work through) AIMA - so I thought I'd put this down here (and point anyone who asks the same question to this entry in the future).
Learning AI (or any deep comp.sci for that matter) is not like learning J2EE or ruby "dsl"s or whatever the fad du jour in the enterprise software world is - read a few chapters of the latest bestselling "pragmatic" book, write some crappy web site and hey presto you are the expert.
"Real" comp sci doesn't quite work like that.
To understand a standard 3 layer feed forward neural network, for example, you need to have a solid grip on
- vector spaces
- basis vectors and change of bases
- eigen vectors and eigen values
- Basic matrix operations like inversion
- multi dimensional performance surfaces
- Quadratic functions and finding their global maxima within Newton's method and Conjugate gradients
- performance measures and steepest descent
- partial differentiation of vector values
- numerical stability of algorithms
- Linear Algebra by Gilbert Strang
- Calculus by Gilbert Strang
- Artifcial Intelligence A Modern Approach By Russell and Norvig
- Machine Learning By Tom Mitchell
- Neural Networks for Pattern Recognition by Chris Bishop
- Paradigms of Artificial Intelligence Programming by Peter Norvig (ok, this one is not quite an cutting edge AI book, but imo this is the best book on programming ever written and if you call yourself a programmer you should have it on your book shelf)
Sunday, October 28, 2007
Intoxicating Conversation
I just got back from our end of the month "Losers' Club" meetings (more on these here). In the absence of the one person in our group who maintains an interest in enterprise software, we focussed on the more "blue sky" aspects of software/comp sci.
Topics that came up for discussion - Haptic sensors for robots, micro robots, challenges in building a simulation of the human cardio vascular system, metrics for each component of a research effort, Randy Pausch and his lecture on Time Management, the Bhagavad Gita, Reinforcement Learning as a methodology to learn control algorithms, Computational Fluid Dynamics and Aerodynamic modelling, building SkyNet, using histograms to model discrete probabilistic distributions, Algorithms for probability Density Tree construction, how to keep tight focus on research projects that spin off more areas for exploration with every step taken aka how to balance exploitation and exploration in the context of Rogue Research, proof techniques as weapons in a personal arsenal, abstract problem spaces, Lush as a lisp for day to day work, overcoming the fear of Calculus, Django (yay!) vs Rails (bleh!), the non importance of learning java script, Prototype vs jquery, Goal Driven vs Capability Driven learning styles, continous phenomena in genotype decoding, a proposal for a facebook style app for researchers, Aikido, conferences in Goa, and of course status reports, "iteration reviews" and plans for the next month.
Aaah, Life is Good!
Friday, October 19, 2007
A Few Good Men
One of the oddities of India's "silicon valley" is that there is very little hapening that is technically interesting.
For example, take interest groups. User groups for various topics of technical interest certainly do exist - for some value of "exist". They are unfortunately not very effective. Some common patterns I've seen are
FizzBust - There is a lot of enthusiasm for setting up a group, drawing up an agenda and holding an initial meeting. After that first (or occasionally second) meeting, nothing much happens and the group dies away.
"Eternal Beginners Syndrome" - Every single user group meeting has talks of the variety "Introduction to X" where X is the topic of interest. This is certainly fine *if* people ever move on to intermediate or advanced topics. This rarely happens. What's worse, every one of these "introductions" are (a)focussed on power point presentations and (b) every slide in those horrendous presentations are cut n pasted from the same old books. Encouraging powerpoint for non visual data is the infallible identifying sign of a group that has passed its peak and is now declining in utility and relevance.
A closely related pattern is "Propaganda over Exploration" - the group takes on the attributes of a cult with some members claiming to have "superior wisdom", the dissemination of which becomes the primary aim of the group. Thus rather than have a a collegial group exploring and learning and where appropriate criticizing the focus of the group, one has "masters" and "followers". This quickly drives away any good folks.
"Philosophy Over Code" - This is where people wax lyrical over the virtues of GPL vs the BSD license but haven't written a single piece of open source code in their lives and don't intend to.
"Uncritical Acceptance" - Once in a X user group I suggested that one possible topic for an upcoming "X Conference" would be "Where is the use of X inappropriate". I was quickly shushed with "That is a valid question but asking it in public would "hurt the movement" ". My reaction was "Duh? "movement"? what movement?" but I didn't press further.
The way to run an effective (vs "popular") user group would seem to actively invert all these phenomena. Have a small bunch of experts meet regularly to discuss things of interest. Don't actively try to expand the group or conduct "outreach". Avoid all formal organization and "outreach programs". If someone wanders in after hearing some word of mouth description of what goes on that's fine, but don't actively aim at recruiting or expanding the group. Have everyone bring code (or proofs or papers or whatever the metric of actual progress in the field is) and actively discourage empty philosophizing.
I've been experimenting with some of the above ideas for the last few months and they see to work well. One kind of "community" I'd like to see is of amateur researchers in hard comp sci - amateur in the sense of "pursuing research strictly out of interest and not to get paid" , not "amateur" as in "lacking skill". Assembling a group like this has its own difficulties however. With a few honorable exceptions most members of (Indian) "research groups" of technical companies could be stood up against the nearest wall and shot with no appreciable impact on the output of those groups. Likewise for most researchers in (Indian) government service or the (Indian)educational institutions. But "most" != "all" and that is what keeps me from abandoning the idea.
Saturday, October 06, 2007
Snapshots from my Robot Simulator
I've built a tiny robot simulator for my ongoing research. Like the (absolutely brilliant) Stage Simulator, my simulator enables the simulation of robots in a 2D world. Of course my simulator is much simpler than Stage, primarily because it doesn't try to do as much as Stage does. On the other hand it has a couple of important differences that are important to my research. For e.g. it has a built in sensor and motion error model and (being implemented) a sophisticated Sonar Model.
Anyway, here are some early snapshots of a simple environment.
A simple world for a robot to navigate - The world is 10m X 20m with a resolution of 2 cm. The corridor is 2.5 m wide.
A robot (the little blue dot)stands in the middle of a corridor.
The world overlaid with a quadtree that overlays and recursively decomposes the 2D world and enables efficient ray projection.
The world illuminated with a laser. The illuminated points are rendered in yellow. The scan has a resolution of 1 degree,a "pan" of 360 degrees and a range of 3 m. I was a bit concerned that this would be slow but it takes no appreciable time, even when the angular resolution is 0.1 degree. All hail the quadtree!
Of course the robot sees only the illuminated points, not the complete length of the walls etc.
This is what the robot "sees". There are other sensors simulated (e.g. an odometer) but they are not rendered here. You'll notice that the laser sensor senses the environment "perfectly", i.e the range detected is the actual range to an obstacle that intercepts the laser beam. No real sensor works like that. To simulate this imperfection in a simulator, a probabilistic error model is added to filter the reading so the robot sees an approximation to the real range.
Here we've added a bivariate gaussian error (with a standard deviation of 10 cm) to the laser sensor. If you squint, you can see that the readings now only approximate the wall surface. To see this more clearly, we'll remove the unseen parts of the corridor walls and the overlaid quadtree to get a picture of what the robot sees, with the simple error model in place.
This is what the robot "sees" through the error filter. Note the "scatter" of the readings. Now the robot doesn't know for certain where the walls (or whatever objects obstruct the laser - different parts of the world react differently to different sensors - some surfaces absorb light for e.g returning no readings to the laser sensor) are.
The robot simulator is not the central thrust of my research effort, but it helps to have an environment in which one can plug in various sensor models, motion models and error models and see what the robot would see. I thoroughly enjoyed coding this up.
The next step is to replicate a realistic sonar (vs laser) sensor. There are a few interesting issues to be resolved to get this to work properly. Sonar works differently from lasers - cones of ultrasound have different propagation and reflection characteristics from rays of light. Stage simulates sonar with the same "ray trace" approach as is used for lasers. For my research I need a more accurate model (and hence the need for a custom simulator). Early next week, I will be visiting the Robotics Lab of the DRDO (The Defense Research and Development Organization - For non Indians reading this, they are the local equivalent of DARPA) to talk to some scientists working on similar problems. I have a basic sonar model working already, the key challenge of which was to layer different continuous probability distributions and sample data from them in reasonably efficient fashion, but to describe that would make an already long post longer, so I'll stop now.
A simple world for a robot to navigate - The world is 10m X 20m with a resolution of 2 cm. The corridor is 2.5 m wide.
A robot (the little blue dot)stands in the middle of a corridor.
The world overlaid with a quadtree that overlays and recursively decomposes the 2D world and enables efficient ray projection.
The world illuminated with a laser. The illuminated points are rendered in yellow. The scan has a resolution of 1 degree,a "pan" of 360 degrees and a range of 3 m. I was a bit concerned that this would be slow but it takes no appreciable time, even when the angular resolution is 0.1 degree. All hail the quadtree!
Of course the robot sees only the illuminated points, not the complete length of the walls etc.
This is what the robot "sees". There are other sensors simulated (e.g. an odometer) but they are not rendered here. You'll notice that the laser sensor senses the environment "perfectly", i.e the range detected is the actual range to an obstacle that intercepts the laser beam. No real sensor works like that. To simulate this imperfection in a simulator, a probabilistic error model is added to filter the reading so the robot sees an approximation to the real range.
Here we've added a bivariate gaussian error (with a standard deviation of 10 cm) to the laser sensor. If you squint, you can see that the readings now only approximate the wall surface. To see this more clearly, we'll remove the unseen parts of the corridor walls and the overlaid quadtree to get a picture of what the robot sees, with the simple error model in place.
This is what the robot "sees" through the error filter. Note the "scatter" of the readings. Now the robot doesn't know for certain where the walls (or whatever objects obstruct the laser - different parts of the world react differently to different sensors - some surfaces absorb light for e.g returning no readings to the laser sensor) are.
The robot simulator is not the central thrust of my research effort, but it helps to have an environment in which one can plug in various sensor models, motion models and error models and see what the robot would see. I thoroughly enjoyed coding this up.
The next step is to replicate a realistic sonar (vs laser) sensor. There are a few interesting issues to be resolved to get this to work properly. Sonar works differently from lasers - cones of ultrasound have different propagation and reflection characteristics from rays of light. Stage simulates sonar with the same "ray trace" approach as is used for lasers. For my research I need a more accurate model (and hence the need for a custom simulator). Early next week, I will be visiting the Robotics Lab of the DRDO (The Defense Research and Development Organization - For non Indians reading this, they are the local equivalent of DARPA) to talk to some scientists working on similar problems. I have a basic sonar model working already, the key challenge of which was to layer different continuous probability distributions and sample data from them in reasonably efficient fashion, but to describe that would make an already long post longer, so I'll stop now.
Thursday, September 20, 2007
Saluting Randy Pausch
First read this (via news.ycombinator).
Then see the streaming video. It is terribly slow and broken up on a typical Indian internet connection but just see it anyway. You'll thank me afterwards.
If you are a parent, a spouse, a teacher (of any subject), a student, a programmer, an artist, a designer, a public speaker, just see it.
Dr Pausch, I have never met you but you just changed my life. Thank You.
Update: The video is on YouTube in ten pieces. This is much better than CMU's streaming video, because in these you can load the full video before viewing, go back and forth etc.
Tuesday, September 18, 2007
The Lame and the Blind - Proofs And Code in research software
There is this old story about a blind man teaming up with a legless man. The blind man carries the legless man on his shoulders and provides the locomotion while the sighted cripple tells him where to head.
Similar divisions of labor exist in enterprise software (think "developer" and "analyst") but this two fold division of labour is exacerbated when one focuses on research software. Here the scientists are the "sighted folks" who know where to go but can't move and the developers are (ideally, as we'll see later) the folks who know how to move the project forward by writing code, but don't have the requisite mathematical/scientific skills to navigate and choose one direction over another.
Earlier today, I was talking to a scientist trying to move a multi million dollar machine learning project forward, who was feeling hamstrung because it was impossible to find a few people who could follow advanced calculus and also write good C code.
Unlike in the folktale, a real life arrangement consisting of a blind man and a cripple would be very inefficient, with the occasional fall, not to mention the constant stubbing of toes and odd outburst of swearing. But equally, nothing in real life mandates this kind of "pairing". Nothing prevents a scientist from learning how to code (except a feeling that coding is a relatively "blue collar" activity) and nothing prevents a developer from learning the requisite maths and science (except that most developers, especially the enterprise/agile/dsl types either don't have the caliber to learn hard math or think erroneously that these skills are beyond them or just don't want to work that hard).
The few folks who do master both proofs and code, can and do make a tremendous difference. The very best people in every research area that incorporates software and maths are very capable scientists/mathematicians and very capable programmers. Peter Norvig is an example. As is Donald Knuth. Or Manolis Kellis. Or Yann leCun.
If you are running a research software project you'd want to staff it with high level multi-class (think dungeons and dragons) scientist-mathematician-developers. Unlike in D and D specializing in one area does not need to involve trading off the other.
After all the lame man/blind man arrangement is not the best possible one. The best (and normal) situation is having two (or n) people who can both walk and see.
Tuesday, September 04, 2007
Erlang is the new Ruby
There is a particular type of programmer who tries to keep up with the "coolness" crowd by jumping on to the latest bandwagons and hanging on for dear life (till it is time to jump again). The word "fanboy" doesn't quite describe these folks but it gets some of the nuances right. The key characteristic is that they talk a lot about what essentially they don't really understand.
For a while , the fad was ruby. "Ooooh look we can use select instead of a loop" "Oooh everything is an object". Then it was creating half baked "DSL"s, especially in the context of Rails.
Now Ruby seems to be losing some of its sheen, and the lemmings are migrating to Erlang. Now, Erlang is a very powerful language that is worth studying and it has been around for the last twenty years or so, but the next time I meet someone "evangelizing" Erlang, without the faintest idea of how functional programming, pattern matching or concurrency really works, I am going to do something nasty.
Don't get me wrong. Erlang is well worth studying. But first write a 10,000 line+ non trivial program in it. Create an open source library or two. Submit a few patches. Then try to convert the heathen. But I guess if you were to do that you wouldn't be a fanboy anymore.
Ahhh. Choices.
Tuesday, August 07, 2007
Indian "Journalists" strike again
SmartTechie (what a horrible name for a magazine !! ) has an article purportedly written by Roy Singham, CEO of Thoughtworks. Having worked at Thoughtworks and having met and interacted with Roy, I am very skeptical about the attributed authorship. The article has many examples of "Indian English" and is very tortured writing to boot. Roy is a very articulate speaker and writer and speaks perfect "American". So if you read the article and go "WTF?!!" do keep in mind that the writer is probably some Indian hack pretending to be Roy
Here is a sample " To over take other automobile companies and to reach at the helm, Toyota had devised a comprehensive action plan which included the Toyota Production System. " .
"reach at the helm"? WTF? You expect me to believe Roy writes or speaks like that?
I can only conclude that some half baked journalist essentially made up the article and attributed it to Roy.
Thoughtworks is an excellent company, with many world class writers in its ranks and this kind of ghostwriting goes against everything Thoughtworks stands for. And if the editors at the magazine must have someone pretending to be Roy, they magazine ought to get someone who understands how to write English well.
It amazes me that people whose profession is all about writing well don't know the rudiments of the language in which they write.
Saturday, August 04, 2007
On Having Friends Who'll Change the World
A few months ago I and a few friends started meeting at the end of every month for an "iteration review" of how much progress we've made (or not) on our "life work" that month. The structured part of the meeting consists of each participant reporting what went right, what went wrong and what was learned during the preceding month and what the plans for the coming month are. Anyone can ask clarifying questions. This is followed by unstructured discussion over dinner (and drinks, for those who indulge in that particular vice). Apart from the obvious benefits of meeting up with friends regularly, the act of vocalizing what was learned has tremendous value.
The last meeting was focussed, for instance, on the difficulties of transitioning from the habits instilled from working in India's "Silicon Valley" to those needed for doing world class work, particularly in research/scientific software, the price one needs to pay and the metrics of progress. While that was a fascinating discussion, what struck me then was how lucky I am to know people who are unwilling to accept the status quo and exert themselves to become the best they can be.
This extends beyond the attendees of our end of month meetings. I just got back from lunch with another friend I haven't met in a while. I am amazed at how much she has learned in the intervening period and how many different areas of improvement she has targeted for the future. Indian society has the nasty habit of grinding down women who want to excel in any field, but then she has extraordinary potential, so that will be an interesting career to watch. If she ever starts a company, I will be the first to invest in it.
On reflection, I realize that I subconsciously rank people by (a) their potential to excel and (b)the ratio of actual achievement to potential achievement. I pay attention proportional to how high I think they score on these parameters and so I end up ignoring people who, in my subjective opinion, have low scores on both parameters.
I am not very certain that this is the "right" way to judge people or decide who to befriend (I guess I am an unconscious "elitist") but it results in my knowing people who strive to excel. And given the caliber of some of my friends, I effectively end up knowing people who'll change the world.
Subscribe to:
Posts (Atom)