« | » Main « | »

I've got a pet peeve about the way build trees are organized: I like to segregate source files from build files. For example, the ideal tree would have a src directory that had all the source, an obj directory that had all the intermediate built files (for example, .obj files), and a bin directory that had all the finished built files (.exe, .dll, .pdb, .map, and so on). I think there are a number of benefits to this organization:

  • If I want to clean out the built stuff, I just delete the bin and obj directories. Simple.
  • If a build fails, I can compare the bin and/or obj directories to a previous successful build to get an overview of what finished and what didn't. Simple.
  • If I want to make a copy of just the human-produced files, I know where they are (src). If I want to save off the finished executables, I know where they are (bin). Simple.

It can be kind of a pain organizing things in this way, but I think the benefits outweigh the costs. Usually, it's only a matter of setting up a project properly at the start, there's no maintenance required.

Unfortunately, Visual Studio .NET doesn't let me organize things this way for C# projects. There's an option for where to put the bin stuff, but the .obj files have to go into a subdirectory of the project directory. Why? Grrrr, submit to the borg!

Making Peace With Autism is my wife Susan's book about our family and how we have dealt with autism. It is available today from Amazon, or any bookstore. Please consider buying a copy. Heck, buy two!

It's been an incredibly long process to get this book into readers' hands, and I'm very proud of Susan for making it happen.

Making Peace With Autism

tagged: , » 1 reaction

I created Nat's World, my immersive photo exploration game, the hard way: each picture is added into the environment by adding a line to a large Python file. It worked for me because I'm a geek, and it was quick to get the whole thing going. But I've idly toyed with the idea of building a GUI application to create similar environments. I think it would be fun to write, but I've never seriously started on it.

Redbug Technologies now has Mapwing, a commercial product to build the same type of walkthroughs. I haven't tried it, but they've got a few demos on their site. It was interesting to see that they faced some of the same problems I did, for example, how to show a simple photo of a spot without it being a fully-realized four-direction point you could navigate to. They did it by putting a camera icon on the spot before you get there. I did it by drawing a thick white border around the photo (to make it like a snapshot).

tagged: » react

I'm no longer in the market for such things, but if I were, I would consider custom photo birth announcements by Purple Stork. Not only are the announcements good looking, but the site itself is open, friendly, and helpful.

tagged: » react

This will be old news for those in the UK, but Honda has another great commercial: Hate Something, Change Something. They've combined cute animation with a catchy folk tune and Garrison Keillor's mellifluous voice to talk about hate being good. Very clever.

tagged: , ,   /   via: David Pitkin» 1 reaction

These days, Kellogg's cereals have Disney wobblers in them. Because of their round bottoms and a very low center of gravity, they wobble but end up standing upright. I was discussing this with Max, who had lots of questions about center of gravity. Could you make an object with a center of gravity on the ground? No, because some of the mass has to be on the other side of any line drawn through the center of gravity.

Then I remembered something I'd read about a long time ago. A few searches, and I found it: a unistable polyhedron is one which will only rest on one of its faces. Robert Dawson calls them by a different name, but has some nice pictures: monostatic polytopes.

In the real world, there's a very pragmatic reason to be concerned about polyhedral stability: it is at the heart of the issue of Fair Dice.

tagged: » 1 reaction

Maciej Ceglowski has a blistering and well-researched essay excoriating the space shuttle: A Rocket to Nowhere. He carefully dissects the history of the program to highlight the compromises and political appeasements that have shaped it:

Future archaeologists trying to understand what the Shuttle was for are going to have a mess on their hands. Why was such a powerful rocket used only to reach very low orbits, where air resistance and debris would limit the useful lifetime of a satellite to a few years? Why was there both a big cargo bay and a big crew compartment? What kind of missions would require people to assist in deploying a large payload? Why was the Shuttle intentionally crippled so that it could not land on autopilot? Why go through all the trouble to give the Shuttle large wings if it has no jet engines and the glide characteristics of a brick? Why build such complex, adjustable main engines and then rely on the equivalent of two giant firecrackers to provide most of the takeoff thrust? Why use a glass thermal protection system, rather than a low-tech ablative shield? And having chosen such a fragile method of heat protection, why on earth mount the orbiter on the side of the rocket, where things will fall on it during launch?

