I Teetotal

Today, on St. Patrick’s Day, I am writing down a more complete answer and explanation to a question I am regularly asked.

I don’t drink alcohol, never have, not once, and I am not going to start. When I was around 21, I never felt compelled to start drinking since I was never much of a ‘partier’ and didn’t see the attraction of getting drunk. I have been pressured to drink many times, but I was never interested in doing something because somebody or society told me to. Now, I choose to teetotal because it is part of my identity.

When I was younger, my peers seemed to drink because it was fun to get drunk. Now, they tell me that it helps them loosen up in social situations and they enjoy the taste of wines and craft beers. Using alcohol to improve my performance or the way I feel in a social situation is definitely something I never want to rely on. I like knowing I can do something without paying for a crutch. I talk to strangers, dance when I want to, and regularly speak my mind. Knowing I can controllably do that when I choose is very powerful for me.

I don’t mind when people drink around me nor do I consider myself better or more virtuous than others because of my decision. Though, I am disappointed by those who abuse alcohol and disrespect the city and an entire holiday, for that matter. Living close to bars that cater to 21-year-old drinkers probably doesn’t help my disappointment with drunken behavior.

Overall, I am very happy with my decision and I don’t feel like I am missing out on anything worthwhile. So, if I see you drinking at a bar, I’ll be respectful of your choice and if you’re respectful of my choice, I’ll be more than happy to toast my glass of water with you.

Force Ubuntu One to Rescan and Synchronize Files and Folders

I like using Ubuntu One for file synchronization because it offers 5GB of space for free. I ran into a few gotchas where Ubuntu One wouldn't start synchronizing new files and folders and the output of u1sdtool --waiting was blank. The solution to this was to tell Ubuntu One to rescan the folder by running these commands at the terminal:

> u1sdtool --list-folders
Folder list:
  id=x-x-x-x-x subscribed=True path=/path/to/folder


> u1sdtool --rescan-from-scratch=x-x-x-x-x

After telling Ubuntu One to rescan the folder that isn't synchronizing, it will start to upload all the files and folders in that folder. This also helps when there are file conflicts or the u1sdtool --waiting or u1sdtool --current-transfers is empty and there are files or folders on your computer that haven't been synchronized.

Random Hacks of Kindness Milwaukee

At my last Toastmasters meeting, a friend invited me to Random Hacks of Kindness in Milwaukee. I haven't been to Milwaukee or a hackathon in sometime, so I was excited to visit the city and meet other developers.

I met my friend downtown at 6:30am, but since I was so preoccupied the night before with submitting my Apps for Metro Chicago, IL entry before the midnight deadline, I overlooked the fact that I had to buy a travel ticket in advance. I managed to get a ticket at the last-minute and was on my way with about 5 hours of sleep under my belt. Half way through the trip my friend asked me if I brought my ticket to the event. I didn't even register! I was clearly flying by the seat of my pants on this one. At least I had my trusty T61 laptop.

read more »

Save ScraperWiki Data to Local SQLite Database

Update: https://github.com/christophermanning/scraperwiki_local_python is now available and makes it easier to set up your local ScraperWiki environment.

read more »

Make Flickr shapes JSON parsable

Update: Flickr has released version 2.0.1 so this is no longer necessary. Thanks Flickr :D

read more »

Internal Type Juggling in PHP 5.2 vs PHP 5.3

There is an undocumented case where the output of an internal function is different in PHP 5.2 vs PHP 5.3 when you pass it an invalid argument.

read more »

Don't Use maxlength on Password Inputs

On the HTML input form element, you must define a type and may define a maxlength attribute. This is in regards to the password type and the relation it has to the maxlength attribute. If the maxlength on a password input is wider than the width of the input, there is no way to tell if what you are typing (or pasting) is actually going into the field.

Below are two test forms that will illustrate my point. Each form looks identical, but have much larger implications in practice. Test the following KeePass generated password in the following forms:


What you have just experienced is a problem that exists on many website's user registration. If this were a real user registration, the password you entered will not completely save and you will be locked out when attempting to log in. This happens when sites validate the length of the password by specifying a maxlength as opposed to correctly checking its length during the form processing. Overall, using client side markup to validate form values is precarious. Therefore, maxlength should be limited to text input types, if it is backed up by server side validation.

