Starting a Programming Blog

It is one month ago today that I decided to start a programming blog. I wasn't sure what to expect but I get questions both here and in the real world so I thought I'd jot down some my experiences.

Why Start a Blog?

Fellow StackOverflow user, Brent Ozar goes into this in a way I see no need to repeat in Sow to Start a Blog. Jeff Atwood probably tipped me over the edge when I read How To Achieve Ultimate Blog Success In One Easy Step. Not from any grandiose notions of reaching those giddy heights. It was more the just do it attitude.

I'll just say that for me it's not about earning money from the blog. Other than Joel Spolsky, Jeff Atwood and one or two dozen others, I don't think anyone makes enough money from blogging to justify the effort (compared to, say, spending that time getting paid for professional services). For me, there were (and are) several reasons:

  1. To have a demonstrable body of work on a variety of topics;
  2. To make me a better communicator;
  3. To raise issues I feel are worth discussing such as the future direction of Java;
  4. To write tutorials on technologies, platforms or libraries that I don't think have been sufficiently covered, like my ongoing series on Ibatis; and
  5. For fun.

Interestingly, many of these reasons are the same as why I chose to become a frequent and regular contributor on StackOverflow. StackOverflow luminary and contributor extraordinaire, Jon Skeet has written about writing helpful technical answers, which is worth reading.

Recently someone suggested that new users are at a disadvantage to experienced users in terms of gaining reputation. In a way they're right but not because of the implied reason that people vote for and accept answers just because an "old-timer" answered it but because--speaking as someone who has answered over 1,000 questions on StackOverflow--answering questions makes you better at answering questions.

Blaise Pascal once said:

The present letter is a very long one, simply because I had no leisure to make it shorter.

This applies very much to answering questions and writing blog posts and doing pretty much any form of written communication: there is a skill and an art to writing something that is long enough to be useful and short enough to be read and succinct. I see the difference in my own answers on StackOverflow now versus 6 months ago.

The other positive aspect of answering questions is that it's a really good way to teach yourself a new skill. I had read large chunks of "jQuery in Action", which is a fine book, but it's only when a library is met by other programmers that you start seeing real world cases and problems of how to apply it. I taught myself jQuery by answering questions on StackOverflow.

What to Write?

You get a lot of people who ask "I'm new to PHP, what framework should I use?" Likewise, I've seen people ask "I want to start a blog, what should I write about?" In both cases, people can miss the point: a framework is a tool. It exists to solve a problem you have rather than being a security blanket. It may sound trite but only start a blog if you have something to say.

Other people write very narrowly focused, highly technical blogs that can be of excellent value. I've always been more of a generalist so I deliberately chose not to restrict myself too narrowly, which is why you see posts here about PHP, Java, CSS, ORMs and SQL and a mix of both technical posts and opinion pieces. Is this a good idea? I have no idea. Like I said, I'm new to this.

What to Expect?

I didn't know what to expect going in to this. Would 10 people a day read my blog? 1000? None? This is the situation after exactly one month, according to Google Analytics:

Are these numbers good? Bad? I honestly don't know. I will say that I am pleased and this has exceeded my most optimistic yet nebulous expectations.

My Advice

It may be premature or even presumptuous to start dispensing advice so soon but I have learnt a thing or two worth conveying:

  1. Start from day one under your own domain name;
  2. Use Blogger. Using your own domain is free. It is a paid feature on Wordpress. You could of course host it yourself but why would you?
  3. Turn off "Convert line breaks" on Blogger. It's a real pain to change later;
  4. You're better off writing HTML than you are using the inbuilt editor;
  5. Find, choose and cuustomize a good template. Obviously this is subjective but you don't want your blog looking like every other blog;
  6. Use Google Analytics
  7. Use Kontactr for a contact form. Make sure you have a contact form;
  8. Link any relevant profiles like LinkedIn or StackOverflow or any open source projects you contribute to;
  9. Add a selection of social news links (eg DZone, Digg, Reddit, Twitter) to your profile;
  10. Put your content on the left. This is easier to read on lower-resolution displays, especially mobile devices;
  11. Use Feedburner for RSS feeds; and
  12. DZone is your friend. Of course this will vary depending on your content. For me it has been the biggest traffic source by far.

So there you have it. I must admit to having a Seinfeld moment writing this post. Much like "the show about the show", this is now "the blog about the blog". I hope these observations and tips are of use to you.

Continued in Part 2.