First post with(out) SyntaxHighlighter

This is my first blog, my first ever blog.

I did not want to use the same old cliché for my first blog but I couldn’t resist. Anyways, I’m happy that I have started writing my own tech blog. This wont be anything big. Just my daily tech encounters, my (and only my) thoughts.

So, here’s my first tech (actually, not-so-tech) post. Since it is a tech blog, I needed some source code highlighters. I have read many blogs which highlight the code, with line numbers and even providing syntax highlighting. I found SyntaxHighlighter. As per the site, it is easy to install/configure but it took me 2-3 days to finally understand that this won’t work. I got JavaScript errors, unnecessary blank lines at the bottom and various other gotchas. I was not prepared or even have the patience to spend more time configuring it. I finally realized, there has to be something else, more easier.

I searched, googled, binged (now Google Search has a background image too) and finally, WordPressed and found it. There is something in WordPress.com itself for posting source.

Here’s a demo –

class Feeder {
	private Integer i = 0;
	
	public void setFeeder(Integer i) {
		this.i = i;
	}
	
	public Integer getFeeder() {
		return i;
	}
	
	public void increment() {
		i++;
	}
	
	public String toString() {
		return i.toString();
	}
}

Finally, I can start blogging with(out) SyntaxHighlighter.