Archive for November 2002

Friday, November 29, 2002

Finder Followups

Daring Fireball has posted followup comments about the OS X Finder:

Mostly, though, I think they’ve been conditioned by years of exposure to poorly designed file managers. If your file manager is irritating, you learn to stop managing your files.

That the OS X Finder is good enough for some does not mean it is good enough for all. When newcomers to the Mac—no matter how experienced they are with other platforms—dismiss long-time Mac users’ criticism with a bit of “good enough for me” hand-waving, it belies their ignorance of what the Mac truly stands for. Let’s turn the tables and imagine that the GNU bash shell (favored by many Linux users) wasn’t able to run on Mac OS X. Bash advocates would, rightly, complain loudly. Now imagine if a long-time Mac user responded to their complaints by saying, I only use the Terminal to run “top” and to open hidden files once in a while, but I don’t see anything wrong with tcsh. You Linux switchers are just complaining because tcsh is a little different.

What a great way of explaining it. Also included is this comment from Steven Frank, which matches my experience and reaction:

At WWDC last year, my co-workers and I sat in quiet horror as we heard the umpteenth presenter say, “Now I’m going to turn on the new ‘metal’ look for this window, because it looks pretty cool.” This from actual Apple employees, in Apple’s actual engineering department. What happened to all the people who gave a damn about the Mac user experience?

Tuesday, November 26, 2002

Hidden False Positives

From InfoWorld via Gary Robinson:

A NEW STUDY shows that 11.7 percent of messages that were requested by an e-mail subscriber never reached the recipient’s inbox. Six percent were incorrectly routed to a junk mail folder, and 5.7 percent never arrived in any form.

The problem is faulty spam filters put in place by major ISPs such as Earthlink, MSN, and AOL. In their attempts to reduce UBE (unsolicited bulk e-mail, or spam), these services appear to be whacking many messages people actually want.

That Finder Thing

Daring Fireball has posted an excellent analysis of the OS X Finder. However, there are a few parts I have quibbles with.

Once the NeXT regime stepped in and assumed top positions in Apple’s software division, they started putting their stamp on Apple’s UI design, despite the fact their input on such matters was neither wanted nor needed. The hallmarks of NeXT’s UI design are extravagant attention to cosmetic appeal, and nearly no attention whatsoever to actual usability. This is enough to fool many people, especially converts switching from other platforms, where the interfaces are both ugly and disfunctional. If it looks better, it must be better, right? With that metric in mind, you can start to understand why the NeXTies think so highly of their own UI design skills.

As a description of OS X, this is correct. It also explains why opinions on the OS X interface are so divided. However, I think it’s a mistake to blame every OS X interface disaster on “the NeXTies” and their design skills. Certainly, some aspects of OS X, like Columns view, came straight from NeXT; but attributing other elements, like the Dock, is not so easy. Further, many of the problems with OS X have to do with poor implementations rather than poor design. Columns view, taken by itself, is fine. That the Open/Save dialog implementation of it is so horribly broken is a separate issue, as are the facts that the spatial Finder views are slow and not spatial enough. The “blame it on NeXT” theory also cannot account for how bad the initial OS X rewrite of Project Builder was compared to NeXT’s own ProjectBuilder.

I maintain that the real cause of OS X’s interface problems is not poor design but (for lack of a better word) poor supervision—the result of Steve Jobs’s dissolving of the human interface group. With no one enforcing consistent interface principles and a woefully incomplete set of guidelines, it’s really no surprise that we are where we are. Apple has lots of programmers, and this is what happens when you let them loose (however smart they may be). I don’t think it’s so much a matter of their platform heritage. There are obviously a lot of Mac-type people working on OS X. Joel Spolsky loved that Microsoft gave him a lot of freedom when he was low on their totem pole. I think that this element of corporate culture, while it may be a great way of keeping programmers happy, is a lousy way to ensure quality and consistency. Yet rejecting this idea need not lead to Joel’s Juno scenario; programmers respect HI experts when they are good. Programmers need HI experts in the same way that writers need editors.

Apple’s iApps provide a broader example. iTunes and iMovie were designed and implemented by Macintosh developers; both are runaway smash hits. iPhoto and iCal, however, were developed only for Mac OS X, and are not nearly as polished. iCal in particular is pretty much a stinkbomb, and bears all the hallmarks of NeXT UI design: looks good, feels clumsy.

