Sunday, January 3, 2010

Building a portable dev environment

I started a little coding side-project, and came to the idea of putting the whole dev environment on a usb drive.  That way, I could plug it in wherever I am, on any computer, and have all the tools I needed without any additional setup.

An additional benefit: to bring another developer onto the project, I could just drop the contents of the drive on their computer.  They'd be instantly ready to roll, with close to zero start-up effort.

I have a 8GB drive, but so far the environment uses only about 500MB.  Here's what I installed:

* JRuby.  The project calls for Ruby, and I went with JRuby because it's extremely portable: just extract the binary zip to wherever you need it.  You might be able to setup Ruby on a flash drive, but the options sounded more experimental. 

* Java SDK.  Turns out you can direct the java installer to point right at your USB drive.  Here's more detailed instructions.  Very easy, ran across only one bug -- closed by Sun though not fixed -- that didn't have any effect on performance / function.

* Eventually, I'll need a j2ee container, but I feel pretty confident I could get resin or tomcat or glassfish working on a drive.  Installing webapps on a j2ee container involve nothing more than just a .war file drop, of course, so dropping in Rails should be a snap.  I don't need Rails just yet, but I'll post an update when I try that.

* Git.  Git offers a portable version, and is more appropriate for distributed source control than something like subversion.  If I used subversion, that would mess up the whole goal of keeping it on a flash drive.  I wouldn't be able to drop the env to a friend at a moment's notice, and then we'd need a central server stored somewhere.  Git might need some additional config if others join, but for now it's just me.

Of course, using Git might seem like overkill to some.  I like to save versions frequently, and I quickly get tired of and confused by all the .old and .dated files and directories lying around.  Git will eliminate all that clutter.

* Firefox.  While coding, you always end up with a ton of reference and investigation links.  I thought taking my browser with me would be better than storing links on a 3rd party site, which I've never really liked.  IE is not a possibility, and I prefer Firefox for the add-ins anyway.  This ended up working very well (as long as you bump up the cache, which defaults at 0), except for one problem, which might be considered serious.  If you run the portable version, with all your dev-related links, and then you try to run your local version, Firefox just runs another instance of the portable version.  So, you can't get to any locally-installed links without closing the portable version.  One workaround would be to store all links on all your Firefox installations, but I wasn't really looking to store, for example, my company's HR website on my dev env, especially if I want to drop the whole thing to another developer at some point.  Will have to think about this one a bit more.

* gVim.  I want to use the same code / text editor on any computer; your productivity increases as your expertise increases.  Yes, going to gVim feels a little like using WordPerfect on the dawn of Word's impending domination, but gVim is much more robust than Notepad++, which might be the only other possible contender meeting these two criteria: free and portable.  Frankly, I found very few features that gVim didn't have or couldn't be added to the default configuration.  A robust text editor decreases the likelihood of needing to fall back to a full-blown IDE, which I'm not sure would run well on a flash drive (though some say it works).

That's where I am so far.  Other than the remaining Firefox issue, the results have exceeded what I thought was possible.  I'll provide updates as my env requirements grow or unexpected issues pop up.

Wednesday, December 16, 2009

*Nudge* by Thaler and Sunstein

Without being aware of it, I seem to be very concerned about my or (maybe others's?) decision making skills.  Several books I've read lately deal with improving decisions.

Nudge takes an interesting approach.  Instead of questioning how people decide, it asks how decisions can be organized in a way that helps people make a wise decision.  Some might debate what makes one decision wise compared to another, but the authors point out that often people would make a choice except that they are forgetful or find the options too complex.

A simple example: defaulting 401k enrollment instead of forcing people to opt-in.  People can opt out if they so desire, but usually don't. 

The areas they discuss relate to government and institutional programs -- health insurance, charitable donations, marriage.

The theory applies very directly to software and software management.  Much of good management involves getting people to do the right thing -- and in this case, the "right thing" is more easily defined -- without using a heavy hand.  Sometimes micromanagement is required, but it should be a last resort.

Test driven development strikes me as a good way to encourage good practices.  You encourage testing and more up-front analysis by making the former easier and the latter part of the process.  Domain driven design provides tools to express the business more accurately.  You also encourage developer involvement in the business by easing the barriers to understanding.  Just working to get the developers in front of the users goes along way to this goal, as well.

Many other agile practices are less about software development per se, and more about putting people in the right spot and frame of mind to make the right decisions.

It's great to hire people who self-start and need no guidance.  Most of us, however, need a little nudge.

Tuesday, December 15, 2009

Lawsuits to rein in bonuses

You know things are a little whacked when your own shareholders sue you over bonuses.
Goldman Sachs Group Inc is being sued by an institutional investor who claims the firm is preparing to pay out improper bonuses.
Naturally, shareholders want more, but in this case, they believe they deserve it.  According to an article last month:

Despite record net income and compensation at Goldman as markets rebound and the firm outmuscles weakened rivals for business, analysts expect its 2009 earnings per share to be 22% lower than in 2007 and roughly equal to its 2006 earnings...  The decline is caused by issuing more than 100 million shares in the past year to bolster Goldman's financial position and capital.
The article raises the question about whether Goldman changed the way it accounts for consultants in order to make the average bonus look lower.  The conclusion seems to be that no change occurred, but questions like these will continue when 1) you faced death and survived due to help from the government, wealthy friends, and shareholders, who allowed getting diluted due to the circumstances, and 2) you played accounting games before.

In fact, given the disappearance of the worst month in its history (thanks to the accounting games), these bonuses may indeed be improper.  Including December, this is most definitely not a record year and therefore not deserving of record bonuses.

Bonus culture has ended its usefulness.

Monday, December 14, 2009

50% tax on bankers

A short interruption as we barrel toward bonus season here in the financial industry.

