Tech Leaderisms.

Are you a developer? Yes? Then I'm sorry to tell you, friend: There is a Tech Lead in you. Rather, someone will try to make you a Tech Lead one day. For your future Tech Lead self, I recommend reading the corresponding articles, A Tech Lead Manifesto and Behaviours of a Tech Lead (written by colleagues Sam Newman and Pat Kua, respectively).

To those insights, I add these recommendations:

Know Your Teammates

Before you start, talk to everyone. Understand each developer's goals and fears with respect to your upcoming project. Know the strengths and weaknesses of everyone on your team, and formulate a plan for dealing with both. Sketch out your team roster and ensure that the experience and skill level is balanced.

Use Two-Pizza Teams

I'm not sure who first coined this, but I love the idea. I also like the idea of trying it out in reality: Have an in-office team dinner. Order two pizzas. Were you left hungry? Your team is too large. Or you have one gluttonous developer. But probably your team is too large.

Given an oversized team by this yardstick, work with all stakeholders involved to divide up the project. You may even find additional value in simplifications required to divide up your previously bloated project.

Develop Horizontally Until Release 1

It may seem obvious, but I'm still surprised how often this rule is ignored. If you haven't deployed into a production environment yet, build out -- not down. Complex business rules will materialize in every story. They always do. Create new stories from these rules and put them on the shelf until they are truly more important than the next functional story coming down the pipe.

As a Tech Lead, you share this responsibility with your stakeholders. At the end of the day, they will decide what is most important. However, the unseen complexity of a business is visible to you because it materializes as code; share this with everyone.

Build It Yourself First

All too often slogans such as "You Aren't Gonna Need It" are thrown around the the software community until they're almost law. Lately, I find the most troubling to be "Not Invented Here Syndrome"; more often than not, I find the opposite Syndrome afflicting developers: "There's a Framework For That! Syndrome"

Sure there is. Build it yourself anyway.

The majority of frameworks are simply implementations of patterns. Whether as ubiquitous as Dependency Injection, or as domain-specific as a shopping cart, try implementing the pattern yourself before reaching for the nearest third-party library. You very well might throw it away, but often you'll end up with an implementation which is significantly lighter and easier to test.

Keep Metrics and Ratchet Your Build

Chris wrote about "ratcheting" recently. Go read it! The flip side of ratcheting is, of course, preventative medicine. Why wait until you have 60 TODOs before breaking the build? Place as many reasonable limits on yourself as you can, early on. In the thick of the project your motivation to do so might be overruled by the desire to Just Write Code. Tools such as Panopticode, metric_fu, PMD, and Gendarme will help you a great deal, but they're just the tip of the iceberg. Be creative not only in the tools you choose, but the rules you write and the metrics you extract.

The C# expatriate: Tips for settling in Java.

Friday signaled the end of my first Java project in 6 years. Coming from a C#/.NET background, the learning curve was not steep -- but by the end of the project I had learned enough small lessons to serve as the basis for this little document.

If you happen to move from a .NET project to a Java project, have a look through these pointers. This is all the advice I wish I had when I started this project six months ago.

1. Learn all your new tools, inside and out.

As a C# developer, you're already utterly dependent on ReSharper. You will undoubtedly feel at home in IntelliJ. The majority of your day-to-day keyboard shortcuts will remain the same. Those that map directly map closely (CTRL+- is replaced with CTRL+ALT+LEFTARROW).

However, ReSharper is a plug-in which makes .NET development tolerable. IntelliJ is a work of art -- and it makes programming a joy. Install the Key Promoter plug-in and never look back.

2. Find New Tools

As far as I know, nothing like Panopticode exists for C#. Guice almost certainly doesn't. Explore the landscape and enjoy the rich open source bibliotheque that we're missing on Microsoft-funded frameworks.

3. Testing and Mocking

Use JUnit 4. Use Mockito. Try jBehave.

4. Collections

Eagerly write custom collections and provide yourself with methods for collecting, filtering, and all that other fun stuff. You can augment this with Hamcrest Collections, but keep in mind it's still v0.1.

