« | » Main « | »

The Final Days of AT&T

Monday 31 October 2005

SBC is buying AT&T, renaming itself AT&T, and creating a new logo while it's at it. This has got the design community in an uproar. Design Observer has a thoughtful piece on the history of the AT&T graphic identity: The Final Days of AT&T. The comments are a long mudfight over the need for graphic design historical preservation, the absurdity of same, who designed what, and so on. It's juicy, in a narrow sort of way.

Ghost diagrams

Sunday 30 October 2005

I don't understand anything about Paul Harrison's Ghost Diagrams, except that the pictures sure are purty, and it has something to do with tiling. In fact, I don't think I undestand any of Paul's blog, except that it involves many things I am interested in, including math, autism, and math and autism. Dense, but fascinating. BTW: It is nothing more than coincidence that this is the day before Halloween and this entry has the word Ghost in it.

Google AdWords: evil?

Saturday 29 October 2005

To help promote Susan's book, I signed up for Google AdWords. I thought it was a great program at first. Then Google pissed me off.

» read the whole sad tale... (17 paragraphs)

The whole thing has put a bad taste in my mouth. If I had to guess, I'd say that I fell victim to an over-zealous anti-spam or anti-fraud heuristic. But shouldn't I be able to get someone's attention? I'm starting to think that Google is getting too big too fast, that their growth has outstripped their ability to attend to their motto: "Don't be evil".

Update Nov 13: the account has been reactivated.

Gridgame

Thursday 27 October 2005

gridgame is an abstract Flash game. Click on a circle, it turns a quarter turn. If its markings connect with a neighbors, then the neighbor turns. Chain reactions ensue. From the random board, it is difficult to predict what will happen. Sometimes what looks like a fruitful vein of energy sputters out after a short time. Actions taken as a mindless afterthought can create extended chains of unexpected consequences. It reminds me of life...

More alternatives for Python unit testing

Tuesday 25 October 2005

Here are more facilities for helping with unit testing in Python:

  • TestGears is part of the TurboGears web uber-framework. It provides automatic discovery of test functions, simplifies suite development, and makes it easy to run tests zero configuration.
  • TestOOB (Testing Out Of [the] Box) provides for new styles of output (HTML and color terminal), debugger launching, verbose asserts, parallel execution, and command-line utility testing.
  • nose provides an alternate test discovery and execution engine for unittest.

Together with unittest, doctest and py.test which I wrote about a year ago, this brings the total to at least six.

One common thread among the three new entries is that they aim to be as useful as py.test, but based on the standard unittest module. It's an interesting dynamic, since py.test claims to be more Pythonic than the standard module.

As usual, I find that I barely have time to use any of these modules, much less evaluate all the options.

Parrot post-mortem

Thursday 20 October 2005

I haven't followed the progress of the Parrot at all, though I know vaguely what is: a multi-language VM. Dan Sugalski was the architect of it, but has left. His Parrot Post-Mortem is a fascinatingly honest account of what went right and what went wrong with the project. It includes technical issues, inter-personal issues, and he's not afraid to admit to his own failings. It seems like the kind of manifesto that should be used to guide future projects.

More Unix cheat sheets

Thursday 20 October 2005

The last few weeks I've had to dive into Linux again (to install a wiki), and I found some more cheat sheets and tutorial that were helpful:

Finally, this won't help you run a Linux box, but Éric Lévénez's UNIX History has a mind-blowing graphic laying out the entire twisted family tree, from September 1969 to the present.

Comments prevent execution

Wednesday 19 October 2005

Looking for basic information about ASP.NET syntax, I found this description of Server-Side Comment Syntax. It explains:

Server-side comments enable page developers to prevent server code (including server controls) and static content from executing or rendering. The following sample demonstrates how to block content from executing and being sent down to a client.

There you have it: the point of a comment is to prevent a chunk of code from executing. There's no mention of using comments to communicate with other developers. This helps explain a number of Daily WTF's!

wcscmp vs StrEqual

Tuesday 18 October 2005

I know this is a small thing, but it snagged my brain this morning. I hate the C standard library function wcscmp. First, because the name is so crappy (it stands roughly for Wide Character String CoMPare). Second, because although it returns a true comparison (which of the two arguments is greater), it's almost always used to compare for equality, and therefore has to be negated. It returns zero if the strings are equal, so you end up writing this:

if (!wcscmp(s1, s2)) {
   // Do something if s1 and s2 are equal...
}

Or worse, you want to know if they are not equal, so you leave off the negation. When I see wcscmp, I think, "we're comparing to see if the strings are the same", but then I have to carefully navigate that negation to get the sense correct.

If we're not going to have a real string class with an equality operator, I much prefer to have a StrEqual function:

inline bool
StrEqual(const wchar_t * s1, const wchar_t * s2)
{
    return !wcscmp(s1, s2);
}

Then I can write what I mean. But others feel that at least wcscmp is standard. I'll take readable and straightforward over standardized obfuscation any day.

Which book?

Tuesday 18 October 2005