As I recall, iMovie and iPhoto were written by the same team. iCal is a disaster, for sure, but I can’t say that I detect a strong NeXT influence in it. (Most of the third-party applications from NeXT developers are obviously of NeXT heritage; I don’t see that with iCal.) I think it was simply released too early. Polish takes time, and today’s Apple is in a rush. (Alas, and why shouldn’t it be when so many hold iPhoto and friends as examples of great software?)

The bottom line is that Apple’s current corporate culture doesn’t value usability as much as it should. All is not lost, but unless something is done this will merely be the beginning of a long decline. Without strong, thoughtful guidelines (and example-setting) from Apple, the quality and consistency of third-party Mac software will deteriorate as the pool of Mac-clueful developers is diluted. Unix users will write Mac software that doesn’t feel right, and we’ll have Apple to blame for it. Old-school Mac developers will try to make sense of Apple’s actions, searching for the method that’s absent from the madness. It remains to be seen whether their efforts will be appreciated.

Monday, November 25, 2002

Perl vs. Python vs. Ruby

I’m evaluating Python and Ruby as replacements for Perl. I’ve been using Perl for several years and am very comfortable with it, although I’m definitely not an expert. Perl is a powerful language, but I think it’s ugly and encourages writing bad code, so I want to get rid of it. Python and Ruby both come with Mac OS X 10.2, both have BBEdit language modules, and both promise a cleaner approach to scripting. Over the past few weeks I read the Python Tutorial and the non-reference parts of Programming Ruby, however as of this afternoon I’d not written any Python or Ruby code yet.

Here’s a toy problem I wanted to solve. eSellerate gives me a tab-delimited file containing information about the people who bought my shareware. I wanted a script to extract from this file the e-mail addresses of people who asked to be contacted when I release the new versions of the products.

I decided to solve this problem in each language and then compare the resulting programs. The algorithm I chose was just the first one that came to mind. I coded it first in Ruby, and then ported the code to Python and Perl, changing it as little as possible. Thus, the style is perhaps not canonical Python or Perl, although since I’m new to Ruby it’s probably not canonical Ruby either. If I were just writing this in Perl, I might have tried to avoid Perl’s messy syntax for nested arrays and instead used an array of strings.

Here’s the basic algorithm:

  1. Read each line of standard input and break it into fields at each tab.
  2. Each field is wrapped in quotation marks, so remove them. Assume that there are no quotation marks in the interior of the field.
  3. Store the fields in an array called record.
  4. Create another array, records and fill it with all the records.
  5. Make a new array, contactRecords, that contains arrays of just the fields we care about: SKUTITLE, CONTACTME, EMAIL.
  6. Sort contactRecords by SKUTITLE.
  7. Remove the elements of contactRecords where CONTACTME is not 1.
  8. Print contactRecords to standard output, with the fields separated by tabs and the records separated by newlines.

And here’s the code:

Perl

#!/usr/bin/perl -w

use strict;

my @records = ();

