Posts tagged “charts-and-graphs”
Kip Twenty Twelve

There exist two traditions here at Ye Olde Vacant Nebula: a long, introspective blog post on my birthday, and a long, retrospective blog post at the beginning of the new year. What you are reading is the latter. As I noted at the begenning of twenty-leven, my blogging frequency has dropped precipitously. (I only wrote twenty posts this year.) As such, this long, retrospective blog post may be merely a retrospective blog post.

My blogging has tended more toward the technical and geeky this year. I detailed the code I wrote to generate gradient images, shared my thoughts on how to write SQL queries, wrote not
once but twice on HTML5 video, provided password tips for non-geeks, compared online backup services, and closed the year by sharing my process to creat photo mosaics.

For the more family-oriented content on this blog, I posted pictures from our trip to Disney World, Emma’s third birthday, a trip to the beach, Grayson’s first birthday, Emma’s first day of preschool, our trip to Dollywood, and Halloween. I also posted a ton of videos all at once.

Some other odds and ends: my thoughts on Donkey Kong Country Returns, some comments on what it’s like living near a race track, the obligitory birthday blog post, and a follow-up review of Anathem.

All in all a pretty good year. Too bad a Mayan version of the Y2K bug is going to somehow tear the world apart in twenty-twelve. Or so they say. Happy New Year!

No Comments
Kip Side projects

Here’s an update on a few side projects I have going. First, you may remember QuickReplace. As I used it myself, I realized that there were some limitations, which I set out to address. So now we have QuickReplace 2.0. One thing I found myself doing with QuickReplace was opening it in several tabs, pasting text in the first tab, copying the output and pasting it in the next tab, because each tab could only run one filter at a time. But now, instead of having a fixed number of filters, which are executed in a fixed order, you can add as many filters as you want. The filters can be dragged and dropped in whatever order you want. And, if you want to save a filter and run it later, there is now a permalink option to do so. As before, the tool was written for me by me, with the assumption that the user (me) knows what they want to do. If you’re a programmer and you understand regular expressions, you should be able to figure it out. I’ve been using the new version for about a month and I think I’ve ironed out all the bugs, but if you find one let me know and I’ll take a look. Unless your “bug” is that it doesn’t work in a browser other than Firefox or Chrome. In which case the bug is that you’re using the wrong browser. (That being said, it seems to work just fine in IE, Safari, and Opera, but I haven’t tested extensively.) Also, the HTML file is self-contained, so you can save it locally if you’d like. (But you can’t run it offline because of a dependency on Google-hosted jQuery.)

The other side project I’ve made some updates to is my gradient generator. The previous version would generate horizontal or vertical gradients. But then I started thinking, wouldn’t it be better if it generated diagonal gradients too? So I worked out the math and made it happen. Now, instead of an “orientation” parameter that takes either “h” or “v”, we have an “angle” parameter, which takes a number in degrees (from 0 to 360, inclusive). It still takes “h” or “v”, for backwards compatibility—”h” is converted to 0, and “v” is converted to 90.

I added an extra parameter, “extend”. If it is false, the image is only as large as it needs to be to hold the gradient. This is OK if the image is being used as the background of a fixed-size element, but otherwise you won’t see the whole gradient. This is where the extend parameter comes in. If it’s set to true, you will see the whole gradient.

So here’s what it looks like without the extend parameter:

You might also notice that the y axis is inverted. That’s just how images are oriented, and I didn’t correct for it since I figure the most common case is a gradient oriented in the top-left corner. Now, if the gradient is extended, it will look like this:

You can view the gradient generator source code here.

Of course in a few years, when CSS 3 gradients are fully supported, my gradient generator will be obsolete. Oh well.

No Comments | Add Comment
Kip Twenty-leven

Well it is a new year and, just like the last six years, I am going to kick off the year with a look back on my last year of blogging. But first, a graph! As you will see below, I haven’t been blogging nearly as much as I used to. I still haven’t gone an entire calendar month without making a post yet, but I’ve come close. At one point I planned to write something on a regular schedule—either M/W/F or M/Th or something like that. Then I had kids.

Blog posts per month graph

But I digress; time to recap my year of blogging. One of my first posts discussed the difficulty of teaching Emma pronouns. (She has mastered them by now). We got a few opportunities to play in the snow. I decided to say goodbye to The Simpsons, and I found a Bizarro Kip out there.

Then some big news came out when we discovered that the baby in my wife’s belly was a boy. Then we had another parenting moment when our adorable little girl entered her terrible twos. (So far they haven’t really been all that terrible.) When Stephanie and I celebrated our fifth anniversary, Stephanie posted a really long post looking back on those five years. I made a personal goal to lose some weight. I’ve pretty much kept to my plan. I quickly lost twenty pounds, but I’ve put ten of them back on. I’m planning to add some new items to the list in the new year. The biggest change, of course, was when Grayson Matthew Robinson arrived on July fifteenth.

I also gave out some random advice along the way: how to evaluate Mexican restaurants, how to better tie your shoe laces, and how to win at hangman, the Cracker Barrel peg game, and tic-tac-toe. I let you guys know what I thought of Metroid: Other M. (It wasn’t that great.) Stephanie and I went to our first high school reunions, where I realized that people lose their accents in my memories. I also discussed how my handwriting has changed since high school.

We also took Emma trick-or-treating as a bumblebee. She had a blast. I played around with my new DSLR camera, sharing pictures of the moon and a bonfire. I also made some pretty cool-looking high-resolution panoramas. The end of the year brought about an election season, and I turned the focus of this blog onto a poorly-worded campaign ad, which single-handedly destroyed a politician’s career. (And you thought blogging was a waste of time.) And of course the year ended with my first white Christmas. Maybe it makes me a racist, but I now think white Christmases are the best kind.

