Monday, June 14, 2010

The Brain That Changes Itself - Norman Doidge

Great book full of interesting stories from the fringes of neuroscience. The thing to take away from this book is "neurons that fire together wire together".

Friday, April 23, 2010

Windows Explorer: Open CMD Prompt at Location

To add the ability to open a folder location in a CMD prompt via the Explorer context menu, do the following:
  1. Open regedit. This can be done via the Run prompt.
  2. Create the key HKEY_CLASSES_ROOT\Directory\shell\open_cmd_at_loc.
  3. Change the default value for this key to Open CMD at Location.
  4. Create a the key HKEY_CLASSES_ROOT\Directory\shell\open_cmd_at_loc\command.
  5. Change the default value for this key to cmd.exe /k "cd %L".
  6. Close regedit.
  7. Right click on a folder. The changes should take effect immediately.

Thursday, April 22, 2010

Game Development: JPod and Irrational Behavior

Recently finished Douglas Coupland's JPod; interesting material. The unabridged audiobook can be a difficult listen due to the random and lengthy lists. However, the voice work by Marc Cashman is often brilliant, especially for the character of Steve.

This book meshes well with the various game developer produced podcasts. Among the best is Irrational Behavior (RSS feed) hosted by Shawn Elliott.

Wednesday, April 14, 2010

Over the Edge of the World: Magellan's Terrifying Circumnavigation of the Globe - Laurence Bergreen

An excellent book on a topic that doesn't seem to get much attention in typical history classes. The accomplishments of Antonio Pigafetta rival those of Magellan.

Tuesday, January 5, 2010

Dropbox and TortoiseCVS


I've used TortoiseCVS for quite a while now and recently installed Dropbox onto the same computer. I noticed that after installing Dropbox, most of the icon overlays for TortoiseCVS no longer appeared.

After a quick Google search, I found this helpful Stackoverflow topic. Although the topic mentions the fix is for Windows 7, it worked perfectly on my XP machine. In summary:
  1. Open regedit and navitage to the following: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ShellIconOverlayIdentifiers
  2. Each type of overlay has its own key. The keys are prioritized in alphabetical order. Since the Dropbox keys appear before the TortoiseCVS keys, there must be a conflict somewhere.
  3. Add a z_ to the Dropbox keys to push them to the bottom.
  4. This fix seems to require a restart to take effect.

Tuesday, December 29, 2009

PyQt and py2exe

PyQt is an excellent framework for creating GUI applications in Python. It would make sense to create an executable version of these applications that would not rely on Python being pre-installed. The py2exe tool makes this process very easy for most Python applications. However, I recently ran into the problem of an executable PyQt application not acting the same as its Python interpreted counterpart. For the record, I am using Python 2.6.4.

For example, PyQt4 comes with an example application called imageviewer.pyw. After creating an executable version of this application, any attempts to open a jpg file will fail. Opening a png file, however, will work.

The solution to this problem is described in more detail here. To summarize, PyQt uses a plugin to display jpg images. This plugin is not automatically included when using the py2exe tool. To manually include these plugins, do the following:
  1. In the py2exe created dist directory, create a subdirectory named PyQt4.
  2. Copy the plugins folder from the PyQt install location (typically C:\PythonXX\Lib\site-packages\PyQt4).
  3. Paste the plugins directory into the newly create PyQt4 subdirectory.
  4. From the PyQt4 install location, copy the qt.conf file.
  5. Paste the file into the py2exe dist directory.
  6. Edit the file so that the prefix is equal to ./PyQt4
  7. Test that the application works properly.

Monday, December 14, 2009

HTC Touch Pro2 Cradle Verizon Mod


I recently bought a cradle for my Verizon HTC Touch Pro2 from Meritline.com (see link below). From the webpage, it looked like a decent cradle at a reasonable price. However, this cradle is only compatible with the models that do not include a built-in 3.5mm headphone jack. The difference is that the versions without the headphone jack must have the USB jack in the exact middle of the phone while the other versions shift the USB jack over to allow room for the headphone jack.

Not knowing this ahead of time, I was disappointed to discover that my phone was unable to fit into the cradle. Luckily, this cradle can be easily modified in less than 30 minutes to fit the headphone jack sporting models. The only tools required are a screwdriver and a razor blade.

The following steps detail how to modify the cradle. Proceed at your own risk:
  1. Pry the four circular rubber feet off the bottom. These are adhesive and can be reapplied later if removed carefully.
  2. Remove the four screws to separate the top and bottom halves of the dock.
  3. Line up the bottom of the phone with the dock, placing the phone in the recessed area. Note the offset of the USB jack on the phone with the slot on the cradle.
  4. Using the razor, elongate the slot so that the USB connector can be moved to line up properly with the phone. The plastic is soft enough to make clean cuts by hand.
  5. The USB connector on the bottom half of the cradle is attached to a PCB that is held by a slotted support that is molded into the plastic. The bottom of the PCB was glued to the plastic. Cut away the glue with the razor.
  6. Reposition the USB connector using the newly elongated slot. Press the PCB back into the plastic supports. Blind fit everything to make certain the phone will fit into the cradle.
  7. At this point, the PCB can be glued into the cradle if desired. I did not bother since the plastic supports hold it firmly.
  8. Reassemble the rest of the cradle.
Meritline product page:
http://www.meritline.com/htc-usb-dock-cradle-syn-charger-station---p-39084.aspx