Calling all udev rule geniuses.

Saturday, August 16th, 2008

I have a udev rule so that when a USB mouse is plugged in it disables the touchpad on my MacBook Pro that is running ubuntu. The rule is easy and says the following:

ACTION==”add”, SUBSYSTEM==”input”, ID_CLASS=”mouse”, RUN+=”/usr/bin/synclient touchpadoff=1″
ACTION==”remove”, SUBSYSTEM==”input”, ID_CLASS=”mouse”, RUN+=”/usr/bin/synclient touchpadoff=0″

It works well but there are two problems. If I connect a USB mouse when the computer is starting it doesn’t work. And when I resume from a suspend when I don’t have a USB mouse attached it still disables the touchpad. I then have to run either the second part of this rule by hand or reload the kernel module.

So, anybody know a way to fix this?

Which Language To Use?

Sunday, February 24th, 2008

I think that most everyone knows that I am not a programmer by any means. I do some web scripting with every ones favorite hack language, PHP, but when it comes down to it I don’t know how to code at all. I would like to change this, and round out my abilities. And, when I do get something to work in PHP there is a great amount of pride and satisfaction that come from writing something that works. So, I figure the best way to learn is to do, and I have come up with a little project to work on that will help me do that.

My application idea all started after learning that I can deduct mileage driven for work on my personal car and get a tax credit of 48.5 cents per mile. Really, if your car gets 30 MPG that adds up to a $14.55 credit per gallon, a very healthy deduction indeed. So, the IRS requires that there be some kind of record kept in writing of the miles that you drive. With that in mind I went hunting for an application that did that and low and behold, there is none. So, there it is, I want to create a mileage tracking program.

Right now it is just a MySQL Database with one table, and a front end form through OOo Base. But in the end it would need to have categories for the miles, Have a way to change the data once inputed (i.e. change categories, alter starting or ending mileage, etc.), and it would need to print reports that would give not only a total but break it down by category in either a pie chart or bar graph (possible both, and the user could select which).

So I don’t know what language to learn and start playing around with. I think I have narrowed it down to two: C# and Python. But I want to make sure that the program could easily be ported to any platform. Any thoughts?