An intriguing book search engine, sort of: whichbook.net lets you select characteristics of the book you want to read next, then recommends some to you. The main page gives you a set of sliders: happy/sad, funny/serious, safe/disturbing, and so on. You set the sliders to describe your desires, and book suggestions appear. Intriguing. It looked like it did a pretty good job, though I don't know how large a database is has, or how books get added to it.

Muglets

Monday 17 October 2005

Muglets sounds like something out of Harry Potter (non-magician babies?) but it isn't: it's an online Flash gizmo that lets you upload pictures, cut out the face, and paste it on a dancing disco doll. Simple, yes, stupid, yes, but funny, and I liked the workflow they've got for the cutting and pasting of the face.

Danielle Strachman: hemispheric integration and juggling

Sunday 16 October 2005

My son Nat has had a number of tutors over the years. Through trial and error, we discovered that the best tutors were not the ones with the best training. Although training helped, the most important things in a tutor were a natural predisposition to working hard with a sometimes unwilling student; an enthusiasm I sometimes refered to as "over-caffeinated"; and a centered-ness that allowed the tutor to persevere even when the student was overtly hostile. One of our tutors who fit this description to a T was Danielle Strachman. She is now in San Diego, and has a blog, Heightened Learning, which covers educational topics of all sorts.

Her post about Hemispheric Integration and Juggling caught my eye. It's about how juggling might help disabled childrens' brains. You should definitely look at the video linked at the end, which shows a kid solving a Rubik's Cube with one hand while juggling two cubes with the other.

Open Source licenses compared

Sunday 16 October 2005

I've decided to choose a real license for the software I post on this site, since responsible readers have asked me what license I use. I find the array of open source licenses baffling, so I dug up some resources:

After looking over all this, I'm choosing MIT. It allows others to do the most with the code I write. When I put myself in the user's shoes, it's the license I would want to see on code I wanted to use.

Blogger via XSLT

Saturday 15 October 2005

The last few days I've been setting up my wife's brand-new blog. For some reason, I went with Blogger as a technology. Because her site (like this one) is static HTML generated by XSLT on my laptop, I wanted to generate the Blogger template the same way. That way, the template would have the same look and feel as the rest of the site, and when the overall look changes, the template would change too.

Blogger templates are like most other templating systems: they look like HTML files, with strange foreign Blogger-specific tags in them. The problem with generating Blogger templates with XSLT is that the "tags" in the template are not well-formed XML. So I had to resort to some tricks and compromises to make it all work.

The end result works, but is a bit icky in the middle. If you're interested in the details of stuff like this, read on.

» read more of: Blogger via XSLT... (16 paragraphs)

WHOA

Wednesday 12 October 2005

Since Making Peace with Autism came out six weeks ago, my wife and I have become addicted to Amazon sales stats. We got into the habit of reloading the Amazon page to see how the book was doing (nicely, thank you). Then I wrote an Amazon web services script to pull stats for a number of books.

Now I've created WHOA: the Writer's Homepage for Obsessing about Amazon. It's a customizable page that lists stats for the books you want to see. Try it out, or read About WHOA.

The list of books is all in the URL, so once you have a page you like, you can bookmark it to obsess over and over again. Or you can create a list and share it. For example, here's a Franken vs Limbaugh and O'Reilly smackdown.

Object reference not set to an instance of an object

Tuesday 11 October 2005

I got this error message from .NET. It basically means "null pointer":

Exception: Object reference not set to an instance of an object.

The more I look at it, the more I hate it. Why are there so many words? Who are we trying to impress? What's an "instance of an object"? Don't they mean:

Exception: Object reference not set to an instance of a class.

And isn't "instance of a class" a fancy way to say "object"? So shouldn't it be:

Exception: Object reference not set to an object.

And what else would it be set to? Can't we just shorten this to:

Exception: Object reference not set.

Or why don't we just say what we mean:

Exception: Null object reference.

Or, (heaven forbid):

Exception: Null pointer.

I know, I know, they aren't pointers, they're object references. Whatever. Bite me.

The curse of the were-rabbit

Tuesday 11 October 2005

I saw the latest Wallace and Gromit movie (The Curse of the Were-Rabbit) yesterday. It's fabulous:

  • The animation as always is first-rate. The facial caricatures are hilarious.
  • Being a full-length movie, this has much more detail than previous films, especially in the sets.
  • Listen to the score: there are a number of variations of the Wallace and Gromit theme, used cleverly during high points of the movie.
  • The plot, as always, involves the innocent and mundane (a vegetable growing competition) turned dramatic.
  • The sets are full of puns. Wallace's cheese library includes East of Edam, Grated Expectations, and Fromage to Eternity.
  • The humor is perfect for kids of all ages, including a few low-road visual jokes for the grown-ups.
  • The bunnies are very cute, but the cutest thing in the movie is the very first shot, of Gromit as a puppy.

In other Wallace and Gromit news, remarkably, over the weekend, the Wallace and Gromit warehouse was destroyed by fire. The props and sets from all the other Wallace and Gromit movies were lost.

Wallace and Gromit

