thinair

Boulder, Colorado

elevation 5400 feet

your guide: Eric Dobbs

PDA development quick links

Friday 25 April 2003 at 14:56

A collection of links I want to explore in more detail:
* prc-tools.sf.net
* PRC-Tools on Mac OS X
* Palm OS Emulator
* Rendezvous developer info
* JabberBeans

blog changes tonight

Thursday 24 April 2003 at 19:16

Ladies and gentlemen, the captain has turned on the fasten seat belt sign. We expect a little turbulence this evening. We'll see if we can find some smoother air, but in the meantime, please return to your seats.

Update: Ladies and gentlemen, the captain has turned off the fasten seat belt sign. Feel free to move about the cabin. If you look out the right side of the aircraft, you'll notice a few changes in the landscape, most notably excerpts from Reflection in the sidebar. For our frequent flyers this means you will start to see the less geeky stuff posted there.

Commuting, not coding

Monday 21 April 2003 at 22:44

I live on the north side of Boulder. The new contract is in Denver. Not too far from downtown, but not easy to get to by bus. The commute is taking an hour an a half to two hours each way. I have been using that time to write blog entries in my PDA, but I haven't got a smooth path from PDA to blog yet. More importantly, my recreational coding time has all but vanished. I don't have time to blaze the trail from my PDA to blog. Frustrating.

The Insurance System Sucks

Monday 21 April 2003 at 18:00

I have been under four different health insurance policies in the last twelve months. Now I'm officially angry. Last week I found out my allergist isn't part of the new plan and they won't pay for my current prescription. Today I found out my dentist isn't part of the new dental plan.

The notion of managed care is swell, until a change in plan changes your physicians. Those changes are determined by the employer and not by the patient.

I want health care that's decoupled from employment. The current system is interfering with my healthcare.

I would prefer to be part of a city-wide policy because my doctors and I are all very likely to remain in the same city. Whereas changes in employers are like the changes in the weather. Colorado small businesses have repeatedly asked for help with the cost of providing health insurance to their employees. I would love to see something which solves both problems.

Test-driven code duplication

Friday 18 April 2003 at 14:59

Thursday, I was test driving a DAO. At the moment it's almost entirely pseudo implementation -- no actual SQL. The interface is already designed, I get to write the SQL.

Unit testing the SQL is causing code duplication. I'm using EasyMock objects for the Connection, Statement, PrepairedStatement, and ResultSet. I end up basically writing the implementation in the test and then writing it again in the DAO. Something stinks. I think it has to do with the way EasyMock sets expectations. It would look differently if I used MockObjects, or if I rolled my own mocks. But EasyMock saves me the extra work of writing and maintaining the mock objects.

I want these tests to be independent of the database.

Test driving IDEA

Thursday 17 April 2003 at 13:37

The pun is intentional. While I have been getting acquainted with the code I am taking over for my new contract, I have also taken advantage of the the trial license for IDEA. The app is using Struts in JBoss, both of which are new to me. You can expect to see some Struts-Turbine comparisons as I get more familiar.

Today I started test-driving some new code in the data access object.

My very first impression of Struts this week was frustrating. Hunting from the struts-config.xml to the objects and JSPs annoyed me. At some point I will probably grok the need for the extra layers of indirection. This week it just bugged me. And then I installed IDEA.

I learned regular expressions from BBEdit and quickly became an evangelist for both. In the past three years, I have become an emacs junkie. I've never been impressed with any IDE, always returning to the comfort of the all-mighty text editor. I've read plenty of accolades for IDEA, but remained skeptical. In the first ten minutes, after setting up the project, I was ready to spend the money.

Setting up the project was intuitive. I didn't read the docs at all -- and didn't even notice that until I started writing about it today. I read through a few tips-du-jour and left it on. I never do that! The tips are entirely relevant.

What I noticed first was the todos extracted from the comments in the code. Not a wiz-bang thing, but incredibly and immediately useful. (Contrast that with the MS Paperclip.)

