Disabling Laptop Trackpad vs. Eraser Head/Stick (General Linux)
So, tonight I sat down with my trusty Dell D600 laptop, which has a touch pad AND an eraser-head/stick pointer between the G and H keys, and I noticed that the stick pointer seems to be stuck towards the upper-right corner and makes the mouse damn near impossible to use.

The touchpad is fine.

So, I switched to the F1 text console and started poking around the /dev/input directory. There are several entries. I determined that mouse0, event5 refer to the errant stick pointer, and that mouse1 and event4 refer to the touchpad.

I ran 'chmod 000' on the mouse0 and event5 devices and restarted X. Strangely, enough, X still seemed to be able to read from them. So I removed them completely, and restarted X again.

This time, I got what I was looking for: working touchpad and disabled pointer-stick. Never liked that damn thing anyway.

Final fix was to add this to /etc/rc.local:
chmod 000 /dev/input/mouse0 /dev/input/event5 /dev/input/mice rm /dev/input/mouse0 /dev/input/event5 /dev/input/mice
Posted by Tim Jones at 18:22 2012-12-17 | Trackbacks (3871) | Comments (4169)



We're back...! (General)
This blog is now powered by a minimalist blog software called Poster!

I had to migrate all my sites to a new VPS, and I didn't want to hassle with moving multiple WordPress sites, because each one has a MySQL schema. And MySQL is now owned by Oracle. (RIP, it was nice while it lasted). This one stores everything in simple text files, meaning a simple rsync operation is all I need to track.

I expect to re-post my old content over the next few weeks.
Posted by Tim Jones at 11:53 2012-12-08 | Trackbacks (2689) | Comments (3109)



Surprise! RentACoder.com ranks me in the top 3%. (General Linux)

Well, no, maybe you shouldn't be surprised. I have been programming computers since age 11, and I really love the work, especially when it's all about Linux!

Here's the surprise: I have only done five jobs on RentACoder. Five jobs in four years. Not a lot.

Why so few? Because most experienced software developers in "mature economies" like North America, Europe, Japan and Austrailia get brutally outbid by people in extremely low-cost countries. Or put another way, small-time outsourcing. Or instead of 10,000 full-time jobs all at once, thousands of little one-off projects going overseas individually.

I don't spend much time on RentACoder, obviously because I have an easier time finding fun side work elsewhere. RAC has a feature where a buyer can "invite" developers to bid on something, but most of those invitations are worthless to me. They want me to do something with Windows (me, hahaha!), or search engine optimization, outright scams/spams, and stuff that at least twenty million Indians have already been trained to do.

What surprised me was that after such a small track record, RentACoder has ranked me 7,025th out of 273,839 coders, or "higher than 97.43% of their peers". This results in my RentACoder profile being adorned with the TopCoder badge.

And they never told me. I just stumbled on it, because someone actually sent me a rare interesting-looking bid request.

Maybe RAC is worth a little more attention.


Posted by Tim Jones at 14:32 2009-11-14 | Trackbacks (2918) | Comments (0)


The best way to type in Spanish (General)

As a student of the Spanish Language, this topic keeps coming up. Forget all the Alt-XXX stuff: Life's too short!

On Windows, the best way to type accented characters is to change your "keyboard layout" to US-International. See Microsoft's Guide to Keyboard Layouts. Then you use the single-quote key before your vowel to make your accents: 'a=á, 'e=é, 'i=í, 'o=ó, 'u=ú. Then you can use ~n to make ñ.

There is a similar setting for Linux (both KDE and Gnome) under Regional/Languages that makes the keyboard behave the same way.

On a Mac, you use Option-E, then a vowel to make á, é, í, ó, ú. For ñ, you use Option-E, then n.


Posted by Tim Jones at 21:02 2009-09-18 | Trackbacks (3277) | Comments (0)


Have you ever crashed Javac? (General Linux)

I did -- tonight...

I didn't know (until Eclipse's QuickFix feature suggested it to me about a week ago) that this is valid:

        for (@SuppressWarnings("unused") String fieldname : fieldnames) {
            // some block where I didn't use 'fieldname' --
            // I was more interested in doing it the right number of times, but without a counter variable
        }

This works on Java 1.6.0_10-b33 as provided by Debian/Ubuntu.


