Posts tagged “bragging”
Kip Actions have consequences

You may recall that one month ago I devoted some space on this blog to making fun of a political ad. Now that the elections are over, it turns out that the candidate I was belittling lost the election. He was also the only republican candidate on the ballot that didn’t win in an election marked by lots of republican turnout in an already conservative-leaning county. (But how much difference could party affiliation really make when it comes to sheriffing?)

I’d like to think that this blog has enough influence among Cabarrus county voters to have single-handedly cost him the election. He lost by 6965 votes, meaning that I would have to have convinced 3483 people to change their vote in order to cost him the election. (Neglecting of course the possibility that I changed someone’s decision whether or not to vote.) So... I guess I probably didn’t have anything to do with it.

(Incidentally, I actually voted for him myself. Oh well.)

No Comments
Kip Kip’s handwriting & how it has changed

If you are viewing this blog post on my website (as opposed to an RSS aggregator), you will notice that the title of the post is written in a hand-written font. This is all through the magic of CSS3 web fonts. And in fact, the font that is being used is “Kip the Great”, which represents my handwriting as of early 1999. I’m limiting use to the title because the font is pretty hard to read. That’s only partly due to my bad handwriting—the font is also not well balanced (lowercase e and o, in particular, are too large), the characters don’t all align on the same baseline, and it is weighted so that it always looks bold (except for lower-case t, which I think I shrunk because it was originally too large).

Sample of Kip the Great font

Looking back at the font, I can see some subtle ways my handwriting has changed over the last 1.2 decades:

  • I use an actual ampersand instead of that stupid backwards 3 thing

  • I write capital D and F with two motions instead of one

  • I write capital H with three motions instead of one

  • I loop the tail of my lower-case G, like in cursive writing

  • I put a line through my upper- and lower-case Z. (A habit I picked up in Calculus 2, where it became a real problem that my Zs were indistinguishable from my 2s. I also started adding a tail to my lower-case t around the same time, to distinguish it from a plus sign, but I only do that when I’m writing equations.)

That being said, there’s only about a 1% chance I’ll ever update it. Designing a font was one of the most tedious things I’ve ever done.

No Comments
Kip I called it!

You may recall seeing this photo of a 2.5 L Coca-Cola bottle that I took in Mexico about six months ago:

2.5 L Coca-Cola bottle shaped like a glass Coca-Cola bottle

You may even recall my caption: Why don’t they make the two-liter bottles look like this in America?

Well, now they do.  So I can say I CALLED IT!  Cue the balloons and ticker tape!

No Comments
Kip ImageSizer

I wrote a program last week for resizing images so that they can fit onto a two-monitor desktop, and I figured I’d share with the world before heading to the beach.  This program does more than just resize an image, though.  It accounts for the gap between the two monitors, so that it looks much more like you are looking through the monitors.  Most of this post will consist of an explanation of what exactly that means and why you’d want to do it.

Okay, for starters let’s say you have two monitors sitting side-by-side.  In our example, these monitors each have a resolution of 304×228 pixels, giving a resolution of 608×228 for the entire desktop.  Here is what that looks like:1

Blank two-monitor example

Now, let’s say you want to use this photo of the Gizah pyramids by Ricardo Liberato, the #21 finalist for Wikimedia Commons Picture of the Year 2007, as your wallpaper.  Here is what the photo looks like initially:

A great photo of the Gizah pyramids

There is a problem here, because that’s not the right proportion, so you’d want to crop out a portion of the image that is the right proportion.  Here is a cropped portion that is the proper ratio and size (608×228):

The Gizah pyramids photo, resized to 608×228

Now, let’s use that image as our desktop wallpaper on our dual-monitor setup:

The Gizah pyramids stretched across a two-monitor setup

I don’t know about you, but I find this very aesthetically displeasing.  Suddenly the pyramid is not shaped like a pyramid anymore!  Your mind expects the image to continue through the space between the monitors, but it actually just picks up where it left off on the edge of the other screen.  In fact, it kinda makes it look like there is a fourth, smaller pyramid, between the first and second one.

