most recent entries
The Little Engine That Could: Hidden Lessons
Copy-protected DVDs
Guilty dogs
Steve Jobs 2005 Commencement Speech
2009 Tour of Flanders: Devolder makes it two
Capitol 10k - The Pace Curve
How to do bulk file rename
Glossy 15" MacBook Pro - No Thanks
Calorie consumption
Sun JVM, Windows, system clock drift
OmniDazzle now free
Tomcat + Gzip
iTunes Dooad is rated Excellent!
Troubleshooting cable modem
Unsubscribe in 10 days
shouts
Thomaz Edison
lots of interesting stuff
John Pointer
a super-talented musician in Austin
Austin Bloggers
a meta-blog about Austin
Austin Real Estate
written by interesting realtors in Austin
John Curtis
writes about Texas bike racing

"The Little Engine That Could" is a children's story that delivers several lessons to the reader, some of which are obvious and others less so. I read it as a child and remember the obvious lesson of "think positive". Having read it repeatedly during recent weeks (by request of my son), I've come to understand and appreciate the less-obvious lessons, and I feel obligated to share these bits of wisdom with others.

Obvious Lessons


  1. Think Positive - as long as you believe in yourself, you can accomplish great things. "I think I can, I think I can, I think I can." And then of course you do. It doesn't always work out like this in life, but there is truth to the power of positive thinking. This is the main lesson we get from The Little Blue Engine.
  2. Don't Be Negative - if you can't think positive, at least don't be negative; by not believing in yourself, you will certainly not succeed. This lesson is a bit more hidden than the first. It comes from the old, tired engine who just doesn't believe in himself, so that's the reality he creates - he thinks he can't, he can't, he doesn't. What does being negative get you? Nothing, so don't do it.

Less Obvious Lessons


  1. Maintain Your Vehicle - shown in the context of a train, but applies to cars, too. If you don't maintain your vehicle, it might break down and cause a ton of problems. Not just for you, but everyone else involved. And if it was preventable through regular maintenance, then whatever chaos ensues as a result of your broken-down vehicle is ultimately your fault. This comes from the very first engine in the story who was obviously not well-maintained, and breaks down as a result.
  2. Don't Put All Your Eggs In One Basket - if you do and the basket breaks, you're shit outta luck. In the story, we are reminded of this lesson repeatedly - if the train doesn't make it over the mountain, then the kids won't have food or toys. Really? They've got nothing else to eat over there? And no toys? We're led to believe the children are sitting over there, presumably staring at the wall, hungry, bored, waiting for this train. (Sounds like most of Africa, but I don't see anyone writing cute children's stories about that.) Anyway, is the situation in the story really so dramatic? "Damn, if that train doesn't make it here by tomorrow, then the children are gonna starve! And be bored, too - no toys!" Whoever runs that town needs to wise up and get some more goods flowing in. And maybe inform the toy clown that he should tone it down a little because children in Ethiopia would love to have a train of food and toys show up late instead of not at all.
  3. Just Because Someone Is In Charge, They Could Still Be A Clown - pretty self-explanatory. Leaders are often buffoons. In the story, the leader is a toy clown. In real life, many leaders (bosses, managers, directors, etc.) are often clowns, too.

Copy-protected DVDs
more from blah
Jun 13, 09

What's up with film studios deliberately crippling DVDs?

While trying to create my own iPhone version of WALL-E, I've discovered that Disney crippled it with ARccOS. I own a fully-legal copy of the movie (3-disc set, no less), but due to ARccOS copy-protection b.s., I had to jump through several hoops to get the full-length movie onto my computer. I finally did it, and I hope others do it, too.

I'm not file-sharing or doing anything illegal, just want it on my iPhone. They do include a "digital copy" that will supposedly allow me to put the WALL-E movie on my computer, but it's just more copy-protected wankiness, has an access code, limitations, etc.

This really only serves to annoy paying customers, and does nothing to discourage thieves/pirates. I mean come on, all you need to know is which track to rip (30, in the case of WALL-E), and whether to time-shift the video (38 to 40 frames, possibly none at all depending on who you ask). Most 12-year-olds probably figured that out, and then the rest of the low-tech customers are just mad that they can't put the movie onto their kids computer. Nice going.

