Clean Code

Sometimes when I factor out a function, I see a more general algorithm hidden in that function. And then I get carried away generalizing it more and more.

In a few occasions I have seen functions that allocate certain local variables on the heap instead of using variables with automatic storage. In this post I explain what you should do with those variables.