How I Get Stuff Done  

I've been meaning for a while to sort of document how I get stuff done at work. It was just over a year ago that I bought my MacBook Pro. Within a week or so, I started using it at work. Probably within the first month, I'd completely moved to my MacBook as my sole work machine. After a year, and particularly since the upgrade to Leopard, I've kind of worked out how I get stuff done.

Let's start with my environment.

IMG_0337
The front wall of my office with pictures taken by a former co-worker. And, of course, the famous "Dwight" flasher flyer from "The Office"

IMG_0334
The shelf behind me containing random stuff I've gotten from eating kid's meals and ice cream sundaes. And some Yankee Swap gifts. Oh, and I have some windows. That makes my life nicer.

IMG_0332
My white board and busted ass bookshelf. And my cool VT light switch cover from Matt, and some random stuff I've collected and hung up.

IMG_0333
The view of where I sit. I used to use that big ass monitor to do a dual-monitor display, but since I've been moving around so much each day, now it's just there to keep people from having a good look at me.

IMG_0335
Finally, the MacBook Pro, my Motorola Q, my 30GB 5G IPod, my noise canceling head phones, and my phone that I don't ever answer or use. And yeah, that's Win2k running in Parallels. More on that in a bit.

So that's where I do my work.

My Mac is setup in a very particular way. The upgrade to Leopard with Spaces has made my life considerably easier. It's probably easiest to roll through how my Spaces are setup.

Space 1
This is where I use my browser, which is currently Firefox 3 Beta 3, and sometimes Safari 3.

Also running on this space is my "chat" clients. We use Jabber at work, which works nicely with Adium. I've also got Twitterrific running on this space.

Space 2
Here's where my Terminal lives, which is just the default Leopard terminal. Tabbed Terminals make me happy, particularly once I made the default tab switching hot keys to be Command+Left and Command+Right.

It's all command line and vim and mysql. Good times.

Space 3
Space 3 is where iCal and Mail live. Mail is just downloading my mail from Gmail. iCal is doing some cool stuff. I have most of my life in Google Calendar. iCal subscribes to my calendar feeds from GCal (including my work Outlook calendar--more on that in a second).