A fifty percent tax on bonuses over ~$40k would certainly get bankers' attention.  Britain and France both signed up, but other countries, including the U.S., have backed away.

At first, I doubted the wisdom of it, but after some thought, I find myself agreeing with it more.  (Needless to say, my banker friends would kill me.)

 The common arguments against aren't that strong, frankly:
1. it's politically motivated?  Uh, every law that gets passed fails that test.
2. it will drive people to work in other cities?  One time events don't have a big impact on behavior.
3. it will drive people to work for other companies?  See #2.  A couple years from now, this will have zero impact on people's work decisions. 

The bottom line is, we can dismiss this one-time tax as an extraordinary event, just as we justified bailing out the events because of the singular nature of the bubble collapse.

The strongest argument against it is that it can be circumvented, through delays or payments of other forms.  Very difficult to enforce.  But most people aren't making that argument.

As an issue of fairness, I see nothing wrong with it.

Wednesday, December 9, 2009

Better living through software

f.lux dims your monitor brightness during the evening and night.  Just like your dashboard lights dim when you turn your headlights on.  I would feel blinded when I'd come home and log in, and this really helped.  It might help you sleep better, too.  (Via Seth Roberts.)


Dropbox automatically syncs files between multiple computers.  It also keeps a copy of everything in online storage.  So, it solves the problem of storing to an always accessible location, while also keeping a second local copy in case the cloud goes down.  While also creating a copy in a different location in case you have a fire.  While also eliminating the need to email and thumb drive copies around to yourself.  This is a freemium service.  (Via Dave Winer.)

Bloomberg embraces baseball via new baseball stats analysis.  Seems a little like swatting flies with a brick, but as a baseball fan working in the financial industry, I have to like it.  As a side-benefit, it keeps the financial modelers busy and not creating fancy new financial products that no one understands and threaten our economy.  Then again, at the end of the article, one man claims that the Bloomberg product will destroy baseball.

Indie software games

Indie games are to the game industry what the indie movies are to the movie industry.  According to one leading indie game developer:
“A realization is dawning that games can be much more than what they are now... They even have the potential to be meaningful in deep, fundamental ways.”
You can try some of them for free, so you owe it to yourself to give them a shot.  Like indie movies, they tend to have more ambiguity in purpose and focus on aesthetics.

I hope these guys succeed, because we can only play so many versions of Halo / C&C / AoE / Warhammer / Warcraft.  Change way the people look, turn the castle into a spaceship, improve the design, but it's still the same game. 

Yet, I'm not convinced that games will join books, movies, and music as high art.  (Many argue that mass-appeal movies like The Transformers are no less an art form than other movies anyway.)

First, story lines and characters tend to be very shallow.  The old dude in Up had more depth than any video game character I've seen.  I'm not saying that, even when you're building your Civilization, there isn't a story being told. There is, and that history creates part of the fun of the game; it's just not a very complex story.

The bigger question is whether games should try to create meaning.  They should definitely try to force people to imagine new things.  Indie games do a good job of that.  Whether or not that's meaningful from an emotional sense may be irrelevant.

In addition to imagination, games should try to involve more of our senses.  The breakthrough of the Wii centers on the fact that it brought new senses into the experience.  Dance Dance Revolution is really a game revolution that we should appreciate in awe.

Ultimately, the division between games and tools will increasingly blur.  While "games" will continue to be a way to pass time, "tools" can make people's lives better, more efficient.  What more meaning could there possibly be? 

Monday, December 7, 2009

Happy holidays coding

Every year, I pull out the holiday lights and always (so far) receive a pleasant surprise.  "Wow, look how organized these lines of lights are!"  Bundled, neatly folded up, tied in key points. 

And that's when I remember that the year before, when I put them away, I took extra time to do it right.  Undoubtedly, other needs pressed -- lots of cleanup, snow to be shoveled, an urgent need for more exercise -- which is why, honestly, it never fails to surprise me when I take them out again.

Why don't we treat our code equally well?  People shove code in, sometimes with little regard to ever using it again.  Bad names, broken formatting, long run-on functions, no design considerations, etc.  It's a giant knot of holiday lights the next time someone opens the box.

There are 3 main reasons.  The reason you might hear most often -- "I was in a hurry" -- doesn't hold up.  Time pressures rarely put a gun to our head.  When NYSE goes down -- now those coders have an excuse!

The rest fall into these buckets:

1.  Tragedy of the commons.  Whether you do your part or not doesn't affect you that much.  Rather, it contributes or detracts from the group good.  So, you prefer to spend your time on things that will benefit you more directly.  In other words, your box of lights goes into a community pile, from which you'll pick a random one next year.  The best way to combat this is by cultivating a group culture that values well-written code.

2.  Discipline is difficult.  The temptation to slide by, just this once, draws you in.  You worked hard at it every day this month, you've earned the right to just shove something together and go home early this time.  If you're feeling this way, you're probably a bit burned out.  Take a break.  Take a day off if possible.

3.  I just don't care.  Often because the gain is too far away.  In other words, anyone who shoves their lights in the box without any effort to be organized, knowing they'll be the one pulling it out in a year.  This is the hardest one to overcome; the guy is crapping in his own yard, what can you do?  Sometimes, appealing to professionalism can help.

Of course, it goes almost without saying that the extra time I spent putting the lights in carefully was easily repaid by the short time it took to get them strung up again this year.  And now I can relax.

Thursday, December 3, 2009

Phone industry: the third phase

The remarkable story about Android phones is not the phones.

True, Motorola's Droid is selling well, proving the platform presents a real challenge to iPhone.  Not this year, and not by itself, but I'll stand by my earlier prediction that this is the last year iPhone will dominate.  Next year, we'll have more new, hot Android phones, and the snowball will continue to roll and grow.

