
Programming's a hard thing to do, if you hadn't figured it by now. Really, there's a gradient.
In order to refresh and strengthen my own programming skills, I've been writing, from scratch, a syslog daemon. Syslog is the unix process by which all the useful warnings and errors from other programs get stashed into files. Doing this from scratch means by the time I'm done, if I do it right, I will have gained an intimate understanding of the syslog system, strengthened my network coding a little, and most powerfully, have written _in C_ a process which has to remain up and running for months at a time.
The pitfalls to this little masochism are manifold, but the worst of them is the programmers doom - the memory leak.
Memory in a computer is nothing more complex than a big linear wodge of 10101011. In order to keep processes from tapdancing all over eachother and overwriting eachothers memory, the OS on your computer has some mechanism for allocating swatches of memory to interested parties. The job of those interested parties is to make sure that when they're done with any given piece, they put it back. When you forget to give it back, but you're not using it anymore, that's called a memory leak. Until the program dies, that bit of memory is totally unusable.
Plugging leaks like that is really tough, and the right thing to do is not to get them in the first place. I'm learning how hard that is to manage.
My program works, now, at least a good chunk of it does. Now I do a little memory management and code cleanup. Then I add features again.
Wheefun.