5. Other Wrappers

Be even more aggressive about wrapping standard APIs than you would be in .NET. Why? Like collections, the .NET base class libraries have a (small) leg up on Java, thanks to watching Java grow and change. Because of this, you will periodically find features missing you might expect from the standard API. To be fair, once you've become accustomed to eagerly wrapping standard APIs in Java, carry that back to .NET with you. Chances are good you weren't wrapping enough stuff when you were last writing .NET. (I know I certainly wasn't.)

6. Dates and Times

The Java DateTime libraries are beyond useless; use JodaTime from day one. If anyone imports the JDK DateTime packages, fail the build. Joda comes with all the Hibernate jazz you need to persist Joda's DateTimes, so you're good there.

7. Apache Commons

Use it. It rocks. When you go back to .NET, steal ideas.

I am that alien.

"Somehow the competing teams of aliens can see our world through our eyes when they want to, and can influence our actions by ramping up or down on our desires. They can't control our specific actions, just our general propensities, making us, for example, hungrier or hornier or lazier than normal whenever that would be a strategic advantage in the game."

Scott Adams - Sci-Fi Plot


Human beings can comprehend mathematics. At some point, we discovered the triangle -- a brilliant, reusable piece of beauty and simplicity.

Why do we still build tables with four legs?

Cartoons and comic books.

The curiosity of my coworkers at ThoughtWorks often leads to a number of healthy and interesting debates, which often occur in the pub, on internal mailing lists, and anywhere in-between. One such discussion, of the mailing list variety, revolved around the topic Chinese economics and politics. Inevitably, the recent Angry Red Dragon issue of The Economist was mentioned in passing as participants shuffled over the topic of general Western opinions on China.

Most people I know were furious when they saw the Angry Red Dragon. I was elated. For years, I've taken to ribbing any of my friends who read The Economist; although the writing is entertaining, the topics various, and the grammar impeccable, I still find it offensive that such a magazine sells itself as "news" for the same I reason CNN disgusts me. It's not news. It's entertainment. It's a comic book.

Fox News has been getting it right for years now. Kurt Vonnegut's obituary-thing is the perfect example -- no one at Fox is pretending they're running a news channel. It's a cartoon and that in itself is not entirely disagreeable. No one I know would take such material at face value.

Other sources of information, though, seem to slip through this filter simply because their content is well-delivered and free of lunacy. Why is this the case? Even if we find a media outlet without opinion or agenda, what on earth makes us think they could possibly collect all the facts or perform a complete analysis?

Although we all ask ourselves that exact question and respond with "of course that's silly! I always question everything I'm told," sometimes it's not so obvious. As human beings, we're remarkably fallible. I've read Economist articles in the past and forgotten, mid-stream, that the material I'm consuming is For Entertainment Purposes Only. It's an easy rule to forget -- we all do it -- and there's nothing quite like thinly-veiled racism (or other abhorrent messaging) to remind us that media we consume is largely trash.

We need more onomy.

The other day I was listening to assorted tracks in my reading room while enjoying a glass of scotch and puttering away in the codebase of my current project. I was feeling chipper, the sun was shining. On Saturdays I'm willing to play the music loud enough to feel engrossed and I was looking for a bit of a beat in most of what I was listening to.

I own an iPod Video, and if we discount the fact that Winamp seems to be the only reliable way of getting data on and off the device, it does a satisfactory job of playing music. Selecting music, however, is a chore. None of the predefined labels in the iPod taxonomy (or the taxonomy of any other music player I've ever used) satisfy my needs: Artist? Genre? Just what is a "genre," anyway? And how do I differentiate between Electronic, Electronica, and Electronica/Dance? Or Folk, Folk/Country, Folk/Rap, and Reggae/Folk?

I'd love to see a taxonomy for music based entirely on well-articulated emotion or situation. That is, the primary detail describing the music would be details of potential consumer environments, rather than details of the musical quality itself. Because music is so notoriously difficult to classify in the first place, I don't see why a difficult, albeit inverted, classification scheme isn't worth a go.

An open-ended tagging scheme would work well for this, so perhaps the folks at or MusicBrainz have already solved this problem... I don't know. I don't use the internet often enough to pay attention to this stuff. But searching one's own collection for tags such as 'emotion:elated,complacent' and 'situations:alone,underground coffee shop' would save those of us who don't have the energy to invest in memorizing albums.

Such a system would actively encourage group classifications to avoid the obvious potential single-minded environmental appreciation of music stemming from individuals producing this meta-data. But then, these classification parties would tend toward an eventual situation of 'classification party'. maybe it wouldn't work after all. But I still wish UIs for music-selection had improved in the last 15 years.

Design oddities from another universe.

Man. Whose job is it to come up with this shit? Here is what this dialog box says to me:

Hey, sorry. Because the software we wrote for you is riddled with security holes, we have to turn your computer off at random... in the night. Like ninjas. Or vampires. Or ninja-vampires who come in the night to destroy your data and then tie you down to your bed and tickle your feet until you scream. And then suck all the blood out of you through... your nipples. Yeah. And maybe then we'll throw salt on your bloody nipples just for good measure, even though you're already dead. Because we hate you. A lot.

Well, I'm starting to hate you too, Microsoft. My current project requires that I use a Windows laptop on a daily basis. I've grown quite accustomed to Ubuntu and OS X over the past few years. As much as I'll harp about the fact that Apple's computer platform blows Windows out of the water when it comes to "how much proprietary do ya gots?" -- at least it works. Windows XP is the new OS/2: it's cute, it worked once, but now we need to convince our co-workers it's time to move on.

Rock the shortcuts.

Brilliant. I'm not sure how I got through life without this before: ? (or shift+/) displays all the Gmail and Google Reader keyboard shortcuts immediately on-screen. Hooray!

Devcamp Bangalore, Barcamp Pune!

If you are near the south or west of the subcontinent this college fest season, be sure to sign up for devcamp Bangalore and Barcamp Pune. Each unconference will run out of the respective ThoughtWorks office, and Sexy MF will be in attendance. If you're coming to Barcamp, let me know!


Life in India incurs smaller expenses than life in Canada. (Unfortunately, it also involves a smaller salary; my Indian salary is approximately minimum wage in Canada.) Rent is reasonable ($225/mo) and food is as cheap as you'll find it anywhere -- even to eat out ($2 will stuff you in a cheap restaurant).

But if Geoff can accomplish the $10/day February he has planned, he'll blow me out of the water.

I don't even have the energy to be angry about this anymore.

One of these things is not like the others.

in honour of russian girl

Mike gave up on his blog, but apparently someone else hasn't.

Here's one that recently slipped through Gmail's filters. You have to admit it's pretty money.

Enormous shlong drive girls mad

Your woman lived you alone along of she had done it with your friend.

By reason of the size of his machine drove her crazy with him.

Dont worry chap. At present you have good chance to Enlarge your male machine length.

Lengthen your male device size and you'll forget about troubles surely enough.

-Doctor Samantha Mcgraw

Testing strange web applications using Selenium? Take note.

Update to: Workaround for alert() and confirm() during onload()

A change in Selenium has caused this workaround to stop working for those inclined to simply copy and paste Alistair's original solution. These days, if you want to give Selenium access to alert() and confirm() dialogs your application pops up during the onload event, you'll need to reference parent.selenium.browserbot instead. As per the original solution, execute the following code anywhere (either statically in the page or in the onload event itself) before the JavaScript which pops up a dialog:

var browserbot = parent.selenium.browserbot;
if (browserbot) {
browserbot.modifyWindowToRecordPopUpDialogs(window, browserbot);

Tada! You're home free and your QAs can happily automate testing through the UI once again.

Also of note: If you're popping up alert and confirm dialogs in an IFrame (egads!), you'll need to reference parent.parent.selenium.browserbot.

Happy testing!

How to be succinct.

Regarding Singletons, Steve Yegge writes:

In my Data Structures course in college, when we got to AVL trees, my prof turned and wrote on the board, in huge, clear letters:

 AVL Trees are EVIL

...and that's all we had to learn about them. He had us implement red/black trees and splay trees instead. To this day, I have no idea how threaded AVL trees work. But if that's OK with Dan Weld, it's OK with me.

But now I know how he felt.

Steve, Steve. Follow Mr. Weld's example. Or you could just point people toward "Test-Driven Development By Example", since Mr. Beck has already covered this one pretty well:

"How do you provide global variables in languages without global variables? Don't. Your programs will thank you for taking the time to think about design instead."


At lunch the other day, Anay and I were lamenting the sharp bug-detection skills of our team's Business and Quality Analysts over dry, flavourless rotis. At one point, while defending a feature he hadn't implemented yet against accusations of systemic circumvention, Anay blurted out, "That's because you haven't filed a bug for it yet!" (With the standard XXL Anay Grin plastered on his face, of course.)

However, our humour inadvertently led to revelation. The differences described by experts between "defects" and "features" are purely semantic. And after considering the application of this theory wholesale to our current project, we arrived at a much juicier solution: Bug-Driven Development. Submit a bug, have it implemented by our crack team of developers.

Subversion is here, but we'll probably move to Google Code when we write... some code. (I tried making an issue tracker on Lighthouse... but lo-and-behold! It sucks. Thanks Web 2.0 for providing the world with a bunch of over-simplified applications written by 15-year-olds which are only free when they're totally useless. I'm not bitter.)

Anyway. No software exists yet, but you are welcome to submit bug reports. No development environment exists yet, so bug reports are welcome as comments on this blog post or emails sent to me. A good first bug report would be the lack of a bug reporting system. Maybe the software should be a bug reporting system? Oh, we also don't have any developers yet, so another suggestion for your first bug is recommending the assembly of a team.

Enough hints! Welcome to Singularity: The First and Last Real Software Ever.


The Theory

Moving to a new country often involves adjusting to a new currency. As much as my mind can't intuitively wrap itself around miles, I have a hard time with the feeling of Rupees here in India. Thankfully, the current economic situation provides us with some easy answers.

The present economy helpfully provides us North Americans with a nearly-round conversion rate:

$1 CAD / USD : Rs. 39.1

We can exploit this fact by rounding up to Rs. 40 per dollar and taking other factors into consideration. The economy of India is significantly different than that of North America. Housing is much more expensive. Food is much cheaper. Compared to the cost of living in your average Canadian or American city, the cost of living ratio is approximately:

1 : 4

You see where we're going with this, ya? To get a feel for prices in India, all you need to do is apply this ratio:

1 : 10

Canadians/Americans: That is to say, for every dollar you would spend in the US or Canada, you should prepare to spend Rs. 10 in India. This obviously won't be the case. I've spent Rs. 2000 (which feels like $200) on a bad bottle of wine. I've spent Rs. 5 (which feels like $0.50) on a sandwich. But you get the idea.

Indians: Conveniently, the inverse is true. If you move to the US on a US salary, imagine every dollar you spend is Rs. 10. A $50 bottle of wine should taste as good (probably better) than an Rs. 500 bottle of wine. $400 for an iPhone? That should hurt as much as spending Rs. 4000.


The difficulty here is that India's economy is a great deal more interesting than North America's. Some people in India live on Rs. 500/month. Could you live in Denver for $50/month? On the other end of the scale, we have inflated prices driven by foreign currency, which complicates the conversion even further. For now, let's assume you're a member of the youthful middle class in either country and examine some sample costs.

Cleaning Lady
Rs. 1000 /mo => $100 / mo

$50,000 => Rs. 500,000

Rickshaw / Cab ride
Rs. 50 => $5

Cheap meal
$4 (McDonald's) => Rs. 40 (delicious)

Expensive meal
$200 (delicious) => Rs. 2000 (Meh.)

Imported iPod stereo
Rs. 16,000 => $1600 (in India)
$400 => Rs. 4000 (in Canada)

Delicious street-side masala chai / disgusting Starbucks coffee
Rs. 2.5 => $0.25 (in India)
$4.25 => Rs. 42.5

Those last two items are intended to illustrate the sliding scale. You would never pay $1600 for an off-the-shelf iPod stereo (one hopes), nor would you ever find a coffee shop willing to serve you a cup for $0.25.

In general, "the high life" is better lived in Western countries... or in India on a Western salary, if you have such a luxury. Otherwise, you'll find the cost of living comparable in India, with regular expenses such as food or tea accounting for very little of your budget.

Is there an easy conversion rate for two countries you've lived in?

A new theme.

In the past I've applied "don't think, just do" only when I felt like doing. No more! If you aggregate this thing, you'll probably want to stop. A scratchpad will all facets of my life become.


        Bees.  Swarming buzzing bees.  Tickling temperamental bees.  Bees with
pointy painful stingers.

The boy poured honey down his back and shook his buttocks left to right.
The naked crazy boy. He passed by the beehives, jogging not running. Taking
his sweet innocent time, through the grass, toward the white perfumy clover
field. The bees rose in a fuzzy brown boil, filtered out their hive, cleaved
the air like an arrow aiming for honey-dripping bare-bummed Johnny. Little
Johnny boy smiled broad and white, his feet advancing toward the clover, tossing
his hips from side to side, breathless voice issuing forth, "Beeeeez.

Little Johnny boy slipped a finger between his perspiring crack, taking
away honey as if from the stale edges of a white bread sandwich. Johnny loved
the bees, almost as much as the sticky sweet clinging of honey that formed and
hung like stalactites from his perineum, dripped dripping drops.

The bees closed in. Thousands of bees, their murmuring buzzing chorus
titillating little Johnny boy, stingers angry and shining in the sun, quivering
mad. Johnny jogged toward the clover field, licking his finger of the sweet
sweaty honey. Honeybuns, Johnny thought, and laughed until he fell rolling over
the start of clover. Honeybuns, thought Johnny, and he laughed, giggled, a
smile playing over his bare freckled puss. "Beeeeeeez!" Johnny exclaimed, as a
fuzzy buzzing cloud converged on little Johnny's honey sticky ass.

The sun rolled in golden fury, and hours later, when it had turned a dark
red, and sunset swollen, little Johnny boy lay stiff and puffy, pink and happy,
dead stinking sweet.

- (this one you have to find yourself)

The Mystery of Monster Mountain (and captain America)

Once upon a time there was an ugly man. He lived in the Jungle.

He was half man half monster. He ate green gorillas. When he was 3 he was very nice. Then when he was 12 he turned into a monster! His name is the purple graveyard monster.

His planet was called oookkyy. He has a space ship. It can go 8,000,000 miles a day. On thursday 1980 he went to earth that very day.

Then he saw another planet. It was called earth.

Then he landed in the Mississippi river.

Then the monster saw something. It was captan America!

Captan America fainted. He was hypnotized. Then he got unhypnotized. For that he shot a laser at him. Captan America took his shield out

and Palaaka! It reflected back to the monster!


Next Christmas?

Hell yes. (Video after the jump.)

Not Getting Things Done.

Some lessons I learned before reading this article Rohan showed me today (ironically filed under GTD):
  • Get rid of your car.
  • Own less. And less. And less.
  • If you have to own something, own something good.
  • Don't watch TV. Ever.
  • Do things you love with other people.
  • Do things you hate with other people.
The article, unfortunately, suggests moderation. If you, like me, are incapable of moderation, you almost certainly consume food, alcohol, sleep, and friendship with reckless abandon. You overwork. You underwork. You overthink and underact in the moments preceding underthinking overreaction. For you, blindly following the absolute rules listed above is as much a part of Not Getting Things Done as the behaviour they reflect.