Thursday, September 28, 2006

The future of compilers: right now!

From Software by Rob's post on The Future of Compilers... The part where he talks about logic errors being detected by compilers can probably already be done with xUnit, as we (at work) have NUnit running almost like a compiler, right after the actual compilation, in the build script. That way, if we have a "minus sign in the wrong place", a unit test will catch it, if not prevent it from happening again.

Some software like FxCop (PMD in the Java world) can also help here.

Gopher the Demo Player

As part of a university course I am taking (I've gone back to Carleton U for a M.C.S.), I am to make a presentation on some open-source software. I picked my own project, Gopher the Demo Player.

The presentation slides can be downloaded here (PDF, 693 902 bytes).

Hacking the Microsoft Natural Ergonomic Keyboard 4000

I am very happy with my Microsoft Natural Ergonomic Keyboard 4000 as it's finally a natural keyboard that (again) has the inverted T arrow keypad and the standard-size insert key, just like the good ol' 101-key days. In other words, it's like the original Microsoft Natural keyboard, but with "new interweb buttons", an even more natural layout (the "comfort curve design" makes more sense for the way fingers are laid out) and a "zooming thingy".

That "Zoom slider", however, should have been sold/marketed as a "Scroll rocker button", because I do far more scrolling than zooming and, besides, you can usually zoom by scrolling and holding down the Ctrl key in most programs. Well, those by Microsoft anyway.

Anyway, it turns out it's configurable if you:

  1. don't mind editing some XML

  2. don't mind that it's not really XML
    Just try adding an XML comment to document your changes (like <!-- changed by Oli -->) and watch the type32.exe (or itype.exe, depending on your version) program crash every time you hit a magic key to see what I mean. :p



Here's a DIFF of the changes to C:\Program Files\Microsoft IntelliType Pro\commands.xml that disable most customizations of the C319 and C320 keys, which are rock up/away and rock down/toward, respectively. I know it works with versions 5.3.606.0 (aka 5.30.606.0) and 5.5.661.0 (aka 5.50.661.0) of the IntelliType software, maybe also others.


--- commands.old 2005-03-15 04:46:45.000000000 -0500
+++ commands.xml 2006-09-26 15:45:38.718750000 -0400
@@ -1606,8 +1606,8 @@
<C101 Type="5" KeySeq="alt rightarrow" />
<C103 Type="5" KeySeq="escape" />
<C300 Type="5" KeySeq="enter" />
- <C319 Type="6" Activator="ZoomIn" />
- <C320 Type="6" Activator="ZoomOut" />
+ <C319 Type="6" Activator="ScrollUp" />
+ <C320 Type="6" Activator="ScrollDown" />
<C1101 Type="6" Activator="HorizontalScroll" />
<C1003 Type="7" Subtype="0" />
</Application>
@@ -1694,8 +1694,6 @@
<Application UniqueName="rctrl_renwnd32" AppName="Microsoft Outlook">
<C1003 Type="7" Subtype="3" wParam="0x01672" />
<C401 Type="5" KeySeq="F7" />
- <C319 Type="6" Activator="OutlookZoomIn" />
- <C320 Type="6" Activator="OutlookZoomOut" />
</Application>
<Application UniqueName="screenClass" AppName="Microsoft PowerPoint">
<C100 Type="5" KeySeq="pageup" />
@@ -2124,8 +2122,6 @@
<C309 Type="0" />
<C204 Type="0" />
<C315 Type="1" wParam="0x09cc4" />
- <C319 Type="6" Activator="ZoomOut" />
- <C320 Type="6" Activator="ZoomIn" />
<C401 Type="0" />
<C900 Type="1" wParam="0x09cf0" />
<C902 Type="0" />
@@ -2138,8 +2134,6 @@
<C311 Type="1" wParam="0x09d23" />
<C310 Type="1" wParam="0x09cb4" />
<C315 Type="1" wParam="0x09cc7" />
- <C319 Type="6" Activator="ZoomOut" />
- <C320 Type="6" Activator="ZoomIn" />
<C401 Type="1" wParam="0x19d47" />
<C900 Type="1" wParam="0x09cf0" />
<C902 Type="1" wParam="0x09ddb" />
@@ -2158,8 +2152,8 @@
<C101 Type="1" wParam="0x01798" />
<C103 Type="0" />
<C102 Type="0" />
- <C319 Type="5" KeySeq="ctrl add" />
- <C320 Type="5" KeySeq="ctrl subtract"/>
+ <C319 Type="6" Activator="ScrollUp" />
+ <C320 Type="6" Activator="ScrollDown"/>
</Application>
<Application UniqueName="MSN6 Window" AppName="MSN Window">
<C204 Type="5" KeySeq="ctrl y" />
@@ -2188,8 +2182,8 @@
<C106 Type="1" wParam="0x0a125" />
<C104 Type="2" lParam="0x05" />
<C105 Type="2" lParam="0x06" />
- <C319 Type="6" Activator="ZoomOut" />
- <C320 Type="6" Activator="ZoomIn" />
+ <C319 Type="6" Activator="ScrollUp" />
+ <C320 Type="6" Activator="ScrollDown" />
</Application>
<Application UniqueName="Internet Explorer_TridentDlgFrame" AppName="Internet Explorer Child">
<C103 Type="0" />
@@ -2230,8 +2224,8 @@
<C105 Type="2" lParam="0x06" />
<C106 Type="2" lParam="0x07" />
<C104 Type="2" lParam="0x05" />
- <C319 Type="6" Activator="ZoomOut" />
- <C320 Type="6" Activator="ZoomIn" />
+ <C319 Type="6" Activator="ScrollUp" />
+ <C320 Type="6" Activator="ScrollDown" />
</Application>
<Application UniqueName="HH Child" AppName="HTML C302">
<C310 Type="1" wParam="0x000cf" />




Warning: The preceding code block came with no warranty whatsoever, so if your dog died, your significant other left you and/or your house burned down as a result of reading the previous code block, well, sorry, but you should have read this disclaimer first. Please don't sue me.

Tuesday, September 26, 2006

Other cool software you've never heard of

Last time I promised to write about some less crucial but-still-really-useful pieces of software I often use. Here's the "priority 2" list:


  1. Compare It!

    • The best diff/merge utility and thus the third best use of $30 I ever spent. I think it's its keyboard support and light-weight-ness that I enjoy most.

    • I tried (and even purchased!) DiffDog, but then it crashed too often and would hog the CPU too much for my liking and it looks like Altova couldn't care less about fixing the bugs. I used to like Araxis Merge also, but why pay $130 (USD) when you get almost everything (except 3-way diff/merge) for $30??



  2. Hamachi

    • Secure VPN between computers. Fantastic for playing games with friends from different houses or for remote access between two [otherwise] firewalled hosts on the internet.



  3. K-Lite Mega Codec Pack

    • Finally! No more spyware-infected, 54324-AOL-icons-on-your-desktop and 3420-icons-in-your-system-tray multimedia player distributions! These guys packaged up Media Player Classic with a few lots of CODECs. This means that after installing this one package, you can play any audio or video file you aunt Linda will e-mail you every second rainy Tuesday afternoon.

    • Did I mention Media Player Classic?? (yes I did) Well, I need to mention it again, because it means you'll never need to ever see those stupid ads on the side or under the aforementioned funny video Linda sent you. You'll also never have to wait the extra 25 seconds it takes for those damn things to load, skin, check for updates and pop up some dialogs saying "please send us money to help us continue to make your media playing life hell". MPC is slick, fast, small and an excellent example of where Microsoft should have stopped working on their Media Player.



  4. RSS Popper

    • RSS/ATOM feed fetcher, delivers to specified Outlook folders. Works as advertised.

    • This means I can read my feeds from anywhere I can access my Outlook mailbox thus I don't end up reading the same articles over and over again between my work computer, home computer, laptop and PDA. (well, almost, as I haven't quite mastered mail sync for my ancient Palm III on a modern OS)



  5. Expresso

    • Regular Expression Development Tool. Allows you to write and test your regular expressions in a quick, tight loop so that you can fix the mistake before your string contains 5435643789 characters.

    • The testing itself is fantastic as it will present all matches in a treeview, allowing you to expand the match groups to see exactly what was matched.



How to inspire confidence in your build process

From the Ankhsvn website:


Same build as above, but works.


LOL

Update: added some labels