Tuesday, August 04, 2009

Wanted: A Wireless Keyboard That Does Not Suck

Unicomp Customizer 104 Windows keyboard
Wireless keyboards (and mice) for PC's are obviously a convenient piece of technology, but I have two problems with the current line of available consumer models of wireless keyboards:

  1. Dome-switch keyboards: unless you are a graybeard hacker, it is likely that the PC keyboard you are currently using is a dome-switch keyboard. This is the type that makes a mushy, almost quiet sound when you press a key. In my opinion, this technology robs all joy out of the act of typing. I prefer the buckling switch technology — perfected by the IBM Model M keyboards — which produces a loud and satisfying click every time you hit a key.

  2. Superfluous "Function" keys: I swear to you, the Microsoft wireless keyboard that I am using has this ominous looking button on top, which I am afraid to press, for I fear it may launch a nuclear attack on Tehran. Seriously, who needs all these extra keys that waste keyboard real estate? The only non-standard key I can tolerate on my keyboard is the Windows key.
Fortunately, Unicomp actually still makes some keyboards with the buckling switch technology, but their only wireless keyboard, the SK-7500 wireless, doesn't seem to have buckling switch keys. Also, its wireless receiver uses a PS/2 connector to attach to the PC.

Does anyone know where I can get a wireless keyboard that does not have the aforementioned shortcomings? I will pay good money for it, too.

Thursday, April 23, 2009

Help My Friends Get to Mongolia!

This is easily the coolest thing that anyone I've known has ever been involved in. Arun, my college buddy, has signed up for Mongol Rally 2009. That means he and his team are going to drive from London to Eastern Mongolia. That is one hell of a road trip. Thousands of miles, 15 countries and, I am pretty sure, some incredible adventures, over a two month period. You can find out more at the Mongol Rally Rustics Blog.

Arun and his team are looking for support to help them get to Mongolia. They are donating all proceeds to charities. In fact, they will even donate their vehicle in Mongolia, and figure out how to get back once they get there. Gnarly!

Donate to the Mongol Rally Rustics' effort
So, help out for a worthy cause, if you can. Donate to the Mongol Rally Rustics' effort (you can also click the image link above).

Monday, February 16, 2009

Merging lists (or any sequences) in Python

When writing Python programs, I often need to merge a list of lists into a single list. For example:

[[1, 2, 3], [4, 5], [6, 7]] -> [1, 2, 3, 4, 5, 6, 7]

Looking around on the Internet, I have not come across any solution better than the one I always use:

>>> def mergeseq( *lists ):
... return reduce( lambda x, y: x + y, lists )
>>> mergeseq( [1, 2, 3], [4, 5], [6, 7] )
[1, 2, 3, 4, 5, 6, 7]
>>> mergeseq( *[['a', 'b'], ['c'], ['d', 'e']] )
['a', 'b', 'c', 'd', 'e']

If you know of any better solutions, let me know. The idea behind my solution is to use the reduce builtin, and the fact that the addition ('+') operator in Python works as expected for lists.

Note that really, all that mergeseq is doing is to apply the addition operator to the current result and the next element in the input. So, this will work too:

>>> mergeseq( 1, 2, 3, 4 )