What I find fascinating is how software is revolutionizing phones.  Software used to be a few buttons you pressed to find the right contact.  Phone hardware concerns dominated: how usable are the buttons (blackberry), how big is the screen, how many megapixels does the camera have, etc.

It seems obviously now, but if you had asked someone a few years ago, "How do you take on the iPhone," they would have replied, "You need better hardware."  Remember when everyone speculated that Google would get into the hardware business in order to build a beach head on the phone platform?  But Google saw right away that the hardware had developed to the point where it didn't matter as much as the software on the phone.

Think about this: an entire category of phone hardware has been marginalized -- the clam shell phone -- because that form factor can't really run the software.  Did "candy bar" vs "flip" used to be a preference decision for you?  It was only a couple years ago!  Then iPhone's large screen and keyboard phones killed flip.

And then think about this: Google, which doesn't even make phones, is now arguably the second most important company in mobile phone production.

The phone industry has entered a new phase.  Software issues will dominate, and that change will be as disruptive as the transition from landlines to mobile phones.

Update: just noticed that Google will in fact have their own phone.  So, Google will play both ends, presumably aiming for a completely seamless experience like iPhone. 

Monday, November 30, 2009

Bonus season begins

I'll be following how the bonus season plays out this year.  Most banks will apparently have huge bonus seasons.

Goldman, doing the best, will pay the biggest bonuses.  Back in August, the CEO told staff to refrain from ostentation. Didn't really work: bankers and traders are making giant purchases, just with lowered voices.

I'm reminded of the movie Goodfellas.  The guys pull off the biggest heist in history, and DeNiro (Jimmy Conway) tells everyone not to spend the money until the police heat turns down.  Instead, the next day, one guy shows up in a new pink Cadillac, the next guy's wife has a new mink coat. 

The most interesting aspect will be how the public responds.  Some predict public outrage, but I think it will brief and muted.  The Wall Street show will roll on.  Only strict regulatory overhaul has a chance to change things.

In Goodfellas, recall, the only thing that stopped the lavish spending was Jimmy Conway killing everyone off.

Thursday, November 26, 2009

Facebook is hell

Jean-Paul Sartre wrote (taking lots of liberties in my summarization here) that having all your thoughts and actions observed by someone else would create a hell of shame and fear. 

Welcome to our always-on, interconnected digital world!

Facebook is quickly becoming the grand marshall of this world.  I'm not saying Facebook is evil or bad, I'm just saying its tools -- easy updates and posting, photos and videos tagging you, a feeling of privacy in a public space -- work well, and as a result, create a perfect situation for unintended bad results.  It's the metaphorical equivalent of someone picking their nose in their car (false feeling of privacy in public), but instead of just a few fellow drivers seeing it, it's posted on the web.

Canadian woman loses benefits over Facebook photo
Bank intern busted by Facebook
Facebook postings closing doors for job candidates

For years, we "adults" have been tut-tutting the kids with party pictures posted with comments like "Stupid kids, you'll regret it later when you try to get a job."

But this is the world that kids grow up in today.  I met some recent college grads on a Facebook alumni page, and they all had between 500 and 5000 friends.  Every one of them.  That seemed weird -- most people I know, older of course, have between 30 and 300 -- but then I realized they'd been adding friends from every school, every club, every summer camp they'd ever been to, all their lives.  From that perspective, 500 is probably the number of an introvert.

If you got very drunk at a party, you used to just reminisce about it with your friends.  Getting drunk or doing stupid things together and then reminiscing about it was one of the things that bonded you. 

Now, the reminiscing happens on-line.  That's just the way it is today; it's designed that way.  Even against your will, someone else might take photos (Michael Phelps), and often those end up in their Facebook album, with you tagged.  And then, lots of people you barely know -- that guy you took driver's ed with and your sister's friend's boyfriend's karate coach -- are all reminiscing with you.  Without the bonding effects, of course.

Privacy options help a little bit, but that's a finger in a leaky dam.  Our groups of friends and family and business associates overlap and intertwine.  These days, I share jokes and beers more often with co-workers than with "friends".

The only safe option is to never do anything stupid that might be embarrassing if someone took a picture and posted it online.  You never know who's looking, so assume that someone always is.  That sounds like Hell.

Tuesday, November 24, 2009

Microsoft paying for search content is unbelievable stupidity

Microsoft's impending deal to allow Bing to be the exclusive search engine for The Wall Street Journal and other Murdoch sites can only be described as stupid. 

Forget about whether the price is too high (reports peg it at $50mm), if it includes Fox News and MySpace, or if gating news can every work as a long-term strategy.

The real question is: what's in it for Microsoft?  Absolutely no one is going to use Bing more often because the results will include those sites, or a different search engine because they won't.

The die-hard WSJ and Fox readership will simply go straight to the source.  No one else will notice.  Maybe you could argue that the search quality will be infinitesimally lower quality on Google.  It's a weak argument, but still no one will notice.  Tomorrow there will be more free sources of news than there were yesterday.

By the way, I tried to use Bing exclusively when it came out, just to encourage industry diversity.  But after about a month I gave up. 

I liked the pop-up extra text when you hover.  Unfortunately, it takes a second to load, which doesn't sound like a lot, but every extra second or step is a disincentive, especially when you might have to scan through dozens of entries to find the one you want.  I frequently forgot to use it.  Then, the hover text usually didn't have enough info.  Finally, the little bar that prompts the extra text to pop-out is too small.  Again, another second wasted finding just the right spot.  Why not start caching all the hover text as soon as the page loads and then show the text automatically when you mouse over any part of the result?

The killer, though, was that I found I had to go through more entries to find "good" results.  I found myself paging to additional sets of results more often.

