VIsual C++ 2005 Express

I’ve recently found myself needing to generate binaries for Windows NT4 (don’t ask). At work, we’ve settled on using MinGW for building our C++ binaries and I’ve struggled to generate binaries that run on Windows NT without any missing modules.

In order to make things simpler, I thought that I might try downloading Visual C++ 2005 Express, as that was the last version that supported generating NT4 binaries. Later versions are XP and above only. If I’m not mistaken Visual Studio 2012 only targets Vista and above out of the box; XP support was returned after much pressure.

I couldn’t a download link to Visual Studio 2005 Express on the Microsoft website. Instead, I found the following link to the Visual C++ ISO (hosted at Microsoft) that still appears to work.

It’s still valid, so grab a copy before it disappears forever.


Wireless Networking on Windows 2008 R2

I’ve just spent 30 minutes trying to get my new wireless card working under Windows 2008 R2. I had installed the drivers that came with the card, the card was visible under Device Manager but I could not connect to a wireless network.

It turns out that Windows 2008 R2 doesn’t include wireless LAN support unless explicitly enabled. So to rectify this, bring up Server Manager->Add Features->Wireless LAN Service and all the tools for connecting to a wireless network are installed.

Making Ubuntu default to using the USB sound card

The nVidia video card in my machine also gets registered as a sound card. There appears to be a high definition audio (HDA) chip on it that gets automatically detected and made default.

To get sound through my USB sound card, I’ve had to add the following to /etc/udev/rules.d/00_local.rules:

# Default to using additional (USB) sound cards when they are available.
KERNEL==”pcmC[D0-9cp]*”, ACTION==”add”, PROGRAM=”/bin/sh -c ‘K=%k; K=$${K#pcmC}; K=$${K%%D*}; echo defaults.ctl.card $$K > /etc/asound.conf; echo defaults.pcm.card $$K >>/etc/asound.conf'”
KERNEL==”pcmC[D0-9cp]*”, ACTION==”remove”, PROGRAM=”/bin/sh -c ‘echo defaults.ctl.card 0 > /etc/asound.conf; echo defaults.pcm.card 0 >>/etc/asound.conf'” 

Any new applications that launch will default to using the USB sound card.

Why can’t anything be simple?

Lubuntu touchpad configuration

While minimalism is good, too much minimalism can be a real drag. Lubuntu doesn’t come with a touch pad configuration app, so you’ll have to work with the command line.

To get an idea of the options you can configure, run the following command: 

synclient -l

Edge scrolling and two finger scrolling is enabled by default. This is overkill on my laptop, and edge scrolling is especially troublesome as my touchpad is tiny. I noticed that the mouse cursor was jumping all over the place while I’m typing. After a little digging, it turns out that this is because palm detection is disabled by default and thus the touchpad is responding to my palm. 

We fix this by running the following command in the terminal:

synclient PalmDetect=1 VertEdgeScroll=0

To persist these settings across restarts, edit the autostart configuration file by issuing the following command:

gksudo leafpad /etc/xdg/lxsession/Lubuntu/autostart

Add the following line to the end of the file:

@synclient PalmDetect=1 VertEdgeScroll=0

And we’re done. Sit back and enjoy your newly configured sensible touchpad behaviour.


Finder sucks

I don’t spend much time on a Mac, but when I do I’ve always been underwhelmed by Finder. These are two of my main gripes:

  1. Why is there no easy way of viewing hidden files? There is no keyboard short cut, menu item, or even preference to toggle this functionality. Feeling thick, I turned to Google. Turns out you have to hack around in the terminal to enable this functionality! 
  2. Why is the Home folder not easily accessible? When you launch Finder, you’re taken to “All My Files”. In the side panel, there are 6+ navigation options with things like Desktop, Documents, Air Drop (eh?), Applications, Pictures, Movies, etc but no Home. Thus if you were foolish enough to store your work in a folder called Projects, you’ll be left scratching your head as to how you’d get to it. Never fear, the keyboard combination CMD+SHIFT+H to the rescue. If you thought Finder was bad, wait till you see the file open/save dialog. No Home button for you there, so you need to remember the magic CMD+SHIFT+H keyboard short cut or you’re never going to see your documents again. Nevertheless, I’m happy to report that Google provided a fix.

I have never used a file manager (Windows Explorer, PacmanFM, Nautilus) that didn’t provide an easy way to accomplish the mentioned tasks. Why are they missing from Finder? Why?! Do they have focus groups down in Cupertino?

PostgreSQL and frequently updated tables

How to avoid performance degradation on frequently updated tables in PostgreSQL.

nVidia driver on Ubuntu 12.04

For whatever reason, the “Additional Drivers” tool on Ubuntu refuses to install the binary nVidia driver on my machine. Thus I have to do it manually via the following commands.

sudo apt-get install nvidia-current-updates nvidia-settings-updates