Next I noticed the local version control. I first used CVS for a safety net in my hobby projects. I have missed that since I joined Turbine and learned to never commit if it doesn't compile. In the back of my mind I have occasionally toyed with trying a local repository in conjunction with the real thing, I have chosen to just do without. I had forgotten about it until I saw the feature in IDEA. I immediately had to see the diff and rollbacks in action. How totally excellent!

Most importantly, in these few days I haven't found any annoyances. That never happens! Preferences have been easy to find. Keyboard access for everything is excellent. Ubiquitous name completion and JUnit integration are also excellent. I love having the "grammar checker" warn me about the syntax errors before I compile. My only challenge is training my fingers new keystrokes.

Back to Struts, IDEA was immediately useful in loading classes by name while looking at struts-config.xml. It took away the nuisance of the indirection. I realize now that this is one of the critical services offered by an IDE: making layers of indirection easy to navigate.

I know the refactoring goodies are cool, but fluidly navigating the code is what facilitates the understanding that comes before code changes.

IDEA rocks!

Server side spam filters

Monday 14 April 2003 at 18:24

I started my new life as an independent contractor today which is very good news. The bad news is I don't have Mail.app's spam filter at work. I was wading through junk mail today. It's enough to make email completely unusable. Time to go find a procmail solution.

I am going to miss the ease of the Junk button.

Serpico

Wednesday 09 April 2003 at 17:13

This movie has been kinda haunting me for the past week. Sarah and I rented it several weekends ago. It is based on the true story of Frank Serpico, a cop of remarkable integrity who blew the whistle on rampant corruption in NYPD in 1970. The movie portrays NYPD like the mob, spending most of their time shaking down criminals for hush money.

It's an excellent movie, but it is the real story which I find sobering. As recently as 1970 the integrity of the NYPD was thoroughly compromised by payoffs. Even the highest ranking public officials turned a blind eye to the problem rather than risk the damage to the image of the department. Image was preferred over substance. It's now obvious to me that I've been deeply naive about police work. It has made corruption into something real for me, not just speculation.

A couple years ago this country was agitated about chads and ballots in Florida. And until the war drums started beating there was a ton of press about Enron and WorldCom. I first noticed the war drums around this time last year, the same time that questions were asked about business practices at the former companies of Bush and Cheney. I sarcastically predicted to Sarah that we would be at war with Iraq in time for the elections. I was progressively more disturbed by how close I was to being right. Then I was shocked and frustrated by how well the war drums effected the elections.

It's all frustratingly conspicuous, but more frustrating because, like any good conspiracy theory, it's completely unverifiable. All suspicion, all circumstance, all compelling but vaporous.

Serpico doesn't have anything to do with all of this. It's an excellent movie that I happened to see when too much of my attention was wrapped up in a war and in my mistrust of the Administration that started it.

Reservations about this tipping point in Iraq

Wednesday 09 April 2003 at 14:14

I'm sincerely happy for the Iraqi people who are celebrating in Baghdad today. This war has gripped me with very mixed emotions. Even as I have opposed US military action, I have been unable to imagine a convincing non-violent way to remove Saddam Hussein from power. I don't object to the ends, but I do object to the means. I wish Gandhi could comment on it.

Google pointed me to some quotes from Gandhi that articulate my concerns about the use of violence even for as noble a cause as liberation from tyranny. Both quotes are from Gandhi's thoughts on violence and terrorism

I object to violence because, when it appears to do good, the good is only temporary; the evil it does is permanent.

A perfect example of long-term consequences of violence, this war was precipitated by the US support for Iraq in their war with Iran, who were supported by the Soviets. The US and USSR waged war with each other through these middle eastern countries. Iraq and Iran had their own animosity, but their conflict was fueled by the super powers. In our fear of communism we armed Iraq with the very weapons which originally motivated our present invasion. The Iraqi blood Saddam has spilled is also on our hands, not Saddam's alone. Perhaps this is a long overdue correction to the imbalances created in our protracted cold war with the Soviets. But that isn't the spin we get from the White House. Instead we get a Hollywood-style spin, ironically, with the US wearing white hats and Saddam and his sons in black hats. Good propaganda is true, but simplistic and one-sided. Even as the Iraqi's celebrate, I believe strongly that violent solutions create as many problems as they solve.