tagged: » react

I've added some more features to Cog, and am presenting them as Cog 2.0 beta 2.

New features include globally defined strings on the command line, marker suffixes for generated lines, and @files that provide options. On the negative side, Python 2.2 is no longer supported. If you need 2.2, I can make it work, just let me know. I'll describe each feature in turn.

ยป read more of: Cog 2.0, beta 2... (21 paragraphs)

tagged: » react

Link Grammar Parser seems like a really cool library: it parses English sentences, and seems to be quite capable. Looking at the sample parsed sentences, it can distinguish good and bad sentences that have completely similar structure (asterisk means it doesn't parse):

The big question on everybody's mind is who killed OJ.

*The big mind on everybody's question is who killed OJ.

Millions attended.

*5 millions attended.

Millions of people attended.

I don't have a need for parsing English like this, but reading about a tool like this makes me want to try it out.

Small world: One of the authors of the parser is Daniel Sleator, whose brother is William Sleator, who has written many kid's books, including an awesome one I read in school, House of Stairs.

tagged: ,   /   via: Keith Devens» 1 reaction

A little over a year ago, I referenced Say No By Default, by Derek Sivers. I mentioned then that he was the guy behind CD Baby. What I didn't realize then was how completely off the cool meter Derek is. Not only did he build CD Baby, but he's a musician with a CD behind him, and he's got a blog at O'Reilly. To top it all off, judging from his picture, he's some kind of neo-post-modern haircut that I can't even parse.

How did I come across Derek again? Out of curiousity, I did a search for "svn" at O'Reilly's new job-oriented social network site O'Reilly Connection, and he popped up. No, I don't know if it will be worth anything more than LinkedIn or orkut are. I'm a sucker for signing up for things, though.

tagged: , » 1 reaction

I'm a happy Subversion camper, I use it for all my personal projects. There's one thing I don't get about it though: tags. In CVS (or Perforce, or many other systems), I can create a tag (or a label as it is called in some systems). It's a symbolic name for a set of revisions of files. In Subversion, it would be a symbolic name for a revision of the repository.

Subversion provides tags, but is gleeful about how they are implemented with the copy command: a tag is simply a copy of a particular revision of a tree into another part of the repository. The typical instructions for setting up Subversion say to create three directories at the top: trunk, branches, and tags. The tags directory is to hold the eventual tags you will create.

OK, so I understand this, and I understand that making a copy doesn't really copy anything in the repository until the files are changed. And since this is a tag, the files will never be changed there, so the copy really is small in terms of space. But what happens to my working directory? If I ever go into the tags directory and use the update command, I'll pull out a copy of every file that has ever been tagged, once for each tag!

Is this right? I know I don't want to keep all those copies, so I can delete the working directories in my tags directory. They're still in Subversion, and the "svn ls" command will show them to me. I can pull out the ones I want with "svn up tags/SomeTagName". But I feel uneasy with "svn up" potentially pulling out a pile of files I don't really want. Is there some other step I can take to keep the genie in the bottle?

The next phase of Max's Madlibs program is reading the madlib story out of a file rather than having it hardcoded in the program. First we put them in .txt files, but then I suggested using a new file extension, since the program didn't care. Max thought having a custom file extension was very cool, so we started putting the text in .mad files.

As a geek, I always set my Windows explorer options to show all file extensions. But when I looked at the madlibs directory, something odd was happening. I saw "madlib.py", but story1.mad was listed as "story1". Where was the .mad extension?

I figured the answer must be in the registry somewhere, and it was. The registry entry for .mad (at \HKEY_CLASSES_ROOT\.mad) defines it as "Access.Shortcut.Module.1", which has registry values (at \HKEY_CLASSES_ROOT\Access.Shortcut.Module.1) of:

  • (Default): Microsoft Office Access Module Shortcut
  • IsShortCut
  • NeverShowExt

That "NeverShowExt" value prevents the shell from displaying the file extension. The "IsShortCut" value makes the shell put the little arrow overlay on the icon.

Of course, this obscure feature of Windows has been exploited by the bad guys to fool users into running malicious programs. Exactly what extensions are marked as invisible like this will depend on what software you have installed, but here's one guy's census.

This Microsoft article about these entries is a breezy bestiary including other exotic examples like AlwaysShowExt, NoOpen, OpenWithList, and NoFileFolderConnection. And just to make things even hairier, it turns out you can use a COM class id as a file extension!

tagged: » react

Jeff Atwood extolls the virtues of Microsoft Log Parser. It provides a SQL syntax for querying log files of diverse heritages. It sounds very cool, and damn handy. From a quick look through the source he provides, I didn't see how to plug in new input parsers, though the architecture diagram he shows has a block for them. With CSV and XML inputs available, I guess you could transform anything you like into something it could eat even without plugins.

tagged: » 3 reactions

A perfect entry for the beach weather at the end of August: Giant Disney Sand Sculptures (though ironically, because they are in Australia, the pictures were taken seven months ago!). I don't get it though, how these sculptures hold together. They must be using a different kind of sand (and a different kind of sculptor!) than I use.

A little digging (ha!) found this page in the Google cache, apparently from the site of the people who did the sculptures: Sand Sculpting Australia: About Sand Sculpting. It explains more about the materials and process.

tagged: ,   /   via: Luxo» react

My wife Susan will be interviewed by Joan Hamburg on WOR-AM in New York City this morning. It's one of many interviews happening these days, see the whole list at her new events page.

To listen to the interview live from work, I broke down and installed Real player. During the installation, I was asked to register, and of course didn't want to use my real email address. I entered "goaway@example.com", and was told, "That email address is already registered." LOL! So I put in "buggeroff@example.com", but it was also already registered. Holy cow! Now invasive registrations are a pain because we all keep choosing the same bogus email addresses! "suckeggs@example.com" finally worked.

tagged: » 7 reactions

My youngest son visited me at work some time ago, and left this drawing on my whiteboard:

A crowd of stick figures on a whiteboard

I like to leave these pictures up as along as I can, so they become part of the art in my work space. The other day, I was talking to a co-worker, and Pete was waiting to start another conversation. I heard Pete observe, almost to himself:

Boy, that guy is really mad.

Ben's explanation of the drawing: the top guy, and the three colored guys at the bottom (with the flat-bottomed heads) are Mr. Colors: Mr. Black, Mr. Red, Mr. Blue, and Mr. Green. The round-headed figures are Mr. Black's workers. Mr. Black is mad because his workers aren't doing what he told them to, especially the two workers at the bottom who are playing with the Mr. Colors.

Information Aesthetics is a blog focusing on the intersection of art and information presentation. It's chock-full of those cool arty projects involving databases, data feeds, graphs, scupltures, all that jazz. For example:

  • Color Code is "a full-color portrait of the English language." Actually, it is a tree map of nouns, clustered by meaning, colored by averaging the pixels of images found via Yahoo image search, and then sized by intensity. I'm not sure it reveals much (except that flowers, food, and surgeries have characteristic colors), but it's always interesting to see old information presented a new way. It was created by Martin Wattenberg, who also did Map of the Market.
  • Bitfall "is a physical water sculpture with 128 synchronized magnetic valves, so that a wall of falling water drops can be perceived as a graphical bitmap matrix."
  • Spore 1.1 "is a rubber tree plant for which the conditions for life or death are controlled by monitored fluctuations in the stock market price of Home Depot."

There's plenty more where that came from. Go take a look.

tagged: , , » react

I recently listened to Kent Beck speaking on Developer Testing. It's an interesting and entertaining talk. Kent is passionate and articulate about developers doing testing.

I thought his most interesting point was about "software health", which he contrasted with software quality. He defined quality roughly as how many bugs were in the software at a given point in time. Health is defined as how well the software will respond to stress, for example, changes in the environment, changes in the team, changes in the requirements, changes in the code, and so on.

I remember hearing a description of [a typical release process], and someone likened it to Jello. You've got this software, and it's like Jello and people are making changes, and it's shaking and it's shaking, and you think you're getting close, but the software's still shaking, and then it stops shaking just for a second, and that's when you ship it.

That's why I'm not interested in quality, I'm interested in health. Healthy software is not like Jello, it doesn't have that sense of "Oh boy, is today gonna be the day in which there aren't any bugs in my software?"

I didn't agree with everything he said (I don't think that offshoring is driven by accountability rather than cost, for example), but this guy's on the right track.