So here’s where my app comes in.  We need to figure out how wide that gap is, in pixels.  If you knew the dpi of your monitor, you could measure the gap in inches and calculate the number of pixels.  But if you don’t know that, here’s how I measure it.  Open up any kind of image editing app (Paint will do just fine).  Place the window so that it straddles the gap between monitors.  Draw a 45-degree line that spans the monitors.  It is very important that the line be exactly 45 degrees (you can hold control or shift or something to fix the line to 45 degrees in most image editing apps).  Now, hold something with a straight edge (say, a piece of paper) so that it lines up with the line on one monitor.  Holding the straight edge there, click somewhere on the other monitor, where the line would be if it was accounting for the gap, and draw another 45-degree line starting from there.  Now measure the vertical distance, in pixels, between the two lines.  This will be equivalent to the horizontal distance, in pixels, between the two monitors.  For our example, here is what that might look like:

Example of measuring gap between monitors

You can see the solid black line is “straight” if the gap is not accounted for.  However, the dashed line shows how the line would behave if the gap was considered to have a width.  The distance between the dashed line and the solid line on the right-hand monitor is 50 pixels, so that is the width of our gap.  So now, let’s use my app:

1
java -jar ImageSizer.jar pyramids.jpg -monitorWidth 304 -height 228 -gap 50

This will generate pyramids.resized.png, which looks like this:

Gizah pyramids resized by tool, accounting for gap

When we use this image as our desktop wallpaper, we get an image that looks correct:

The Gizah pyramids stretched across a two-monitor setup, accounting for the gap between the monitors

If you’d like the program, you can download it right here.  But before you use it, here are a few things you should know:

  • You may get OutOfMemory exceptions on very large images.  If this happens (thanks Peter), you can increase the Java heap size from the command line like this:
        java -Xmx256m -jar ImageSizer.jar ....
    If that still doesn’t work, increase the 256 to a bigger number.  It is important that the -Xmx parameter comes before the -jar parameter, so that Java knows it is a parameter to the JVM and not to the ImageSizer.

  • When the image is not the proper proportion (which will be nearly all the time), it will crop from the middle of the image.  In many cases, this will be a less-than-ideal cropping.  If that happens, you should crop the image the way you want it cropped first.  (The tool will still help you out because removing the middle of an image is much more tedious.)

  • Your monitors must be of equal resolution.

  • Supported file types are .jpg, .png, and (I think) .bmp and .gif.  (I’ve only tested jpg and png myself though.)

  • Output file will always be .png format, even if a different extension is used on output file.  This is important because a lossy compression can cause some pixels to “bleed” between the monitors.

  • There is only support for two-monitor setups.

  • If you want to modify the code, feel free to do so.  You can even redistribute if you want, just be sure to leave my name and URL in the comments and help info.  The source is included in the jar file (open it as a zip file).  There are only two Java files.

  • There is a good chance there are some bugs, as this was written in two evenings, with a fourteen-month-old competing with the computer for my attention.  The vast majority of that time was spent trying to figure out how to use the Java image libraries.  I probably could have written this in PHP in an hour, but I didn’t want to use PHP from the command line, and I didn’t want to have to upload large images.

1 yes, these monitor images are stolen from Windows XP display settings
Kip Some vid joes

I’ve been meaning to put up some videos for a while, and now I’ve finally done so.  Sorry there are so many, in the future I’ll make them less six-at-a-time.  Anyway, this should give those of you who haven’t seen her much (and those of you who have but can’t get enough) a chance to see her in movement.

Note: I’ve tested this video player with IE 6, IE 7, FF3, Safari (Windows Beta), Chrome Beta, and Opera 9.  Please let me know if it does not work for you.

First video (below) is from last July (at just under four months old).  Here you’ll see and hear Emma’s shrieking laugh as I kinda growl into her belly.

Next is a video from the same day, wherein you can see Emma paying with her Elerat before dinner.

The next video is also from July.  Here I try to show you Emma’s reaction to Punky.  Also, I hate the way my recorded voice sounds (so does everyone I guess).

Here we have a video of Emma’s first time eating food.  I had forgotten how much better at eating food she has gotten since then.

Next is a video from just last week of Emma sitting up (with some help from a pillow) and playing with a moose (she thinks she’s the next Sarah Palin1).

And to finish off this videostravaganza, we have a video of Emma showing off her rolling skills.  The final roll seems to defy accepted laws of physics.  It reminds me of a wheel that has been weighted at the top so that it will roll uphill.  Also, Punky walks by and says hi.

OK, that’s all for now.

1 You can decide whether or not that is a good thing based on your own political/social/ideological perspectives.
No Comments
Kip A Birth Day

This is a quick note to let everyone know that Stephanie has successfully given birth.  Emma Leigh and her mommy are healthy and resting right now.  She seems to have gotten in a fight on her way out, so she has a black eye.  But the doctors say this is superficial and she will be okay soon.