If Microsoft has $50mm to spend to improve their search position, how about improving the hover usability?  Or implementing some other innovations?  Or improving their algorithms?  These ideas are too crazy?

If this deal goes down, it will be clear sign that Microsoft simply has too much cash that it doesn't know what to do with, and they should pay it out as a one-time dividend to shareholders.

Thursday, November 19, 2009

Long-term gains

After I work out / swim, I feel great.  Yet, before I work out, I have difficulty starting and think of dozens of reasons why I can't.  Why is that?

Sleeping feels great also.  So great that, like lots of people, it's not easy to drag myself out of bed in the morning.  Yet, at night, when I should go to bed, other things that I could or should do seem to proliferate, and I constantly go to bed late.  Why is that?

I believe the answer also explains why bonuses fail as an incentive practice.

All the satisfaction from the workout and the sleeping come at the end.  Meanwhile, there are other activities that offer more immediate rewards.  Sometimes, as in the case of working out, the activity itself requires exertion, and just sitting and doing nothing can feel more satisfying, in the very short run.

Frequently, the only thing that gets you to do the "right" thing is discipline.  Tricks can help, too, like telling yourself, "If you work out, you can have dessert."  But that's discipline in another form, because you can obviously do what you want.  Automatic withdrawals from your paycheck into your 401k is another form of discipline -- actually, another example of a very beneficial long-term goal that we wouldn't have a chance of fulfilling due to so many short-term alternatives, without the aid of another trick: "out of sight, out of mind".

Similarly, if you work hard over the course of the year, you increase your chance of getting a good bonus.

Of course, that assumes that you work in meritocratic organization, one which has strong capabilities in tracking productivity and achievement, and finely calibrating bonuses accordingly.  It further assumes that you can ignore the fact that the company's performance, which you have little effect on, overwhelmingly impacts your bonus more than any of your personal accomplishments.  If any of this was not true, then clearly the possibility of the bonus would have little part in your decision to do a good job.

But, even assuming all that, how likely is it that your decision in April to put in extra effort, give up your weekend, risk making a fool of yourself, and wear yourself out, will be affected at all by some additional dollars later that year?  It's a struggle just to stay focused on the positive incentive of a work out an hour from now!  The benefit of a full night's rest just a few hours away, all of which accrues to you, is too far off to affect your decisions now!

The bonus is classic example of a long-term gain.  I might further contend it does more damage than good, but at the very least, it clearly has no impact on productivity and personal incentives.

Tuesday, November 17, 2009

Free software: IntelliJ

In case you missed it, IntelliJ is now free.  JetBrains has adopted the freemium strategy: a free version and a paid enhanced version.

At one level, the strategy responds to the fact that the arguably best two IDEs are already free.  So, the free version helps get their foot in the door, and maybe you'll get hooked.

JetBrains's free version is offered under an open source license, a critical factor.  Clearly, this is actually all about a user-developed add-ons strategy.  It's called "the community version" after all.

So, this isn't quite freemium, it's actually open core licensing.

The unanswered question about open core licensing is whether the original developer (JetBrains in this case) can offer enough additional bang to encourage users to pay.  At the same time, they want their users to donate valuable features for free. 

Open core licensing is a fairly new free strategy, and it involves walking a real tightrope.  On the one hand, a strong user community means a strong platform, but less likelihood that the the proprietary version stands above far enough to elicit upgrades.  Meanwhile, the core version looks better if the community doesn't add as much, but then the platform doesn't add up to much.

Firefox and iPhone has taught us that add-ons make the platform far more valuable than the platform by itself.  Chrome and Android will emerge as serious competitors, in large part because they will have serious add-ons as well.

Similarly, IntelliJ has to compete with Eclipse.  Trying to spark a community as robust as Eclipse's presents a major challenge by itself.  Unlike Eclipse, they also have to simultaneously try to keep ahead of it.  It will be interesting to watch how IntelliJ, and open core licensing, evolves.

Monday, November 16, 2009

Voice is destiny

Everyday, Pandora offers me songs I've never heard before, songs that are similar to the ones I have registered.  Some of the suggestions I like, some I don't.

Many of the songs I like have hard rock roots, like The Smashing Pumpkins.  Eventually, Pandora will a song that fits in the same category, except for one very specific trait: the voice will be deep and "monster-like".  Think Metallica.  As soon as I hear a voice like that, I thumbs-down the song. 

Think about the difference between Metallica and bands like the Pumpkins.  You could argue that both have a lot of talent.  Both do a lot yelling.  But the Pumpkins yell in a relatively higher pitch, while Metallica uses the monster voice. 

Even if everything else was equal, that small difference would make all the difference.  I suspect people who like metal are attracted to the low, powerful, almost threatening voice metal bands often use. 

This is a long way of getting to discussing one's voice at work.

We frequently have discussions with users and business managers about deadlines that need to be met, deliverables that disappointed, features needed yesterday.  Your voice will make a big difference in how the conversation will turn out.

Occasionally, a powerful, threatening voice might work, but usually, you want to cultivate teamwork and mutual empathy.  Soften your voice, and try to persuade, not control.

And, as a side note, smile as much as possible, in direct proportion to how much trouble your message might stir up.  Unless you're singing in a hard rock band.

Sunday, November 15, 2009

Wanted: software developers

Behind the $65bn Madoff ponzi scheme: two programmers.

Mr. Madoff coped with the flood of new accounts by using computer programs “written, maintained and updated” by the defendants.

Those programs allowed Mr. Madoff to mimic a legitimate investment advisory business — although prosecutors contend the two programmers knew no actual trades were ever being made.

The programmers are accused of designing the software that generated thousands of fake customer account statements as well as fraudulent trading confirmations from the London Stock Exchange and fictitious clearinghouse records showing transactions that had never occurred.

