Things I Learnt The Hard Way - A Language Is Much More Than A Language

Picking a programming language is much more than just picking the words that will generate a code. They come with a community, a leadership, an ecosystem and a thread the binds them all together.

Read more...

Things I Learnt The Hard Way - Don't Use Booleans As Parameters

When you're designing a function, you may be tempted to add a flag (a parameter in a function that it is a boolean). Don't do this.

Read more...

Things I Learnt The Hard Way - If A Function Description Includes An "And", It's Wrong

Functions should do one thing and one thing only. I clear indication that you're breaking this principle is the need to add an "and" in its documentation.

Read more...

Things I Learnt The Hard Way - Beware of Interface Changes

Interfaces and APIs is what you give away to others. If you keep changing them, you'll make everyone's life sad.

Read more...

Things I Learnt The Hard Way - Good Languages Come With Integrated Documentation

If you're worried about learning some new programming language, you can bet the one with a better documentation is the one that is born with a document processor.

Same goes for the frameworks/libraries of that language.

Read more...

Things I Learnt The Hard Way - The Function Documentation Is Its Contract

When you start the code by writing the general flow as steps and making each step a function, you're actually making a contract (probably with your future self): I'm saying this function does this and this is what it does.

Read more...

Things I Learnt The Hard Way - Documentation Is a Love Letter To Your Future Self

We all know writing the damn docs for functions and classes and modules is a pain in the backside. But realizing what you were thinking when you wrote the function will save your butt in the future.

Read more...

Things I Learnt The Hard Way - Future Thinking is Future Trashing

When developers try to solve a problem, they sometimes try to find a way that will solve all the problems, including the ones that may appear in the future.

Read more...

Things I Learnt The Hard Way - Testing Every Function Creates Dead Code

If you write a test for every single function on your system, and your system keeps changing, how will you know when a function is not necessary anymore?

Read more...

Things I Learnt The Hard Way - Good Languages Come With Tests

You can be sure that if a language brings a testing framework -- even minimal -- in its standard library, the ecosystem around it will have better tests than a language that doesn't carry a testing framework, no matter how good the external testing frameworks for the language are.

Read more...