P.S. Stop putting maximum length requirements on passwords, period. Just hash the password and store that. And no, password retrieval is not an excuse; have the user reset their password instead.

Creep Traps for Dating Websites

2013 Update

The term for this is Hellbanning.

Free dating sites such as Plentyoffish.com or OkCupid.com tend to be flooded with creeps. Creeps here are defined as users who harass others with inappropriate messages.

Most women who have been on these sites have at least one story of a guy sending some ridiculous email with an incredibly offensive suggestion or perhaps an indecent picture attached.

A strategy to mitigate the effects of these creeps is two fold; first, identify these profiles, and second, prevent these profiles from continuing to creep.

An option for the first part would be to create a “creep trap”. Ideally, this would be a profile of a fictional woman with attractive pictures and a generic profile. Messages sent to this profile would then be scrutinized for their quality. If they contained ads, an over the top request, or are written like a text message, the senders profile would be flagged.

As for the second part, I do not think this is taken advantage enough in services such as these. Some sites are diligent and do ban troublesome users, but with the internet it is easy enough to create another profile. Instead, the site can quietly sandbox the user. To them it seems as though their emails are being sent; though, in reality, they are deleted and their profile is not viewable by anyone else.

The specifics of how many creep emails over a period of time should cause a user to be sandboxed is up for discussion, as well as sandbox duration. Overall, I would imagine this would amend the creep problem as well as improve user confidence.

Load-bearing Code

The term 'load-bearing code' can be used to refer to software that exhibits the following attributes.

Jerry, these are load-bearing walls, they're not gonna come down!

Cosmo Kramer in the Seinfeld episode "The Chicken Roaster"

I have encountered load-bearing code in legacy open source applications, inherited projects, or debugging production software.

Calculating Different Mii Combinations

On November 19th 2006, I set out with a friend to buy a Wii on launch day. After futilely showing up at about five stores, we took a chance at this small electronic boutique with ten people waiting outside. After getting into line at eleventh place, I was hearing murmurs of this place only having ten Wiis. We decided to wait the hour and a half and hope for an extra Wii. Five minutes to 11:00 am, this girl that was second in line with her boyfriend decided she was hungry and went to get a bite. Much to my surprise, when the guy came out of the store to tag who would get a Wii, she wasn't there and I got the tenth and last Wii they had.

read more »

The Fn Key Drives Me Fn Crazy

I have previously discussed my frustration with the placement of the Fn key on my Lenovo T61 laptop. When I accidentally pressed Fn+F12 (which puts the computer into hibernate) as opposed to Ctrl+F12 (to pull up Firebug) I decided enough was enough.

I looked at all of the light blue Fn keys on my keyboard and decided that I could do without them. Every function can be done in windows except for the keyboard light. Though, I can't believe that anyone would find that useful anyway. Seriously, isn't the screen bright enough?

I went about popping up the Fn key and thinking of the best way to suppress this key. I initially thought that I could slide a piece of paper between the key and the circuit board, but since the T61 keyboard is waterproof it was not as simple as I hoped. Instead I cut a small slit in the rubber molding for the keyboard button and slipped in a piece of paper.

Now I don't have deal with the unexpected side effects of accidentally pressing the Fn key.

Click here to go to a web page about the overuse of 'click here'

As with many early internet paradigms 'click here' has become the equivalent of the verbal overuse of 'like': an unnecessary filler before getting to the real point.

Admitting You Have a Problem

It is worth realizing that yours is not the first web site your user has seen (unless you are the operator of acoolwebsite.com). For the rest of us, telling a user what to do with a hyperlink is on par with having instructions on how to scroll and see the rest of a web page. Is it underlined? Does it react when I hover over it? Does it stand out from the rest of the text? If so, I know it's a link and I have a pretty good clue what is going to happen if I click it. The text of a link should answer a user's questions. "Where do I go to read more of this article" should translate to a 'Read more' link. "How do I get to the next page" gives us a 'Next page' link. "What is this web site's privacy policy" can turn into 'Privacy'.

Wait, What?

Obviously We Have a Problem

Search TermResults from Google
"click here"1,620,000,000
"click here to"831,000,000
"click here to go"16,800,000
"click here to go to"7,730,000
"click here to go to a web page about the overuse of 'click here'"1 unique


