Myst: The Movie
Oh, God:
Keeping with the video game adaptations trend, news has come out regarding a very independent film version of the wildly popular game series, Myst.
Geeks Of Doom
Great, that’s all we need: an hour and a half of watching one guy stumble around a richly-detailed environment, flipping random switches to see what they do and occasionally pounding his fist against the ground uselessly where there appears to be something useful that doesn’t do anything.
If they stayed true to the games he’d just give up after the first half-hour.
Code Like An Asshole #2
In C++:
class Foo {
public:
Foo( void ) { delete this; }
};
Dumb Jokes
Q. What do you get when you cross a helicopter, an elephant, and a rhinoceros?
A. Hell if I know.
Q. What do you get when you cross a mosquito with a mountain climber?
A. You can’t cross a vector with a scalar.
Q. What do you get when you cross Tony Soprano?
A. Broken knees.
Q. What do you get when you cross the picket line?
A. A paycheck.
Leopard Foreboding
The first thing I did after I installed OS X 10.5 was fire up the new Interface Builder to see what had changed. I dragged a few widgets into a window, played around with the menus for a bit, and then triggered an assertion failure (leading to a hard crash) by trying to select a child element of something that didn’t have a child element.
Total time spent to find one crashing bug: under three minutes.
This does not bode well.
Check Please!
I’d like to ask you, dear internet, for a reality check. Over the past two months I’ve been working on a little side project, and I’ve got it working to the point where I have to ask myself (and, by extension, you!) whether or not it’s worth the effort I’m putting into it.
It’s a web application framework called Kudzu.
It’s similar in spirit to Ruby on Rails, but with several important differences that I’ll outline in this entry. It is by no means complete or ready for general use — among other things, half of the objects aren’t implemented, and it doesn’t leak memory so much as spew memory in every direction — but the most basic features work, and I think that the most basic features are also the most alluring.
Kudzu is scripting language agnostic. I’ve described Kudzu to my nerdier friends as ‘a scripting language without the language,’ and that’s more or less accurate. Kudzu defines all of the stuff you’d expect a scripting language to have — class definitions, inheritance, properties, methods, and so forth — but does not define an actual syntax. Instead, Kudzu relies on scripting connectors, which translate Kudzu objects into a pre-existing scripting language.
Kudzu can use almost any existing scripting language. Currently, there are Perl and Javascript connectors, and they are both fully functional. I’ve taken a cursory enough glance at Python and Lua to see that it would be possible to connect them, but I haven’t begun that work yet. Any scripting language that can be embedded or extended will most likely work.
Kudzu applications are bundles. This idea is borrowed from OS X. Kudzu applications are directories which contain all of the templates, code, images, etc. needed to run the application, along with a small manifest file. Distributing the application is just a matter of compressing the directory and posting it somewhere. All of the runtime information is kept separate — preferences, db configuration information, that sort of thing.
Kudzu provides a rich data modeling environment. Similar to RoR’s ActiveRecord and Cocoa’s Core Data, Kudzu has a modeling environment in which you define the entities your application uses, and the properties of and relationships between entities, and Kudzu handles the fine details of how records are written to the database.
Kudzu handles all of the ‘overhead’ every web application needs to handle. The Kudzu core handles login / logout, session tracking, templates, form processing, cache control, and so forth. You retain the ability to muck with, for example, the outgoing headers, but it’s purely optional. In the simplest cases, all you have to worry about is your application’s actual logic.
Kudzu provides a rich cross-application ACL. If you’re running a Kudzu-based message board, and you add a Kudzu-based calendaring application to your server, all of the users of the message board can use the calendar without needing to create new accounts. You can assign members into groups and allow or deny them certain features in each application individually, but they’ll only need to log in to your website once to get access to all of the Kudzu applications you run.
Kudzu has a built-in plugin mechanism available for applications to use. So if you’re developing the Great Internet Web App, there is an existing, available, easy way for you to allow your users to develop extensions to your application. Plugins can extend the capabilities of an individual Kudzu application, or they can introduce new object types which are then made available for all Kudzu applications.
Those are the main things that make up Kudzu.
When you shake it, a lot of very neat things fall out of all of this. For example, if you’ve got an application written in Perl, and someone who only knows Javascript wants to write a plugin for your application, they can do it, and it will Just Work. (There’s a very slight speed hit in this case, because Kudzu has to translate back and forth between the two languages, but it’s actually minimal compared to, say, a database query.)
Since there’s a Javascript interface into Kudzu, you can write form validation scripts which can be executed on both the client and the server side. Just to be clear, the same code, not similar code — you only have to write the validation step once, and you get quick feedback for the client side and certainty on the server side.
When developing a Kudzu application, there are really only three things you need to worry about: the data model, the application logic, and the templates. The data model is simple, it looks something like this:
namespace Frobulator;
entity Widget {
string name minlength(5) maxlength(50);
number dingCount optional;
relationship gummies entity(Gummy) toMany reverse(widget);
}
entity Gummy {
binary flavor;
relationship widget entity(Widget) reverse(gummies);
}
I’m hand-waving here, but that’s the gist of how you define a data model. Each one of the entity descriptions gets translated into a Kudzu class, and all of the glue code gets written for you so you can use them in your scripts natively. The actual database might be MySQL, SQLite, or some other database; you don’t have to worry about that when you design the model. The model gets translated into whatever bizarre dialect of SQL you choose when you install your app.
Right now SQLite and MySQL are supported and working, but this is easy to expand in the future.
The application logic is equally simple: you just provide a script-native object to use as a ‘delegate’ to the application, and define a series of methods on that object which correspond to the PATH_INFO required to get there. For example, if you’ll allow me to slip into Perl:
package Frobulator::Delegate;
use strict;
sub new { # not a method
my $package = shift;
return bless {}, $package;
}
sub Index { # handles / and /index
my $self = shift;
my $app = shift;
return $app->error( 'Only the /about/frobulator page works.' );
}
sub About { # handles /about
my $self = shift;
my $app = shift;
return $app->error( 'No, really, you must use /about/frobulator instead.' );
}
sub About_Frobulator { # handles /about/frobulator
my $self = shift;
my $app = shift;
return $app->error( 'Just kidding, this is broken too.' );
}
1;
That’s a complete (if somewhat useless) Kudzu application. The function names represent the PATH_INFO by breaking them apart at the slashes, camel-casing individual words, and mashing them back together with underscores, so for example:
/about/frobulator/more becomes About_Frobulator_Mode
/console/to-do-list becomes Console_ToDoList
There’s a back-off routine which tries to call methods in sequence, so if you have a PATH_INFO of /really/long/path/info/string, Kudzu will try to call the following methods:
Really_Long_Path_Info_String
Really_Long_Path_Info
Really_Long_Path
Really_Long
Really
Index
(throws an error)
Anyway, the application above can be written in Javascript instead:
function FrobulatorDelegate() {
}
FrobulatorDelegate.prototype.Index = function( app ) {
return app.error( 'Only the /about/frobulator page works.' );
}
FrobulatorDelegate.prototype.About = function( app ) {
return app.error( 'No, really, you must use /about/frobulator instead.' );
}
FrobulatorDelegate.prototype.About_Frobulator = function( app ) {
return app.error( 'Just kidding, this is broken too.' );
}
As far as templates are concerned, there’s only one working template engine Kudzu uses right now, but the plan is to make it extensible in the future, to support ClearSilver, or Smarty, or whatever. The syntax is pretty simple, an extension of the engine I wrote for Diary-X, and pretty similar to every other templating engine on the planet. It handles compound variables, has basic control flow (if/else, foreach, while), function calls, server-side includes, and so on.
In all, the development is about 20% complete. I’ve got Perl and Javascript working together — Kudzu is actually bootstrapped in Perl at the moment, with about 6-8 Kudzu classes actually implemented in Perl instead of C. I have DB connectors for MySQL and SQLite both working (at least, they were working). I don’t have the template system ported into Kudzu yet, and I have to clean up the Entity / Model stuff a little before it’s functional.
You can still write a basic test application to prove the principles, though. See Cleanenger, compared to the Javascript-based source. Also look at /about and /about/cleanenger for the full effect. The application object is a bootstrapped Perl object, and its implementation is woefully incomplete, but the error method works.
So, to summarize:
- Kudzu is a new, unreleased web application framework.
- Kudzu provides an MVC framework in which each part can be chosen by either the developer or the user.
- Kudzu allows multiple applications to seamlessly integrate with each other, so that users can be logged in to all of their applications simultaneously.
- Kudzu handles most of the low-level details so that you don’t have to.
- Kudzu allows plugins written in one language to communicate seamlessly with applications written in another language.
The question of the day: is this marketable? I don’t mean in the monetary, ‘can I make a buck off of this’ sort of way; I mean: if this was fully developed, would anyone use it? Is there a place for it somewhere in the long tail?
Number of Horns on a Unicorn Acre In Teaspoons Per Light Year
Google: Number of Horns on a Unicorn Acre In Teaspoons Per Light Year.
Spoiler: the answer is 7.767 × 1024.
“Teaspoons per light year,” which is about 521 square picometers, might be the strangest unit of area I’ve ever seen.
Hot Gasoline
In St. Louis local news, there’s a brouhaha over ‘hot gas’ — how the gasoline companies have conspired to gouge us at the pump because they don’t take into account the current temperature of the gasoline being pumped.
Stories like this come up at lot, at least in St. Louis, thanks to the ‘investigative reporting’ (read: badly-informed muckraking) of NBC 5’s I-Team and Fox 2’s You Paid For It. These stories are always a mixture of baseless accusations, impassioned posturing, and men in suits trying to get back to their jobs.
“We tried to talk to alderman Joe Smith by showing up to a scheduled board meeting with a camera crew and lights and shoving a microphone in his face, instead of scheduling a meeting with him and agreeing on a time to interview him. He refused to talk to us and threw us out of the meeting. What is he trying to hide?”
But sometimes the stories are so off-base that they make the scientist in me cringe, and the ‘hot gas’ story is one of those. This has been going around on talk radio for a while, and I hear people in the gas stations bitching about it (because they heard about it on the radio).
Fill ‘Er Up
The crux of this controversy over hot gasoline is that gasoline, like most other liquids, expands when it is heated. (Even water does this, although weird stuff happens to water when it cools, but that’s another story.) So when you pump 10 gallons of hot gasoline into your car’s gas tank, it will be less than 10 gallons when it cools off.
The real problem here is that we measure gasoline in gallons (a volume), when what we’re really interested in is joules (a measure of energy). It’s sort of how we weigh ourselves in pounds (a force), when what we’re really interested in is kilograms (a mass). We’ll encounter a similar controversy, I’m sure, when we finally populate the moon. Weight-conscious people will take a vacation to the moon, step on a scale and say “Hey! I only weigh 33 pounds here, but on Earth I weighed 200 pounds! Why does the Earth government want me to think I’m heavier than I really am?”
(I’m just kidding, of course. When we finally populate the moon, the scales will be calibrated to show what you would way in Earth pounds, even though that number will have essentially no meaning.)
If we measured gasoline in MJ (megajoules), we’d just say “fill ‘er up with a thousand”, not caring how many gallons that is, and we’d use about 5 MJ per mile, and there wouldn’t be a problem; we’d join hands and sing songs about how happy we are that our units finally make sense.
But we don’t do that, so.
How much, exactly, are we talking about?
Where’s My Nerd Hat?
The first thing we need to decide is what the ‘standard temperature’ is for a gallon of gasoline. Really, we need a standard temperature and pressure, but we’ll just ignore pressure for now. (Coming next week: Why you pay more for gasoline in the mountains!)
Since a good ‘room temperature’ is 75°F, we’ll use that as our standard temperature. When we pump gas, we expect that the gas will be at 75°F, and if it’s hotter, then by God, we’re getting ripped off!
In order to calculate the change in volume of a liquid, we use the general equation:
ΔV = β × V0 × ΔT
This formula says that the change in volume (ΔV) is equal to the initial volume (V0), multiplied by the change in temperature (ΔT), multiplied by the coefficient of volume expansion (β). Note that all temperatures are specified in Celsius, because that’s the nerd way of talking about temperatures.
For gasoline, β is approximately 9.50×10-4. See here and here, and convert the number into proper nerd format.
Let’s say you pump 10 gallons of gas on a hot summer day, when the gasoline is 92°F. The gasoline, which is stored in underground tanks, probably doesn’t get this hot, but let’s say it does for the sake of argument. Later, you park your car in your garage and the gasoline cools down to 75°F. This means that the nerd temperature of the gas has changed from 33.3°C to 23.9°C, so ΔT is -9.4°C.
So, we’ve got the following:
β = 9.50×10-4
V0 = 10
ΔT = -9.4
I’m leaving off the units here because they balance (trust me), and I’m not bothering to convert our 10 gallons into nerd units because I’d just convert it back afterward anyway. So now we can say:
ΔV = 9.50×10-4 × 10 × -9.4
ΔV = -0.0893
In other words, after your gasoline cools down, you will have 0.0893 fewer gallons than when you started. Since we started with 10 gallons of gasoline, we now have 9.9107 gallons.
What does this mean in terms of cost? It means that you’ve paid for 0.0893 gallons of gasoline that you weren’t given. At the current local price of $2.959 per gallon, we’re paying 26.4¢ extra for our 10 gallons of gas.
If we consume 10 gallons of gas a week, we’d be paying $13.74 extra every year for gas we never got. We could buy, like, a pizza with that kind of cash. The gasoline companies are denying us one pizza every year!
But Wait, There’s More
Hang on, though, it’s not summertime year-round. What about in the winter, where the temperature drops to a balmy 20°F? Well, then our ΔT is 30.5°C (23.9°C - -6.6°C). We pump the same 10 gallons of gas, and of course β stays the same, so we have:
β = 9.50×10-4
V0 = 10
ΔT = 30.5
From the original equation:
ΔV = 9.50×10-4 × 10 × 30.5
ΔV = 2.8975
Yikes! On really cold days, we’re pulling away from the pump with almost three gallons of gas we didn’t pay for! At the same $2.959 per gallon, that would cost $8.57 or so. If you fill up just twice in the wintertime, you can make back all of the extra money you spent on gas in the summertime, and maybe a little more.
In Summary
Although I’m sure that American corporations will gladly screw you in any way possible for profit, this whole thing is really the problem it’s being made out to be. In the summer days, you effectively pay about 2¢ more per gallon than you should. In the winter, you pay about 86¢ less than you should.
These numbers really are higher than they should be, because the gasoline is stored in underground containers which keeps it warm in the winter and cool in the summer. We’re really probably talking about a cent or so extra in the summer and about 20¢ less in the winter.
What people ought to be more angry about is that when a refinery has to temporarily close, even for just a few days, gas prices across the nation spike, even at stations that don’t depend on that refinery.
That is American corporations sodomizing at their best.
Keynote Blues
Steve Jobs held the second annual WWDC 2006 conference this Monday in San Francisco. If we’d been seeing most of this stuff for the first time, it would have been amazing, but instead it was mostly old hat. Spaces? Yeah, neat. Time machine? Been there. iChat improvements? Yawn.
Gruber did nail it when he said that brushed metal was being taken out back and shot. It’s no longer anywhere to be seen in Leopard: Safari ditched it, Finder ditched it. I think even Calculator may have given it up.
A few interesting things were revealed, both in the keynote and on Apple’s website. Quick Look, as an operating system feature, is an interesting extension of the ‘Preview’ section of the Get Info panel. The Dock’s stacks feature is neat and useful, spelling almost certain doom for Stunt’s Overflow. The Finder finally gets rewritten, possibly in Cocoa, and sports an iTunes-esque interface.
Behind the scenes, native support for multicore machines will make it easier for developers to harness the power of parallel processing, and other improvements to I/O, networking, and computing abound. There’s really a lot of meat here, it’s just hard to see — which brings me to:
The Desktop, which gets superfluous menu bar transparency and reflective dock effects, altered shadows on the windows, and a general visual refresh. Apple really seems to be relying on Core Image and Core Animation for most of their UI, and therefore depending on a decent graphics card to drive it. Already on Tiger, older laptops with less video power are beginning to choke on Core Image effects.
Apple is not yet saying what the minimum system requirements are, but I’m guessing G5 and higher. If they don’t go pure Intel with this release, they certainly will on the next iteration.
Jobs’ “One More Thing…” was Safari for Windows, which was predicted by the Mozilla folks back in January. This seemed kind of lame for a development conference aimed at Macintosh developers. What are we supposed to take away from this — that Apple thinks it’s worth our time to develop applications for Windows?
Gragh.
Wither iPhone?
The only other big piece of news is that the iPhone will support third-party development via Safari. In the keynote, Jobs says that “The Way” to develop applications for the iPhone are with Web 2.0 / Ajax, distributed via standard websites.
This went over like a lead balloon. You can see it for yourself on the keynote address, starting at 1:13:52. The audience is dead silent. There is no applause, no enthusiasm as soon as they realize what they’re being sold. Even Jobs and Scott Forstall seem like they know how bad this ‘solution’ is.
There are two problems here. One is that no matter how many times Jobs said that these web apps behaved ‘just like native apps,’ it’s clear from the keynote that they don’t. Native apps don’t have a location bar pinned to the top of their window. Native apps don’t require you to click ‘Safari’ to launch them. Native apps don’t show a grey-white checkerboard where Safari hasn’t been able to re-render yet.
The other problem is distribution. Jobs played up the ‘distribution and updates are easy’ angle, since the applications are really running on your webserver. But as an application developer, I don’t want to be responsible for running the application. I don’t want to have to maintain a server that responds to web service calls. All I want to do is send the application to the user, possibly take some of their money, and never hear from them again (unless there’s a problem).
Introducing the need to run a server-side application which renders HTML for the iPhone is a huge, huge problem. I’ve done web applications before, and I’ve had to worry about whether or not my site can be reached, whether there’s a problem with the server, whether there are too many people trying to connect at once. It’s not very much fun.
I don’t have a problem with constraining iPhone applications such that their interface is rendered in HTML and their logic is implemented in Javascript — this is, after all, exactly how Dashboard widgets are implemented. But why the need to connect to the internet? Why not just provide widgets that use WebKit?
With WebKit + Javascript + Google’s Gears, you’d be able to make a nice widget for the iPhone, completely local, with its own data store. Slap it into a bundle, give it a nice icon, and let it sit in the home screen along with all of the other first class applications.
If it needs to get information from the internet, fine, but don’t require that. And don’t insult our intelligence by calling these ‘native apps’ when they clearly aren’t.
Mapping The Comical World
Originally aired in 2004, The Simpson’s episode “The Ziff Who Came To Dinner” contains as its couch gag a riff on Charles Eames’ seminal “Powers Of Ten.” You can see a low-quality version on YouTube.
As a result, one can clearly see the layout of the Springfield that the Simpsons live in, and the relative locations of a few of the more obvious buildings:
Of course, it could be argued that a gag in the opening sequence isn’t really canon. The Simpsons has also always been self-contradictory, so any map is virtually guaranteed to be wrong.
See also: the semi-official Map Of Springfield and the live-action Simpsons intro.
Ell Oh Ell
I’ve been sort of steadfastly ignoring the whole lolcats meme — it’s not in my nature to be on the hip end of things — but it’s getting to be mainstream and overdone, so it’s starting to be fair game.
Case in point, lolcode — a toy scripting language with lolcats-inspired grammar:
HAI CAN HAS STDIO? VISIBLE "HAI, WORLD!" KTHXBYE
May God have mercy on our souls.
Oh no, sit!
Testily Cuts Foil notes that “United Arab Emirates” alternates consonants and vowels. The best I could come up with was unimaginative.
Oh, it’s on.
fido36 + dawn36 = stab36
fred36 + brag36 = riot36
epicurus36 + junk36 = epidemic36
eliot36 + pals36 = fatal36
aaron36 + copy36 + ended36 = patsy36
aesop36 + dopy36 + egypt36 + buoy36 = plate36
Uncomplimentary Subcontinental
The Futility Closet picks up on my Interesting Words note from last week, noting that ‘uncomplimentary’ and ‘subcontinental’ contain the vowels in reverse order. Not sure how I missed those.
Here’s some more: ‘verisimilitude’ and ‘unimaginative’ consist entirely of alternating vowels and consonants. ‘Interconnecting’ has vowels separated by exactly two consonants.
Math Notes
2 + 502 = 2502
25 × 92 = 2592
34 × 425 = 34425
35 × 7 × 21 = 35721
312 × 325 = 312325
39 + 343 = 39343
492 × 205 = 492205
172 × 66 × 392 = 17266392
Some of these are via the Futility Closet.
Update:
7 + 36 = 736
1 + 56 + 42 = 15642
1 + 56 + 62 = 15662
1 × 75 + 36 = 17536
Interesting Words
Abhors, almost, begins, biopsy, chimps, chinos, and chintz have their letters in alphabetic order. Sponged, wronged, wolfed, and zonked have their letters in reverse alphabetic order. Abstemious, adventitious, and facetious have all four vowels in alphabetic order.
Strengths and twelfths have only one vowel. Eeyore, adieu, audio, bayou, eerie, gooey, payee, queue, and yahoo have only one consonant.
Queueing has a run of five vowels. Catchphrase has a run of six consonants.
Disproportionated, semiprofessionals, and transcendentalist are the longest words that start and end with the same letter. Bookkeeping has three consecutive duplicated letters.
Abracadabra and hotshots begin and end with the same four letters. Deteriorated, lackadaisical, and redder end with the reverse of the letters they begin with.
Dispossesses, possessiveness, and senselessness use the letter S six times, while indivisibility uses I six times. Assesses uses only three letters, and senselessness uses only four.
Enormousness, excrescences, necromancers, reassurances, and sensuousness have no letters with ascenders or descenders. Highlight and hillbilly have no letters without ascenders or descenders.
I Love The Internet
A collection of Super Mario Bros. videos: a tool assisted 4:59 speed run and a tool-assisted 19:57 speed run using no warps. A 5:15 speed run of Mario Air, a ridiculously difficult custom level that requires the use of bugs in the game to complete; and a 3:54 run of Parallel Air, an even harder mod. And the hardest Mario level ever.
Also, Super Mario Bros as rendered in LineRider, Super Mario Bros. as a live-action skit, and a fighting game character gets lost in level 1-1.
Efficiency
I took my aging iBook G3 into the Apple store yesterday, because the display was not working. A tech there looked at it, confirmed that the machine itself was OK, and arranged to have it shipped out for repair.
“It’ll take about a week,” he tells me.
This morning — the day after I dropped it off — I wanted to know what sort of information is available at Apple’s website about the status of the repair, so I headed over there and typed in my ticket number.
The page informs me:
“Product received by repair center (10-Apr-2007)
“Repair completed (10-Apr-2007)
“Product return pending (10-Apr-2007)”
That’s some crazy wicked fast repair work. I expect I’ll be getting a call from Apple tomorrow.
Google Hates Me
I just hopped over to Google Maps, switched to satellite mode, and was greeted with this:
At first I figured the satellite imagery server was down, because the street maps still worked fine. But then it was down for hours, which is not like Google at all, so I dug a little deeper.
Looking at the actual headers being sent over the network, each request for an image is being redirected to the Google ‘Sorry’ page, which asks you to prove that you’re not a robot. Once I’ve done that, Google Maps started working normally for me again.
It’s probably just high traffic coming from the corporate network, possibly even someone on the network misusing Google maps for their own nefarious purposes.
But there was no indication of what exactly the problem was, and no way to discover how to solve it. If I hadn’t thought to look at the actual data being sent over the wire, I would have never known what was wrong.
I love being a nerd and all, but some days I’d just like to stop monkeying with technology and just get my work done, you know?
iPod + iPhone
In October 2001, Apple released its first iPod, a 4.02 x 2.43 x 0.78” screamer weighing 6.5 ounces. It contained a 10 GB hard drive and could play 10 hours of music on a full battery. It had a 2” diagonal monochrome LCD display with a 160x128 pixel resolution. It cost $500.
The iPod was not the first MP3 player on the market. By all accounts, the product was neither the best nor worst in its class, some contenders having more space, some having a longer battery life, but Apple’s design was simple, compelling, and sexy.
For the next three years, Apple sold a decent amount of units while it continued to refine its design. By October 2004, with the introduction of the iPod mini, iPod sales skyrocketed, and it has dominated the market ever since.
Today, the iPod comes in a selection of flavors, the flagship model being the 5.5G. This machine is virtually the exact same size as the original except thinner and lighter, measuring 4.1 x 2.4 x 0.55” and weighing 5.5 ounces. It has an 80 GB hard drive and can play 20 hours of music on a full battery. It has a 2.5” diagonal full-color LCD + LED backlight with a 320x240 pixel resolution. It costs $350.
The iPhone
The iPhone, announced at MWSF by Apple and available this summer, is a 4.5 x 2.4 x 0.46” combination of an iPod, cellphone, camera, and computer. It weighs 4.8 ounces. It contains 8 GB of storage (likely flash-memory based), and can play 16 hours of music on a full battery (or 5 hours of airtime). It has a 3.5” diagonal full-color display (I do not know whether it is LCD or OLED) with a 320x480 pixel resolution. It will cost $600.
At the time of its U.S. launch, the iPhone requires a 2-year contract with Cingular. It will not be possible to install third-party applications onto the phone. The phone has support for EDGE, which is a 2G cellular data service and widely considered to be slower than the 3G services that are coming to be available in the states (and which are already widely available in Europe).
July, 2010
Allow me to speculate for a few moments about the future.
I suspect that Apple has a deal with Cingular wherein Cingular subsidizes the cost of the phone in exchange for a multi-year agreement for Cingular to be the sole provider of services. Through this deal, Apple is able to bring their product to market without design oversight (this is not a Cingular / Apple phone the way the ROKR was a Motorola / Apple phone), and Cingular is able to lock a lot of people into 2-year contracts. I expect that three years from now, the iPhone will no longer be tied to a specific carrier.
The design will go through a few refinements, but will retain the overall dimensions and weight. The screen will become slightly larger and will increase in pixel density. The battery life will see modest improvements, and the disk capacity will skyrocket. The phone will support WCDMA or some other 3G network.
So, in 2010 I expect Apple to announce their fourth iPhone revision. It will measure 4.5 x 2.5 x 0.4” and weigh 4.4 ounces. It will have 120 GB of storage, probably not flash-based, and will play 20 hours of music on a full battery (or 8 hours of talk time). It will have a 3.8” diagonal screen with a 854x480 resolution (true HDTV ratio), probably OLED. It will cost $400.
Personally
I want the iPhone to succeed, but its current incarnation leaves me with a quiet sort of discontent. Without the ability to install third-party applications, the device is a very expensive and flashy version of what I already have — a cell phone that occasionally gets updates from its vendor. I don’t have any control over the software on it, and I certainly can’t write new software for it.
The device is very compelling, and I can see it being invaluable in its current incarnation under certain circumstances — tooling around on Google maps while you’re lost in the car is an obvious one. There’s just too many little things lacking right now. The 2-year contract with Cingular costs a minimum of $40/month, and in order to use the internet you have to sign up for an addon that costs at least $10/month, so you’re looking at an additional $1200 paid over two years just to use the phone to its fullest.
The device, essentially, costs $1800.
I do look forward to 2010 when Apple has a solid foothold in the mobile market, and would consider buying one of these devices when I can install my own software on it. I want to be able to justify the expenditure, but I did that once with an old handheld PC and my friends still haven’t let me live it down.
So I demand that everyone else go out and buy one to drive the prices down and I’ll join up with you in three more years.
Oh, You Rascally Spammers
So I wrote an entry a while ago about icon design. It was linked from all over the place, starting with John Gruber’s Daring Fireball, and it gathered a lot of comments. Well, a lot of comments compared to the rest of the entries here.
Shortly after the comments died down, a curious thing started happening — I started getting occasional spam comments posted to that entry. This is despite the fact that I’ve custom-built my journal software, and that the API is different from WordPress or MovableType’s commenting systems.
Well, the trickle of spam comments turned into a flood, and thanks to Akismet, none of them have ever made it through to the actual entry. In fact, as of 23 July 2008, Akismet has blocked 454 spam comments for me, the vast majority on that entry.
But even though these comments aren’t getting through, and I never have to see them unless I want to (occasionally I’ll scroll through them for a laugh), it still bugs me that it’s happening at all.
So, to help mitigate this, I’ve changed the URL used for posting comments, and I’ve obfuscated the entire comment form so that it requires Javascript to display. The theory is that spammers don’t evaluate Javascript in their harvesters because there’s too much potential for infinite loops and whatnot, so they won’t see the form and won’t be able to comment.
In theory, anyway.
Oh, also, I’ve made AfterWords be able to evaluate macros within entries now, so the number of spams above is a live count. I really don’t have time to update this entry every day, even though that’s what it might look like I’m doing.
The HTML Mathematica Blender
In my last trip down memory lane, I mentioned that I had worked on a new version of the HTML Color Blender which was partly inspired by Mathematica. I promised that I would elucidate on that subject today, and so here we are.
Mathematica (Wikipedia entry), in case you haven’t had the pleasure of working in math-heavy sciences within the last twenty years, is a ridiculously powerful mathematics software package. It’s able to perform algebraic manipulations, plot 3D functions, and do really advanced maths that can make my eyes glaze over just by reading some of the introductory matter.
Seriously. “The Hénon-Heiles equation is a nonlinear nonintegrable Hamiltonian system with…” Mmm, eye glaze.
The point of all this is that the driving force behind Mathematica, Stephen Wolfram (who wrote a 1192 page book which is very difficult to read with glazy eyes) is a very smart guy. And when he designed Mathematica, he realized that there were really two components to the system: the crazy eye-glazing maths engine, and the interactive user-facing front end. So, Mathematica is essentially split into two parts: a maths kernel and a front end. This is good, because you can have your Mathematica kernel running out on some supercomputer in your underground lair, but still work from your desktop computer.
I was nineteen, and I liked this idea. I liked it a lot.
I liked it so much that I decided I was going to design the next version of the HTML Color Blender so that it would have swappable kernels. I decided this in spite of the fact that the HTML Color Blender does not perform any sort of computationally intensive tasks that might require more than, say, 50 microseconds to perform, and in spite of the fact that there were around five people who ever used the damned thing.
Luckily, I was able to rationalize that there might be someone, somewhere, who wanted to colorize his text using a partial integration of a generalized Riemannian Manifold by varying the metric tensor over the range g4j-g9j. I don’t even know what that means, but I’m sure Jake will stop by to tell me why it doesn’t make any sense.
So, that’s approximately how I ended up at this:
On the right, you can see the kernel, which is usually hidden, spewing out some debugging messages. On the left is the actual client, which runs in a seperate process. When the text in the window changes, a message is sent to the kernel (WM_CB_REQUEST, it looks like) with the text to colorize. The kernel responds by allocating a block of memory, putting a list of colors into it, and notifying the client. When the client has finished, it notifies the kernel, who then frees the block of memory.
A few things to note here. First, these programs are communicating via Windows-specific messaging, probably because I didn’t know much about how to use the standard internet libraries (and Windows makes it hard to do that anyway). Second, they’re actually sharing memory, which is why there’s all of the register / allocate / release gibberish going on. Thirdly, clients are tracked by their window handles, meaning that if the window is ever destroyed and recreated (which can happen from time to time on Windows), the connection is lost.
This setup essentially bears no resemblance to Mathematica’s except that I called the one application a ‘kernel’.
If I were going to do this again, I’d just set up a plugin architecture so that you could add new styles of blending by installing plugins. Then if the Riemannian Manifold guy just had to do his thing, he could write a plugin which can talk to Mathematica himself.
Memory Lane
Last night, after I did the writeup on the HTML Color Blender, I did some digging around in my old CDs and came across a CD labeled ‘Windows Data Files’ which, I discovered, contained all of my old Delphi projects. It also contained lots of other random crap that I felt was important enough to warrant putting on a CD, like really bad poetry, a file of notes that contains a definition for ESDAM, some nekkid girl pictures, and a collection of zipped Windows applications of dubious quality that I’m kind of afraid to touch.
Who is this goon who looked like me ten years ago?
The Delphi projects hold my attention the most, because it’s interesting to see how my project management skills have advanced in the time between then and now. I wasn’t using any sort of source code management, and for the most part all of the project files and resources are just dumped in one directory, usually the same directory that the build files got dumped into.
With the Color Blender, I was a little more diligent in that I created a bunch of subdirectories for each binary release. I’m not sure why, given that since the source to those releases wasn’t kept, there was no way to patch those versions. Maybe I just wanted to see how the application grew from release to release?
There’s also all sorts of goofy one-off applications, similar to how an artist might doodle in the margins of his sketchbook. The Windows 3.1 Imitator, as it will gladly tell you, Goes Nowhere and Does Nothing™, but it does a pretty good imitation of the Windows 3.1 window frame. It really is more useless than it sounds.
There’s also mockeryclock, which was put together as a birthday present for Buster McLeod, using some illustrations he’d made for his website. Proof that I am psychic: I named the directory that contained this application ‘Buster.’
But among these there are also some really strong applications that I either didn’t have the skill or the wherewithal to carry through to completion. One of the more major applications that falls into the wherewithal category is Notebook (zipfile, 273K download), a text editor written in Delphi whose goal was to be a replacement for Notepad, except with a multiple document interface. Along the way, I added syntax highlighting and project files to its featureset. It mostly works, but has some quirks that limit its utility. The source is also available (zipfile, 84K download).
There’s a lot of little subtleties to Notebook that aren’t really obvious unless you play around with it. The little Windows logo in the status bar indicates what linebreaks the file has; you can toggle it between Windows, MS-DOS, Unix, and Mac line breaks, and save the file in any of those format. The little badges on the document icons indicate their status — yellow bang for modified, red X for read-only, shortcut icon for a file that belongs to a project.
And there are plenty of examples of projects that are just a splash screen, maybe a UI element or two, and absolutely no real software. This is what got me a reputation with my friends of making things pretty and then never following through with the implementation. Audioshop, whose interface is presented here in its entirety, was going to be similar to Photoshop, but for all kinds of audio. I think at one point I also wrote some code to read a (specific) .wav file from disk, but it never actually did anything with it.
There’s lots of other one-off projects and miscellany, but I’m running out of spacetime to discuss them. In my next post, I’ll show you what happens when an inexperienced software developer overengineers an application after playing with Mathematica for a few days. Yes, that’s quite correct — in my next post, I will show you how I had planned to make the HTML Color Blender more like Mathematica.
Be afraid.
A blast from the past.
I don’t have a lot to do at work at the moment. I haven’t been given access to the code repository yet, so I can’t even look at the code that we’ve got so far, and I’m running out of things about the department and company to read, so work is starting to get pretty godawful boring.
I’ve been in a coding mood lately — for fun, ask Michelle how much she enjoys not seeing me every night because I’ve got my face glued to my computer — and it’s frustrating to be here at work, unable to code. Especially when I’ve got a lot of ideas for things I’d like to develop.
It’s this kind of funk that makes me thing things such as ‘I wonder if anyone remembers the HTML Color Blender?’
The HTML Color Blender (zipfile, 406K download) was one of the first major software development projects I ever undertook. As software development projects go, it’s ridiculously simple, just a way to use font tags to change the color of text from one letter to the next, and copy the result to the clipboard. But it was the first ‘real’ software I ever wrote.
By which I mean that it was the first bit of software I ever considered charging money for.
You can see the four windows with any sort of meaning in the composite screenshot above. One thing you can’t see is that the drop-down box in the main window contains color schemes, whcih you can add and remove. The built-in color schemes are Original Default (green to blue, from 1.0), Scary Halloween (pictured), Wiseguy, Lollipop (pink!), “Red, White, and Blue”, Neapolitan, and Autumn. You also can’t see that the little widget with the circles and arrows changes to one of six styles.
Registration was $10, and PO Box 293 was the first PO Box I’d ever rented (now it’s long since closed). I seem to recall that four or five people actually paid, which is pretty amazing considering that they had to go through the trouble of putting a literal check in the literal mail.
After its release, I started working on the Next Big Version, which was going to have a way you could plug in new styles of blending, and which I was going to write ‘on the metal’, by which I meant using the Windows API directly instead of the overhead of Delphi, which is what I had been using.
I think that getting Delphi to let me compile Pascal in a way that produced a Windows executable without the associated garbage that it wanted me to use is probably the most clever thing I’ve ever done. I seem to recall it being ridiculously difficult.
Anyway, version 3.0 never came, because I got sidetracked working on another project (Notebook), and I eventually re-released version 2.2 without the registration crap. That version didn’t get as wide distribution as 2.2 did, however, so it might not be online anywhere. I’ve lost the source and the binary for this and Notebook, so we’re at the mercy of internet packrats; I found it through a ftp.winsite.com mirror, because it was once included on a CD of Windows shareware.
Update: I did some digging and found a CD I’d burned back in 2000 that has the source to the HTML Color Blender 2.3, which does not need to be registered. You can download the source (zipfile, 73K download) if you’re interested in what an eight-year old Delphi application coded by a 19 year old looks like.
I am equal parts amused and ashamed at the quality of this application. I suppose that, in 2014, I’ll look back on Zugzwang and Kudzu the same way.
P.S. I’ve written an application on top of Kudzu that generates these thumbnails for me — the TV style and the postcard style. It’s pretty slick; you specify parameters in the URL and it generates the image for you. For the postcard you can rotate and scale the image, for the TV you can scale and tell it not to display the magnifying glass. Other plugins can be added really easily, because Kudzu has a centralized plugin architecture.
</gush>
Oops.
As it turns out, verifying 2150 positions between the time the mouse button goes down and the UI gets updated is a relatively bad idea.
Things I Have Done In Recent Days
In the last entry, I mentioned that I was having difficulty finishing the construction of a retaining wall. I’m happy to announce, as the picture to the right attests, that the damned wall is done.
Now I just need to build a similarly-sized wall on the other side of the house. (Sigh.)
I am also happy to announce that I have a job, and in fact I am starting said job tomorrow morning. I’m a “team lead” — not sure yet what that means in terms of responsibilities — and I’m working with C#. My C# is pretty rusty right now, but I’ll fix that.
I am also also happy to announce — I seem to be a very happy announcer — the very early, pre-pre-alpha release of Zugzwang, the chess game I started writing the day I lost my last job. It Really Works™ — you play against a chess program named Crafty (who is set to always make moves immediately), and he basically kicks your ass.
At least he kicks my ass. I’m not good at chess.
Anyway, there’s lots of fancy stuff in it that’s not entirely visible yet. It has a plugin architecture, so you can add new engines to play against. I’ve sketched out (but not enabled) human-on-human play via Bonjour and ICS. And the entire game is defined by an external file (currently internal) — so you can make up fairy chess pieces and play chess variants against your friends.
It’s got tons of bugs — most notably, it won’t tell you if you’re in check and it will let you move into check freely (although this confuses Crafty, who will then stop playing with you). Castling and en passant don’t yet work, so if Crafty attempts to castle the game just sort of stops.
Oh, and sometimes when you quit the game Crafty forgets to stop playing. If you’ve played a few games and your machine starts to get slow, reboot.
Mac OS X 10.4.x only, because it needs Core Image, WebKit, and a few other things. You might have to have a decent video card, I’m not sure.
Having said that, if you’re feeling adventurous, you can download Zugzwang 0.0.1.
Two Sets of Five Things
Five things that currently bug me about my website:
I have two applications built on Kudzu, but because they’re using different versions of the code and are installed against two different databases, I can’t be logged into both of them at the same time (because they both try to use the same cookies) — thus negating the whole point of Kudzu, which is to make all of the applications built on it work together.
I stopped whining long enough to fix this.- I miss my photoblog. Due to a case of chronic dust poisioning, my cell phone has begun its final descent into the static graveyard. As a result of the infection it does not take pictures as well as it used to, and I don’t have an application set up on this domain to process the pictures anyway. I looked into replacements, but the most attractive space in the cell area at this moment is S60, and those sorts of phones are still very expensive.
- AfterWords is still very immature about a lot of things, most notably navigation — it’s very hard to post a new entry right now because I have to manually generate the URL for entry composition, and then after I post I have to go back into the database and manually tweak a field that doesn’t get correctly set. Bugs, all fixable, but who has the time?
- My wiki is running on MediaWiki, which is fine (NIH notwithstanding) but that means that it doesn’t integrate with the Kudzu set of usernames and passwords, which means I have to remember Yet Another Identity for my own website. Even if it’s the same username and password, it’s the principle of the thing.
- All of the other content sections I’ve envisioned have yet to come to fruition — software, fonts, RSS aggregation for things I’m doing elsewhere, etc… there’s a lot more I want to post.
The other side of the coin, five things I love about my website:
- AfterWords has a spam filter (thanks to the loverly people at Akismet), and it has actually managed to catch the first real instance of spam here, which was an auto insurance site. The poor spammer posted three variants of his message, each one of them more diluted than the previous, until his fourth attempt (which did not even contain the target URL) finally got through. Go Akismet!
- The minimalist design — even with all of the other stuff I wanted to add, the design is very sparse, and I like it. Of course, I have to credit John Gruber with the majority of the inspiration, and the now-defunct Drunkenblog with another small portion, but no man is an island.
- I love not having to be responsible for the upkeep and safety of fifty thousand journals. For a while I thought it was going to suck, but I like being by myself again. Which ties into the next thing:
- I can say whatever I want. I don’t have to worry about maintaining a facade of sanity so that I don’t drive away my users. (Hell, I barely have readers, much less users!) I can tell people to fuck off if I want. Hooray!
- Webmarks, which is my personal bookmark repository, is quite nice. It’s very similar in form and function to del.icio.us, but has neat features that I find useful, such as private bookmarks (I know del.icio.us has this now, but they didn’t when I started), arbitrary data storage, and an easier-to-use interface. Plus it’s local.