These days, any operation of scale requires systems, so the days when you could perpetrate a massive scam just using laborers, such as shipping actual bricks instead of hard drives, are over.  Advances in regulation and auditing of systems also means taking advantage of software errors, such as making millions with false trades, are also over.

So, now it comes down to programmers being in on the game.
Mr. Madoff averted [the programmers'] rebellion by ordering Mr. DiPascali to give them whatever was required to keep them quiet. The two men received 25 percent pay increases and bonuses of about $60,000 -- and maintained their silence, according to the complaints.

We can surely expect to see increasing numbers of cases where people will lean on software developers, who know the back-doors into their systems, to help out their crime.  Often, these will be very senior people.  With lots of money to share, in addition to being able to ruin careers.

I don't know what 25% of their pay adds up to, but I'm sure all of it and more will be going to lawyers as they attempt to avoid 30 years in jail.

Wednesday, November 11, 2009

Clean code = clean hands

Here's a situation you surely have seen in the past:

You're building a new app, and your code starts out pretty uniform.  You follow some basic coding conventions.  You need to bring in another pair of hands, so you hire someone.  He does good work -- but all his code completely ignores the existing coding conventions. You've prodded him about coding conventions, but to no avail.  Now you've got database columns of TradeId in 5 tables, but trade_id in his new table.

What do you do with this guy?  Like I said, his work is otherwise good.  There's a good chance that a replacement would not be as good as him.  In baseball statistics, you'd say he has a solid VORP.

Do you micro-manage him?  Make his life hell?  Or, on the other hand, should you just accept this flaw as part of the package?  Perhaps his brain does not accommodate thoughts of coding conventions, and to impose it would greatly affect his productivity.  Some people could be like that.

Code reviews might catch these kinds of problems.  But, every place I've ever worked had such extreme deadline pressure that code reviews always got chopped.  I don't think they're a long term solution.

Perhaps a code czar can be appointed to to make sure all code fits in with the master plan, like George Lucas does to ensure consistency in the Star Wars canon?  Almost always, such a czar is disdained by the other coders, or gets carried away and becomes a bottleneck.  People you'd want to have in that role smell the no-win nature of it and avoid it.

My usual solution has been to prod as much as possible, using all the motivational tools in my belt, but ultimately letting it go if that all proves useless.

But, today I witnessed something that totally changed my mind.  This event had nothing to do with code.

In the bathroom, someone was in the stall doing their thing, using the toilet paper.  As I was washing my hands, this person came out of their stall and then proceeded to walk straight out to the work area. 

Yes, I was disgusted.  I was also shocked, because this person was a fairly high member of the department, and known to be a good guy, excellent worker, etc.  I don't know if I can look at this guy the same way now.

Strange mind that I have, I immediately related this to coding conventions. 

Would I eventually get rid of someone who consistently refused to wash their hands after, you know, using the toilet paper?  Absolutely.  Social pressure should work (and probably would in this case).  But if he didn't, he's gone.

You might argue that clean code is not as big a deal as clean hands.  But, as far as your code is concerned, it is.  If one person's code sticks out so clearly, then he's creating a bigger problem.  Like a virus, it will indeed degenerate your code into unmaintainable, unreadable goop.

Clean code = clean hands.  This basic level of social behavior and decency should be expected.  There's no excuse for doing otherwise.

Tuesday, November 10, 2009

Honoring all veterans

I don't usually write "commemorative" posts on holidays.  But I liked Dave Winer's recent advice to Let the World Change You, and the message fits in nicely with Veteran's Day.
I have a problem with entrepreneurs who say they want to Change The World... The best we can do is make a few other people happy for a while, make ourselves happy, and if you do that, and leave the place a little nicer for having been here, I say -- Job Well Done!

Like Dave's dad, my dad is a veteran, and I got to see first-hand how his service took a physical toll on him, for not a lot of money.  Whatever you might think about what our military does around the world, the vast vast majority of the men and women in our armed forces are trying to leave the world a little better, and putting themselves in personal danger while doing it.

Something to think about as we contemplate our own careers and possible dissatisfactions while sipping coffee in air conditioned buildings and fretting about bonuses.

Sunday, November 8, 2009

Why Pandora should allow user-provided content

Youtube got big on free user-provided content.  Later, after they had millions of eyeballs, they found they had to add professional content as well, so they started paying for that.

Music differs from video in critical ways.  Everyone makes videos all the time.  I probably have several hundred hours of videos of my kids.  (A few might be youtube-worthy.)  Meanwhile, like most people, I have never made a single song recording, much less of an original song.

So, if you were going to set out to build a youtube empire for music, you'd do it in reverse.  Start with the professional content.  Once your user-base stabilizes, then expand into the fringe.

Music marches (inevitably, I believe) to its future where most music will be free.  Some bands have tried MySpace pages and personal websites to find an audience, but they lack scale.  Musicians are still looking for the right venue.


Pandora is uniquely positioned to become the big player in the middle.  First, they are a leader in on-line music broadcasting.  Second, one of their missions is to introduce its listeners to new music.  They have the listener base, and the right listener base, to build on. That combination creates an entry barrier for would-be competition. 

Allowing users to upload content fits in perfectly with their strengths.  Pandora can continue to be the go-to site to hear your favorite music.  And they'd become the go-to site get introduced to the newest music.

Friday, November 6, 2009

Free software: Pandora

Now that I listen to music again at work, I've been using Pandora heavily.

Pandora offers free music through freemium and advertiser strategies.  As you listen to songs, Pandora recommends structurally similar songs.  The ultimate idea is to introduce you to new music, something the founders are deeply concerned about.

Despite what I'm about to say, understand that I have greatly enjoyed using Pandora, and will gladly pay the $1 monthly fee.

Two aspects of Pandora's business, as described in a recent article, really surprised me.

First, their entire playlist only numbers 700,000 songs.  Even though some competitors have many more, it doesn't seem to be a limiting factor yet. 

More surprising is that they don't use or even plan to use the "wisdom of the crowd".  As a listener, I vote on whether or not I like the songs that are chosen for me.  If the users who liked "Stairway to Heaven" also tended to like "Paranoid Android", you could use that information to drive recommendations.  Pandora can use these links between songs, created by its user crowd, to build their song trees, just as web site linking builds the search lists on Google.

Instead, Pandora has professional musicians who decompose the structure of each song in hundreds of elements.  The next song recommended to you will have a similar structure. 

To me, that sounds ridiculous.*  

Mainly, I think Pandora is thinking too small.  They need to break away from thinking of music as driven by the record labels and more driven by music listeners.  Music is being decentralized like everything else, and they're in a unique spot to take advantage of it.

Pandora should just start adding songs with some high level categorization, let the votes roll in, and create links between songs that way.  Categorization could be done by letting its users tag songs.

Once you do that, there's an opportunity to become the youtube of music.  Small bands could upload their recording, tag it, and if enough people like it, slowly get more "airtime".  If people dislike it, it will fade into oblivion. 

Now, you're really introducing people to new music.  You draw people in with the established acts, and they end up listening to some genre-defying garage band from Podunk.  You can also scale up your playlist very quickly.

If you add a donation button, some mainstream acts would likely upload their songs too, particularly the vast, not well known middle tier.  Eventually, instead of paying 50% of their revenues to the record labels as they do today, record labels will be coming to them.

And if Pandora doesn't do it, someone else will, and will eat Pandora's lunch.

------
* The manual labeling reminds me of the Open Directory Project -- an effort to create a "definitive catalog of the web" using manual labor.  While ODP, aka DMOZ, has been successful so far, I'll frankly be surprised if it's still around in 10 years.

Wednesday, November 4, 2009

How We Decide

Imagine you have two decisions to make: one which is complex, having a lot of variables to consider, and one that is much simpler, with only a couple of variables.  An example complex decision might be choosing which car to buy, while a simple decision might be what color.

Which decision will benefit more from thinking through the options logically?

Jonah Lehrer's How We Decide instructs us to use reason for simple and new decisions, but rely on our instincts for more complex ones. 

In other words, thinking about what color will probably make sure you get the best choice (for you), but thinking and comparing the cars will likely prove futile.  The book shows us that our brains can only actively consider a few variables at once, and decisions that have more variables end up being a crap shoot and often worse because we end up over-weighting less important factors.  (Yesterday's post might be an example of the latter.) 

Even choosing which box of cereal to buy can overwhelm us.  Because most of us don't buy cars too often, if you can narrow it down to three, just getting the cheapest one probably works best.

If you deal with complex situations frequently, create frequent practice opportunities to sharpen your instincts.  Flight simulators have worked wonders for pilots.  Also, take the time to reflect later on your satisfaction with your decisions and thoroughly understand what happened -- why you succeeded or failed.  (Reminds me of deliberate practice.)

The lessons of the book are pretty straightforward.  Its real strength comes from the fascinating stories and research examples.

Its conclusions can also be useful if you flip the decision around: when you're trying to convince someone else of a decision. 

As developers and engineers, we often try to convince our customers, our audience, each other by laying out intricate arguments while highlighting caveats.  Instead, identify the top priorities and focus on those.

How much is a year worth?

Suppose your job has become slow and boring, but you're planning to go to med school in a year.  You could stay at your current job, or take a more interesting one-year job at a non-profit for 1/3 less pay.  Or, your company put you through school, and if you leave within the next year, you owed them $30,000. 

In these cases, do you stay at your job even though you aren't learning anything?

The question boils down to a year is worth to you. 

One-third less pay, or $30,000, whichever works for you, sounds like a lot of money.  On the other hand, sitting around not learning has three very real costs: 1) being bored sucks, 2) your skills are actually declining, and 3) you're foregoing the chance to branch out to new areas.