The overuse of 'click here' In conclusion, I believe using a 'click here' qualifier to help the user actually makes it more confusing considering how inconsistent the 'Click here' linking can be. Any argument for keeping it I would have to rebut with the actualization that you would have to put 'click here' in front of every link. Imagining a menu navigation with that much filler should clarify my point.

My First Pair of FiveFingers the Vibram Sprint

Look at them shoes! Where did you get those? Are they comfortable? Does it hurt your toes? Don't you worry about stepping in something sharp? These are the questions you must be prepared to answer when walking in a pair of Vibram Fivefingers. I got them at Hanig's Slipper Box. They are comfortable once you get used to them. No they don't hurt your toes; actually, they feel more cozy than ever. As for glass, nails and crazy concrete, no, I don't worry about it. The bottoms of these are tough enough. Anyway, it is easy to avoid the perils in the road once you learn to pay attention to where you are walking.

read more »

I Hate the Caps Lock and Insert Keys

2013 Update

I use vim now and have remapped the Caps Lock key to Esc. I've also switched to using my right pinky to press Ctrl while my left fingers press a modifier key to reduce stress in my left pinky.

If you were to look at my keyboard, you would notice some keys missing. Specifically the Caps Lock and Insert keys.

I never use either of these keys. That wouldn't be reason enough to pop them out of my keyboard, but the frustration caused by accidentally clicking them is.

These keys are remnants of the typewriter generation. As we have an appendix, keyboards are still plagued by these evolutionary leftovers. I have yet to hear a compelling argument for keeping these keys on the modern keyboard.

While I am at it, stop cramming a Fn button in the Ctrl Windows Alt section of my laptop keyboard. I know for certain the placement of the Fn and Ctrl are swapped on Dell and Lenovo laptops. Unfortunately, I prefer the Dell placement (between the Ctrl and Windows keys). On my Lenovo I have to contort my pinky to hold Ctrl.

This may mark the first instance of 'Control Pinky'.

Wish Boldy

There is a saying out there, ‘be careful what you wish for’, and I really hate it.

Partly because it is a hindsight statement. One of those pithy quotes that only really works after something has gone wrong. It is passed off as wisdom when, in actuality, it is more insult than anything. It is said by a naysayers who launch these poisoned phrases to anyone within earshot.

Statements like these stealthily sneak into our collective psyche and create unnecessary limiting beliefs for ourselves.

Wishes can be seen as our dreams. When it comes to our dreams, we should not be careful of what we dream for ourselves. We should dream beyond reality, hope for what is seemingly impossible and strive for the absolute best in all we can accomplish.

Whether we wish, dream, hope or pray, do not take the careful path; be bold, be brave, be more than who you are today.

A little nibble of gum

I am addicted to chewing gum after meals.

Obviously this sent my gum consumption through the roof.

Then I realized that there is no reason to chew an entire piece.

Now I only take a little nibble of gum so now a stick of gum can last me five or more times.

After this change, chewing a whole piece of gum feels like way too much and I get more out of the gum I buy.

How to Increase Your Chances of Getting Your Phone Returned

2013 Update

Now that I have a smart phone, I set the Owner info in the Security settings on my android phone to Emergency Contact: xxx-xxx-xxxx.

Over the past years I have come upon a few lost phones that have been left in taxis or restaurants. Usually I can just hand the phone over to the manager of the restaurant or the taxi driver, but sometimes that isn’t an option. In the latter case I flip through the phone looking for a number to call to inform about the phone. Usually there is no ideal listing in contacts that says ‘call me’.

This is why I have added to my phone contact list a ‘.Call if lost’ number. The period at the beginning sorts the entry to the top of the list and makes it very obvious whom too call if your phone is lost and someone tries to call you to return it.

How to Prevent Your Debit Card Signature from Smearing

I have recently changed financial institutions. I received my new debit card the other day which reminded me of a strategy of mine.

I carry my debit card in my pocket and, in past iterations, my signature line would smear off causing problems at the checkout.

Now, when I get a new debit card, I make sure to take a strip of scotch tape and cover over the signed signature area on the back of the card.

Once the tape is in place, it is trimmed to size. My previous debit card’s signature line is still in as good of shape as it was when I attached it two years ago.

Previously I attempted to tape over more areas to preserve the number shine and the magnetic stripe, but those proved to cause errors in scan reads or elicit peculiar looks at the checkout.