Things I Learnt The Hard Way - One Commit Per Change

When working with source control tools, keep one change per commit. Avoid bundling more than one change in a single commit just to "save time".

Read more  ↩︎

Things I Learnt The Hard Way - Always Use A Version Control System

"This is my stupid application that I just want to learn something" is not even a good excuse to not use a version control system.

Read more  ↩︎

Things I Learnt The Hard Way - Debuggers Are Overrated

I heard a lot of people complaining that code editors are bad 'cause it's hard to attach a debugger. I'd claim that this vision is wrong.

Read more  ↩︎

Things I Learnt The Hard Way - Shortcuts Are nice, But Only In The Short Run

A lot of languages/libraries/frameworks add a way to make things shorter, reducing the number of things you need to type.

But, later, that will bite you and you'll have to remove the shortcut and do the long things.

Read more  ↩︎

Things I Learnt The Hard Way - Logs Are For Events, Not User Interface

Two things in one: First of all, when using logging, use it to log events, not for user interfaces; second, log events in a machine readable way, not necessarily an human readable format.

Read more  ↩︎

Things I Learnt The Hard Way - Resist The Temptation Of Easy

Sure that IDE will help you with a ton of autocomplete stuff and let you easily build your project, but do you understand what's going on?

Read more  ↩︎

Things I Learnt The Hard Way - Start Stupid

One way to get away from the IDE is to "start stupid": Just get the compiler and get an editor (ANY editor) with code highlight and do your thing: Code, build it, run it.

Read more  ↩︎

Things I Learnt The Hard Way - Always Use Timezones With Your Dates

No matter if the date you're receiving is in your local timezone and you'll display it in your timezone, sooner or later, the fact that you ignored there was a timezone behind that date will hurt you.

Read more  ↩︎

Things I Learnt The Hard Way - Always Use UTF-8 For Your Strings

Long gone are the days where ASCII was enough for everyone. Long gone are the days where you can deal with strings with no "weird" or "funny" characters.

Read more  ↩︎

Things I Learnt The Hard Way - Cognitive Cost Is The Readability Killer

"Cognitive dissonance" is a fancy way of saying "I need to remember two (or more) different and contradicting things at the same time to understand this." Keeping those different things in your head creates a cost and it keeps accumulating the more indirect the things are ('cause you'll have to keep all those in your head).

Read more  ↩︎