Our brains can quickly grasp the value of 1/3 of our paycheck, but the other costs, though more numerous, remain vague and thus valueless.  We end up calculating this as $30,000 vs nothing.

Of course, that's completely wrong.  First of all, all learning comes to use.  Second, think of how much more satisfied you'll feel at the end of each day.  And third but not least, you can use the year at a new job to take risks that could blow up -- oh, so that's what happens when you frankly tell VPs when they're wrong in a meeting -- or could turn out to be amazingly successful.  You can take the risks because, at worst, you'll end up out of a job in a year, which is where you'd be anyway.  At best, you might end up shocked at what you accomplish.

Unless you're retiring soon, or you're living on steamed rice and frozen vegetables and you literally need every dollar of your paycheck to get by month-to-month, the intangible costs will be far more valuable in the long run.

Monday, November 2, 2009

Minimum job requirements

Today I noticed that a project manager who sits near me never got up from his seat, never had any meetings, never discussed anything with the developers or the business analysts.

Even though he appeared to be working -- didn't notice any web surfing on the occasions when I walked by, seemed to be doing some spreadsheets and paperwork -- I would say he flunked the minimum requirements for his job.  Almost all jobs require personal interaction, except maybe the most basic programmer on a really heavy coding day.  Senior coders, managers, and certainly project managers should spend their time mostly on personal interaction on most days.

What I think this project manager did today was spend the day using tools to communicate.  Chat, email, documents.  All good stuff, but they're the supplement, the seasoning, not the meat.

We sometimes fall in love with the tools.  They make our lives so easy.

Major, major mistake.

Jonah Lehrer talks about how doctors who use MRIs to diagnose back pain do a much worse job than doctors who don't.  They start seeing things in their scans and draw conclusions that their training and common sense would contradict.

