Steve Johnson of Pragmatic Marketing, the winner of Software Idol 2007, gives an entertaining talk about the role of product management in software companies. A 6 min 35 second-clip:

And oh, Happy Q1 of 2008!

Here’s some good advice from Paul Graham writes about good practices that any good programmer can relate to.

  1. Avoid distractions. Distractions are bad for many types of work, but especially bad for programming, because programmers tend to operate at the limit of the detail they can handle.

    The danger of a distraction depends not on how long it is, but on how much it scrambles your brain. A programmer can leave the office and go and get a sandwich without losing the code in his head. But the wrong kind of interruption can wipe your brain in 30 seconds.

    Oddly enough, scheduled distractions may be worse than unscheduled ones. If you know you have a meeting in an hour, you don’t even start working on something hard.
  2. Work in long stretches. Since there’s a fixed cost each time you start working on a program, it’s more efficient to work in a few long sessions than many short ones. There will of course come a point where you get stupid because you’re tired. This varies from person to person. I’ve heard of people hacking for 36 hours straight, but the most I’ve ever been able to manage is about 18, and I work best in chunks of no more than 12.

    The optimum is not the limit you can physically endure. There’s an advantage as well as a cost of breaking up a project. Sometimes when you return to a problem after a rest, you find your unconscious mind has left an answer waiting for you.
  3. Use succinct languages. More powerful programming languages make programs shorter. And programmers seem to think of programs at least partially in the language they’re using to write them. The more succinct the language, the shorter the program, and the easier it is to load and keep in your head.

    You can magnify the effect of a powerful language by using a style called bottom-up programming, where you write programs in multiple layers, the lower ones acting as programming languages for those above. If you do this right, you only have to keep the topmost layer in your head.
  4. Keep rewriting your program. Rewriting a program often yields a cleaner design. But it would have advantages even if it didn’t: you have to understand a program completely to rewrite it, so there is no better way to get one loaded into your head.
  5. Write rereadable code. All programmers know it’s good to write readable code. But you yourself are the most important reader. Especially in the beginning; a prototype is a conversation with yourself. And when writing for yourself you have different priorities. If you’re writing for other people, you may not want to make code too dense. Some parts of a program may be easiest to to read if you spread things out, like an introductory textbook. Whereas if you’re writing code to make it easy to reload into your head, it may be best to go for brevity.
  6. Work in small groups. When you manipulate a program in your head, your vision tends to stop at the edge of the code you own. Other parts you don’t understand as well, and more importantly, can’t take liberties with. So the smaller the number of programmers, the more completely a project can mutate. If there’s just one programmer, as there often is at first, you can do all-encompassing redesigns.
  7. Don’t have multiple people editing the same piece of code. You never understand other people’s code as well as your own. No matter how thoroughly you’ve read it, you’ve only read it, not written it. So if a piece of code is written by multiple authors, none of them understand it as well as a single author would.

    And of course you can’t safely redesign something other people are working on. It’s not just that you’d have to ask permission. You don’t even let yourself think of such things. Redesigning code with several authors is like changing laws; redesigning code you alone control is like seeing the other interpretation of an ambiguous image.

    If you want to put several people to work on a project, divide it into components and give each to one person.
  8. Start small. A program gets easier to hold in your head as you become familiar with it. You can start to treat parts as black boxes once you feel confident you’ve fully explored them. But when you first start working on a project, you’re forced to see everything. If you start with too big a problem, you may never quite be able to encompass it. So if you need to write a big, complex program, the best way to begin may not be to write a spec for it, but to write a prototype that solves a subset of the problem. Whatever the advantages of planning, they’re often outweighed by the advantages of being able to keep a program in your head.

Disclosure: Paul Graham runs the Y Combinator Startup School held annually at Stanford, so he does have a vested interest in helping startups succeed.

Now that I’ve got that upfront disclosure out of the way, I want to include Paul’s two observations which I agree with, simply because I feel what he says is true.

On why single solo great programmers are productive and get great products out the door,

It’s striking how often programmers manage to hit all eight points by accident. Someone has an idea for a new project, but because it’s not officially sanctioned, he has to do it in off hours—which turn out to be more productive because there are no distractions. Driven by his enthusiasm for the new project he works on it for many hours at a stretch. Because it’s initially just an experiment, instead of a “production” language he uses a mere “scripting” language—which is in fact far more powerful.

He completely rewrites the program several times; that wouldn’t be justifiable for an official project, but this is a labor of love and he wants it to be perfect. And since no one is going to see it except him, he omits any comments except the note-to-self variety. He works in a small group perforce, because he either hasn’t told anyone else about the idea yet, or it seems so unpromising that no one else is allowed to work on it. Even if there is a group, they couldn’t have multiple people editing the same code, because it changes too fast for that to be possible. And the project starts small because the idea is small at first; he just has some cool hack he wants to try out.