Chuffed

Thursday 18 August 2005

Max is re-reading a Harry Potter, and asked me what "chuffed" meant. He said it sounded bad, but the context made it seem good. Let's just say I'm chuffed to have found The Best of British, which explains these sorts of things to us Yanks.

tagged: » react

I used the term "meteoric rise" the other day to describe someone rapidly climbing through the ranks, achieving greater and greater status as they went. It's a common phrase used to refer to unusually fast success. But unless I'm mistaken, meteors don't rise at all. They only fall rapidly through the atmosphere, and their light is due to their incineration on descent, which usually results in their complete destruction.

As a metaphor for success, a meteor sucks. Where did this phrase come from anyway? Of course, I am not the first to notice the conceptual dissonance. Some have even used it to poetic ends.

This sounds like a joke, but is not. Jake Shimabukuro plays an awesome version of While My Guitar Gently Weeps on solo ukelele: While My Ukelele Gently Weeps.

tagged: » 1 reaction

The National Alliance for Autism Research raises money through fundraising walks all over the country throughout the year. Walk F.A.R. For NAAR is the signature fundraising event of the National Alliance for Autism Research and is the nation's largest Walk program dedicated to autism research. Since its inception in May 2000 approximately 171,000 people have participated in Walk F.A.R. For NAAR and collectively 65 events have raised over $18.3 million for autism research.

