Archive for the ‘Code’ Category

My Code Got Hosted

Thursday, December 3rd, 2009

Ever have that dream were you realize half way through a normal day that you’ve got no clothes on? Well, this feels a little like that. I’ve been working on a test suite for a while now, and technically it’s been open-source (GPL), but it wasn’t publicly accessible. That changed today, as it’s now a Fedora Hosted Project called “v7″. So stop by, ridicule my code, fix it, break it, or what ever. Even if you don’t do any of that, it’s a little weird to think that all the code I’ve been writing is now in public view.

v7 on Fedora Hosted

RacePro

Friday, February 27th, 2009

I’ve been playing RacePro, a new racing game on the 360 that claims to be the most realistic racing simulator ever. I have my doubts about this, but more importantly, I don’t think it’s a good game.

They knew the game had problems before they released it. It was offered for $40 via pre-order, as compared to the usually fixed-price of $60. That’s why I’m not surprised that the game has issues, but I went for the pre-order despite this.

They did a good job for a driving simulator. I can’t comment on how realistic it is, as I’ve never raced in real life, but I’m not sure that matters. But the AI and their private physics model kind of ruins the single-player for me, turning it into a hot lap exercise. I hear the multiplayer is a lot of fun, but I can’t really try it yet given that most players are way ahead of me in unlocking cars. I’ll stick with it at least that far just to see.

So far, it’s been worth my time just in the sense of a break from Forza, some new tracks and new cars. That said, I’d rather be playing a Forza expansion pack with the new tracks and the open-wheel cars.

There’s a bigger issue that really bugs me about racing games in particular. They don’t seem to be getting better, with the exception of graphics, and RacePro falls short even here. Perhaps its my background via my day-job, but I can’t help but think that it’s due to the proprietary nature of game development. Each game has to re-invent the wheel. And industry pressures mean that companies producing good results get new projects in other genres, for example DICE and Rallisport Challenge.

I have no experience with PC-based games, perhaps it’s different there. Maybe this will change with business models, where these games go the way of WOW, a dedicated subscription service, and these monolithic console sequel releases are a thing of the past.

RIP Garmin 305

Wednesday, February 11th, 2009

I tried to use my Garmin 305 yesterday, and it was not responding to any button presses. So, back it goes. I may try and get a replacement.

Garmin Forerunner 305 on Fedora

Friday, February 6th, 2009

I got a Garmin Forerunner 305. I’m trying to get it running on my Fedora 10 system, as well as my Mac Mini.

So far, pytrainer just won’t work. It seems to rely on an old blacklisted driver gps_garmin. I have gotten
gpsbabel working, via a usb permissions rule change:

I added the file /etc/udev/rules.d/51-garmin.rules with the following contents:

SYSFS{idVendor}==”091e”, SYSFS{idProduct}==”0003″, MODE=”0666″

With that, I could run:

gpsbabel -t -r -w -i garmin -f usb: -o gpx -F outputfile.gpx

This is a nice XML file. But what can I read it into?

On the mac, it gets a little wierd. The Garmin Training Center wouldn’t detect the device at all.
I downloaded the latest version. It still had a lot of trouble detecting the device, asking me
to reboot the 305 several times. There seems to be a hint that some maps are included
in the application, but no luck downloading them. It’s odd that the “supported” platform doesn’t
even work as well as Fedora.

A Day in 40 seconds

Thursday, January 29th, 2009

Web Cam and Time Lapse

Wednesday, January 28th, 2009

I’ve got a web camera attached to my Mac Mini. First, I wanted to set it up to take pictures out of my office window every 5 minutes or so, and upload them to this site. That might seem like a simple thing, but none of the easy-to-use Apple applications offered any help. With a little poking around, I found isightcapture, and wrote a short python script to call it every 5 minutes and ftp the resulting picture to my server.

while True:
    # take a picture
    timestamp = datetime.datetime.now().strftime("%Y-%m-%d-%H-%M-%S")
    filename = "/tmp/pic-%s.jpg" % timestamp
    print "Say Cheese!"
    os.system('isightcapture -w 960 -h 720 %s' % filename)

    # upload it
    try:
        file = open(filename, 'r')
        print "uploading..."
        connection = ftplib.FTP('ftp.atomicspatula.com', 'henry@atomicspatula.com', 'password')
        connection.storbinary('STOR pic.jpg', file)
        file.close()
        connection.quit()
        print "done"
    except exception:
        print exception
    time.sleep(60)

