shinyblog

Wednesday, November 30, 2005

no programming after 9 pm

I have a rule which I've been forgetting lately: no programming after 9 pm. This is my equivalent of the extreme programming 40 hours a week rule. I'm old enough and secure enough to admit that I'm useless as a coder after seven pm. I can still do decent pixel tweaking and whatnot for a bunch of hours after that, but if I haven't found a bug by seven pm, I'm not going to find it that night.
Some of my co-workers at Laszlo work insane amounts (fer instance, Scott Evans' domain name is antisleep.com) and I've been trying to be like them... even turning up at work before 9 am a few times! but no. I need eight hours of sleep a night; I really truly do. Stopping programming by 9 pm is one of the best ways for me to maintain my happiness and well-being, not to mention my code quality.
In my world, schedules matter on the order of days and weeks, not hours and minutes. If our process is running at light-speed, it takes minimum a day for a code change to go from "it works on my machine" to "it's live." At a more normal speed, we do weekly or semi-weekly builds. So, reminder to self: go to sleep! Now! And eat a sandwich!

over-caffeinated, or, the hazards of being friendly with java juice employees

Today I went on an afternoon fructose run, and treated myself to a matcha shot. That's powdered green tea in one or two ounces of fresh orange juice. One shot is supposed to be 75 mg, two shots is 150. I am a caffeine lightweight, so I usually get just one shot and drink half of it. I think this is one of the tastiest low-sugar ways to self-medicate with caffeine; I can't stand the sucralose/aspartame/red #5/natural and artificial flavors "energy drinks." I've indulged in this treat enough to make friends with one of the employees at the Jamba near the office, and today I think she must have given me a free double, or triple, or something, because it's seven hours later and I'm still rather caffeinated. Er, thank you? I think?

Saturday, November 26, 2005

so that's where my disk space is going: insidious backups

Yesterday, I downloaded Xcode 2.2. This is a 933 mb download, and installs to even bigger than that. I let it install overnight, and I woke up to a message that my startup disk is almost full. Drat!. This is still my three-year-old titanium ibook, with a 30 gb hard drive. I went looking for stuff to cleanup, but I'd cleaned my desktop a few days ago, pruned unused source trees, deleted unused applications... so where is all my disk space going? I found a directory named Backups on the root dir of my drive. Looking inside, it contains "Home Folder Full Backup" from September 22, 2005, and 11.6 gigs of incremental backups for every day since then. Ouch! Ouch! Ouch! I'm using a third of my disk space backing up files to the same disk that contains them... so when my hard drive fails, these 11 gigs of backups are going to be useless.
I'm not stupid, and I've been burnt before, so hell yes I have backups. I backup to cd once a month; my source code and mail are backed up by my employer and gmail, and I periodically drop a snapshot on a remote server. My powerbook has had so many hardware problems in the last year that I don't rely on anything being there tomorrow that was there today. These incremental backups are quite possibly the least useful data I've ever stored on any media anywhere.
I'm a paying member of .mac and I use Backup 3, which comes with .mac, and comes configured with a sensible backup plan. When I was setting up with Backup 3, I think I made some decision like "I'm going to be very cautious and do lots of backups, more than the standard apple recommendations!" Apparently I didn't think that one through completely.
I implore each of my readers: backup to alternate, write-once media, with error checking, stored offsite. If not regularly, just do it now. Today.
I'm starting my work today backing up to cd, starting with purchased music and then going through the really crucial stuff, Quicken and email and pictures and notes. Want to take bets on how much longer my powerbook will last?

Friday, November 25, 2005

a free day for coding!

It's the friday after thanksgiving and have three days to do whatever I want! I want to code. The question is, what should I code? I could dive into a fairly bad set of Laszlo Mail bugs; I've got seven P1's blocking the next milestone. I could learn Ruby on Rails, although I don't have a project I want to implement with it, so let's rule that out. I could return to my Delicious Library laszlo application. I could look at some OpenLaszlo platform issues. I could work on a book chapter I've committed to writing for an early january deadline. I could go back to my skunkworks project that will dramatically improve Laszlo Mail usability.
How to choose? I want to do something that will be fun to do and that will give me that happy coding feeling. (Code is my favorite mood-altering experience, in case that wasn't clear already.) The P1 bugs and platform performance issues sort of fill me with dread. The skunkworks usability project, though, that's exciting. When I demonstrated a prototype a few weeks ago, people were really excited about it. Probably traditional software engineering values would say, quality before features, contractually-required features before strategic features before just cool features... but I say, bah! It's my three days, and I know I'll be spending the rest of November and December on quality and contractually-required features. So, I'm going to dive into the fun usability project, and get back to the bugs saturday or sunday.

Wednesday, November 23, 2005

email faux-pas

Seen in a long conversation on a list which will go unnamed:
I deleted all your comments to save some bandwidth.

Friday, November 18, 2005

everybody's working for the weekend

"I can work all weekend, whether I want to or not."

Sunday, November 13, 2005

mouse wheel isn't supported in flash player 7 on the mac

The Flash 7 release notes explain that mousewheel support was added for windows only. Parse that and rearrange a bit, and you get, "the mousewheel is not supported on the mac in flash player 7." Flash doesn't support it, so OpenLaszlo doesn't support it, so (sadly) Laszlo Mail can't support it.
We've been getting user comments about this, so I know it doesn't work in some cases (including on my favorite dev machine) but I'm not sure if it does work in any cases. Luckily, I don't have a windows box with a mouse with a scroll wheel to try it out on.

Saturday, November 12, 2005

implemented code is nine-tenths of the law

Sarah Allen, the director of the Laszlo applications group, told our team about a planning exercise: give everyone on the team a hundred dollars, assign relative costs to features and open bugs, and let the team members "buy" features. At the end of the exercise, the features which have been paid for go on the "to do now" list, and the others wait for later. Our graphic designer, Peter Andrea, asked, "What about stealing? I want to steal features." "That's what weekends are for," Sarah responded.

Similarly, Sarah told me the first eight hours of work she does a day are what Laszlo needs done; after that, she does the work that she wants to do. Quite a lot of the time, what I want to do is the same as what Laszlo needs done; this is just about the definition of "the perfect job for me." When what I want to do isn't quite what Laszlo needs done, I work weekends. As our CTO, David Temkin, said yesterday, "implemented code is nine-tenths of the law."

Friday, November 11, 2005

speeding up laszlo apps by replacing constraints with $once

Constraints are incredibly tasty for rapid prototyping, but they can lead to performance problems. Each constraint, of the form
<view name="nugget" width="${thingy.width}" ... / >
becomes, at runtime, something like this:
<method event="onwidth" reference="thingy" args="w" >
nugget.setWidth(w);
</method>

Every time thingy's width is changed, nugget's width is changed; that's the point of the constraints. If you don't care about maintaining that relationship, or if you know thingy.width is never going to change, then you're bloating the runtime with event handlers you don't need.

The $once "constraint" avoids the extra event handlers:
<view name="nugget" width="$once{thingy.width}" ... />

My understanding is that this constraint is just evaluated once, when the view's attributes are first set. This will only work for static layouts, of course, and only if instantiation order works right. In this case, thingy must be constructed, and its width attribute must be set, and "thingy" must be in scope, in order for the $once form to work.

I feel guilty when I make images. I feel like I "should" be coding... When I make images there's a tape playing in my mind: "You're not a real designer. This isn't going to look like a real designer made it. This isn't professional quality. This is going to have to be thrown out and replaced by a real designer. You don't know how to use these tools. You're so slow. You're wasting time when you should be coding. Give it up." ...as if my making images was actually wasting someone else's time.
My time is mine to waste! I'm off to make pictures!

flash, linux, fonts

OpenLaszlo/Flash is more write-once-run-anywhere, more zero-install, than anything else I've developed in. However, the linux flash player has some problems which affect Laszlo Mail:

  • There's no 64-bit flash player for linux. If you're running a 64-bit machine, and running Firefox as a 64-bit app, you're just hosed. You'll only see a blank page. We need to add a check for that, somehow. But really, if you're running a 64-bit linux desktop, you're probably a pine devotee, or dyed-in-the-wool thunderbird user. Hell, you're probably a thunderbird contributor if you're running deskt 64-bit linux.

  • We embed the true-type for Futura, but we expect client machines to have Verdana. If Verdana isn't present, we request sans, but in certain configurations, the linux flash player displays a serifed font instead. Looks weird and bad; it's a linux flash player bug. Generally, text rendering in flash/linux is not as lovingly massaged as text rendering in windows and mac os x.


  • The linux distributions I've been playing with (Mandrake 10.2, Mandriva 2006) don't ship with flash player; you have to install it yourself.

  • Only Flash 7 is available for linux; no flash player 8, which is sad, because flash player 8 is way faster.

  • Opera? Oh please. Most of our stuff works in Opera on Linux. I developed in it for a while. There are cetain things which don't work in Opera on Linux, but I'm not sure what they are.

Thursday, November 10, 2005

Laszlo Mail is live!

Laszlo Mail is live. It's a webmail client and server, designed for licensing to ISP's and content providers. It's swooshy and smooth... I love the visual and interaction design. Please check it out and let me know what you think. This is what I've been working on since I came to Laszlo this summer, and the rest of the team has been working on it for more than a year before that. Try registering and logging in; see what it feels like.

Sunday, November 06, 2005

influenza: exponential growth.

I've been reading The Great Influenza: The Epic Story of the Deadliest Plague in History by John M. Barry. It's shocking and terrifying. This is the biggest thing I'd never heard of, and learning about it makes me wash my hands a lot. I'm thinking of stocking up on gauze masks. Seriously.
The "spanish" flu of 1918 killed 30,000 people in New York City and more than half a million in the United States. It was most likely to be fatal in otherwise healthy adults aged 20-40. Healthy immune systems attacked the virus so powerfully that debris from the immune response clogged the lungs. People suffocated in their own blood. Overcrowded army barracks and troop movements facilitated the rapid spread of the virus. They were running out of coffins in New York City. Corpses literally piled up. The flu could kill within hours of exposure. The virus can stay viable in the air for an hour.

Here's the scenario that scares me:
  1. Alfred is exposed to the flu virus. (Let's not worry about how it mutates or crosses the species barrier right now.)

  2. The virus starts invading a few cells in Alfred's lungs.

  3. A few hours later, the first generation of invaded cells burst, releasing around 10,000 virii copies per cel.

  4. Alfred sits down for a meeting with Betty. They pass a whiteboard marker back and forth. Alfred is shedding virus; a few get onto the marker.

  5. After the meeting, Betty touches her nose. Now Betty's infected.

  6. Charles has a question for Alfred about how to use Microsoft Exchange. Alfred pulls up a chair to Charles' computer, and they work together for an hour. Alfred breathes out; Charles breathes in. Now Charles is infected.

  7. Betty goes to the gym after work and works out on a treadmill. Dave and Edward are working out on the treadmills on either side. Now they're infected.

  8. Alfred heads home for the day. He's standing in a crowded subway then he starts coughing. His immune system has mounted its first defense against the virus, sending a cascade of defender cells and antibodies to the lungs, where the virus is reproducing. Alfred is young and healthy, so his immune response is powerful. Infected epithelial cells are killed by the immune system; antibodies stick to virii and make clumps; the virus itself bursts and kills infected cells. So much debris accumulates that Alfred's alveoli can't exchange carbon dioxide for oxygen anymore. He is choking on his own immune response... and he's doing it on the subway, shedding thousands of virii. Alfred collapses and his lips start to turn blue. Alarmed, subway riders call 911; an ambulance comes and takes Alfred to the emergency room. His lungs are so clogged with virii and debris that he is put on a ventilator.

  9. After the gym, Betty goes home, goes to sleep, wakes up in the middle of the night coughing, and dies.

  10. Charles starts to feel ill the next morning. He stays home from work for a day, then another day, and another day. He has the flu, and he recovers without incident.

  11. Dave starts to feel ill. He stays home from work. He conquers the viral infection, but his immune system is so depleted by the effort that it can't defend itself against normal airborne bacteria. After a week of the flu, Dave gets pneumonia. His family takes him to the doctor, who recognizes bacterial pneumonia, and puts him on amoxycillin. Alas, Dave's bacteria is resistant to amoxycillin. He doesn't get better after a full course, so his doctor puts him on erithromycin. After weeks of illness, Dave recovers.

  12. Edward wakes up feeling ill the day after he was at the gym with Betty. He feels short of breath, and is scared, so he goes to the emergency room... but finds dozens of people in the waiting room, all as sick as him. Edward is admitted to an overcrowded hospital ward; not enough beds, doctors, nurses, or ventilators. Edward dies.

  13. The paramedics who took care of Alfred when he went to the emergency room become ill. So do the other healthcare workers who treated him. So many healthcare workers become ill that hospitals and doctors offices cannot be fully staffed. More deaths.



That's probably enough of that: easy transmission in close conditions, rapid virus replication and shedding while asymptomatic, viral infection raises susceptibility to bacterial infection. Breakdown of healthcare institutions, then breakdown of civil society. It's going to happen. I'm not worried about will I get sick and die? I'm worried about, will modern society survive the pandemic?

Saturday, November 05, 2005

on purchasing apple hardware. or not.

Yesterday I wandered into a Circuit City after a long day of pretty damn good programming. I had a few minutes to kill so I walked the retail circle... and I came upon the iPod Shuffle. So I'm thinking, "Well, I've been working hard, and my iPod is broken, and having an iPod is pretty crucial to going to the gym, and I'd really like a tiny one like the shuffle, and the nano is out of my price range..." Staring lovingly at the white sliver of plastic, part of that thought caught my attention. My iPod is broken. Wait. This is the third iPod I've had. This is the second iPod i've paid for. This is the third iPod that's broken, and the second iPod that's broken out of warranty. Why on earth would I buy another iPod? I walked out of the Circuit City with all the cash I had when I came in, pleased with myself that I hadn't bought another fragile, doomed gizmo.
I buy apple hardware because I love OS X, which I can only get on this hardware, and because I love the industrial design. I can have the fundamental experience of walking around listening to MP3's with a gadget from any manufacturer, and toughness matters more than looks. I'm not going to throw away another hundred dollars away on shininess.

Tuesday, November 01, 2005

quick & easy installation (4:47 remaining)

I'm in my "one week, no software configuration" blackout, but a Mandriva Linux 2006 install cd fell into my linux box's cd-rom drive a few days ago, and when I restarted, it booted from the cd and asked very nicely from which media I would like to install. My local linux guru told me that installation would be super and wonderful and good, so I hit install. Ah, apparently the whole install was not on the cd. The installer asks if it can go out to the web to get the rest of the pieces. I say, okay sure. A few clicks later, I was looking at delightful illustrations of penguins and promo text reading "Quick & Easy Installation!" At the bottom of the screen there's a long progress bar captioned, "Time Remaining 4:47." Yes, hours. Arg! Apparently it's got a whole lot of bits to download.
The question now is, do I cancel the installation so I can get work done tonight?
[later]
I tried to cancel the install both by hitting the "Cancel" button and the "Exit Installation" button. There's no indication that it got my click for a few minutes, and then a content-free large grey rectangle appears. A few more minutes go by, and it's replaced by a progress output list labeled "Installing" that lists all of the packages its installing. I told it to cancel!.
[later]
"Time Remaining 01:02"
[later]
"Time Remaining 01:04"
I am now rather pleased with my habit of daily backups to alternate media.