Blog | Admin | Archives | Random | Recent | Thanks
    • A grand entrance. Ready for a fantastic night! #albakchan
    • #albakchan the main event
    • Commute
    • Meat, bread, and succotash.

Uncommunicative Tweets

My friends are occasionally perplexed  by my tweets. In response to one recent tweet, my friend Dan responded:

@RyanMcE You need to add more words if you intend your tweets to be communicative.

And he is absolutely correct. In this case, there is nothing private about the tweet in question (“Dubious indeed”). The story was that my friend Maria and I pulled an April Fools prank on Facebook by becoming engaged. Enough people fell for it that it was fun, but one of my friends called the timing of the announcement “dubious,” since it did come of the first of April. The tweet was in reference to this comment; probably only those who happen to follow me on Facebook would have had any idea what I was talking about.

So, if there is a tweet you don’t understand, know this: not all my tweets are meant to be communicative to all audiences.  Just like with some of my blog posts, some of my tweets are really just markers in time for my future reference. I wrote about something like this before, in a  post called Why I Blog, and before twitter, I would occasionally post a one-liner to this blog. Now those one-liners have simply migrated to Twitter.

On Password Restrictions

Websites should list their password restrictions on their login pages. Sometimes I run into the following problem:

I try to use a password generated by my “standard model” — ie, a standard prefix depending on the nature of the site and some salt determined by the website itself. However, some sites have stupid rules on their password requirements. In real life, I have encountered a wide variety of password requirements:

  • A requirement of an exactly 6-character password
  • A prohibition on “special characters” like any of !@#$%^&*()+=></?{}[]|\/.
  • A requirement for a special character that happens to be one of !@#$%^&*()
  • A requirement for numbers, uppercase, and lower case in the password
  • A requirement for two sets of letters and numbers in the password — ie, fit the regex /([a-zA-Z]+[0-9]+){2}/

When my standard model password doesn’t fit into one of the more esoteric requirements, I have to modify it to fit. Fortunately, I find that on this subject at least, I tend to think the same way over time, so, given the standard model and a set of constraints, I will usually come up with the same password. However, it is uncommon for websites to list their password constraints on the log-in page. Therefore, I will usually try the standard model password first, and only when that fails twice (in case I mistyped the first time), and I’m down to one more try, do I realize that this website might be “special.”

Then I have to go to the trouble to find out what the password requirements are. This is not difficult — usually it involves clicking the “sign up button” and reading a little bit — but it does take some time and it is very annoying. Listing the password requirements at the login screen would make for a much better user experience (since it is so easy to find this information, not displaying it on the login screen can’t be interpreted as a security measure either).

Of course, the real solution is for websites to get rid of their inane password requirements, so I never have to deviate from the standard model.

Safety Agains Reopen

What does this comment in the MySQL source mean? (log.cc, currently line 2295 in 5.1)