But on Solaris Java 1.5.0_06-b05 (where my product has to be built every night) this was (apparently) an invalid place to put a @SuppressWarnings annotation. Makes the compiler barf:

    [javac] An exception has occurred in the compiler (1.5.0_06). 
            Please file a bug at the Java Developer Connection 
            (http://java.sun.com/webapps/bugreport)  after checking the Bug
            Parade for duplicates. Include your program and the following 
            diagnostic in your report.  Thank you.
    [javac] java.lang.AssertionError: {unused}
    [javac]     at com.sun.tools.javac.tree.TreeMaker$AnnotationBuilder.visitArray(TreeMaker.java:634)
    [javac]     at com.sun.tools.javac.code.Attribute$Array.accept(Attribute.java:124)
    [javac]     at com.sun.tools.javac.tree.TreeMaker$AnnotationBuilder.translate(TreeMaker.java:637)
    [javac]     at com.sun.tools.javac.tree.TreeMaker$AnnotationBuilder.visitCompoundInternal(TreeMaker.java:628)
    [javac]     at com.sun.tools.javac.tree.TreeMaker$AnnotationBuilder.translate(TreeMaker.java:641)
    [javac]     at com.sun.tools.javac.tree.TreeMaker.Annotation(TreeMaker.java:649)
    [javac]     at com.sun.tools.javac.tree.TreeMaker.Annotations(TreeMaker.java:570)
    [javac]     at com.sun.tools.javac.tree.TreeMaker.VarDef(TreeMaker.java:554)
    [javac]     at com.sun.tools.javac.comp.Lower.visitIterableForeachLoop(Lower.java:2892)
    [javac]     at com.sun.tools.javac.comp.Lower.visitForeachLoop(Lower.java:2755)
...etc ...

The bug is described here and it's been fixed in a later version.

This is the fix (since there's no way we're going to push out the fixed compiler on dev/test AND production by March 31, which is when I would need it.

        for ( String fieldname : fieldnames) {
            // same old block
        }

All that over trying to suppress a warning...


Posted by Tim Jones at 04:49 2009-03-14 | Trackbacks (3140) | Comments (0)


Data loss: a universal experience? (General)

Tonight, I was at band practice, working hard on our contest music, and out of the blue, our director Jim called out: "Who here has lost a hard drive?"  He happened to lament on his Facebook page about losing a drive, so I wasn't surprised that it was on his mind.  I was only surprised he chose to bring it up in front of 30 talented musicians during rehearsal.

Jim knows that I work in computers, because I host his personal website, that of the band, and a couple others.  Before anyone could respond, he re-targeted the question at me, personally.  "Tim, have you ever lost a hard drive?".  I immediately blurted out, "No!"  Incredulous, he shot back, "Never, in your whole life?"   The rest of the band started to laugh, and maybe there was a jeer or two.   Normally, most computer users have just one hard drive, and when it fails, they lose stuff.  Tax returns, baby pictures, email, and in Jim's case, maybe painstakingly composed (and really amazing) brass music scores.  I just assumed that I was being asked if I had ever lost any DATA.  But no, Jim had asked if I had ever lost a DRIVE.  "Well, yeah, of course... DRIVES go bad all the time, but I don't lose DATA... Ever."

Another guy called out the name of a widely-advertised remote backup solution that

  1. probably only works under Windows,
  2. definitely costs more than a backup hard drive, and
  3. sprays your data across the internet to a remote datacenter with a bunch of other peoples' backups, where it sits as a very tempting target to all the hackers and business competitors out there,and.
  4. is probably staffed by over-confident twenty-somethings with less than 5 years' experience but somehow have "Senior" in their title).  

I pointed some of these things out, again, to guffaws and more laughter.  I pointed out that losing a hard drive doesn't have to mean losing data, but you have to take charge of your zeroes and ones, install mirrored drives, and take every opportunity to copy stuff around to systems you control (especially when you can automate it with tools like cron). 

I have a whole boatload of little techie rants like this, and I am used to rattling them off as needed, but my bandmates hadn't heard any of them before.  It felt like the most helpful and natural thing in the world to share my experience and knowledge, yet I felt like I made a spectacle of myself in a room where probably a third of the people have AOL email addresses (but are otherwise fun and intelligent human beings). 

Anyway, it was over before I knew it. We got back on task, working on the difficult sections of the music that do need attention.  But I started thinking to myself, "Why were they so unwilling to believe me?"   It is often hard for me to relate to ordinary people's conceptions of computing for (more than) a few reasons.  The most obvious reason is that I don't use Windows, except when I am forced to (and fortunately that only means Outlook/Exchange at work).  Most of the rest of the reasons are because as an applications developer, for all of my adult life (20+ years) and most of my teens, I have used a lot more kinds of systems than even exist today, and I understand what goes on at the very lowest levels of the system. Big surprise, everyone already knows I am a major-league geek.

"Am I really that fanatical about backups?  Why is that?"   When I try to remember what data I have ever lost, I really have to go back to my teenage years (starting at age 11), when my systems were home computers (mostly Ataris) that used the family TV and used audio cassette tapes for  storage.  I didn't own a floppy drive until I was 16, and no hard drives until I was 18.  These cassette tapes, in particular, were extremely unreliable devices, much more so than any hard disk I have ever encountered.  These tape drives basically recorded and reproduced sounds similar to 300-baud modems.  I even remember that the documentation even recommended that the user keep two parallel sets of tapes (always save to two separate tapes).

With that rough sort of initial introduction to early computers, I guess what I am saying is this: As technology improved, I never did develop a trust in a single storage device to hold important data, because of the primitive hardware I started with.  From the very beginning, I saved to parallel sets of audio tapes.  I kept two or mor copies of most of my floppies, and when I got  into PCs with MFM/RLL hard drives, I always had my stuff copied and spread around multiple systems  too. Nowadays, I have remote VPS systems that are redundant hot-backups of each other, multiple mirrored drives under Linux, and lots of external USB drives.

I teach my son the same thing:  he saves all of his important data to a mirrored NFS drive on my main programming server, on the other side of the house from his room.  My wife, fortunately, only does email, and that is all server-based (timjones.com uses Google Apps, which includes GMail For Domains).  Even there, I back up her Google-hosted email to my Linux system using Fetchmail.

SSDs (Solid State Disks) are starting to appear in the stores, and the strongest recommendation from Linus Torvalds is for the SSDs made by Intel.  I don't
own any yet, but when I do, there will be two, set up as a mirrored pair.  Neither will ever be the sole copy of anything, not even with such a great endorsement. Just not gonna happen!

Call me paranoid, sure, but I don't lose data.  You don't have to either.


Posted by Tim Jones at 02:58 2009-01-06 | Trackbacks (2669) | Comments (11239)