Awk to split c functions into multiple files.

This, at present, is overly simplistic and makes many stupid assumptions:

  • That the return type is short.
  • That there are no short global variables declared.
  • That everything is well-formatted so that the return type is always first column, and that there is a space between both function name and return type (as in, only spaces–no comments) and function name and open parenthesis of the arg list.

cat $1 | awk '
/^short/ {
/* assumes return type of short */
/* assumes space between return type, function name, and parm list */
print $0 > functionNameFile;
/^}/ {
print $0 >> functionNameFile;
if(functionNameFile != "") {
print $0 >> functionNameFile;

Windows Vista problems resticting GNU GCC apps to 32MB

Disturbing to see this come about:
Windows Vista problems resticting GNU GCC apps to 32MB

Buried in the footnotes is a note about a response supposedly coming from a Microsoft representative saying, “now that people are asking for this, we are planning to fix…”

Anti-spyware change of heart.

Spy Sweeper is my new anti-spyware solution of choice. I started out using Ad-Aware, but I ran across spyware that I was trying to remove that Ad-Aware could not take care of.

At that time, I stumbled upon both the Microsoft Anti-Spyware Tool and Sunbelt CounterSpy. Both tools did an exceptional job, and went with CounterSpy because it was advertised as the creator of the engine for both products.

In two years of use, CounterSpy bogged down my 2.8Ghz P4 with Win2k and 1 GB RAM. I also had quite a few false positives in those two years. With a recent update, CounterSpy constantly disabled itself on my Win2k system.

I decided to switch over to one of the top recommendations from a Consumer Reports article… Webroot Spy Sweeper… as far as I can tell so far, Spy Sweeper is using only 8MB of RAM while not conducting a scan.

O’Reilly Book: Programming C#

Programming C#: Building .NET Applications with C#

I’m not always impressed with books published under the O’Reilly label. I usually find them much more useful as a reference guide than a learning tool.

This book, however, stands out. As someone well-versed in Java and C++ concepts, this book was a helpful introduction to C#. Whenever a topic was presented in which Visual Basic, C++ or Java differed, there was an information box for the section pointing out the differences in C# compared to the other language mentioned.

How Not to Program in C++

How Not to Program in C++: 111 Broken Programs and 3 Working Ones, or Why Does 2 + 2 = 5986
I expected many great things from this book. I got mixed results. I usually enjoy figuring out “Bugs of the Day” and the like, but this was book was largely a mix of grading papers from an introductory programming class and debugging buggy programs at work.

Low points:

  • Debugging printf format specifiers and forward slash for escaping characters.
  • A few fairly long programs with somewhat trivial errors.

High points:

  • Bugs encountered as a result of optimizing compilers.
  • Exploring of lesser used features of the C/C++ language
  • Some interesting puzzles to find where initialization and/or destruction order went wrong.