At various points throughout the year I used this site to give away some free code and programming tips. I gave away code to generate a collage thumbnail image, improved code to generate gradient images, a mini webapp to perform powerful search-and-replace operations, and code to update your Twitter status using OAuth in PHP. I also shared
a haiku for web developers.

And I guess that’s most everything that I talked about on this blog this year. Happy New Year everyone!

No Comments
Kip How to win at tic-tac-toe

Recently, Randall Munroe of xkcd1 diagrammed a complete map of optimal tic-tac-toe moves. I thought I would see how the high-resolution version looked through the Seadragon scripts I’ve integrated into my blog (seen previously in high-resolution panoramas).

So below I’ve reproduced the original high-res image from xkcd in a zoomable format. I split the map for X and the map for O into two separate graphs. At any given zoom level, the optimal move is in red, then wherever your opponent goes you would zoom in on that space and it would show you the optimal move again. It’s pretty simple. It should be noted that it’s not very hard to ensure you never lose at tic-tac-toe. The only way to win is to play someone who doesn’t realize this and wait for them to make a mistake.

1 Am I the only one that pronounces that “zaxid”? Probably!
No Comments
Kip Shoe sizing

Random fact: Nike size 10 and Adidas size 11 are almost exactly the same size.

Nike size 10 and Adidas size 11, almost exactly the same size

No Comments
Kip Retraction

For the first time in Vacant Nebula history, I have retracted a blog post.  Upon further consideration (and a little pleading from Stephanie), I realized that the post might cause this website to show up as a result for certain search queries.  Let’s just say, Dateline might have been interested in anyone who came to the site and was disappointed that the link did not, in fact, point to the type of content that was claimed.  In addition, I do not want to attract that kind of attention to a website that has pictures of my daughter.

Fortunately, no one has yet arrived at my site by means of such queries.  For anyone interested, here are the top 20 search engine queries that brought visitors to this website in May, 2008:

Top 20 search referrals for May, 2008

That last one is a little weird though.  Yikes!

Kip Science confirms: money can buy happiness

You’ve probably heard before that the mo money we come across, the mo problems we see (Wallace 1997).  While that may be the case when mo money is acquired posthumously, statisticians and economists now have evidence that your happiness is proportional to the logarithm of your wealth (see chart below).  In other words, sadness is for poor people!  The corollary is that the more money you currently have, the more you would have to acquire in order to attain an additional happiness unit.  Much like crack cocaine.

Chart of happiness vs. log(wealth)

See also a more formal paper about this topic.  I didn’t read it because it looked super boring, but the charts at the end are interesting.  For instance, did you know there is a “U-shaped life satisfaction in rich English-speaking countries”? (Figure 5)

No Comments
Kip Right of way

Below is a sketch of an intersection that is the main bottleneck of my commute home from work.  I’ve had a question about right-of-way and I’m curious if any of you know the answer.  In the sketch below, if cars A and B both turned into lane 2, colliding with one another, who would be at fault?

Sketch of an intersection

Not to scale.  Lanes 1 and 2 are actually long enough to hold about 15-20 cars each.  Cars A and B would actually be nearly parallel to one another.

This is an unusual design; typically lane 2 would be created first, and then lane 1 would be created to the left of it.  Instead, we have a lane created in the middle of two lanes.  On the one hand, car A has already turned into lane 1, and now he’d be changing lanes back.  But on the other hand, car A has gotten into the left-turn lanes, and now he wants to pick which left turn lane to use.  It should also be noted that where lane 2 is created, both lines are marked with short dashes.  If one of them were marked with regular dashes it would be clear.

Now what makes this really annoying is that from around 5:00 to 5:45, there are a lot of people that need to turn left here.  So there is a line of cars backing up well into the area that is only two lanes, so there is a long line of cars in lane 3.  What happens is that nearly all of these cars end up turning only into lane 1.  But a few people go past the traffic in lane 4, then move left at the last moment to get into lane 2.  So they only have to wait for the stoplight to complete one or maybe two cycles, as opposed to four or five.  This makes the problem worse, because the line of cars coming out of lane 2 makes it practically impossible for a person who was waiting patiently in lane 3 to merge into lane 2.  I’ve often thought about going from lane 3 into lane 1, and then continuing straight into lane 2 (making the person who skipped the line have to wait).  But I’m afraid if that guy hit me it would be my fault, or we’d both be at fault.  And my sense of politeness keeps me from passing the line and merging into lane 2.  After all, I wouldn’t want anyone to road rage me.

So what I actually do when it’s backed up like this is take lane 4 straight through the intersection, then move left and make a U-turn at the next break in the median, then make a right turn onto the road I want to go on.  This is actually quite easy since a good two-thirds of the traffic either turns left or right at this intersection.

Kip The United States

For some reason this morning, I decided to see how well I could draw the continental United States from memory.

Continental United States, drawn from memory

I started with California and worked my way generally to the east and then north.  Michigan and New England are particularly atrocious.  I forgot that Maine comes off the side of NH/VT.  Which themselves come off the side of New York.  I guess those states are just so small that I felt bad for them, and drew them bigger.  Then Minnesota totally got embiggened.  But all in all I think it’s still a perfectly cromulent map.

Kip Thai taste

I went to a new Thai restaurant with some people from work yesterday, and I took a business card as I was paying:

Thai Taste: Charlotte’s first restaurant since 1988

I’m not sure what that means.  My theory is that a non-native speaker meant to write something like “premier” instead of “first.”

Any other theories?

RSS feeds: Kip's - Stephanie's - Both