On why large software companies sometimes don’t realize that they work against these good practices for programmers,

Even more striking are the number of officially sanctioned projects that manage to do all eight things wrong. In fact, if you look at the way software gets written in most organizations, it’s almost as if they were deliberately trying to do things wrong. In a sense, they are. One of the defining qualities of organizations since there have been such a thing is to treat individuals as interchangeable parts. This works well for more parallelizable tasks, like fighting wars. For most of history a well-drilled army of professional soldiers could be counted on to beat an army of individual warriors, no matter how valorous. But having ideas is not very parallelizable. And that’s what programs are: ideas.

It’s not merely true that organizations dislike the idea of depending on individual genius, it’s a tautology. It’s part of the definition of an organization not to. Of our current concept of an organization, at least.

He then concludes,

Perhaps the optimal solution is for big companies not even to try to develop ideas in house, but simply to buy them. But regardless of what the solution turns out to be, the first step is to realize there’s a problem. There is a contradiction in the very phrase “software company.” The two words are pulling in opposite directions. Any good programmer in a large organization is going to be at odds with it, because organizations are designed to prevent what programmers strive for.

There is some truth to that. Established software companies have their own marketing departments. However, they sometimes tap outside marketing firms for help in their programs. Some things are just better when produced outside of the company. Are ideas and rapid-prototype software development one of them?

Yes, that’s right, you math nerds. March 14 is Pi day.

From Wikipedia:

The mathematical constant π is an irrational real number, approximately equal to 3.14159, which is the ratio of a circle’s circumference to its diameter in Euclidean geometry, and has many uses in mathematics, physics, and engineering. It is also known as Archimedes’ constant (not to be confused with an Archimedes number) and as Ludolph’s number.

Update 15/3/2007 - Saw this on Digg, explanation about how the constant Pi is used! Very informative stuff: http://www.howstuffworks.com/pi.htm

Funny picture description of how software is really made in a bloated big corp. Thanks Carny.

Today, it is not enough just to be technically competent to survive. Yeah, yeah, everyone says that, but I found some numbers today. According to the annual Design News salary survey, these are the skills participants found most important (from most important):

  1. Project management and communication/presentation skills (86%)
  2. Computer skills (85%)
  3. Team-building skills (64%)
  4. Language skills (43%)
  5. Marketing/sales skills (35%)
  6. Finance/accounting (31%)

Who would have guessed that the #1 most important skill is communication? (Shocker, it’s not some l33t rare proprietary system hacking skillz. Us geeks have been trained in college to work in a dark windowless basement without talking to each other that communicating our ideas effectively is just naturally un-natural, to say the least.

Delivering results on time and within budget is also an obvious, although no where in a regular computer science curriculum is this strongly emphasized. However, this shouldn’t be a problem for students that have completed their operating systems class. Remember the fundamental concepts in threading, process and memory management? It’s all about juggling multiple tasks with finite memory space and a single processor. Same thing usually applies in the real world — you will have a finite resource/budget.

I’m sure someone can write up an algorithm for their project management needs. Here’s a pseudo-code algorithm:

  1. Identify the “projects”, tasks that need to be worked on (deliverables)
  2. Prioritize each task — use appropriate metrics (e.g. urgency, due date, cost, risk, etc.)
  3. Execute, and don’t drop the ball! Feel free to apply threading and pipelining concepts e.g. make sure no threads get “starved”.

Other advanced concepts that you can also apply from the OS class are such as solving deadlocks (process contention), reducing overhead cost when task-switching too much, and pipeline “hiccups”.

Also, I would highly recommend applying the infamous GTD concepts. I have learned to apply the GTD toolkit and I have managed to tie up many of the loose ends in my life that were just bogging me down (too much overhead). I like to think of it as reducing the number of background processes, giving me more memory and processing power for other things!

Perhaps CS grads are also lacking in the leadership department, because students are too busy competing to out do each other in grades that they didn’t get the memo telling them that in the real world, people are supposed to work together — performance reviews/appraisals replace “grades” and the need for leadership skills become more relevant and important.

That shouldn’t be a problem either. Any competent CS grad cannot call himself a “computer scientist” if he doesn’t carry his problem-solving algorithm toolkit with him at all times. Many hackers have used these general problem solving principles to solve non-technical problems. The Hacker’s Diet is a very good example a person determined to lose weight by approaching it as an engineering problem. The key resource in this weight problem? Determination.

Rick Johnson, president of Cherry Electrical Products says:

“My experience is that all companies prefer technical people in these [management] positions. The opportunity here for an engineer to continue in engineering is to add to his/her leadership skills. All engineers are taught to solve problems. If an engineer pursues acquiring leadership skills … they will have huge opportunities in store for them in the future. Alas, most engineers just ignore this aspect of their personal development preferring instead to learning more and more about the latest technologies.

Full article at Design News.