On a project that a colleague was on, he would get informed of his assignments through the issue tracking system, which was Jira.  When he transferred to the project, he actually got an assignment from Jira before his project manager ever contacted him.  I never found out who his manager was, because he would always reply "Jira" when I asked him.

Collaboration tools make a big difference and in fact are essential to a well-run project, but you can end up with too much use of them.  They keep the cranks turning, but they don't ultimately deliver anything. 

On the other hand, you can never have enough personal attention -- your personal touch, your time and involvement face-to-face or at least on the phone.  Fostering team identity, motivation, confidence, priority / urgency, appreciation.  These and many other things can only be done personally.

Sunday, November 1, 2009

Discipline takes discipline

Sometimes, the only thing that gets you through what you need to do is discipline.  Reasons why you can't do it, lack of confidence, low energy, environment distractions, personal disruptions, and simple procrastination bombard you at various times, and at particularly bad moments, all at once.

In times like that, you have to rely on your discipline.  The catch is, you don't even realize you're relying on it. 

It's similar to how the extra muscles you've developed in your arms helps you avoid back strain, even though you don't think about it.  You build those arm muscles slowly, never sure when you'll reap the benefits, but something heavy always comes along.

The important things you do regularly because they need to be done, or they help you bring order to your chaos -- you'll rely on them to maintain during bad times.  Every time you do them when you don't really need to, while things are going okay, you're building your discipline.  You slowly build your ability to act, despite any obstacles, and you'll be ready when bad times come along, as they always do.

Thursday, October 29, 2009

Forcing focus

Recently, I found myself struggling to focus. I think the change of pace to coding threw me off.

As a manager, I zipped around constantly; frankly, there were too many conversations and issues all up in the air, so I had to choose, but there was always something. As a developer, I spend a much greater amount of my time staring at the screen. Plenty of things to do, of course, but at my own pace. Which is good, just different.

So, I implemented something that forced me to stay on track: I log the time and a very, very brief description whenever I start doing a new task. Says here today I started at 8:50 reading email, got some breakfast at 9, did some data scripting from 9:05, etc.

After about three days of this, I learned two things very quickly.

First, forcing myself to note the time whenever I switched tasks made me accountable. If I took an hour lunch break, it's there in the log. I know where my day went. When I'm spending too much time chit-chatting or doing non-productive tasks, I become conscious of it quickly, and feel pressured (by myself) to get focused on real work.

Second, I was hopping between tasks too often. I still do, but now I'm better about trying to bundle my interruptions. If I'm in the middle of coding, then I'll wait until I have to go get food before I also reply to some emails. This should be intuitive, but I'm so used to interruptions that I was distracting myself constantly.

I don't find anything wrong with realizing that I might need help to stay disciplined. Sure, I'd rather be ultra-disciplined all the time, but better to realize the need and take action than to continue failing. As they say, if you can't stop eating all the ice cream, don't keep any around the house.