Last year my family and I walked and raised $1700. This year, we're walking with family and friends including Laurie Flutie (co-founder of the Doug Flutie Jr. Foundation) to raise money for autism research again, and to help promote my wife Susan's book, Making Peace With Autism.

To help, you can donate money, or you can join us in the walk:

  • To donate money, visit my fundraising page, and select "Click here to sponsor me". Any amount is greatly appreciated. Last year I was touched by the number of people who made even a small donation.
  • If you are in the Boston area, and would like to join us in the walk, it is Sunday morning, September 25th. Drop me a line to work out the details, or visit our team page and click "Join Making Peace With Autism" to become an official team member.
tagged: , » react

I was helping a friend navigate the Xlibris web site: we were trying to find guidelines for formatting a poetry manuscript. After doing it the hard way (following links) for a while, I figured I would try their search for "poetry". I was flabbergasted to see these results returned:

Search Results for 'poetry'

Please note: if you are searching for a specific book or author, you should search in the bookstore

index.asp

wong.asp

index.asp

org.html

index.asp

index_apr2002.asp

faq_submissions.asp

events.asp

index.asp

faq_submissions.asp

index_mar2003.asp

index_mar2002.asp

index.asp

and so on. What year is this, 1993? Forget the relevant content of the pages with the search term highlighted, can't we even get the titles of the pages? I did another search (I forget for what phrase) that returned "index.asp.bak" as one of the choices!

tagged: » 4 reactions

A commenter on my Madlibs story (Blake Winton) complained that his perfectly valid email address was being refused by my email validator. His email address has a plus sign in it, and my validator didn't like it. I was using this regex:

^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4})$

