Messing around with CSS for Blog

October 12th, 2012

WebDevel.jpg

I've spent far too much time messing with CSS for the preview in MarsEdit for my journal. This took way too much time because of the caching of the files and silly problems I made in the CSS file. I really like the preview in MarsEdit, but the caching of the CSS makes it really hard to know if what you're doing is really having the effect you think.

I spent several hours - really, on this. In order to minimize problem, read the CSS from an http:// URL - this seems to have a lot less problems with caching, and then switch back to the file:// URL once things are stable.

In the end, I was able to get it all fixed up, and then copy up the CSS changes to the CSS for the theme I'm using. Not easy, that's for sure, but worth it.

Conducting Timing Tests

October 12th, 2012

Speed

So this morning I'm doing some timing tests to see what the effect is of trying to run multiple jobs at the same time. Initially, we thought that the boxes would be CPU-bound because of all the logic in the pinning and calculations. But that's not the case. I can use top to see that the vast majority of the time the CPUs are idle (2 CPUs in this box).

So what's taking so long?

The monitoring (NewRelic) says it's all I/O - seems reasonable, but then can we speed up the time to make all six runs by putting them all in the run queue at the same time? Maybe it's I/O choked, and if that's the case, then No, it won't help. But if we're latency bound, then it will - so long as the service on the other end are fast enough to handle multiple requests.

It's a lot of questions, so that's why I'm running the tests.

Timing of a particular run is easy - just use time. But if I want to parallel the runs and see the effect in the same manner, I need to be a little more clever:

  #!/bin/bash
  philadelphia &
  central-jersey &
  baltimore &
 
  wait

This is a great little script that runs all three in parallel, and then waits for them all to be done before returning. If I put this into a time call:

  $ time ./parallel

then I'll get exactly what I want to get.

Now it's just a matter of doing all the runs and gathering all the data.

Division Total real user sys
philadelphia 414.68 3:13.863 2:02.340 0:08.889
central-jersey 109.00 2:17.305 1:29.034 0:05.768
baltimore 214.04 4:03.828 1:53.211 0:07.500
cincinnati 121.80 3:09.080 1:33.894 0:06.716
cleveland 264.36 2:56.955 1:48.855 0:07.872
austin 194.46 4:45.738 2:06.456 0:08.581

OK, this is all a nice baseline, but what we're really interested in is how they work together. In that case, we ran successively larger sets, starting at the top of the list and running more jobs and timing them:

Job Count real user sys
2 7:37.395 4:22.084 0:16.545
3 7:40.657 6:45.033 0:24.438
4 12:14.561 8:05.870 1:54.751
5 16:09.544 12:06.461 0:31.694
6 18:53.886 14:59.040 0:37.562

This looks puzzling, so I'm going to do similar tests - this time serially running the first 2, 3, 4, 5, and 6 jobs and see how they compare:

Job Count real user sys
2 9:00.463 4:10.892 0:16.337
3 12:21.413 5:59.158 0:23.101
4 15:49.010 7:32.160 0:27.686
5 20:13.591 9:39.248 0:37.150
6 26:44.176 11:47.096 0:44.891

All this data looks like:

Parallel Tests

Which tells me that it doesn't matter, really, if we try to run these in parallel. They simply don't scale that way. There's some other limiting factor in the system and it's not the CPU. This isn't terribly surprising, but it's something that means we really need to start looking at these external systems and see where we can limit our exposure to them.

UPDATE: it took 4:10 - just over four hours to do all 40 of the divisions that we need to do nightly. I guess in that light, it's OK, as there were plenty of retries in the run and we still had time to do the Top 40. The problem, I fear, is that we still have a global choke point that we need to work through, but we'll run into that soon enough, I guess.

Really Fun TV – White Collar

October 11th, 2012

TV.jpg

I really like Netflix and how I can run through an entire series of a TV show that I might have missed when it aired - without commercials, with pause, etc. It's really a great way to watch TV. Tonight, I finished watching Season 1 of White Collar, and I have to say it's a very nice - albeit a bit fluff, but great entertainment. It's the classic buddy story, but this one buddy straddles the line between legal and illegal. The friends are great additions to the cast, and the storied background of the thief reminds me a lot of It Takes a Thief back when I was a kid.

So good. Funny. Sharp. And doesn't take itself too seriously.

Great fun to watch.

Today is Just One of Those Days…

October 11th, 2012

I'm sitting waiting for some runs to complete on the UAT box for The Group, and there's not a lot I can do other than to wait. This has been one of those days where I just want to scream - but can't. I've been trying to make progress to feel like I've really accomplished something today, but it seems that I'm getting set-backs at the same rate that I'm removing them. Every "Finally…" is quickly followed by "What's this?!?", and a diversion or blocker that keeps me from actually getting anything really interesting done today.

