Ben Poole

“It is a very sad thing that nowadays there is so little useless information.”

Weblog by month (November 2009)

This one’s for you Brucie-baby

Utterly jaw-dropping mad skillz from one of the UK’s finest musicians (probably most famous for playing with Porcupine Tree)…

Gavin Harrison is a force of nature, and along with Vinnie, Neil, Stewart and Simon, one of my most favourite drummers EVAH! Enjoy.


Why Stack Overflow rocks

Stack Overflow is rapidly becoming my #1 code snippet resource. It is superb, and if you’ve not had reason to go there yet, do so! The whole system of voting up / down questions and answers is like a lovely non-pigeon PageRank™ for code.

For example, after a long day at my current contract, I needed a wee bit o’Java that would pad out an integer to a three-digit string value. Now, there are ways to do this with simple padding, length testing and sub-stringing, but this, I think you will agree, is much better:

String.format("%03d", someIntOrOther); // pads with length of 3

Eh? Eh? Great isn’t it! And the thing is, I just knew there was something like this out there, so rather than flail around in Google, I opted for a simple search (for “java padding”) at Stack Overflow, and collared this code in no time.

I ♥ the Stack Overflow.

(BTW, if you fancy this padding code, you can vote it up and find the whole question / discussion / bonkers rubbish answers here).