IRB tab completion

The ruby IRB comes with tab completion. Here’s how to enable it –

Create a file (if it doesn’t already exist) in your home directory called “.irbrc”. In it, cut and paste the following lines –

IRB.conf[:AUTO_INDENT] = true
IRB.conf[:USE_READLINE] = true
IRB.conf[:LOADMODULES] = [] unless IRB.conf.key?(:LOADMODULES)
unless IRB.conf[:LOAD_MODULES].include?(‘irb/completion’)
IRB.conf[:LOAD_MODULES]

On the advantages of Lisp

Lisp is a programmable programming-language. It has several high-level features which many “modern” or “contemporary” languages do not. Among its features are –

* the now very common garbage collection
* language level extensibility
* true support for macros
* the now somewhat popular dynamic typing
* a special condition system (exception-handing on steriods)
* true multi-paradigm programming support
* the somewhat common lexical closures
* more

More than the features themselves though, Lisp truly encourages bottom-up programming. Finally, the programmer can build up the language to meet with the problem domain, rather than try to express the solution (broken down, using a top-down approach) in a clunky syntax which has nothing to do with the actual solution or the domain. In other words, domain specific languages (DSLs) become easy – in fact, they are a very common way of solving problems with Lisp. This is good. Even domain experts (non-programmers) can be directly involved in the “coding” using the domain-specific-language. More importantly, small changes lower in the stack can significantly improve and expand the functionality available towards the upper part of the stack (which is the DSL) – which is also where the problem at hand, is actually addressed.

Finally, even if one doesn’t actually program in Lisp at their day jobs, it changes the mental models significantly enough to make one a better programmer for the rest of one’s programming life.

Ownership and Quality

Here’s something that is perhaps rather obvious – Ownership Improves Quality. As in, if a person is given ownership of the work-product, the quality of the result is much higher when compared to the situation where he is told to do something “for the company”. Quite obvious, right?

Why is it then, that most companies do not recognize and foster this? Take a look at any medium-sized or larger company. You will find employees engaged in turf-battles, political-struggles and playing the game. Essentially, employees are mostly either in-fighting over inconsequential issues or attending fruitless meetings. Work gets done in between all these activities, if time is available for any. If this wasteful behavior could be eliminated, productivity could increase by an order of magnitude or more.

You don’t see this type of dysfuctional behavior in small companies. Why? What happens when companies grow in size? What happens between the time when a bunch of smart and motivated people come together to form a new company and the time when the company grows to beyond a certain number (about 150, according to popular research)? Why does this company then become a candidate for ridicule, typically?

Here’s what I think happens. The people who start the company are the ones with the real passion to create something bigger than themselves. So they do everything right. They also hire the right people and infuse them with similar passion. This chain-reaction continues for a short while. And at some point, this transferrence just isn’t effective anymore. After all, what is to *really* motivate someone who has worked at five other places before joining this company and has heard it all before? Metrics to measure “performance” are now needed where earlier, none were needed because doing the best one possibly could was the way of life. No performance metrics can really measure anything real and because of the reflexive interaction between workplaces and metrics, people simply adjust their work patterns to chalk up the right numbers for themselves. In any case, true enthusiasm is often lost.

Once the wrong (or at least sub-optimal) people start getting hired, pretty much all is lost. All the afflictions described above start flaring up. And the place of work becomes a game of chess and also a mockery of anything it is meant to be. And yes, Dilbert cartoons start getting pinned up on people’s walls.

Is there a solution? Many people have tried employee ownership through stock with varying amounts of success. It does work upto a point. And this point is much farther along the line than where the pure transferrence of passion stops working. So that makes it indeed a step forward. But after a point, it really just becomes a component of one’s salary – almost like a form of variable pay – because the amount it contributes to total compensation isn’t really all that much. And when this happens, it once again, stops being an effective motivator. In the end, the thinking becomes: one person’s effort can not really make all that much difference to the share price, and it just isn’t worth busting ones ass beyond “regular” work (or more likely, non-work) – just do enough to not get fired.

I’m not saying stock as a component of compensation is bad, but merely that although employee ownership is a neccessary condition for higher quality, it is by no means a sufficient condition. Neccessary but not sufficient.

What are the other aspects of things needed? In the end, the employee needs to belong. This is probably not valid for the merely mercenary type of employees – for them, money alone is the motivator – and that is either easily taken care of or not. For those who want to be a part of something greater than themselves (and are not the enterpreuner types themselves), the only effective way to get them onboard the real-value train is empowerment.

Empowerment means ownership of a different kind. It means ownership of ideas, work-products and initiatives. It means being recognized for doing successful things and for being able to do what they think of to make things better. This is the only kind of employee ownership that truly works at the grass-roots level. I say this from experience at various clients – places that understood this had a much larger percentage of non-pointy-haired-bosses-type folks. After all, people are not born sub-optimal, they merely adapt to their enviroment and do what works best for the situation. In the end, the answer is to create an environment where the best thing to do everyday is simply the right thing.

My two cents on what motivates employees.

Ownership and Quality

Here’s something that is perhaps rather obvious – Ownership Improves Quality. As in, if a person is given ownership of the work-product, the quality of the result is much higher when compared to the situation where he is told to do something “for the company”. Quite obvious, right?

