This site will look much better in a browser that supports web standards, but is accessible to any browser or Internet device.

Anomaly ~ G. Wade Johnson Anomaly Home G. Wade Home

November 26, 2004

An Apology

For most of the ten months I've written this weblog, I've tried to keep it open for comments. Now, I finally have to bow to the inevitable.

Although I have enjoyed getting comments from a few people. (Possibly the only ones who have read this<grin/>), I have gotten far more spam than actual comments. To give you an idea, I have received 1574 individual comments on my weblog. Of those, 8 were actual comments. The rest were peddling drugs or gambling or whatever.

I was doing okay killing a handful to a dozen a day. Any IP address that seemed to consistently send spam was banned from commenting. (As of today, 49 addresses were banned from commenting on this site.)

But today, the spammers went too far. I received 929 spam comments around noon today. The cleanup time was far longer than I wanted to spend on clenaing up someone else's mess. More annoying is the fact that someone was trying to use my website to sell drugs. It's kind of like walking outside to find that your house, garage, fence , and car have all been plastered with signs selling products from some drugstore.

So as of now, I am turning off the commenting feature. If I can come up with a way to stop (or at least limit) this kind of thing, I may turn it back on. If you want to send a comment, feel free to email me at If it's a real comment, I'll try to post it as such. If it's just spam, expect it to be deleted.

To the few of you that are reading this and might have liked to comment, I apologize.

Posted by GWade at 11:07 PM. Email comments | Comments (0)

November 21, 2004

Review of C++ Coding Standards

C++ Coding Standards
Herb Sutter and Andrei Alexandrescu
Addison-Wesley, 2005

For many programmers, the term coding standard generates a gut-level response. We all know that someone is going to be pushing the one, true brace style or the proper way to indent code. This subject is probably the best way to generate instantaneous rebellion among a group of programmers.

The first "standard" in C++ Coding Standards wipes all of that away with their first rule:

0. Don't sweat the small stuff. (Or: know what not to standardize.)

In one quick entry, Sutter and Alexandrescu sweep all of the indent-level, brace-placement, CamelCase/underscores holy wars into a single category and give a useful bit of advice: Be consistent. The authors point out that any professional programmer should be able to read and write in any of these styles. The differences are basically a matter of personal preference.

From this point on, we get to see a coding standard that is focused on best practices and proven techniques for improving code. Almost every item is explained with examples. Some have exceptions, with an explanation of when (and if) the exception should override the rule. All of the rules contain references to other sources to read for further explanation,

The rules cover such general topics as 1. Compile cleanly at high warning levels and 3. Use a version control system to specifics like 73. Throw by value, catch by reference. Some of the items could be considered common sense if it weren't for the fact that I've seen them regularly violated by people who claim to be professional. Others are based on knowledge of the language and implementation details that most of us never need to care about.

There are even a few rules that violate my personal list of "best practices." Like all of the others, the advice in the book is authoritative enough and backed by good reference. So even on the issues that I disagree with, Sutter and Alexandrescu argue their case well enough that I plan to go back and reassess my views.

If you are a new C++ programmer, this book will help you learn to be a much better programmer. If you are an experienced programmer, this book will help improve your skills and give you a reference to use to help keep more junior programmers in line. If you manage C++ programmers, this book is a good starting point for a coding standard to improve the work of all of your programmers. I don't think I can recommend this book too highly.

Posted by GWade at 09:58 PM. Email comments | Comments (0)

November 08, 2004

Review of CSS Cookbook

CSS Cookbook
Christopher Schmitt
O'Reilly, 2004

This has become my new favorite book on CSS.

For quite some time, the only way to learn to use CSS in website design was search the web for references, keep CSS: The Definitive Guide by your side, and experiment. The problem is that the interactions with the different browsers is a mess and not everybody thinks in the CSS model.

This book helps on both fronts. The recipes in the book each have a section in the discussion that describe various browser incompatibilities and their workarounds. There is also a full chapter devoted to the workarounds. More importantly, the author handles each recipe by telling you how to solve your problem correctly, and then explains how to make the minimal changes necessary to deal with browser incompatibilities.

Unlike a few books I've seen in the cookbook style, the CSS Cookbook does it right. Each recipe starts with a problem you might want to solve on your site and walks you through solving that problem. Some of the recipes give multiple solutions and describe some tradeoffs, so you can decide which is right for you.

The book isn't perfect, I found a couple of grammar mistakes that should have been caught in editing and the last figure of chapter 8 is missing. Overall, it seems to be a really good effort.

If you are doing any web design work, I would highly recommend this book. I plan to be using some of the recipes to clean up a few things on my site that I didn't get quite right.

Posted by GWade at 08:52 AM. Email comments | Comments (0)