Scroll Wheel Emulation for the TrackMan Marble
June 04, 2011 at 04:26 PM | Uncategorized | View CommentsI recently had to get a new mouse, and because Logitec has discontinued my mouse of choice, the TrackMan Wheel[0], I got a TrackMan Marble.
Unlike every other modern mouse, the Marble doesn't have any sort of scroll wheel… But fortunately this can be emulated in software. I've done this on my Mac using KeyRemap4MacBook and a custom private.xml. I've also been told that Marble Mouse Scroll Wheel (mirrored marbleinst.exe) works well on Windows.
[0]: It has been replaced by, of all things, a wireless version. Why does a stationary mouse need to be wireless? I've got no idea. Maybe it's a conspiracy between Logitec and Duracell?
In thinking about the pair programming that I've done, I realized that I can separate all of my past partners (all 6-8 of them) into four categories:
- Equally skilled
- Less skilled
- Much less skilled
- Skilled in a different domain
Of these, I have found the “less skilled” partners to be the most frustrating. Not because of their personality[0], but because during the sessions I've felt like there is a mutual understanding of the goal, but I would just be able to get there more quickly (for example, because I'm more experienced with the libraries or environment). I haven't felt this way with the “much less skilled” partners because I believe there is a mutual understanding that the session more akin to a tutorial… So, in my mind, the goal becomes “teach my partner” instead of “solve a problem”.
The times I've paired with an “equally skilled” partner do not stand out in my memory, so I assume they went okay.
My favourite pairing experience was when a friend and I had to figure out the inner workings of some example C code for a micro controller. My friend knew a lot about micro controllers, I knew a lot about C, and together we were able to reverse engineer the hideous example code much more quickly than either of us alone could have. It was a lot of fun.
[0]: as I write this, I don't have any specific people in mind, just memories of my experience.
It appears that, at some point, I stopped getting notifications of new comments… I've sorted that out now, though, and please forgive me for my tardiness in replying to old comments.
After seeing Problem, Boole?, a table of comparisons in PHP, I decided to bang up a quick JavaScript version (a cell is green when column == row):
| true | false | 1 | 0 | -1 | "1" | "0" | "-1" | "" | "javascript" | null | undefined | [] | {} | [[]] | [0] | [1] | NaN | |
| true | ||||||||||||||||||
| false | ||||||||||||||||||
| 1 | ||||||||||||||||||
| 0 | ||||||||||||||||||
| -1 | ||||||||||||||||||
| "1" | ||||||||||||||||||
| "0" | ||||||||||||||||||
| "-1" | ||||||||||||||||||
| "" | ||||||||||||||||||
| "javascript" | ||||||||||||||||||
| null | ||||||||||||||||||
| undefined | ||||||||||||||||||
| [] | ||||||||||||||||||
| {} | ||||||||||||||||||
| [[]] | ||||||||||||||||||
| [0] | ||||||||||||||||||
| [1] | ||||||||||||||||||
| NaN |
The source can be found over at GitHub: https://gist.github.com/761080.
If you've taken an OS/161 based operating systems course[0], you probably ran into one of those fun little eccentricities that makes higher education so enjoyable: the requirement that all code be added in #if blocks.
For example, if the original code looks like this:
int foo = 3;
And I change it to:
int foo = 4;
I'm actually required to submit something that looks like this:
#if !STUFF
int foo = 3;
#else
int foo = 4;
#endif
Well, my friend Dave didn't find this very amusing, so he commissioned me to write a script which would massage a diff produced by $VCS diff, adding all the #ifs required to make the TAs happy :
$ hg diff -r initial: ... -int foo = 3; +int foo = 4; ... $ !! | ifdiff STUFF ... +#if !STUFF int foo = 3; +#endif +#if STUFF +int foo = 4 +#endif ...
The code can be downloaded and forked over at GitHub: ifdiff — http://gist.github.com/612687.
[0]: For the record, CSC369 was one of my favorite courses.