To reduce fragmentation specially in high-activity code, allocate temporary buffers (buffers that will live only for a short while) from a separate memory pool. The idea is to avoid long-lived buffers and short-lived buffers from being allocated from the same pool.
By grok2 | February 3, 2011
I find that I am often unable to complete some piece of code unless I have a mental picture of the whole thing in my head. And this is a huge problem. For small things, it is fairly easy to get a mental picture of what needs to be done and my coding happens fast. [...]
By grok2 | October 4, 2010
…in a console as a result of some debugging or control command, then try to ensure that any column that uses string or such similar output does not have spaces within that column. This helps with parsing output using tools like awk that are able to split by column and help with subsequent slicing and [...]
By grok2 | October 20, 2009
After playing around a bit with various fonts and color schemes due to increasing eye-strain, today, I finally settled on using “Lucida Console” with “ClearType” font smoothing for C/C++ programming (under Windows with Emacs and Vim) and realized something — when the code looks beautiful (as it does with this font combination), I feel like [...]
As a programmer, you are continually making decisions when you program. Both at the macro level and the micro level. For any project, you have to select the programming language, the tools and the environment. Then as you design, you have to choose continually among multiple ways of doing anything. As you code, you continually [...]
The author of this coins a new phrase — Premature Flexibilization: …the practice of adding complexity to your code to make it more “flexible”, in anticipation of future change. The article, triggered an “yes” response in me because I felt the same way many times. In all my coding, I find that I waste a [...]