May 30, 2007

Lazy Blogging Continued

Here is a great posting I just read on Slashdot ( that is full of nuggets about the Reiser4 and ZFS file system implementations and the tradeoffs they make. Interesting stuff to a database geek.

Because of CouchDb's copy-on-write semantics, the storage engine doesn't rely on ordered writes, just in case you were wondering. MySQL has a pluggable storage engine layer so each storage engine does it's own unique thing, which allows for lots of tuning opportunities.



Was going to blog. Can't keep eyes open. ZZZZZZZ.


May 28, 2007

Code rage

I've learned long ago most heated arguments are pointless exercises. That's not to say I never get into them, I do. I just realize they are pointless. But sometimes I can't help myself.

The reason they are pointless is because when an argument becomes heated it means it's getting emotional. At this point, neither side wants to be convinced and the chances of any rational discussion goes to zero.

When this happens to me, it's usually because I perceive the other side is refusing to listen to reason. And I tend to get mad. I feel it in my shoulder's, a frustration that rises and becomes irritation. This irritation becomes anger. Anger becomes "Why won't this FUCKTARD acknowledge FUCKING REALITY!!!" and then productive communication ceases. Plus I want to win.

Been there. Done that. Way too many times.

So I try not to get into those arguments, it's pointless. But still I do sometimes.

Anyway, recently, I was dealing with some particularly frustrating work related thing, filing expenses. The process seemed unnecessarily convoluted and it started to annoy me. A lot.

Then I noticed I started getting that tight feeling in my shoulders. I started to feel anger. But I continued.

And I got angrier.

And I yelled out "GAHHHH!! I HATE THIS SHIT!"

Then I felt slightly better.

After calming down a little I realized that because the process didn't seem particularly rational, I was getting frustrated with it in the same way I'd get frustrated when arguing with a person. Only the expense process is the most pig-headed debater ever. Any demands to explain its self are met with silence. It never responds to reason, it has no pity or remorse. All I get from it are the next steps in the process.

The expense process might be completely rational, but I can't tell. To me it looks like it's complicated just for the hell of it and it mocks me when I'm not looking.

Then I realized not only did I feel like this when arguing with people and expense processes. I had experienced this exact anger when programming. A lot.

When using Erlang and the OTP libraries, some parts seem so non-intuitive and cumbersome as to be downright illogical. It becomes extremely frustrating, they seem to be annoying and contrary just for the hell of it. Those bastards!

Many times working with Erlang I became angry. The same frustrated, "why aren't you more reasonable!?!" anger. And I would literally lose my temper, swearing out loud at code and text and wanting to slap some sense into the API.

Oh yeah, and Antlr too.

Antlr, I remember as I was first picking it up, just seemed so odd and complex that it made me mad as hell for days on end. It was tough going, I would start to work with it, get frustrated and feel anger, physically, in my body and have to get up and walk around to try to diffuse it.

I know other people get this, and no wonder so many give up on their projects. Sometimes wrapping my brain around something actually feels as if I'm physically wrapping my brain around something. Trying to get anything done can make me mad as hell with no one to yell at except stupid code and documentation.

Fortunately -- while I'm not a patient person -- I am a forgiving person. And in the case of Erlang and Antlr, I made an effort to forgive them for being so damn weird and hurting my noodle, and I tried to see the world through their perspectives.

Try as I might, I can't make the anger magically stop. I can only deal with it as is comes, manage it and try to put it to good use. And so I persevered, tried to work of my anger in he gym (really there's nothing like lifting heavy weights to relieve aggression) and eventually figured out where these crazy tools were coming from. They've both changed my mind for the better.

And they both still piss me off sometimes, but we're still friends.

Now if I could only learn to do that with people.


May 27, 2007

Still no flying-cars though

Here's a video of me showing off my Air Hogs Havoc Heli. I got mine at a local Target store.


May 26, 2007

Let your geeks roam free

I was thinking about Kubi and how bad we screwed up things there and why.

Kubi was a VC funded startup where we were going to fix what was wrong with email. Lots of people know the pain and chaos of being swamped by emails on a regular basis. You inbox might look something like mine:


We were going to fix the mess of the inbox by creating project specific collaboration. Integrated into Outlook or Notes, you could have an nice structured place to share documents and sales leads and plans to dominate the Earth. You create a space. Invite people to it. Share documents. Blah blah blah, peace, love and happiness. And it worked offline.

There was a really cool thing about Kubi ( and by cool I mean completely unworkable): It used email to communicate between Kubi clients.