Recognizing the limitations of this validator, I thought I would look up the real rules for email addresses. They are spelled out in RFC 2822, but after digging through there, nothing was clear at all. Not only are many characters allowed that I have never seen in email addresses (~ # ? { *), but there are also a handful of different quoting mechanisms!

Helpfully, Paul Warren has written a Perl regular expression to deal with all of the complexity. It is a 6200-character behemoth, and I don't intend to adapt it for my use!

Of course, some of this complexity is for full addresses that won't be entered into a comment form, but where to draw the line? For now, I've added the other special characters as allowed. If I get more complaints, I'll revise further.

tagged: , » 8 reactions

ShotCode is yet another scannable URL technology. It's kind of like TinyURL crossed with barcodes, aimed at people with cell phone cameras. It seems like a great idea: the site has an animation of a guy looking at a concert poster, and he buys tickets just by aiming his cell camera at the ShotCode on the poster. Unfortunately, I don't think it will fly, mainly because it requires the cell phone user to download ShotCode software into their phone. The whole idea of the thing is to enable people to do impulse Internet purchases with their phone. Who downloads software into their phone so that they can later make impulse purchases?

Also, for commercial use, you have to pay to use ShotCode technology. That's understandable, the company has to make money. But the technology won't take off until ShotCodes are everywhere, so that people will download the software into their phones. And they won't be everywhere if you have to pay for the privilege of being accessed by a (currently) tiny set of people.

The whole thing is eerily reminiscent of the :CueCat, which is now relegated to the dustbin of silly bubble ideas. Joel Spolsky ably explained why the :CueCat was a dumb idea even before the whole thing went under.

via: SimpleBits» react

My son and I did some more work on our Madlibs program. New features include random ordering of questions, and reusable words. Along the way, we discussed dictionaries, member variables, encapsulation, and polymorphism. Read all about it in the ongoing saga of Programming Madlibs.

tagged: , » react

A 13-year-old, shopping for a cell phone, derisively:

A can't believe they still make cell phones without a camera!

VIP

Thursday 4 August 2005

Heard yesterday: a new definition for do-nothing management types at tech companies:

VIP: Vest in Peace

tagged: » react

Two random yet related links I came across made a synchronicty in my mind, so I present them to you:

First, a story in the Wall Street Journal about Why the U.S. Wants To End the Link Between Time and Sun. This is a thorny problem: I've seen mention in various time libraries to the fact that the seconds component can have a value from 0 to 61 (to accomodate two leap seconds!). Adding them randomly at two points during the year does seem like an inconvenience. And while I wouldn't usually support changing science to accomodate ill-informed engineers, the other side doesn't have a very strong argument either: that severing the link between the earth's orbit and time would be an inconvenience to astronomers. Don't astronomers have to do all sorts of crazy space-math all the time anyway? They're the ones that figure out when to add the leap second, so why can't they just remember that the rest of us didn't add one, and compensate for themselves?

Second, Streetclock is an art project about turning common street objects into sundials: signposts, building edges, and so on. It's a nice idea, but it wouldn't work. Building a real sundial is complicated, and has to take into account the latitude of the dial. There are things like analemmas to take into account. But it's a cool art project.

tagged: , , » 1 reaction

I find it fascinating that something as simple and ubiquitous as the mouse can be the subject of constant innovation. Apple has come up with a typically sleek, simple, and catchily named new mouse: Mighty Mouse.

tagged:   /   via: T-Blog» 5 reactions

Damien takes the occasion of the 2005 Programming Languages Achievement Award to exclaim, "the whole design patterns thing is an over-hyped crock of shit."

I respectfully disagree, except with maybe the "over-hyped" bit. If you look back at the 50 years or so we have of programming language history, and indeed, the 75 years or so of computer science, a large part of it has been concerned with naming and then studying ever-larger units of computation.

Before Fortran, people wrote programs in assembler. Fortran's innovation was to say, "If you look at assembler code, there are chunks of instructions in there that are really units. Let's call those things statements, and make it possible for you to talk about statements instead of instructions." That was a big step forward.

Algol and its ilk said, "There are chunks of statements that really should be isolated as a new unit, let's call them functions." (I know: Fortran had functions, but it didn't get them the way that Algol got them.)

Simula and Smalltalk said, "There are chunks of functions and variables that really should be considered as a unit, let's call them classes." And so on.

To the cynics of the time, none of these steps was particularly interesting. People still write C code where "object-oriented" means a structure and a collection of functions which take a structure pointer as the first argument. They were doing that before OO was big, and they're doing it now. That doesn't mean that object-oriented programming (whatever it means to you) wasn't an important step forward.

Heck, there are people that think Fortran's innovation of writing statements was no big deal. But most of us agree that it was.

The Design Patterns insight was that collections of classes, and especially the way they interact, are new units that deserve names so we can talk about them explicitly. Is this earth shattering? No, but it can be powerful, and not just because it gives us a shorthand in design meetings. Seeing the interaction between classes as a phenomenon deserving of terminology is an important idea for people designing software. Sure, people have been getting classes to interact for decades, how else would software work? But recognizing this level of system design, and creating a language for thinking about it, reasoning about it, and discussing it, is a big step forward.

Of course, patterns can be ridiculed, and of course, some people will earnestly credit them with solving world hunger, or something equally ludicrous. Just because something is over-hyped doesn't mean it is unworthy of praise.

I say, "Congratulations and well done" to Gamma, Helm, Johnson, and Vlissides.

« | » Main « | »