Someone pointed out in the forums that it's easier to download an illegal, pirated copy than it is to create your own backup copy from your own legal DVD. I think they're probably right. Wake up, Disney.

Guilty dogs
more from blah
Jun 12, 09

They did a study where they sometimes tricked dog owners into thinking the dog had done something they shouldn't do when the dog had in fact done nothing wrong. Basically the dog's expressions had nothing to do with anything, the owners behavior and conclusions of guilt/innocence are really the only factors.


Can dogs really look 'guilty'?


Researchers concluded that any such "guilty look" is a response to human behaviour and has no relation with the dog's actions or sense of having broken any rules.

I've heard about this several times, but never seen it. They say it's very inspirational. At a brief 15 minutes, I can't imagine it's not worth watching. Jobs is usually a captivating speaker, even when talking about mundane stuff.

While looking for an audio copy, I found a video version instead. Available on iTunes, and free.

Stijn Devolder took the Tour of Flanders for the 2nd year in a row. What a beast. I was rooting for Haussler (especially after he got nipped on the line in San Remo), but damn, gotta respect Devolder just storming away from the lead group on the Muur, 18km from the finish, and riding solo all the way to the finish. Nice ride!

http://www.youtube.com/watch?v=v9w5bhSnZE8

Capitol 10k - The Pace Curve
more from blah
Mar 30, 09

Click to enlarge

Here's a chart I made by extracting data from the overall results of the 2009 Capitol 10k. It shows the number of timed participants for each overall pace.

They sold 7,000 timed registrations (according to the initial registration form), of which 6,644 runners completed the event (according to the official results page). There were ~18,000 participants in total (according to news reports), so ~11,000 completed did the event un-timed.

Anyway, for the timed runners, you can see pretty clearly how people did.

How to do bulk file rename
more from dev
Mar 18, 09

How can you do bulk file rename using shell tools?

The wrong answer is: mv *.OLD *.NEW

The easy answer is a shell loop, should be pretty straightforward. Or maybe even a simple Perl/Ruby/etc. script.

But it's also do-able using find with some other tools. Turns out that's rather awful. This is what I came up with to make it actually work using find, and as far as I can tell, it adds zero practical value over a basic shell loop. I spent a few minutes trying to use -exec, but that got hairy when using {} twice, and also when the output contained full paths from subdirectory traversals.

find . -name "*.OLD" | sed 's/^\(.*\).\(OLD\)/cp \1.\2 \1.NEW/' | awk '{system $0}'

Another option would be using xargs. If you wanted to rename all ".txt" as ".txt.OLD" (variation from above), that would be:

find . -name "*.txt" | xargs -I % cp % %.OLD

The example I initially gave is a little harder -- .OLD to .NEW -- you could use sed, too, in order to remove the file extension, like this:

find . -name "*.OLD" | sed 's/^\(.*\).OLD/\1/' | xargs -I % cp %.OLD %.NEW

Or you could use basename instead of sed, and call xargs twice, like this:

find . -name "*.OLD" | xargs basename -s .OLD | xargs -I % cp %.OLD %.NEW

This is a nice interview question for someone with Unix chops, because it can (should?) lead to a short discussion of shell tools.

The new MacBook Pro is a step backward from the previous version.

I used a brand new 15" MacBook Pro (backlit LED display, glossy screen, black border, extruded keyboard, etc.) for more than 3 weeks while my previous MacBook Pro was being fixed (it was hit by NVidia graphics failure). My old MacBook Pro finally came back, I've migrated my work back to it, and I'm happy to switch back.

Overall, I'm suprised at some of the changes Apple has made, a few of them are particularly bad.

Glossy Screen

This one just makes no sense to me. I don't know what MacBook (non-Pro) users thought of the "glossy-only" option, but everyone I know who uses a MacBook Pro for work complains about this. And they're right - the power of a laptop is that you can take it with you, and 3 weeks has told me I had no idea how much variance there is in lighting during the day.

But thanks to the new glossy screen, I was painfully aware of windows, lamps, overhead lights, anything flashing, anything moving within 50 feet.... This may be my single biggest beef with the 15".

Why did they do it? Apple knows the glossy screen blows, which is why they offer a $50 upgrade on the 17" model. But no upgrade on the 15"!

New Trackpad