(Side note: logging all my tasks is quite a bit like Dave Winer's suggestion to Narrate Your Work. Though my list remains private, I still accrue to myself some of the same benefits.)

Wednesday, October 28, 2009

Old friends

For the first time in a while, I am spending the majority of my day coding. Very little management going on for me right now.

I have some other thoughts about it, but one thing that really struck me is totally not code related: listening to music again at work. Since I rarely listen to music outside of work, I enjoy it immensely.

When you're managing, you need to talk to people constantly. Interruptions come frequently, or you go off to interrupt someone else.

Listening to music again has been like re-acquainting myself with old friends. Friends with funny names like Radiohead, but still.

Tuesday, October 27, 2009

A chance to rate yourself

Today offers a great chance to rate yourself.

Other firms are hiring. Your coders are probably taking calls from headhunters looking to place them.

How many have you lost to competitors? Not counting unique opportunities or clear upgrades -- but basically the same job for maybe a little more money.

Count those as marks against you. Everyone who stays who you want to keep as marks for you. If you're sitting on over 80%, take a bow, you've been doing something right.

Monday, October 26, 2009

The end of iPhone

Prediction: this will be the last holiday season that iPhone dominates.

We are on the brink of an Android break-out. I make no claim about the relative performance of one vs the other, but some points are clear:

* Many manufacturers will be producing Android phones. Only Apple will be making iPhones. Android phones will, in short order, offer a lot more features for less money.

* Every network will offer Android phones. In the US, you must have AT&T if you have an iPhone. That in itself is huge, because when you buy a phone, you usually buy a network too (for a year or two). Hardware lock-in to AT&T is a competitive disadvantage for iPhone. Every iPhone user at my office has to go to the other side of the building or outside to make calls. This is in the middle of New York City; I can only imagine how badly the rest of the country suffers.

* Enough dissatisfaction with iPhone itself exists to allow competition. The primary one is battery life.

* Android apps will explode as the user base increases. That may not seem like a big deal, but I think apps (and not hardware or features) are the real strength iPhone has over all other phones on the market.

Perhaps Apple will end its exclusivity with AT&T. It is not a choice they would easily adopt, or else they wouldn't have suffered with AT&T's network over the past year. I have no idea when their agreement ends, but Apple would likely take a big hit to future earnings if they go that route. Other networks have not been willing to fork out the cash that AT&T pays to carry the iPhone.

Their ideal strategy would be to dominate the market so thoroughly that the other networks eventually come crawling to them, begging to be let in to Apple's party. Unfortunately for Apple, Google is today's monopoly buster -- just ask Microsoft. (Tomorrow, they very well could be the monopoly.)

In short, many always beats one in a competitive market. And open always beats closed.

Expect iPhone to have a lovely holiday season, but sometime next year, its market share will peak.

Sunday, October 25, 2009

Here Comes Everybody

Could the giant corporation become a thing of the past? You might reasonably reach that conclusion after reading Clay Shirky's Here Comes Everybody.

The logic runs like this: thanks to new digital communication and organizing tools, the cost of organizing has dropped close to zero. Self-organized people will inherently rally around the "right" things (serving the interests of the most people). Most attempts at starting movements and clubs will end up dying to do a lack of interest. However, a few will hit a goldmine of unmet need and succeed spectacularly, usually in areas that surprise us (otherwise the need would have been met). Stay-at-home mothers are one of the most popular groups using Meetup. Who knew?

In this way, we get "failure for free" on our way to identifying unmet societal needs -- a truly hyper-efficient market.

In contrast, large corporations often organize around the wrong things (serving their own interests). They fund a big staff of marketing and sales people to generate interest in products and services they've created. Failure for them is most definitely not free. A big bet placed on a software roll out (uh, Vista?) or blockbuster movie can be devastating.

Google seems to be doing the best job of becoming a big company while still maintaining an entrepreneurial attitude. They put out beta products frequently, some of which fail. How long can they keep it up?

They maintain a high organizational cost by necessity. At some point, an organization becomes risk-averse, and tries to protect its gains for itself (employees, managers, shareholders, brand image). Hiring lobbyists is usually a first step in that process. Next comes predatory or monopolistic behavior. Who does that sound like?

The brilliance of Here Comes Everybody is that it talks about lots of little things that you know already, and makes you think about them in new ways, or generate new thoughts about them. Clay Shirky never says the corporation is dying, but it sure made me think that way.

Thursday, October 22, 2009

James Cameron, micro-manager?

Have you ever considered the difference between a "micro-manager" and a "genius that controlled every detail to make sure it was done perfectly"? It's more than the result; after all, you don't know the result until later.

This bio on James Cameron lays out the difference perfectly.

Micro-managers have their hand in everything and argue about the smallest details. That's exactly what James Cameron does.
Cameron has mastered every job on set, and has even been known to grab a brush out of a makeup artist’s hand. "I always do makeup touch-ups myself, especially for blood, wounds, and dirt," he says. "It saves so much time." ... Cameron inserts himself into every aspect of the filmmaking process.
People who work for micro-managers feel disrespected and despise them for it. Similarly, the crew of "The Abyss" came to refer to it as "The Abuse". Because of his abrasive nature,
Cameron has an uncanny ability to make people want to see him fail.
Yet, despite these flaws, big stars -- people who don't need the work -- will readily work with Cameron. In fact,
A small, loyal band of cast and crew works with him repeatedly
That quite possibly includes the makeup artists.

Cameron brings to the table shared vision and credibility. Without those two things, he would just be a micro-manager.

Cameron aims high.
"This film integrates my life’s achievements," he told me. "It’s the most complicated stuff anyone’s ever done." Another time, he said, "If you set your goals ridiculously high and it’s a failure, you will fail above everyone else’s success."
Whether or not the film turns out to be any good, his lofty goals can inspire. You want to be a part of something like that.

But if you didn't believe he could get it done, then his goals would just be talk. Some credibility comes simply because he's had some success in the past. But, this is new ground, so he needs more that just his past.

What he has is massive amounts of conviction. This quote captures it perfectly:
Before beginning production on "The Abyss" (1989), the most ambitious underwater movie ever attempted, he went to see Leonard Goldberg, then the president of Fox, which was financing the film. "He said, 'I want you to know one thing -- once we embark on this adventure and I start to make this movie, the only way you'll be able to stop me is to kill me,'" Goldberg told me. "You looked into those eyes and you knew he meant it."
If you don't buy into the vision and didn't think Cameron could get it done, he would be just another unbearable tyrant. If he also worked in an office instead of on movies, he would just be a micro-manager.

But, he's got all those things, so instead, he's a visionary genius.

Wednesday, October 21, 2009

Marshmallows predict coding skills

Have you heard about how marshmallows can predict SAT scores?

A study done in the 70s tested the self-control of 4 year-olds. Each was left in a room alone with some marshmallows they were told not to eat until the researcher came back. Some kids couldn't even wait a minute before caving in and eating the marshmallows. Some covered their eyes or looked away or kicked the table. The more self-controlled kids waited over 15 minutes.

Thirteen years later, the researchers looked at these same kids' SAT scores. Those who waited longer had, on average, better scores by a couple hundred points than those who caved in quickly. The marshmallow predicted SAT scores more accurately than IQ tests that the kids had taken. Kids who demonstrated weak self-control with the marshmallows as 4 year-olds also experienced more behavioral problems.

I read about this research study in a few books, and I always interpreted it simply as a lesson about the importance of self-control, which is how the authors present it.

But here's an important factor that I just realized: the successful kids didn't just show self-control. They didn't sit and stare at the marshmallows and then demonstrate amazing willpower. They knew they'd be weak, so they took actions (covering their eyes, doing something else) to help them focus on the correct things (or, more accurately, not focus on the wrong thing).

Many times in software development, we rely on self-control to do the right thing. "After you code, refactor and clean it up." "While you're testing, make sure you come up with all the business cases."

The coding is treated as the main piece of business, and then when that's done, the developer should demonstrate amazing willpower, push through their fatigue and relief at finishing, and focus on quality.

Instead, we should know that we're weak, and make sure the focus on quality is built deeply into our routines. Practices like automated builds, daily production-quality check-ins, TDD help us address the important aspects of functional and structural quality, while eliminating the need for willpower.

Similarly, if certain activities make you less productive, don't just rely on personal determination to avoid them. Address the problem directly. If checking your email is a big distraction, then decide you will only do it once every half hour and set an alarm. Same goes for your blackberry. Most managers will readily accept any reasonable work pattern as long as you let them know, especially as your intention is to improve productivity.