Instead of using a centralized server to coordinate updates, it used the existing messaging infrastructure so that Kubi clients could communicate in a decentralized manner. It was like peer to peer but even better than peer to peer because it actually had servers involved, your already existing email servers.

Building a email done right on top of email done wrong, it turns out, is really hard. I wasn't at Kubi from the beginning so I can't say what the Kubi vision was early on, but by the time I left it became a way to share 30 meg powerpoint presentations with versioning, access control and encrypted communications.

There were tons of obstacles. For example most email system had limits on attachment sizes, so we had to break up big files into smaller messages. I designed and wrote the chunk-ifier, which broke up large messages into smaller chunk messages and reassembled them on the receiving other side. I remember I wrote some code that looked like this, which to me, in a wearied state of delirium, was the very height of hilarity:

A: How do you feel?

B: Better...

A: Better!?!

B: Better... Get. A. Bucket.
BlowChunks(msg, ....);

Maybe I'm delirious now, but the joke still cracks me up.

Anyway every time someone made a change to a document in a Kubi space, it had to the put little encrypted chunks of message data into email messages and send them to other Kubi clients so the clients could read the messages out of the user's inbox, reassemble and decrypt them and make the corresponding change in the local replica of the Kubi Space. And if for some reason a email message didn't get delivered, the system could even figure it out and resend the data and sync things up.

This is how we built email done right. A brilliant solution to the collaboration problem, wouldn't you say?

If you just agreed with me then please slap yourself. Because it's a horrible, horrible solution. Besides being extremely complex (EXTREMELY complex. I still shudder to think about it) our system was built on a false assumption: That email is in any way a reliable transport.

Email just barely even works as email. With all the spam filters, virus scanners, white lists and "roll your own" mail rules, getting these opaque encrypted messages successfully delivered and processed was getter harder, it seemed, by the day.

The biggest failure on our part was not getting our heads around how bad the email ecosystem was. We should have figured this out sooner and switched to a different transport and model.

Part of the problem at Kubi was so many of use were ex-Iris folks. Iris made Lotus Notes and Domino and Iris lived and breathed email. Email was a central part of Notes and we ate the hell out of out own dogfood. Nothing was filtered in our internal system. No spam filters, no virus scanners, no rules, no message or inbox limits.

We didn't appreciate how onerous and over-protected (or in the case of many small Outlook/Exchange shops, seriously under-protected) the rest of the corporate world was. We didn't really have a clue what most of our prospective customers were dealing with.

But we weren't entirely to blame, we were hobbled by lack of contact with the customer. The sales and marketing folks pretty much kept us away from direct contract with the customers. Instead they were the messengers and translators between customers and the geeks. Geeks couldn't talks directly to customers. No way.

I think I know why. These guys are hustling to get sales and they don't want us geeks screwing it up. I don't know what it takes to do sales, but those guys seemed to be pretty damn good at *something*. I just can't quite pinpoint what that was. I remember them being very entertaining to listen to in their presentations, but I don't remember much else.

Anyway, we geeks pretty much never got to talk to customers. I won't say never, I remember at least one meeting with a customer. But we had no email or online collaboration with the customers.

We asked a few times to allow us to set up an online forum, where customers could post questions and give feedback and we could interact, maybe even build a little community and get some online advocacy.

Nope, marketing didn't like that idea. They wanted to make sure the early customers were "carefully managed".

And that was hard on us. We came from the Notes community, where we could interact freely with customers. At Iris we had built a very strong community and it was very valuable to help us build a better product for a our customers.

I think one reason the Kubi sales guys didn't want to us to interact with customers is because engineers can scare customers. Engineers might come into a meeting with a customer to find out they have a firewall that blocks all unknown attachment types and say things like "That's going to be a problem". Yeah, for sales guys, that's definitely going to be a problem.

Salesguys like to carefully manage customers by telling them we can deal with whatever system configuration they have. Engineers might shatter the illusion of ultimate competence and flexibility the sales guys need to project at all times.

Or so I'm told.

Maybe that wasn't the reason at all. Maybe it's because we engineers are rude louts who will do typical nerd things like scold customers for not running the latest patches on the Solaris boxen, or joke how the customer's bald head makes him look like Captain Picard.

Yeah, we geeks are annoying bunch. More than one rich moneybags has had his monocle pop-out in mortification at our antics. I can see why the sales guys are afraid.

But really they shouldn't be. Customers are ready to tolerate it. Not only are tolerate, they actually expect it.