This one is pretty bad, a close 2nd behind the glossy screen. I'm not the only person who noticed that the trackpad button makes my fingers tired. I found myself trying to avoid using the mouse altogether. Note that I use an external mouse/keyboard most of the time, so for me to rate this as a big complaint is significant.

When they increased the trackpad size (to accomodate frivolous mouse gestures... seriously, they're just fluff) they also increased the trackpad so much that you'll find other parts of your hand accidentally touching the trackpad surface, which creates screwy mouse input.

The mouse software ain't all there... maybe they've fixed it in recent updates, but I couldn't get double-click-and-hold to work, nor could I reliably double-click-and-drag to select text. Just forget it. I asked another saavy Mac user to try on the new MacBook Pro, and he couldn't do it either. I ended up disabling all of the fancy mouse features (including basic double-click stuff that the old MBP - and every other Mac laptop for the last 8 years - did just fine). Lame.

New Keyboard

This may just be personal preference, but I like the old / traditional style keyboard better. I heard the justification is that keycaps pop off more easily on the previous scissor-style keys, so these new rectangle button things don't come back for repairs as much. I don't know. I type a lot, and I type fast on the old keyboard, but on the new one I type slow. Why should I get used to it? It was a good keyboard before.

New DVI Port

You cannot use a DVI display without spending $20-30 on a special mini-DVI-to-DVI connector. Grr. And if you want to use a projector, you have to buy a 2nd connector, this time mini-DVI-to-VGA. And no, you cannot use a DVI-to-VGA adapter with the first connector you already bought, because the interlace pins don't line up. And if you chop them out, it won't work (I know a guy who tried).

There's ~$50 in crap just so you can use your brand new computer the way you used to. My previous MacBook Pro (and PowerBooks before that) included these connectors for free.

Firewire 800 Only - No Firewire 400

This is just a plain nuisance. We have lots of Macs around the office, and I have Macs at the house. Everyone and their dog uses FW 400 cables, but when it came time to migrate my data from old to new MBP, I had to... go to the freaking Apple Store and spend $40 on a Firewire 800 cable.

This cable + mini-DVI connectors + tax is ~$100 in crap.

No Front Row Remote

Admittedly, I haven't used this much, but it used to come free with your computer, and now you have to pay extra. They've already got you buying display adapters and Firewire 800 cables, why not add to the fun and pay extra for a remote, too?

Screen Hinge Moves Too Easily

This must have been a complaint point from weak, lazy users, I can't think of anything else that would justify the insanely friction-less ease with which you can now close the laptop screen. It's a laptop people, so when you move the computer it would be really nice if the lid didn't glide shut in the process. And no, I'm not exaggerating. Several times I had my work interrupted, connections closed, etc. because the lid slid shut on its own.

Removed "Enter" key, now "Option" key

I don't understand this. "Enter" and "Return" behave differently, and for years Apple laptops have included both. Now, for some reason, they decided they needed a 2nd "Option" key. Why?

Speed Feels The Same

This is just subjective, but most of the time, a laptop upgrade includes a snappier, faster feeling. But this didn't. I went from the non-glossy 2.4 ghz MacBook Pro to glossy 2.53 ghz MacBook Pro (4gb ram in each), and it felt... just about the same. I did some benchmarks, and the numbers were a little higher on the 2.53 in a few areas, actually lower in others. Why doesn't the new "faster" MacBook Pro actually feel faster?

Silly Shortcut Keys

They re-did the shortcut keys from previous laptops, so in addition to default keys for Dashboard and Exposé (I'm ok with these, OS-wide features that are practical for all users), they added keys for iTunes which just reeks of dumb Microsoft "multimedia keyboard". Come on Apple, this is a $2,500 computer.

Can we please avoid keyboard buttons that appeal to 8-year-olds? Or maybe just go with it and add "Post New Tweet" and "Update Facebook Status" buttons? I bet the kids would like those, too.

Calorie consumption
more from cycling
Mar 15, 09

I just read an interesting question & answer at www.cyclingnews.com - "Eating on the bike". I don't know that I've seen anything definitive about caloric absorption rates (during exercise or otherwise) so the response from Scott Saifer is pretty interesting:

"... typical [caloric] absorption rates quoted are in the vicinity of 150 calories per hour for small, un-fit people, up to 325 or so for large, fit, genetically endowed people on good days ..."

The original question was posed because energy food manufacturers have suggested/recommended serving information that would have you consume 900+ calories per hour, which makes no sense whatsoever, except for the company that stands to make more cash by selling you more energy food.

I've been digging into some odd behavior that ultimately traced back to periodic changes to Windows system clock. After doing some research, I've found that:

  • Sun's JVM (through 1.6) has a bug that pushes the system clock into the future faster than real-time.
  • I've observed clock drift by as much as 3 minutes in 1 hour
  • there's no single trigger that your code can do (or avoid), it seems many people have observed the clock drift in different scenarios
  • the bug is still open in Sun's bug database: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6435126
  • as of June 2006, they're targetting Java 7 for a fix, and as of March 2009 the bug is still open
  • this affects Windows only, and the underlying cause is ultimately something screwy with clocks and timers on Windows

The Sun-recommended workaround -- as documented here http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6435126 -- is to create a zombie thread at JVM startup. This has the effect of fixing the clock drift issue on Windows, not sure if this needs to be excluded/ignored if you have a multi-platform product, but it should be pretty straightforward to do an OS check and ignore if OS != Windows.

new Thread() {
	{ this.setDaemon(true); this.start(); }
	public void run() {
		while (true) {
			try {
				Thread.sleep(Integer.MAX_VALUE);
			} catch (InterruptedException ex) {
			}
		}
	}
};
OmniDazzle now free
more from apple
Feb 28, 09

Download here: http://www.omnigroup.com/applications/omnidazzle/

I've been using OmniDazzle since it was in beta, bought a license as soon as it was available. It's hands-down one of the most useful apps I've ever used, especially in the workplace.

As of Wed Feb 25, 2009, OmniDazzle is now totally free.

I'm not sure why they changed the license. When I bought it, I paid $15, and I assume they were still charging the same until recently. I guess by making it free, they don't have to focus as much on fixes/tweaks/updates, although the app seems to be pretty stable... since purchasing 1.0 in June 2006, they've only released a handful of minor updates, even now they're only at version 1.1.

Anyway, all Mac users should grab this utility now. It's both useful and silly, and at $0 the price is just right.

Tomcat + Gzip
more from dev
Feb 5, 09

While doing some performance testing for a Tomcat-served webapp, I discovered you can enable automatic gzip compression based on content-type. In basic testing, this resulted in ~65% decrease in data transmitted from server to client. Considering a page with 400k of content, that could shrink down to 100 or 150k total. Good stuff.

A great tool for performance benchmarking is YSlow (http://developer.yahoo.com/yslow/), which hooks nicely into Firebug. Using YSlow I was able to see as much as 80% reduction in transmitted data after enabling Gzip.

Note that Tomcat will not compress content unless the browser identifies itself as understanding Gzip compression, which it does on each inbound request.

Here are the steps to enable Gzip in Tomcat:

  1. edit conf/server.xml
  2. find the Connector, should look something like this: <Connector acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" maxHttpHeaderSize="8192" maxSpareThreads="75" maxThreads="150" minSpareThreads="25" port="8080" redirectPort="8443" maxPostSize="0" />
  3. add the following: compression="on" compressionMinSize="512" compressableMimeType="text/html,text/xml,text/plain"
  4. based on Connector definition from above, mine looks like this after making the change: <Connector acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" maxHttpHeaderSize="8192" maxSpareThreads="75" maxThreads="150" minSpareThreads="25" port="8080" redirectPort="8443" maxPostSize="0" compression="on" compressionMinSize="512" compressableMimeType="text/html,text/xml,text/plain" />
  5. restart Tomcat

Reference documentation for v5.5 here:
http://tomcat.apache.org/tomcat-5.5-doc/config/http.html

iTunes Doodad won an award today. It has been certified as "Excellent" by FindMySoft.com. They made me a custom graphic, too.

I can hear it already... some of you are you saying, "So what? That graphic was probably auto-generated by robot software". But hey, how many auto-generated robot graphics have been sent to YOU on behalf of a website you've never heard of? Mmm hmmm, that's what I thought.

But you know what, don't focus on the negative, man. If you are true to yourself, with a lot of hard work, you too can follow your dreams and have a robot stranger send you a graphic that you can post on your website. And that'll just be the beginning.

Ok yeah, I'm done. It's neato though, their website seems legit, has Google PR 5/10 so it's not some fly-by-night scam. But it doesn't take over my personal favorite "included in Japanese Mac magazine" success. They sent me 2 copies after they published it, couldn't read a damn thing.

Troubleshooting cable modem
more from info
Jan 16, 09

I've been having issues with my cable modem, decided to do some digging. First, from within my home network, most cable modems will respond to this url:

http://192.168.100.1/

Mine has basic info, but I want to see Power and Signal-to-Noise Ratio (SNR), preferably both downstream and upstream. Quick Google showed me how to access the locked screens on my cable modem (WebSTAR DPC2100R2):

http://192.168.100.1/_aslvl.asp
set "Access Level 2"
login: admin
password: W2402

Then I could see Power and SNR numbers, for both downstream and upstream. If those numbers don't make sense to you, this is a good reference for cable modem signal levels.

Unsubscribe in 10 days
more from blah
Nov 27, 08

I've been on mailing lists before, and take it for granted that "unsubscribe" means "right now". For Microsoft, it means "within the next 10 days". I wonder, is that business days or calendar days?

I submitted feedback to Microsoft a while ago as part of a survey they were doing, I don't even remember what it was. But every now and then, they send me additional survey requests. I got another one today and finally made the effort to click "unsubscribe". A moment later, I received the following automated email response:

From: winsurv@microsoft.com Subject: Windows Feedback Program removal confirmation Date: November 27, 2008 2:49:44 PM CST To: ******************

We have received your request to leave the automated feedback program and survey feedback program. Your request will be processed within the next 10 days.

Test of Civic Literacy
more from blah
Nov 21, 08

I just took the Test of Civic Literacy. There are 33 questions, some of which were a little challenging, while others were just.... not challenging.

For example:

21) Name two countries that were our enemies during World War II.
A. Canada and Mexico
B. Germany and Japan
C. England and Spain
D. China and Russia

According to their survey results, ~67% of respondents answered correctly. That means 33% got it wrong! Think about that. Roughly 1 in 3 people could not figure out the answer! I knew there were stupid people in this country, but this shouldn't even count as being smart. Everyone should just blurt this one out, no thought required. Canada and Mexico? w.t.f.

Another stunning question...

28) A progressive tax:
A. encourages more investment from those with higher incomes
B. is illustrated by a 6% sales tax
C. requires those with higher incomes to pay a higher ratio of taxes to income
D. requires every income class to pay the same ratio of taxes to income
E. earmarks revenues for poverty reduction

1 in 2 people answered this incorrectly. Now, maybe this one is a little "harder", requires some reasoning if you aren't sure what "progressive tax" means. But the respondents included elected officials (at some point in time, at various levels, doesn't specify exactly which positions). And they break down the results explicitly:

  • 49.97% elected officials got this correct, which means
  • 50.03% got it wrong!!

Again, we're talking about elected officials.

If 1 in 2 elected officials are incapable of deducing the correct answer from the choices presented, how can they figure anything else out? And these people are in charge of our government? This is like a really twisted, sick joke.

By the way, the survey results state the following:

Of the 2,508 People surveyed, 164 say they have held an elected government office at least once in their life. Their average score on the civic literacy test is 44%, compared to 49% for those who have not held an elected office. Officeholders are less likely than other respondents to correctly answer 29 of the 33 test questions.
Obama wins
more from blah
Nov 5, 08

Click to enlarge

Sweet, rigged voting machines isn't just an issue in Ohio and Florida, now it's happening in West Virgina, too.

Voters have been noticing rigged voting machines in West Virginia (conveniently operated solely by the Republican party) to automatically cast all votes for McCain (and every other Republican candidate on the ticket).

West More W.Va. voters say machines are switching votes

"I pushed buttons and they all came up Republican," she said. "I hit Obama and it switched to McCain. I am really concerned about that. If McCain wins, there was something wrong with the machines.

"I asked them for a printout of my votes," Ketchum said. "But they said it was in the machine and I could not get it. I did not feel right when I left the courthouse. My son felt the same way.

Wassup 2008
more from blah
Oct 25, 08

Wassup 2008