With all of my stuff in iCal, I then use the Missing Sync for Windows Mobile to sync my calendars to the previously mentioned Motorola Q (which also connects to my work Exchange server, so it's almost as a good as a Blackberry).

Space 4
It's the Windows space! I've got Win2k (don't ask, I had a license lying around) running in Parallels, in Full Screen mode. Parallels runs pretty much just so I can run Outlook (for work email and calendaring) and so I can occasionally test stuff in IE6.

My Outlook runs a plugin called SyncMyCal to sync my Outlook calendar off to Google Calendar (which then gets sync'd down to iCal, as previously described).

Other software that occasionally comes in handy:

  • NeoOffice (though it's slow and bulky and I'd switch if there was a viable alternative)
  • iTunes (obvs)
  • MarsEdit (for doing this sort of stuff)

That's how I get my work done. Anything else I should be using?

Bad Week. Really, Just a Bad Wednesday  

So, last week:

  • I worked pretty late every night on stuff that, for the most part, has nothing to do with my job
  • Worked late enough on Wednesday, that I had to drive all the way to the Garden to not miss the entire Celtics game
  • Rather than parking at the T and paying $3, I drove around and finally parked at the Government Center garage for $20
  • I missed the first half of the Celtics game
  • I then spent 40 minutes in park waiting to get out of the Government Center garage
  • On the drive home, because I parked at Government Center, and not Sullivan Square (like I normally do), I took 93N home
  • 93N was some of the worst road conditions I've ever driven in, leading me to skid towards parked traffic in front of me
  • To avoid said parked traffic (already slowed by an accident), I ended up cutting my wheel as hard as possible, resulting in my car doing a 540 degree spin on 93N, catching the rear left bumper against the concrete median and sitting facing into oncoming traffic who had as difficult a time stopping as I did

So not the best week. Topping it off, my poor girlfriend had all of her wisdom teeth out and has been in pain for the better part of 4 days.

Here's to Monday bringing on something better.

(For what it's worth, it isn't all bad. I went to a fun party, got to see the second half of the Celtics win over the Cavs, had a moral victory over a douchebag trying to cut me off in the garage, and got to spend a lot of time with the recovering girlfriend--including watching Blade Runner for the first time. And my car is in pretty good shape, all things being considered.)

Pop-under Ads from Digg?  

Am I the only person getting pop-under ads from Digg? I don't think it's malware (it's on my Mac). I don't think it's another site (I've only got Gmail open).

I'm not getting it on every page load, but it's definitely happening. I'm guessing that it's being caused by a rogue ad that's getting brought it by the many ad services Digg uses.

I've only been getting it when I leave Digg up for a while. Lately, Digg pages never seem to complete loading--Firefox just spins and spins trying to load the last couple of elements of the page. I wonder if the two are correlated. Of course, after getting two ads in about 15 minutes, I haven't gotten another one since.

Thoughts on MySQL Scalability From a Certified MySQL Moron  

While I sit here and wait for myisamchk to finish and tell me that the table that various folks have spent the better part of the day trying to restore is either healthy or once again dead (how's that for a run-on sentence), I wanted to dump out some of the things we've done to try to make our MySQL backend scale. It's not been pretty, but given that it's strung together with some Perl, some MySQL, and a bunch of paper clips, I think the folks around me have proven themselves brilliant (I just sit around and pretend to know what's going on).

Oh, and this is all without a cluster. That's probably the next step. And "Oh: part 2," myisamchk finished checking 28 million rows. All is good. I've copied the data over to the main server and brought it up and everything is happy. Back to MySQL scalability ...

First issue: We've got too much data

This one was easy to solve. We got rid of it. Sort of. We started archiving off data that we no longer needed chronologically. Old support incidents, logging, anything that had a timestamp that we aren't looking at gets sliced off into an archive so that the main tables can be as tidy and fast as we can get them. Which for us is like 8GB of data and not fast at all. But it's better than 12GB of data.

Second Issue: We've got too many connections

When you're small(ish), it makes sense to throw a bunch of dbs on the same server. As you grow, those connections start to swamp MySQL. MySQL starts to get all panicked, and it doesn't know how to handle all of the people asking for data, so it starts to get sloppy about closing old handles. Then it's basically like thermal runaway in a transistor. The server can't close old connections, new ones open up, adding more overhead, and all of a sudden your nice server has 5000 open connections and is hosed. Again, this was a pretty easy one to fix. Bring up a new box, move some databases it to it, and hope that you've built your code layer to make that swap pretty easy (ours was). Presto. Now both of your servers are happy.

Third Issue: We lock up the damn tables all the time

We've got a lot of customers who are constantly accessing their sites. We've got nearly 1000 support agents across the globe who are using our tools to look at customer configuration to make sure there's no issues. This puts a whole chunk of load and repetitive queries on the database. That's easily handled.

Except when you add in a bunch of data updates. Agents, customers, new signups adding and editing data in the database. All of a sudden those hundred pending SELECT statements are stuck because one big select locked the data when an UPDATE came in. Now you've got a bunch of web users who think your stuff is slow and/or broken. We've tried to attack this in a few ways:

  1. Fix your queries -- We watch our slow queries and try to make them faster. We look at our most often called queries and try to make them faster. Sounds simple, but bad queries are the biggest cause of problems.
  2. Add indexes -- This goes with "fixing" queries. Add indexes and make sure you're queries use them.
  3. Perform less queries -- Can you cache your data? Can you make less queries and do more in your language of choice? Can you make your users smarter (maybe without them knowing) about when they need to request data? Do it. The less queries you have, the more likely you won't lock things up.
  4. Split your reads and your writes -- If you can split your reads and writes at the code layer, then you can shuttle reads off to one (or more boxes) and writes off to the primary box, and you should lock up a lot less. We accomplished this by having a couple of boxes replicate the main database, and having one of our smart engineers subclass Perl::DBI to look for SELECT statements and swap the database handle over to the read replica. It helps more than you might thing (but it's not a silver bullet).

Most of this sounds like common sense. It is. But it still matters. We're trying to do a lot with a little, and every ounce of performance you can squeeze out matters, when your users are super demanding and will use any slowness as an excuse.

There are some other things we should and probably will try:

  • Denormalization to bring data back together and cut down on costly joins
  • Sharding to split our data up into smaller chunks and this cut down on long table scans and huge indexes
  • A real MySQL cluster to optimize reads and writes and spread traffic out to many nodes

I wish I knew more. I'm still barely up the curve compared to some of the engineers and admins I work with. Thankfully, they've been able to keep our many million row tables (and many GB data and index files) humming along with few interruptions.

Awakened By Awaken  

So, after yesterday's post about the move to shareware of Aurora (which, again, I don't begrudge the dev that--it just doesn't fit into my plans), I got an email from Jerry of Embraceware, the creators of another Mac alarm clock app called Awaken.

Jerry had a good deal for me: a free copy of Awaken.

That's pretty amazing. I'm a small little blog, written by a web dork. My readership is pretty small. But Jerry is the smartest of marketers. What better way to get the word out about your product than to get it into someone's hands who'll try it, write about it, and probably evangelize for it (just based off the fact that it was such a great out of the blue offer).

So I installed Awaken last night, and I woke up to this morning to Bloc Party. It works as advertised, has a pretty nifty interface, and has one feature that Aurora doesn't: it doesn't require you to turn off your screen saver password or turn on auto-login. Both of those lower the security of your Mac (particularly if you're using a laptop, like me), and it always bugged me about Aurora.

Now, with Awaken, even though my machine was locked, the alarm clock turned on and work me up, allowed me to snooze it or turn off the alarm, and then I could go about my daily business.

I like that. A lot.

It's a pretty app too (especially in full screen mode when you wake up). Here's a taste (from Embraceware's flickr account):

Awaken rocks a good bit. I'm probably going to move to it as my alarm clock--it'll be a whole lot less abrasive than my blaring alarm clock from 1988 (that my girlfriend despises). And then I'll probably start using it as my sleep timer too, since it'd be pretty cool to toss a movie into iTunes and have it shut down my Mac when it's done.

Jerry's done pretty darn good marketing here. I would probably have not even considered Awaken before, but now I'm evangelizing it. I love the internet.

You can check out Jerry's blog for more info on Awaken.

Aww, Aurora's no longer freeware  

Aurora's a pretty cool app for the Mac. I don't use it very often, but when I've been traveling, it's been nice to have a backup alarm. As I do every day, I ran my little Application Update widget and got really excited when I saw a new release! New cool, free software!

I like things that are free.

Unfortunately, Aurora's become a shareware app. Well, it's not really unfortunate. It's a cool app. I'm sure there's people for whom it'll be worth the $15. It's just not for me; I don't use it enough. So now I'm left to wonder "Do I keep the old version and get taunted by the AppUpdate widget every time there's a new release? Or do I remove the old version and learn to live without it?"

Really, that's what's currently going through my brain. I think I might actually remove the app. It's no offense to Aurora, I just don't want to have that pang every time the widget displays new stuff.

Fake AirTunes? Hells Yes.  

So, about 2 years ago, I wrote a post wondering:

I’ve decided what I really need in life is a little application that runs on my laptop that’s hooked up to my stereo. This would make iTunes think that my laptop was an Airport Express, and my laptop would show up as remote speakers in iTunes.

There were a handful of random Sourceforge projects, but nothing that hit reality or worked. Which kinda sucked.

Then I'm dorking around looking for cool Mac stuff this evening after filing my taxes, and what do I find but this gift from the heavens: Airfoil 3.

There's a Mac version and a PC version, as well as a little app called Airfoil Speakers. That's the magic bit. I could download Airfoil Speakers, run that on my MacBook Pro, and hook that up to my stereo in my bedroom. At the same time, I could run Airfoil 3 on the PC, and broadcast music--in sync--to my laptop.

Badass. Now, the one downside, of course, is that it'd be $25 x 2 (that's $50!) for me to get both the Mac and PC versions. I could probably get by with just the PC version (since that's where my music is), but it'd be cool to have the Mac version as well (though without a second Mac, I really don't need it). Pretty awesome.

Now, if Rogue Amoeba can create some Airfoil Windows Speakers, then I could take my old laptop out of the closet, have it sit on my stereo, and be a permanent receiver for my iTunes. That'd be pretty darn slick.

Anyway, thanks Rogue Amoeba. One of my most popular post was that fake AirTunes post, which still picks up residual search traffic every week. Maybe if I throw a sale or two your way you'll hook me up? Really? That'd be great! Thanks so much. You're the best.

Trying Out MarsEdit  

So, I'm trying out MarsEdit, to see if I'll post more (which I really want to), if I move to using a local editor, rather than always trying to do things through the WordPress web interface.

I have to say that, so far, I'm impressed. It does a nice autoconfigure to get you set up. Then, it knows that if you're inserting a link, it's probably on your clipboard, which is pretty bad-ass. Plus, I can do stuff like emphasis and bold with your typical hotkeys. Kinda hot.

It automagically knows my categories, so I can quickly tag this appropriately. That's pretty cool too.

Note the use of hot and cool to mean nearly the same thing. I'm nothing if not confusing.

There's also some cool Flickr integration, where I can quickly grab images I've uploaded to Flickr and include them in my post. Like this:

IMG_0001

Apparently you can also make it use your real blog style for the local preview. I'm going to have to muck around with that.

The only disappointing thing is that being a Mac user now costs me money. All the cool apps cost a little dough. I'm pretty sure I'm going to have to shell out the money for this because I'll post a whole lot more using this interface. Damn you MarsEdit!

Edit 1: The default Flickr bit linked right, but didn't have a visible image. I had to fix that.
Edit 2: Editing a post is darn easy. I like this.

Random Work Pictures  

In lieu of actually writing something, I bring you random work pictures from the past few days.

Snow on the way to work

More snow on the way to work

Shots of the road leading to work that I took through my windshield. This is after that big ol' storm we had on Monday.

Don't Disturb ... I'm naked!

I think it's funny to put signs on people's doors and cubes and whatnot.

Happy New Year  

Happy New Year.

I've got a podcast coming soon with my fave songs from '07. I hope to do that this week. In the meantime, here are some pics I took with my new camera. (Yay! First new camera since 1999. Thanks Christmas money and giftcards!)

Blue Ribbob BBQ!

The Sheila Divine

Candy!