[Man, look how much I've written and I'm just now getting to me point.]

Customers want geeks. They've seen geeks. They know geeks are annoying. They know geeks say weird things. They expect it.

They want you to have geeks. Big damn geeks. You're a tech company and you don't have geeks working there? And you want me to trust you because your hair looks good?

Gs Copy

Fortunately, most people's perceptions of computer geeks are a bit more nuanced than the Geek Squad's stylized, fairly harmless version of a geek. But Geeks Squad's runaway success is a strong indication of what people actually expect when dealing with technology. Geeks!

If you ain't got geeks, then you ain't got technology.

Most customers don't know technology very well, they don't know good tech from bad. But they know geeks when they seem them. They know they are inept, say weird things and maybe have bad hygiene. And customers are actually assured by this.

So let your geeks roam free. You need them for geek-cred, they might actually learn something vital and they probably won't completely piss off your customers.


May 25, 2007

Blogger's block

I haven't had much desire to write lately. Not sure why. Maybe I need a kick start.

Maybe I'll write about what it's like to work for MySQL. Or tell you about my new remote control helicopter I bought for $30 (it rocks). Or what I eat for breakfast most mornings. Or a review of Spider-man 3. Or some of the things I hate about my favorite language, Erlang.

So for the next 7 days I'm going to post something everyday. No matter how inane. Lucky you, loyal reader.

There, I said it. Now I have to do it.


May 7, 2007

OS X Gripe