Whenever someone at my office has a baby, usually they will send a photo around of the newborn.  And everytime I think “wow, that is gross, why would you share such a gross picture.”  I had always wondered if I would feel differently when it was my own child.  I can now tell you with confidence that I do.  So I hope you’ll forgive me for sharing a picture of our beautiful bruised 93-minute-old baby girl.  More pictures will be up later.

Emma Leigh at 93 minutes old

Kip I’m in the New York Times

Well, not quite.  But I was mentioned in a post on the Freakonomics site, which is now hosted on NYTimes.com.  I e-mailed them a link last week, which they proceeded to blog about.  But I didn’t expect my full name to show up in bold text or anything.  Kinda cool though I guess.

Kip Spampot

Preventing spam comments is one of the most annoying things about having a blog.  In the past I’ve tried a few different methods to control spam.  SpamMy first attempt involved flagging messages as potentially spam if they had a bad referrer, came from certain IP ranges, contained certain keywords, or contained too many links.  The flagged messages wouldn’t be displayed until I approved them.  This method worked some of the time, but overall it wasn’t very effective and created a lot of work for me.

My next attempt was to implement a captcha system.  This has worked out pretty well, and I was surprised to find that it has been fifteen months since I started this policy.  Basically, any comment containing anything that looks like a link (“http”, “://”, “www.”, “.com”, “.net”, “.org”, “@”, “href”, and some others I can’t remember off the top of my head) would be sent to the captcha page.  This allows real humans to post comments with links, but stops most of the spam.  However, there was an occasional spam comment that had no links.  I’m not sure why the spammers would do this, unless they are trying to game systems where an IP is deemed “safe” after a non-spam comment is made.  In any case, I grew annoyed with cleaning up these comments, and I didn’t like that cookies are required if you get to the captcha page.

HoneypotOver the break, I decided I would implement a type of honeypot.  I noticed that spam comments were always in response to my most recent post, even when comments were still open for other posts.  So I guessed that the spambots are looking for the first form in the HTML.  So I just stuck a comment form at the top of my page, and wrapped it in a hidden div.  No humans see it, but spambots do.

To judge the effectiveness, I logged any comments submitted to the honeypot.  Since I don’t value the privacy of spammers, I’ll let you view the log if you wish.  As of right now, 212 spam comments were submitted in 10 days.  Where it says “honeypot” means that the message was submitted to the honeypot form.  If it were submitted from a valid form but contained links (and hence, was given a captcha), you’d see “contains_links.”  But there aren’t any of those.

So now I have a system that is so far 100% effective, without requiring cookies and without breaking under tabbed browsing.  If this continues to be effective I’ll probably disable the captchas altogether.  Of course, the spammers could pretty easily overcome this obstacle if they tried.

Kip Bobble-head Kip

Last Monday marked two years since Stephanie and I got hitched, an event which was well-documented on this site and others.  Those of you who are fans of The Office are no doubt familiar with the Dwight Schrute bobble head.  Well in honor of our second anniversary, my wife had a bobble-head Kip constructed.  You will see the results below, I think it’s pretty cool, although the bobble-head doesn’t have the I-sit-behind-a-computer-all-day physique of yours truly.  But I don’t think I’d want a realistic representation of my waistline sitting on my desk all day anyway.  Other than the eye color, I think it’s pretty spot-on, at least insofar as that is possible on a bobble head.

Comparison of me and my bobble head

It’s me.  I’m the bobble-head. Yes!

No Comments
Kip Lunch with the CEO

About a year ago my company hired a new Chief Executive Officer (what the kids are calling a C.E.O.).  One of the things he started doing is taking five randomly selected people from the company out to lunch every month.  I was randomly selected for this month, so I get to have lunch with the CEO tomorrow (presumably at his expense, since he probably makes more than my annual salary every month).  I don’t really have any hard-hitting questions.  I suppose I could ask if we plan on hiring any more programmers in not-India... but I probably won’t.  Or I could ask something completely irrelevant, like what his opinions are on British literature from the early eighteenth century.  But I probably won’t do that either.  I might post an update later this week, if there is anything worth blogging about.  I do think it’s a pretty cool thing for a CEO to do, even if he’s not exactly Bill Gates or Larry Page (we are something like a two billion dollar company though... I think).  He also has a rule that none of the people invited to lunch can be the boss of any of the other people (so I guess it isn’t purely random).  Which is good, I’d say.

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