Pumpkingutter

Saturday 8 October 2005

When I was growing up, we used to make jack-o-lanterns with a big kitchen knife. The eyes were triangles, and the mouth maybe had a few teeth in it if we were feeling especially ambitious.

When I started carving pumpkins with my kids, those stencil kits came out. We had fancy patterns to start with, and special little saws to cut the shapes, and we were able to do much more interesting designs. Then we found the two-layer style, where some parts are carved through, and others just have the peel cut off, to give a shaded look. Over the last few years I think we've done a good job: 2004's alien and Mettool, 2003's Homestar characters, and 2002's SpongeBob.

Now along comes Pumpkingutter (Scott Cummins), who carves fully-realized 3D scupltures out of the pumpkins. They're fabulous, but I don't think I'll be making the artistic leap with him.

Cog 2.0

Thursday 6 October 2005

Today, after an extended beta period, I am pleased to announce Cog 2.0, the latest version of my Python-based code generator. It's great. Use it. Changes since the previous version are on the changes page.

HTTP error 191

Thursday 6 October 2005

At work we had a thorny problem in our code: when trying to make an HTTP connection for a SOAP call, the connection would fail. Reading the log files, it seemed to be a 191 error. "That's odd, never heard of that one before," we all said. Somehow, the spec with all the HTTP errors had never heard of it either. Could it be some vendor-specific code? We were stumped.

We lived with it for a while until a co-worker figured it out. Our logging code looked like this:

if (FAILED(hresult)) {
    os << "hresult: " << std::hex << hresult << "\n";
}
if (lasterror > 0) {
    os << "Win32 error: " << lasterror << "\n";
}
if (httperror > 0) {
    os << "HTTP status: " << httperror << "\n";
}

Can you see what's going on here? Bueller? Anybody?

The std::hex function modifies the ostream permanently. If the hresult was printed, then the ostream was switched into hex mode, and all numbers will be hex. The httperror value (and the lasterror value for that matter) are being written in hexadecimal. The mysterious 191 error was actually a 0x191 error, or a plain-old 401. Inserting a std::dec to set the ostream back to decimal fixed things up. We still had to fix the "unauthorized" error, but at least now we know what it is!

CSS-only RSS badge

Wednesday 5 October 2005

Sometimes I get stuck obsessing about tiny details. Recently I decided to give my RSS link a standard orange badge. But instead of using an image, I did it with CSS. I'd seen it done before, but I couldn't find the example I'd seen, so I cobbled it together from some other bits and pieces:

RSS

The final code is:

<a
    href='blog/rss.xml'
    type='application/rss+xml'
    style='
        padding: 0 .4em;
        background: #F60;
        color: white;
        border: 1px solid;
        border-color: #FC9 #630 #330 #F96;
        font-weight: bold;
        text-decoration: none;
        '
    >RSS</a>

How to price a fixed-price contract?

Wednesday 5 October 2005

A friend is negotiating a contract to develop a piece of software. It's to be a fixed-price contract, and it will be a lot of work (in the tens of thousands of lines of code). I've never charged in this way, so I don't know how to advise him. How do you choose a price for a fixed-price contract? Obviously you can choose an hourly rate, and multiply by an estimate of hours, but estimates have risk, especially with a project as large as this.

Scott Lewis is an angel

Tuesday 4 October 2005

Scott Lewis runs a blog over at scotfl.ca. It's a good blog. One of the things I like about it are the retro pinups in the masthead. But the thing that truly sets Scott apart is the speed with which he came to my rescue this morning when I needed help unwedging a Mac. His comment went beyond helpful into the encyclopedic, and led me to the fix for my problem. Thanks, Scott!

Help! Frozen Mac browsers!

Tuesday 4 October 2005

Is there a Mac OS X expert out there that can help me? My wife's iBook is unable to surf the web. When I start a browser, it gets stuck, consuming 80% of the cpu, and completely impervious to Force Quit. This happens with Safari, IE, or Firefox, they all behave the same. Internet access other ways works fine. Mail.app can pull mail, curl from the command line retrieves pages. If I logon to another account on the same iBook, the browsers work great, even while Susan's account is stuck, with her browser consuming CPU.

So it isn't the network in general that's broken, it isn't something particular to Safari or Firefox, and it is something particular to Susan's login. The problem seemed to start Sunday when she tried to open an Acrobat file from her secondary email program (First Class), and it got stuck hard. We had to force the computer to shutdown, and then things were stuck. The first time we launched Mail.app, it complained that its files were locked, and did we want to open anyway? We did, and it worked fine, but the browsers are still stuck. Any ideas? Please help!

Shining trailer

Saturday 1 October 2005

Did you ever see a trailer for a movie, and have a suspicion that the movie would be very different? Or worse, have you been to see the movie, and finally understood just how much they twisted the truth when making the trailer? Well, a contest for making purposefully misleading trailers produced this gem: Shining, which turns The Shining into a heartwarming movie about a boy and his dad.

More about the trailer is at The Shining Redux on The Tattered Coat.

« | » Main « | »