It is an unshakable faith with me that a cause suffers exactly to the extent that it is supported by violence. I say this in spite of appearances to the contrary. If I kill a man who obstructs me, I may experience a sense of false security. But the security will be short-lived. For I shall not have dealt with the root cause. In due course, other men will surely rise to obstruct me. My business, therefore, is not to kill the man or men who obstruct me, but to discover the cause that impels them to obstruct me and deal with it.

More conflicting emotions. I'm sincerely happy for the Iraqi people and optimistic about their future. But I wonder about the repercussions of preemptive and violent overthrow of a foreign dictator. It's like a code smell that I can't quite identify. I'm fairly sure the violence has something to do with it. It's a big ball of mud that I don't know how to refactor.

Update: My earlier letter to the White House provoked an interesting conversation on this subject

Mail.app spam filter, evolution and breeding

Monday 07 April 2003 at 16:19

Charles reports that Mail.app only catches 20% of his spam. It catches about 80% of mine. Maybe the filtering database has gotten fowled somehow.

The success rate varies for me. For a while base64 encoded html attachments were getting through. But I dutifully flagged them as junk and Mail seems to be catching them more consistently. In some recent mutations spammers are *M *E *S *S *I *N *G with words in the subject line and adding random noise fdxciqwea.

The virus mutates. The new strain is virulent until the antibodies in the population develop and correct the imbalance. The pattern is the same whether the virus is SARS, or CodeRed, or the NPR funding hoax.

The first Mail.app preference I turned off was 'Display images and embedded objects in HTML messages'. Hit counts for links to images provide spammers with immediate feedback about which mutations are surviving spam filters in the wild. Unfortunately, there are enough mail clients providing that feedback that the spammers can breed the mutations which are most effective at evading filters.

Now if only I could get a bayesian filter installed on my snail-mailbox.

Damn web browsers! Damn web applications! Damn XEmacs!

Monday 07 April 2003 at 16:13

I don't know who to cuss at! I was working merrily away on a reply to Charles Miller's post about the Mail.app spam filter. I was nearly done, just editing for brevity when BAM! The window disappears. "What did I just do?" I checked through all open windows. Nope. My reply to Charles was gone. Data lossage always sucks. But what did I do? (Please find the link to Charles' post in my rewritten reply. Grumble.)

I was typing into a <textarea> in Safari in Movable Type's New Entry form. One thing I like about Safari is I no longer have to cut-and-paste in order to check my spelling.

But then I hit the keystroke to copy some text. You know the one. Command-W.

The mac user asks "doncha mean Command-C?" The emacs user asks "doncha mean Meta-W?" If you use both, maybe you know my pain.

For those of you who don't: The Quartz window manager maps the Command key to Meta. So the Meta-W keystroke, which copies a block of text in XEmacs, is Command-W on an Apple keyboard. And Command-W is the keystroke which closes windows in MacOS. My fingers don't always make the transition from XEmacs key bindings to MacOS key bindings when I switch between apps.

If I had been using any text editor instead of a damn web browser to compose my reply I would have been prompted to save my work before closing it. But Safari merrily closed the damn window when I told it to.

I think I'll file that as a feature request: please make Safari smart enough to recognize a web form. Identify the window as unsaved if text is edited in any of the fields. Prompt the user for confirmation before closing a window containing an unsaved form.

But I will probably also go back to composing my blog entries in emacs and cut-and-paste them into Movable Type's form. If I get really ambitious I'll write an emacs module to submit new entries. Naw. Who am I kidding? It would be easier to switch to blosxom and just upload the entries.

Welcome to NeXT's best thing, James

Wednesday 02 April 2003 at 11:26

Why didn't they make OSX years ago? They did. Almost fifteen years ago. But they lacked an important bit of market penetration until their stealth takeover of Apple in December 1996. So they also lacked useful commercial software. I jumped on the bandwagon four years later, but I've already blogged the nostalgia of my little silver cube.

I found a nice article from October 2000 while confirming the important dates. Fun review of Apple and NeXT history. NeXT Computer: when cool wasn't enough