How Does One Become a Good Programmer?

This is a quote I like:

The really good programmers spend a lot of time programming. I haven't seen very good programmers who don't spend a lot of time programming. If I don't program for two or three days, I need to do it. And you get better at it—you get quicker at it. The side effect of writing all this other stuff is that when you get to doing ordinary problems, you can do them very quickly.

That's from Joe Armstrong, creator of Erlang, in Peter Seibel's Coders at Work (which, by the way, every programmer should read).

This jibes with what I've seen over the years. Really good programmers don't treat coding as a nine-to-five job. It's something they want to do whether they are being paid for it or not.

A very easy way to weed out bad candidates when interviewing is to ask them about their personal programming projects. If they don't have any, then I'm pretty sure I don't want to work with them.

In this respect, programming is little different from other creative pursuits. You become a good writer by writing a lot; you become a good sculptor by sculpting a lot; you become a good musician by playing music a lot.

So go out there and write some code. That's what I'm about to do.

Automator Service: Scale Images by 75%

Here is yet another Snow Leopard Automator service: This one takes an image file and scales it down to 75% of its original size. This is great for screenshots, as all the text is still readable at that size, but you can put it in a web page or document without filling the screen.

Automator Service: Copy File Paths to Clipboard

Here's another Snow Leopard Automator-based service: It takes the Finder selection and puts the file paths on the clipboard, for easy pasting into command lines or scripts.

Mac Software for Software Developers

A fellow developer who is getting his first Mac asked me what software he should get. Here is a list of Mac software that I, as a software developer, find useful.

The "Easy Part" vs. the "Hard Part" of Software Development

In his essay "Where Do You Get Your Ideas?," Neil Gaiman relates a common situation faced by authors:

Every published writer has had it - the people who come up to you and tell you that they've Got An Idea. And boy, is it a Doozy. It's such a Doozy that they want to Cut You In On It. The proposal is always the same - they'll tell you the Idea (the hard bit), you write it down and turn it into a novel (the easy bit), the two of you can split the money fifty-fifty.

Computer programmers often find themselves in similar situations. Some well-meaning person says they have a Great Idea for an application. They'll tell the programmer the idea, and then all the programmer has to do is write the code to implement it. The Idea Person will get the bulk of the credit, but the lucky programmer gets to ride those coattails. After all, coding must be easy: it's just a bunch of stuff somebody has to type. The idea, the design, the inspiration - that's the hard part, right?

Usually, no.

Don't get me wrong: a great idea is a great idea, and a talented application designer is certainly worth more than the average programmer. But most people just aren't that smart.

And even if the idea is amazing and the designer creates a brilliant user experience, the bulk of the work still falls on the programmers' shoulders. If you take all the man-hours spent designing the iPhone, and all the man-hours spent implementing the operating system, frameworks, and standard applications, and making it all work the way the designers intended, I'd bet the latter number would be at least ten times the former. Maybe twenty times.

Programming is just plain hard, in a way that related software-development activities are not. And it is unforgiving. If a programmer makes a mistake, the program crashes or gives incorrect results. In contrast, if the UI designer makes a mistake, the consequences are not so dire; it just means the application is not quite as good as it could be.

It's usually a programmer who has to fill in all the details of someone else's grand design. When it's 2:00 AM, and the architects are snuggled in their beds, and some program is crashing because nobody thought about how to handle a certain condition, it's a programmer who has to decide how to fix it. Programmers make dozens of these kinds of decisions every day, while the Big Picture guys talk about golf.

I don't intend to put programmers up on a pedestal. Developing good software also requires good designers, good artists, good technical writers, good testers, good managers, and a good user community. But, please, don't insult coders by treating them like a bunch of glorified typists. Programming requires as much imagination, inspiration, and perspiration as any other creative endeavour.

Easy Gradient Backgrounds for UITextViewCells

When you create a table-view-based iPhone app, by default you get tables with plain white rows. But all the cool kids are making apps with 3D-ish gradient backgrounds. You want to make those kinds of apps too, right? This article explains how.

"Speak Count of Words on Clipboard" Automator Service

As part of my "write a blog entry every day during November" commitment, I considered imposing a minimum word limit for each entry. I've decided against that, because I don't want to feel pressure to add filler, but before deciding that, I created an Automator service that would help me to count words.

Not Quite NaNoWriMo

Picture

I've often dreamed of participating in NaNoWriMo, the National Novel Writing Month, in which people pledge to write a novel during the month of November. Unfortunately, I'm not really a novel-writing guy. I could maybe write a short story or two, but I'm just not enough of a writer to generate 2,000 words of fiction per day.

So, instead of doing that, I'm going to commit to do these things during November:

  1. Publish a blog article every day.
  2. Get a new iPhone application into the App Store.

This article does not count as a daily blog entry, as it is really more of a meta-entry. The real blog entries need to be programming-related or computer-related.

This is why you'll be seeing a lot of blog entries from me this month. Please feel free to call me bad names if I skip a day.

Getting Into iPhone Development

I know some people who are interested in getting into iPhone application development. There is a lot of advice out there. Here's my advice for experienced developers who start out knowing nothing about iPhone or Cocoa development:

After that, you'll be able to delve into the other things you need in Apple's documentation. I'd recommend learning all you can about Core Animation and Core Data, but it depends a lot on exactly what kinds of apps you want to write.

Finally, write lots of little iPhone apps before you start on that big important app you really want to write. The language and tools are a little strange at first, but the more you use them, the better they feel.

A Little Service That Converts Files to EPUB Format

To make it easier to put content on my Sony Reader, I've created a service, using Automator, that will invoke calibre's ebook-convert tool on files selected in the Finder.

Syndicate content