{ // Safety agains reopen

I think I understand what it’s supposed to mean — the writer is pointing out that the code is checking again, to be double sure that the log is still open (although, if it can close between this call and the last call to is_open(), I’d be worried about it closing after this call too… note that both checks are after LOCK_log has been acquired).

What I’m more interested in is what the comment, as written, actually means? The grammar is very odd. I’m open to suggestions.

Blog Optimization

In the last two days, I

  1. Changed my blog’s MySQL tables storage engines from the MyISAM to InnoDB
  2. Installed the WordPress Memcache Plugin to mimimize database queries (16-25 queries reduced to 2-7)
  3. Installed APC (Alternative PHP Cache) to reduce PHP bytecode compilation overhead. As a result, all PHP sites on mimimus should be faster.

In addition, I did some general cleaning up and upgrading of software on minimus and nexus.

Altogether, these changes reduce the typical Checksum Arcanius page load from 2.5-3.5 seconds to 0.5-1.5 seconds, a 2-7x improvement.

These are very easy steps to take — I would suggest them to anyone running WordPress. Step-by-step directions follow (assuming Ubuntu Linux):

  1. For each table in your blog’s database, execute the following SQL via a mysql client instance, phpMyAdmin, etc:
    ALTER TABLE <tablename> ENGINE = InnoDB;
  2. Install memcache:
    sudo apt-get install memcache
  3. Download the WordPress Memcache Plugin and place it in your wp-content directory. That is all you have to do to get memcache support in WordPress!
  4. Install APC:
    sudo apt-get install php-apc
  5. Restart Apache:
    sudo /etc/init.d/apache2 restart

Very simple steps with a very high payoff.

Strange Tracking

I have been trying to return a package to Amazon for over a month now. I think it might make it this time! I have two tracking numbers, and one of them (1Z7R23Y69088829050) reports the following tracking data:

Date Time Location
January 13, 2010 09:31:00 PM Hodgkins IL US
January 13, 2010 05:45:00 PM Hodgkins IL US
January 9, 2010 03:24:00 AM San Pablo CA US
January 9, 2010 02:29:00 AM San Pablo CA US
January 8, 2010 10:06:00 PM Menlo Park CA US
January 8, 2010 07:01:00 PM Menlo Park CA US
December 12, 2009 09:49:00 AM Lexington KY US
December 12, 2009 03:53:00 AM Indianapolis IN US
December 12, 2009 02:21:00 AM Indianapolis IN US
December 11, 2009 10:21:00 PM Hodgkins IL US
December 11, 2009 07:13:00 PM Hodgkins IL US
December 9, 2009 05:25:20 AM
December 9, 2009 12:35:00 AM Oakland CA US
December 8, 2009 11:52:00 PM Oakland CA US
December 8, 2009 10:10:00 PM Menlo Park CA US
December 8, 2009 07:25:00 PM Menlo Park CA US
December 8, 2009 04:25:20 PM
December 8, 2009 04:25:00 PM Menlo Park CA US
December 2, 2009 02:02:50 AM US

Notice how it magically disappeared for almost a month after reaching Kentuky, and then reappeared in Menlo Park, only to be shipped off again. UPS magic!

That means the package has travelled over 7,000 miles since when I tried to ship it!

Firefox Turns 5

Almost six years ago, I first downloaded Mozilla Firebird, the web browser that became Firefox. Within a week, the new browser had won me over. It took about another year for Mozilla to release Firefox 1.0, the first generally available version of the new browser, on November 9, 2004. Now, Mozilla is celebrating Firefox’s fifth birthday.

Since then, Firefox has seen over 1 billion downloads and has made significant inroads against the once totally dominant and stagnant Microsoft Internet Explorer. Despite experiments with Chrome, Safari, Opera, and the newer versions of IE (which wouldn’t even exist had Firefox not forced Microsoft into action), Firefox has remained my browser of choice, due in large part to its constant improvements, rich set of extensions, and supporting all the little things that make browsing fast and fun.

In a lot of ways, the culture of Firefox has grown into a religion, with its adherents being encouraged to spread the good word of Firefox, convert their friends, and so on. Nevertheless, it is a religion I feel good about being a part of. So, if you don’t already use it, go give Firefox a try.

Patching PuttyCyg to Send Ctrl-Tabs

Recently, I started using Windows 7 on my laptop, which lead me to adopting PuTTYcyg as my terminal of choice. Also, in large part due to my new job at Facebook and my misgivings about some aspects of Mac OS X, I’ve been experimenting with my terminal setup a lot recently. My research during this time led me to learning about patching PuTTY to send ctrl-tab and ctrl-shift-tab. I thought that sounded like a good idea, but of course I was using PuTTYcyg now, so I had to do the patching myself.

It turned out that downloading and patching the code was straightforward enough: With a few development packages in cygwin (namely make and the normal C/C++ gcc), make worked (almost) without a hitch. All I had to do was download the PuTTYcyg icon (which was not included in the patch), and everything compiled properly. However, after compiling, when I ran a cygwin terminal, a second windows command-prompt-style window with a bunch of debug info popped up:

PuTTYcyg Issue

This of course was a non-starter, so I searched in vain for a few hours to try to fix this, and ended the night by opening a new issue at the PuTTYcyg home page.

The PuTTYcyg developer pointed me to the Makefile used to build the PuTTYcyg releases. In it are a few special XFLAGS that magically make the extra window not appear:

XFLAGS= -UDEBUG -UNO_MULTIMON

Using the new Makefile, I compiled again, and this time when I ran PuTTYcyg, there was no annoying extra window. Brilliant!

Feel free to contact me if you need any more info.