Why is it then, that most companies do not recognize and foster this? Take a look at any medium-sized or larger company. You will find employees engaged in turf-battles, political-struggles and playing the game. Essentially, employees are mostly either in-fighting over inconsequential issues or attending fruitless meetings. Work gets done in between all these activities, if time is available for any. If this wasteful behavior could be eliminated, productivity could increase by an order of magnitude or more.

You don’t see this type of dysfuctional behavior in small companies. Why? What happens when companies grow in size? What happens between the time when a bunch of smart and motivated people come together to form a new company and the time when the company grows to beyond a certain number (about 150, according to popular research)? Why does this company then become a candidate for ridicule, typically?

Here’s what I think happens. The people who start the company are the ones with the real passion to create something bigger than themselves. So they do everything right. They also hire the right people and infuse them with similar passion. This chain-reaction continues for a short while. And at some point, this transferrence just isn’t effective anymore. After all, what is to *really* motivate someone who has worked at five other places before joining this company and has heard it all before? Metrics to measure “performance” are now needed where earlier, none were needed because doing the best one possibly could was the way of life. No performance metrics can really measure anything real and because of the reflexive interaction between workplaces and metrics, people simply adjust their work patterns to chalk up the right numbers for themselves. In any case, true enthusiasm is often lost.

Once the wrong (or at least sub-optimal) people start getting hired, pretty much all is lost. All the afflictions described above start flaring up. And the place of work becomes a game of chess and also a mockery of anything it is meant to be. And yes, Dilbert cartoons start getting pinned up on people’s walls.

Is there a solution? Many people have tried employee ownership through stock with varying amounts of success. It does work upto a point. And this point is much farther along the line than where the pure transferrence of passion stops working. So that makes it indeed a step forward. But after a point, it really just becomes a component of one’s salary – almost like a form of variable pay – because the amount it contributes to total compensation isn’t really all that much. And when this happens, it once again, stops being an effective motivator. In the end, the thinking becomes: one person’s effort can not really make all that much difference to the share price, and it just isn’t worth busting ones ass beyond “regular” work (or more likely, non-work) – just do enough to not get fired.

I’m not saying stock as a component of compensation is bad, but merely that although employee ownership is a neccessary condition for higher quality, it is by no means a sufficient condition. Neccessary but not sufficient.

What are the other aspects of things needed? In the end, the employee needs to belong. This is probably not valid for the merely mercenary type of employees – for them, money alone is the motivator – and that is either easily taken care of or not. For those who want to be a part of something greater than themselves (and are not the enterpreuner types themselves), the only effective way to get them onboard the real-value train is empowerment.

Empowerment means ownership of a different kind. It means ownership of ideas, work-products and initiatives. It means being recognized for doing successful things and for being able to do what they think of to make things better. This is the only kind of employee ownership that truly works at the grass-roots level. I say this from experience at various clients – places that understood this had a much larger percentage of non-pointy-haired-bosses-type folks. After all, people are not born sub-optimal, they merely adapt to their enviroment and do what works best for the situation. In the end, the answer is to create an environment where the best thing to do everyday is simply the right thing.

My two cents on what motivates employees.

Efficiency considered harmful

This is a post about a pattern which I’ve been noticing for quite a while on a subconscious level, but which recently became painfully obvious. It happened, as usual, at a client location.

I’m talking about the fact that completing a project ahead of schedule is bad. Very bad. Let me explain.

We all already know (and love) the typical atmosphere that management at most organizations create – an atmosphere that is super-conducive to getting real work done. Not. Further, from a project management perspective (and I’m not being facetious anymore), estimation is hard. It just is. Whatever methods and models you employ to try and make estimates accurate (how’s that for an oxymoron?), you just have to ultimately rely on heuristics. Bring in a bunch of experienced programmers/architects (after all, architects know best) into the room and have them give you an idea of how long the project will take and how many people need to be on it.

Despite my biting sarcasm, I’m actually being serious about one thing – the fact that programmer heuristics is the best way to estimate. I say this more than just because I think that the people who are actually going to do the job should say how long it will take, but because they factor in the environment they’re working in.

Load factors or project velocity depends on more than just the skills of the team members. If the environment (management, company policies, politics, “the system”) make it hard to get work done, well then – less of it will get done.

People working in such typical soul-crushing environments adapt to it – as any human will when faced with something less than perfect (and unchangeable.) They throw in the towel, and become part of the system. They behave the same way the system wants them to – and become risk averse and rule-following sheep with no enthusiasm left for anything other than doing what makes them look best for the year-end review. They adapt to the measurement process and also to the rule-keeping process.

If this were an IT department of a large company (who would have made that connection?), what do you think will happen when a project comes in ahead of the schedule?

Let me tell you what happened at a recent client – they were crucified. Why? Because it was clearly a case of rigging the schedule. Dishonesty. Everyone knows that projects can either be late, or they can be on time. Early? What? Huh?

Everyone knows what early means – the project manager (and therefore the team) had bloated the estimates to begin with so that they can look good to upper management when they complete “on time”. They should now be crucified because of this sin. And they do.

So what happens next? The adaptation process kicks in. A project just can not come in early – a couple of days late (just fashionably so, leaving scope for last minute “heroics”) becomes the norm. Or late, of course, for that is always allowed and accepted (with a knowing, friendly shrug and perhaps a nod). Scheduling and estimates are still bloated, but work expands to fill the available time, and the finish lines are always met appropriately. Works out nicely.

Just never forget the old software development pattern – being efficient and coming out ahead of the schedule is considered harmful.