foreach my $line ( <> )
{
    my @record = map {s/"//g; $_} split("\t", $line);
    push(@records, \@record);
}

my $EMAIL = 17;
my $CONTACTME = 27;
my $SKUTITLE = 34;

my @contactRecords = ();
foreach my $r ( @records )
{
    push(@contactRecords, [$$r[$SKUTITLE], $$r[$CONTACTME], $$r[$EMAIL]]);
}

@contactRecords = sort {$$a[0] cmp $$b[0]} @contactRecords;
@contactRecords = grep($$_[1] eq "1", @contactRecords);

foreach my $r ( @contactRecords )
{
    print join("\t", @$r), "\n";
}

The punctuation and my’s make this harder to read than it should be.

Python

#!/usr/bin/python

import fileinput

records = []

for line in fileinput.input():
    record = [field.replace('"', '') for field in line.split("\t")]
    records.append(record)

EMAIL = 17
CONTACTME = 27
SKUTITLE = 34

contactRecords = [[r[SKUTITLE], r[CONTACTME], r[EMAIL]] for r in records]
contactRecords.sort() # default sort will group by sku title
contactRecords = filter(lambda r: r[1] == "1", contactRecords)

for r in contactRecords:
    print "\t".join(r)

I think the Python version is generally the cleanest to read—that is, it’s the most English-like. I had to look up how join and filter worked, because they weren’t methods of list as I had guessed.

Ruby

#!/usr/bin/ruby

records = []

while gets
    record = $_.split('\t').collect! {|field| field.gsub('"', '') }
    records << record
end

EMAIL = 17
CONTACTME = 27
SKUTITLE = 34

contactRecords = records.collect {|r| [r[SKUTITLE], r[CONTACTME], r[EMAIL]] }
contactRecords.sort! # default sort will group by sku title
contactRecords.reject! {|a| a[1] != "1"}

contactRecords.each {|r|
    print r.join("\t"), "\n"
}

This is actually the shortest version, and I think it’s the easiest to read if you aren’t put off by the block syntax. I like how the sequence of operations in the first line of the while isn’t “backwards” as it is in the Perl and Python versions. Also, I correctly guessed which classes “owned” the methods and whether they were mutators.

Related Blogs

Mark Pilgrim has a page that uses Phil Pearson’s Blogging Ecosystem to find interesting sites that you might not be reading.

Saturday, November 23, 2002

MDJ on AppleScript and SpamSieve

MDJ 2002.11.22’s coverage of SpamSieve 1.2.2 makes some interesting points about how “AppleScript is making componentized software possible, with only Apple missing out on the benefits”:

Developers are often surprised that a good AppleScript implementation turns out to be a better idea than a check-off item on a feature list. When done properly, AppleScript lets sufficiently technical users add their own features to programs. For example, iTunes will never include features like posting your current song to a Weblog, unchecking all songs in a given playlist, or renaming MP3 files by artist and track name, but you can do all those things right now by using AppleScripts (such as those from Doug Adams’s page). Thousands of people around the world customize their mail clients with AppleScript, adding features that work for them but that no developer will implement for a mass market, including complex filtering and triggering other programs based on incoming mail content.

There’s no better example of these benefits than SpamSieve 1.2.2, the latest update to Michael Tsai’s US$20 spam filtering application for Mailsmith, PowerMail, and Entourage, now also for Eudora and even Emailer (though, as a Mac OS X-only program, it only works with Emailer running in the Classic environment).

[discussion of SpamSieve omitted]

Thanks to AppleScript and SpamSieve’s support of the top five scriptable E-mail clients, you can use any of these programs and retain your customized spam filtering. Want to move to Entourage from Eudora? Just add SpamSieve’s scripts and go—the thousands of messages you’ve already trained keep working for you in the new client. At first, we thought E-mail clients should build in functionality like SpamSieve, but the more clients it supports, the more flexibility you have. In fact, only one major Mac OS X E-mail client is ineligible for SpamSieve’s filtering because it’s not scriptable and can’t run an AppleScript from a filter: Apple’s own Mail application. It’s also the only client with its own high-profile spam filtering that’s implemented as part of Mac OS X 10.2, but is so closed that no one even knows how it works (Apple only admits it’s “adaptive latent semantic analysis,” whatever that is) and no other program can use it.

You know something’s weird in Cupertino when standards-gonzo Apple has a proprietary and closed solution, and the one that’s documented and supports all the other programs won’t work with Apple’s Mail because the company won’t support its own scripting technology. It’s yet another reason not to get tied into Apple’s not-quite-full-strength E-mail client.

JDirect History

Apple’s Allen Denison, in a post to the Java-Dev list:

Apple would like to announce that starting with the release of Java 1.4.1, we will no longer be supporting the JDirect technology.

In addition, we do not recommend that developers use any method of accessing Carbon from Java 1.4.1, even through JNI.

I haven’t actually used JDirect, but I’ve used Java libraries that use it. From what I’ve heard, it’s much better than Sun’s JNI. I’m not exactly sure what the second sentence means. Most of Apple’s APIs are not exposed through Cocoa-Java, so this would seem to be a huge strike against any non–100% pure Java development on the Mac.

Friday, November 22, 2002

Ellen Feiss Interview

The Brown Daily Herald’s interview is pretty good. I can’t believe she’s the same age as my brother. At least Mahir was an adult.

Do you feel any connection to the Dell dude?
No, none whatsoever. That guy’s a doofus. I get a lot of “What if you guys had kids?” And I’m like, “What if we had kids?” Why would you ask that? What a weird question. They’d probably be blond.

Update (2016-08-19): The original page has been removed. Here’s the archived version and a substitute link.

Programming Windows

Darrin Cardani says:

I hate programming Windows. At first, I thought it was just that I was used to the Mac way of doing things, and it would take some adjustment, but I've come to the conclusion that, in fact, Windows just sucks.

Bill Bumgarner points out that using Windows isn’t any better.

The Unlambda Programming Language

Eric Albert links to the Unlambda Programming Language, which basically makes you program with the S and K combinators directly. Here’s what Fibonacci looks like:


```s``s``sii`ki

  `k.*``s``s`ks

 ``s`k`s`ks``s``s`ks``s`k`s`kr``s`k`sikk

  `k``s`ksk

Insert witty Perl comparison here.

Thursday, November 21, 2002

Today’s Wish List

2002-12-02 Update: It seems that the quote smartening only happens when using ProFont; both Monaco and ProFontIsoLatin1 get the normal straight quotes. Does anyone know what causes this?

Wednesday, November 20, 2002

Spam Filtering’s Last Stand?

Jerry Kindall is more optimistic about Bayesian spam filtering than Jeremy Bowers. Statistical spam filtering is just getting started (in terms of deployment; researchers have been looking at it for years now). The current version of SpamSieve only scratches the surface of what’s possible, yet it is more than 98% accurate on my spam. Jerry has ideas for improving it, as do Gary Robinson, the Python folk, myself, and probably many others. In the near term, things look good.

There is no doubt that as spam filters get better, spam becomes harder to detect. Out of the last hundred thousand spams I’ve received, about two of them were really tricky messages that I had to actually read and understand before I was sure they were spam (although it’s worth noting that only looking at the headers SpamSieve would have caught them). This is the future of spam. General spam detection is AI-complete. However, at the moment I am optimistic like Paul Graham because spammers have a disadvantage, their need to get you to respond:

All along the spectrum, if you restrict the sales pitches spammers can make, you will inevitably tend to put them out of business. That word business is an important one to remember. The spammers are businessmen. They send spam because it works. It works because although the response rate is abominably low (at best 15 per million, vs 3000 per million for a catalog mailing), the cost, to them, is practically nothing.…Sending spam does cost the spammer something, though. So the lower we can get the response rate—whether by filtering, or by using filters to force spammers to dilute their pitches—the fewer businesses will find it worth their while to send spam.

Jerry also mention that the new version of SpamSieve increases the spam probability of unknown words from 0.2 to 0.4. A few people have been asking, so I may as well mention some of the hidden tuning knobs in SpamSieve. Use them at your own risk.


defaults write com.c-command.SpamSieve SpamProbabilityOfUnknownWords 0.4

defaults write com.c-command.SpamSieve MaxInterestingWords 15

These are the defaults. The number of interesting words is the number of words in the message that SpamSieve uses to determine whether a message is spam. Decreasing the number tends to make it flag more messages as spam, in my experience.

Nicholas Riley on the Finder Again

Nicholas Riley follows up with his list of the problems with the Finder’s error window, and how to reproduce it.

To people who say I should report these bugs: yes I should, but more importantly, Apple should fix this stuff internally before it ever reaches beta. There are systemic issues at Apple causing these kinds of UI disasters to happen, and identifying such problems one at a time is an inefficient way of dealing with them. Mac OS 8.5 was the last version of the OS to have any kind of consistent UI quality. The line can be drawn rather clearly: the “Index selection…” contextual menu item, one of the few visible additions in 8.6, managed to violate a bunch of guidelines (capitalization and wording) in just two words.

Right on. I would love for Apple to take usability more seriously. But the reality at this time is that Apple won’t fix this stuff without lots of outside feedback.

This will be my last “OS X sucks” rant for the year. Time to affect what I can really affect instead: my own software.

Yup, unfortunately, no one outside Apple has time to go through OS X and report all the problems. That’s why they need to bring back the HI group.

Tuesday, November 19, 2002

Bloated Compiled AppleScripts

A SpamSieve user sent me a screenshot showing that the three AppleScripts he was using from Entourage had grown to 3.3 MB, 172K, and 6 MB. Not surprisingly, he thought SpamSieve might be storing data there, and so was hesitant to delete them before updating to the new 1.2.1 scripts. SpamSieve actually does not store any data in the scripts, but somehow their resource forks are filling up as they are run. One of the Entourage scripts that ships with SpamSieve has bloated to 340K (see screenshots below), even though the text of the script is only 351 bytes according to Script Debugger. I’ve also seen this happen with the scripts that ship with BBAutoComplete. Does anyone know what causes the bloat? 2002-11-19-finder.png 2002-11-19-resedit.png 2002-11-19-sgi.png

The Point of (Any) Semantics

Lambda links to a posting by Schemer Matthias Felleisen about the usefulness of formal semantics in building programming language systems. As an aside, The Types Forum looks like a great resource. It’s moderated by the author of what I’ve heard is an excellent new types book.

The Evil That Is the DMCA

Adam Engst writes about the Digital Millennium Copyright Act for TidBITS:

What we’re seeing here is how the DMCA in essence props up the status quo, denying that legitimate research could be done outside the halls of academia or a company’s R&D department. Left on the outside are the crazy ones, the misfits, the rebels, the troublemakers... oh hell, go read the rest of “Here’s to the crazy ones” from Apple’s Think Different ad campaign for yourself. Whether we’re talking about Apple’s target audience or the open source community that has had Microsoft running scared is immaterial. The point is that the DMCA, supported by this court ruling, prevents that sort of person from doing anything that’s not sanctioned.

SpamSieve on VersionTracker

There are now two reviews on VersionTracker that give SpamSieve bad ratings because it doesn’t delete predicted spam messages. I consider that an essential safety feature because no automated solution is perfect, and most people don’t want to lose any legitimate messages. One can’t please everybody, I guess.

Monday, November 18, 2002

More Firefly

From Zap2it.com:

A source close to Mutant Enemy, the production company for FOX’s struggling Friday-night science-fiction drama “Firefly,” reports that the network has ordered two more episodes produced, keeping the series before the cameras through December.

This is great news, although I wish they’d just picked it up for the whole season. Unfortunately, after Friday’s excellent episode there won’t be any new ones aired until December. Fox wants to show Happy Gilmore and The Brady Bunch in the White House instead. Perhaps it’s not so surprising given that Fox also brought us such programming as Temptation Island. It’s a miracle that they’re even giving Firefly a chance.

SpamSieve 1.2

SpamSieve IconI just released SpamSieve 1.2, a $20 shareware utility that adds Bayesian spam filtering to popular Mac OS X e-mail clients. New in 1.2 is support for Emailer and Eudora, as well as lots of accuracy, usability, and speed improvements.

Thanks to all the beta testers and everyone who’s registered SpamSieve!

Update: Within hours, someone reported that SpamSieve caused the Finder to crash when launched on 10.1.5. A quick update to SpamSieve 1.2.1 fixes this problem, which was caused by these two lines in the Info.plist file:

    <key>LSUIElement</key>
    <integer>0</integer>

I had hoped that these lines would be a good template to help savvy users make SpamSieve hide its Dock icon. Unfortunately, the OS had other ideas.

Sunday, November 17, 2002

Multiple Majors

From the New York Times:

Having honed the habit of achievement in the race to get into college, students are increasingly pursuing double, triple and even quadruple majors when they get there, amassing credentials they hope will show their diligence and, perhaps, give them an edge getting into graduate school or landing a job in a difficult market.

Fine by me if you want to multi-major, but 42% doing it seems like a sign that the work isn’t very challenging.

Friday, November 15, 2002

Leaky Abstractions

Classy posts some thoughts on Joel’s Law of Leaky Abstractions. I think Joel’s basically right (that one should be careful about abstractions), but he frames his argument in a slightly misleading way.

Here’s how I look at it. An abstraction is an idea, like a specification. It can be good or bad for a particular purpose, but it can’t fail. If the implementation doesn’t conform to the abstraction it’s supposed to, then the implementation is wrong. If the implementation conforms perfectly but doesn’t have the desired effect, then you picked the wrong abstraction. Joel picks an easy target—optimistic abstractions that guarentee that everything is fast and nothing ever goes wrong—and then goes on to show that sometimes those are not the right abstractions to use. Well, duh.

He then claims that the C++ string abstraction leaks:

C++ string classes are supposed to let you pretend that strings are first-class data. They try to abstract away the fact that strings are hard and let you act as if they were as easy as integers.

What’s really going on here is that C++ does not define the abstraction that Joel wishes it did. The C++ implementation and specification do not conform to the string abstraction in his head. If you write your code assuming that strings are first-class you’ll run into trouble, but that would be your fault—not the abstraction’s.

Joel’s conclusion, “The Law of Leaky Abstractions is dragging us down,” is a tautology. It’s like saying “The bugs in our software are the reasons it doesn’t work right.”

Finder Move Problems

Nicholas Riley documents some problems with the OS X Finder. That’s like shooting fish in a barrel, of course, but I’m increasingly of the opinion that we’ve got to document this stuff (and report it via Radar) if it’s ever going to get fixed. I don’t know which problems Nicholas identified, but here are my 7:

  1. The title of the window is “Copy” even though we’re moving.
  2. It asks a question but only shows an “OK” button.
  3. There shouldn’t be a zoom box.
  4. It doesn’t say what permissions have to do with not being able to move.
  5. It doesn’t say how I could fix the permissions if I didn’t want to skip the files.
  6. It doesn’t say which items have the problematic permissions.
  7. The right side of the window looks funky with that disabled scroll bar.

Thursday, November 14, 2002

Yo Yo Ma Switch

The new Yo Yo Ma Switch ad is one of my favorites overall.

You Are a Suspect

From the New York Times:

If the Homeland Security Act is not amended before passage, here is what will happen to you: Every purchase you make with a credit card, every magazine subscription you buy and medical prescription you fill, every Web site you visit and e-mail you send or receive, every academic grade you receive, every bank deposit you make, every trip you book and every event you attend—all these transactions and communications will go into what the Defense Department describes as “a virtual, centralized grand database.”

Wednesday, November 13, 2002

BBEdit 7

BBEdit 7 is out, and it integrates with CVS! Here’s the list of changes. It’s short for a BBSW release, but there’s probably lots of stuff that didn’t make the list. What’s there looks nice, although there’s nothing that strikes me as a must-have. (I thought the CVS integration would be, but after trying it out I think I’ll be sticking with CVL.) Right now my favorites are the new Paste Previous Clipboard command (continuing the tradition of stealing Emacs’s good features), rectangular selections (very handy when working with tab-delimited data), and Close Current Tag.

Sunday, November 10, 2002

Firefly Translations

Keith Devens links to translations of the Chinese phrases on Firefly. I think this is the best show on TV. Every time I finish an episode, I want to rewind it to make sure I didn’t miss anything. Each week it’s enjoyable in a different way. Last week’s episode, “Safe,” focussed on the Wiggin-like relationship between the two Tam siblings. Although this script didn’t quite have the zing of the previous ones, there were still some great lines like, “We need to resort to cannibalism.” (I wish I could explain exactly why this was such a cool line.)

Saturday, November 9, 2002

I Believe Anti-Aliasing Is Not Addictive

James Duncan Davidson really likes Mac OS X’s anti-aliasing. On the contrary, I find it to be the single most annoying part of OS X. (Yes, it’s worse than the open/save panels and the mostly stateless Finder.) I find the text hard to read and ugly. There’s no way to turn it off system-wide. Some programs, like OmniWeb, let you disable anti-aliasing for their content views, but the resulting Quartz text is so poorly drawn that it often looks worse than with anti-aliasing. As a result, I use applications like iCab and BBEdit that draw their content using QuickDraw and thus can display actual screen fonts. (Sadly, Mailsmith, uses anti-aliased text for its lists.) Here are some screenshots of Mac OS X’s anti-aliasing, taken from my ATPM coverage. (Click for discussion.) pcp-fonts pcp-font-smoothing

Friday, November 8, 2002

Code Generation

John Lam writes about code generation as a means of capturing abstractions:

During my code generation experiments, I was able to condense approximately 8000 lines of hand-written C# code into about 600 lines of a custom XML language that was in turn fed to about 500 lines of scripting code that generated a functionally equivalent parser. While I was writing this software, I was continuously amazed by the subtle semantics that kept popping up while I was defining my custom XML language. This led to an iterative development process where I would see a new abstraction, modify my language, tweak my code generator, and then test the results of the change using traditional tools (in my case Visual Studio .NET).

Paul Graham has written a lot about how Lisp’s excellent support for code generation (macros) is its most distinguishing feature:

I wonder if these patterns are not sometimes evidence of case (c), the human compiler, at work. When I see patterns in my programs, I consider it a sign of trouble. The shape of a program should reflect only the problem it needs to solve. Any other regularity in the code is a sign, to me at least, that I’m using abstractions that aren’t powerful enough—often that I’m generating by hand the expansions of some macro that I need to write. (Beating the Averages)
The source code of the Viaweb editor was probably about 20-25% macros. Macros are harder to write than ordinary Lisp functions, and it’s considered to be bad style to use them when they’re not necessary. So every macro in that code is there because it has to be. What that means is that at least 20-25% of the code in this program is doing things that you can’t easily do in any other language. (Revenge of the Nerds)

Tablet PC

Bill Gates says:

The launch of the Tablet PC marks an exciting new era of mobile computing that is limited only by the imagination of its users.
Steven Frank, Newton user, doesn’t find much to like, though:
I hear Bill Gates did quite a bit of Newton-bashing in his Tablet PC introduction. That takes some pretty serious brass, considering that Microsoft has apparently learned absolutely nothing from the Newton’s initial missteps and subsequent evolution. Good luck with that $70 million marketing blitz, you nutty visionary, you.

Seriously, what is Microsoft’s problem? They’ve had plenty of examples to learn from dating back to GO, lots of time and money, and didn’t they hire some of those Newton experts?

Thursday, November 7, 2002

Language Sloganry

According to its designers, Perl makes easy things easy and hard things possible. What I want is a language that makes good practices easy and bad practices possible. That is, it should not penalize you syntactically (as Perl does) for doing things the right way. A language can’t prevent you from doing things the wrong way, but it can discourage the use of certain features by making them cumbersome to use.

Wednesday, November 6, 2002

Tiny Terminal

tiny-terminal-window.pngThis morning when I launched Terminal it drew a really small window. I couldn’t resize the window manually, and only got errors when I tried using AppleScript. New windows were created at the same small size. I thought this might be due to Terminal not being able to find ProFont (my Terminal font), since Mailsmith and BBEdit also couldn’t find it (or any other font in my Classic system folder) this morning. Restarting fixed the BB apps, but it wasn’t until I deleted the Terminal preferences file that it would make windows in the normal size.

Tuesday, November 5, 2002

Doing Three People’s Work with One Mac

Derek K. Miller writes for TidBITS about the thrills of being super-productive and publishing on a tight deadline.

I was preparing for three long days in a Toronto hotel putting together a daily newsletter for the large annual conference of the Canadian Paediatric Society (CPS). I would attend sessions, take notes and photographs, write and edit articles, and lay out three four-page issues, distributed overnight to the hundreds of physicians attending, with highlights of the previous day and pointers for the new one.

Monday, November 4, 2002

Do What I Say

Eric Blair reports that after moving SpamSieve from /Applications/Utilities to /Applications/Internet, double-clicking it launched Acrobat Reader. Other locations worked fine, as did directly opening the executable from the command line. After trashing the LaunchServices database and restarting, everything worked fine. I guess this is just one of those bizarre OS Xisms that I’ll never understand.

Sunday, November 3, 2002

Election Selection

Science News considers different voting procedures, including plurality, instant-runoff, and the Borda count:

Nearly all political elections in the United States are plurality votes, in which each voter selects a single candidate, and the candidate with the most votes wins. Yet voting theorists argue that plurality voting is one of the worst of all possible choices. “It’s a terrible system,” says Alexander Tabarrok, an economist at George Mason University in Fairfax, Va., and director of research for the Independent Institute in Oakland, Calif. “Almost anything looks good compared to it.”

Saturday, November 2, 2002

Python

I’m looking for a Perl replacement, and at this point it looks like it might be Python. I like its compact, readable syntax, and I was very impressed with the quality of the documentation it comes with (in PDF, HTML, and LaTeX formats, no less). Python kind of reminds me of AppleScript in that it should be easy for beginners to read and tweak short scripts that others have written. The other language I’m considering is Ruby. It’s favored by several people whose opinions I highly respect, and is probably the most trendy “mainstream” language these days. I like that it’s pure OO (already, Python’s function/method distinction is bothering me) and that you can add methods classes. Blocks are nice. However, it’s currently second in the running because it seems too heavily influenced by Perl.

ATPM 8.11

The November issue of ATPM is out. I’m particularly fond of Greg’s piece on the practicalities of Internet video piracy and the reviews by Eric and Chris.