I encountered a scenario on my latest project where I received a date as a string (ie: `2012-12-21`) and needed to display it as `21st December`. This had me first trying my own hand at doing this, and - thinking that there could possibly be a more efficient way of doing this - I googled it.
... or: Force yourself to code better through imagining that you're teaching others.
I recently updated superLabels in response to a pull request requesting a way to be able to still display the label until a certain number of characters has been typed. Here's what I came up with...
Wahey! I've decided to upgrade the Super Labels version number to 2.0. I've recently added a cool new feature which lets you specify a number of characters after which the label is to fade out...
As a developer that's just made the plunge into freelance work, I've realised that I'm going to be running into some quite horrifying pieces of code and that's got me thinking. After 3 years of full time employment (at just one company), I myself have left behind a lot of code that I'm quite honestly downright embarrassed by.