This code writes timestamped pictures into /tmp, and uses it to upate a single file on the server.

With a nice sequence of pictures, I wanted to use QuickTime to make a nice time-lapse movie. But QuickTime seems to require that the pictures all have the same name with a sequence number, such as pic00001.jpg, pic0002.jpg, etc. Why Apple couldn’t have just suck in all the pictures in the folder in alpha-numeric order is beyond me. So, I wrote another little script to rename them:

rootdir = "/Users/henry/time-lapse"
files = sorted(os.listdir(rootdir))
i = 1
for file in files:
    print file
    shutil.move(file, "pic%.6d.jpg" % i)
    i = i  + 1

Tomorrow, I’m going to run it all day at 1 picture per minute, and see what that looks like at 15 fps.

Stay tuned!

Spreading the Word

Wednesday, October 8th, 2008

I set my 12 year-old daughter up with Fedora 9 and KDE 4. Her initial experiences are proving to be thought-provoking. What little computer experience she has is mostly with Windows, but she has run iTunes on OSX.

Her mom’s (my ex-wife) first question was, “Can’t it run Windows? That’s what she needs for school”. I explained that the system didn’t come with Windows, and that Fedora was free, and easy to keep up to date. Also, any documents could be saved in formats readable by Microsoft applications. It’s really a shame they don’t run Linux/OO at school.

Still, I have to admit some misgivings about this experiment. Is Linux ready for teenagers? I like to thing that subjecting my daughter to an environment where she has to figure things out will be good for her, as opposed to letting her run Windows, where she can go ask adults for help (often getting bad advice) at every turn.

We’ll see how this goes

The Death of the Internet

Tuesday, August 26th, 2008

It looks like we’re down to 2 or 3 public internet service providers, depending on how you count. Comcast seems to be taking the lead on assuming ownership of it’s tubes, and redefining what “internet service” really means – web access and e-mail (httpd, snmp) to partner sites and services, using approved devices.

IP will transition from the defining protocol of the Internet, to being merely a convenient implementation of services. Independent web sites like this one will be replaced by Facebook pages.

Am I being alarmist? What about the FCC in the US? What about the rest of the world? Can these large media corporations be stopped from turning the Internet into Cable 2.0?

I don’t see nearly enough consumer unhappiness or even awareness of this issue. So long as these services are “faster”, “higher speed”, people seem to be happy.

At best, the present public internet will fragment into layers, some AOL-like services, some private corporate, and perhaps some underground networks beyond control of media corporations.

Microsoft still doesn’t get open source

Friday, May 30th, 2008

Ray Ozzie – Microsofts’ new head technologist, says open source is more disruptive to Microsoft’s business than Google:

He’s right about that, but wrong about everything else. It’s shocking that people at Microsoft are still so clueless about the open source economy.

Ray states that open source developers don’t have to answer to share holders like Google employees are. He’s wrong – most open source software is developed by employees of IBM, Red Hat, Novell, etc. – all publicly held companies.

He also impies open-source development is wasteful because there’s no way to pay developers for it. I seem to recall getting a regular paycheck for the last couple of years. BTW, Ray can send me a extra check any time.

These misconceptions are born out of the myth of open-source being done by unpaid geeks in their parents’ basements. The best way to think about open source in business is as co-operation between corporations to share development costs. It’s nothing more, and nothing less.

Microsoft Helps Kids Learn about IP Law

Thursday, February 14th, 2008

Microsoft has sponsored MyBytes.com – a site to teach kids about IP law. Ostensibly it’s a site for letting those youngsters trade ring tones and the like, but really its mission is to spell out the dangers of stealing IP, pointing out that you can go to jail, etc.

The really funny part – when you sign up, you have to agree to a TOU that gives Microsoft rights to distribute your submissions. In other words, “Don’t steal from us, let us take your stuff for free instead!”

Very educational, assuming they teach kids to read the TOU before agreeing.

A fun fact: My internet startup was the original owner of the mybytes.com domain,and we built a virtual community site for college students. This was dead by late 2000, and it looks like the domain has had various squatters own it since then.

More via Slashdot