Ok, let's say I'm copying a bunch a files from Computer A to Computer B (for example, gigabytes of family photos onto my wife's new MacBook) and in the middle of the copy operation it stops with an error (for example, my Dell machine falls off the wifi network).

I understand, the network goes down, it's a problem. Fine. I drag the same remote folder to the same target location.


I don't want either of these options. "Stop" is clearly not what I want, and "Replace" means it's going to resend every file across the network and write it to disk, even if the damn file is already there. Please don't make me start the whole damn thing over.

I want a "Restart Copy" option, so that it only copies the files that don't already exist.

In addition to constantly falling off the network, the Dell's built-in 802.11g wifi is always far far slower than it should be. It's not so slow as to make web browsing painful but slow enough that several gigabytes across the network will take a couple of hours. For a copy operation that size, it's a total crapshoot if the copy operation will complete before it drops off the network again.

Fortunately I know how to use the bash command line and cp with the right flags to do what I want (I'm a computer expert ya know). But I shouldn't have to be an computer geek to do simple thing like copy files from Machine A to Machine B.

XP didn't get this right either so Apple is hardly alone. I don't know about Vista. Maybe some Linux distro does it right.


May 3, 2007

Your existence gives me hope - part 2

Last week I was walking in San Francisco, hurrying about to see interesting things before my trip home the next day. I came across a message spray painted on the sidewalk. I didn't have a camera but here is an example found on Flickr:


I looked at it for about 5 seconds and kept walking. But the message stayed with me. I repeated the words in my head and it made me feel good each time I did. I kept thinking about it as I walked around, wondering who put the message there and why.

The words stayed with me a few days, each time I'd think them I'd have pleasant thoughts. I imagined a person touched by the unexpected kind actions of another. I imagined the happiness of someone being told they inspired someone else. I imagined someone grateful for another person but too shy to say so. I imagined people who inspired me and others. I imagined that I was filling someone with hope just by being me.

Everything I imagined was nice, everything made me connected and happy.

I began to think the message's only purpose was to inspired happy thoughts. And for me it did. I think the mystery was a big part of it. Why this message and to whom? The mystery kept me thinking about it. And it was nice.

So I decided to post the same message without explanation or comments so that you would read it and maybe wonder about happy things for little while. I hope it worked.


I'm a Mac?

I'm writing this post on my spiffy new 15” MacBook Pro. This isn’t the first Mac I’ve had for my work, but this is my first “primary” machine that’s a Mac.

This is an odd turn, it wasn’t that long ago I used to think Macs were a joke. When I was at Iris/IBM we always supported the Mac as platform, but most of us just wished it would go away. Compared to the NT 4.0, Windows 2000 and XP machines most of us ran, they were slow, overpriced and crashy. And far from simple or beautiful I found them exceedingly frustrating to use. Cool? Sure, if this is the introduction to the opposites. The small contingent of Mac faithful at Iris were significantly odder than the rest of us (and that's saying something).

But that was then, no one is laughing at the Mac now. This machine is fast and beautiful and it feels high quality to me, OS X is clean, subdued and usable and the total price is pretty competetive with Windows machines.

So why switch now?

I noticed a while go I really didn't have much use for Windows as an OS. (Almost) everything I use regularly is also available on the Mac or Linux. Email, web browsing, word processing, yada yada yada.

But I didn't want to switch.

I’m now an engineer for MySQL AB. My side projects are server based. I’m not really interested in developing desktop apps, I’m interested in back-end, heavy lifting software. In the regard, the market has spoken: Unix OSes, particularly Linux, are going to dominate the server OS market for many years to come.

 Data Mmcp Novice New Upload Linux-Penguin.Picture

While MySQL does support the Windows platform, our own development tools are heavily Unix-oriented. Cygwin, as impressive as it is, doesn’t quite fill the gap. Leaky abstractions and all that.

Unix-based systems are only going to become more important for web and back-end developers. As a server platform Windows looks more and more like pointless vendor lock-in. A development dead end.

So for me as a engineer, OS X makes perfect sense. Like Linux, it’s Unix down deep, and unlike Linux it is powerful and beautiful. And as advertised, everything just works.

The switch is paying off, I’m getting comfortable and productive with the Unix command line and the MySQL development tools work so much better. Most of my Windows apps have equivalents available for the Mac (and they usually look better) and for everything else I can run Windows XP under Parallels.

Damn Newfangled Keyboard

So far the hardest thing I’ve found moving to the Mac is the keyboard arrangements and shortcuts. I was using all sorts of editing shortcuts that I wasn’t really conscious of until I switched. It can be terribly frustrating moving a new OS with new shortcuts. For example, I use shift+delete to cut to clipboard (a habit I picked up from OS/2), which on the Mac deletes but does not cut, but I don’t realize it until I go to paste.

Photo 189

It was pretty painful for a couple days, but after about a week it was manageable and now I have almost no problems. OS X feels nearly as comfortable as Windows. And the MacBook touch pad work better than any Windows laptop I've ever used.

OS X isn’t quite as stable as Windows XP, it’s locked up I’d guess 4-5 times since I’ve gotten it, which is pretty crappy compared to my desktop PC. XP has proved remarkably reliable and stable for me, OS X isn't there yet. However Apple pushed out a big update last week and I haven’t locked up since (crosses fingers).

One source of annoyance is my Windows XP/Dell notebook coming out of sleep/suspend or whatever the hell it does. Closing the lid on the Dell notebook was something I generally tried to avoid, I’d guess every 8th time it would get hung and I’d need to hold down the power button until the machines reboots completely. But when I close the cover on the Mac it goes to sleep. Open it, it wakes up. Every. Single. Time.

The UI on OS X is a little more sluggish than XP. There are more occasional, unexplained pauses. Even with dual processors. But then I’m running large builds and database test suites, so YMMV. It’s almost always snappy enough that I don’t get annoyed, but I do notice it. Except for when XP has to spin up the optical drives just to show me a file-save dialog (that soooo pisses me off), XP is usually faster.


Stability issues aside, I’m quite happy with it. But I’m not completely Windows free yet. The one Windows tool that I just can’t live without: Visual C++.

Ironically, a tool for developing software on the Windows platform is the only MS tool I want to use on the Mac. Fortunately Visual C++ 2005 Express runs very well under Parallels VM. Code completion, symbol lookup and kick-ass debugger, it rocks. For C/C++ development, MS is still too far ahead of the game for me to cripple myself with lesser tools.

My Wife's a Mac Too?

So while I’ve found really good reasons to use a Mac for work, what I’ve actually discovered is the reasons for my wife to use it are even stronger. My wife’s computing needs are far simpler than my own, and her need for “it just works” even higher. So we got her a Macbook.

Photo 113

But it’s not the Mac itself that’s so compelling, it’s the bundled iLife stuff that comes with it. The apps are extremely usable and polished and seem to do most everything we need. Perhaps equally easy and powerful apps are available for Windows, but they certainly don’t come bundled free.

Photo 94

This is becoming increasingly important to my me and my wife. We have a 3 y/o girl and another on the way.

Photo 177

[pause for congratulations] Thank you!

So naturally we generate a large amount of digital media and it’s increasing. My wife needs to be able to manage our photos and make DVDs from home video. We’ve tried using PCs, but doing anything other than the most basic stuff is just too cumbersome and frustrating.

Photo 99

And so, for whatever reason, Windows is becoming irrelevant to both my line of work and my personal needs. I relied on Windows for a long time, but today my family and I are now Mac users. That's a surprise to me.

Photo 132