Looking back at the commit log, I know I did some good stuff this morning, but that's long been forgotten. Now I'm just sitting here, waiting for someone's runs to complete. This is what I really liked about Finance - or maybe just working in small groups: You spend very little time waiting for folks because there's so few things you need from other people.

Not so here, and so I have to wait. I'm not very good at it, but I guess this is going to make me better at it.

Signing up for Amazon S3 – Skitch Storage

October 10th, 2012

I saw a tweet from a friend the other day:

Mike's Tweet

and it got me thinking about a better back-end for Skitch 1.x. I've planned to use CloudApp and just drag things into it and get URLs, and that would work, but it's not as nice as having a great back-end that works with Skitch as it's meant to. That means being able to pull up the history, etc. It's all there. That would be nice!

PinkHearted uses Amazon's S3 datastore to save your images, so it doesn't really cost them anything to store the images - it costs me. That's nicer than CloudApp because they are going to have to mark it up to make a profit, and I can pay Amazon directly. So I decided to give it a try.

Signing up with Amazon is simple, but there's a few steps to it, so it's not as immediate as you might think. No problem, I just needed to slug through it. Then there was the issue of creating the first bucket. In short - an S3 bucket is a top-level directory in your S3 storage account. I simply used Transmit to create one, and it was very simple.

Now I had a simple bucket on S3:

My S3

At this point, I could sign up with PinkHearted and then configure my Skitch to use the WebDAV service on PinkHearted as the source. I've got it all ready to go, and if they shut down the Skitch.com service, that's where I'm going to go.

I like that it's all me now, and on S3 it's redundantly stored and should be fine.

Google Chrome dev 24.0.1290.1 is Out

October 10th, 2012

This morning I noticed that Google Chrome dev 24.0.1290.0 was out with a respectable set of release notes. It appears they've felt with some crashing issues, but not a lot else. I suppose that's OK, it's still an improvement, and that's a step. I'm not sure where they are really going but it's nice to seem them still moving forward.

Loads of Bug Fixes Today – Slugging it Out

October 9th, 2012

bug.gif

Today was another really slow day. There were a few bug reports I was able to ditch this morning, but the rest of the day was slugging through problems that really did need to be addressed. One of the "bugs" from this morning was turned into a feature request, and that was an interesting exercise in frustration.

I've had the talk with a lot of the Rubists that comments are non-optional, but I've gotten quite a bit of push-back from even those that I didn't expect it from. I waited, because I knew a day like today would come.

I was working on a feature, looking at a particularly obtuse piece of Ruby code, and trying to figure out what the author was doing. One of the long-time Ruby devs stopped by to lend a hand, and even to him, this was bad code. Far too "tricky" - just for the sake of being "tricky". Far too compact. No readability - and of course, no comments.

The long-time Ruby dev even said "I hate it when he does this".

I could not have had a better opening for the importance of comments. And he totally agreed.

'Nuff said.

Slugging through this bug was worth it.

I hate feeling sick

October 9th, 2012

Ambulance.jpg

This morning I feel sick - I mean really sick! I know it'll pass, it was dinner last night, but it doesn't make it any better. I feel like crap, and there's nothing I can do to feel better other than give it time.

I'm sure by later this afternoon, I'll feel better, but right now my guts feel like someone stabbed me with a saber. It's nasty. But I know it'll pass… so I go to work and get on with life.

Crud.

Making Support Tools – Slow, but Necessary

October 8th, 2012

Building Great Code

This afternoon I had to make a lot of tools for supporting the app I've been working on. I'm getting bug reports, and I need to look into the data we're generating, and the only place it really all sits is in the CouchDB. So I had to write some scripts to hit some views and then load up the values I want with some key restrictions. None of it was all that hard, but when I needed to make a change to one of the views on the production database, I had to wait upwards of a couple of hours for Couch to regenerate the view due to the amount of data we have, and the limitations of the EC2 instance we're currently running on.

Soon enough, we'll be on our own hardware in our datacenter, but it's hard to beat the spin-up time of an EC2 box. It's pretty nice. But the performance isn't all that great, and that's what we're really running up against - I/O to the disk and CPUs to process. I'm hoping that as soon as we get the new machines, things like this will be a lot faster.

All told, I got built what I needed, and it's just a matter of time to be able to use it.

[10/9] UPDATE: worked perfectly! Once I got in this morning, I was able to use these views and tools to look into the bug reports and prove that they aren't bugs - the code is working exactly as designed.

Funny Romney Image

October 8th, 2012

OK, I've got to believe this is Photoshopped, but either way, it's pretty bloody funny:

Romney farts on little girl

There have been a very select set of political images that make me laugh, mostly because they all typically make me upset, but this is a rare gem. Really quite funny.

Thanks for the laugh!

UPDATE: it's not Photoshopped! I saw similar pictures from a campaign stop, and it's legit. Now, of course, the girl isn't reacting to The Romney Toot, but it's not faked! Too funny!