My Model M Keyboard Dyed

July 17, 2010 at 07:13 PM | categories: Cool Stuff | View Comments

I've been using the same IBM Model M keyboard for about 6 years now. I never thought I would see the day when it would quit working. I love this keyboard -- the buckling springs deliberately and assuredly clicking and clacking beneath my fingers blow the pants off any cheap-ass keyboard you get for "free" with your factory Dell PC. It's amazing that the best keyboard ever made was actually one of the very first. Created in 1985, the Model M set the standard to beat, but the quality of PC keyboards over the years has only gone downhill. Thank goodness Unicomp still makes these things. Otherwise, I'm not sure what I would ever replace this keyboard with... maybe a Das or a Deck.

Luckily, I don't have to replace it. It hasn't died yet, and probably never will.

Chris McDonough recently wrote an excellent article on the 25 years of the Model M. Since reading it, I've been thinking quite a bit about my trusty Model M and I decided to give it an early 25th birthday present: some new colors!






I followed a guide from Overclock.net describing the process of applying rit dye to the keys. I've used other keyboards that had paint jobs on them before, but the rit dye process is soo much nicer. With paint, you always get a sticky paint feel on the keys and of course it also covers up the letters on the keys permanently. The rit dye, on the other hand, permeates the plastic and leaves no residue on the surface at all. In fact, you can still see the letters quite well.

I liked the red and brown combination used in the Overclock.net guide, although I left the original color differentiation of the model M intact: letters and numbers red, and the meta keys and some of the F keys brown. The red keys turned out fantastic, the letters on them are very distinctive. However, the brown turned out a bit differently; being much darker, almost black, it all but obscures the markings on the keys. No big deal though, I guess my new Model M is half-way to a Das Ultimate after all. :)

Read and Post Comments

Audacious Dynamic Playlist powered by inotify

July 13, 2010 at 12:22 AM | categories: Python, Linux | View Comments

I was playing around with StreamRipper today to record a shoutcast stream I enjoy, and I thought to myself: wouldn't it be nice to be able to continuously play all the files I've downloaded without having to manually queue the new files in Audacious?

So, I scratched an itch. With a little DBUS, pyinotify, and an optparse wrapper, I now have a tool to automatically add the tracks to my Audacious playlist. You can grab the latest version on github.

Streamripper does have a relay option (-r) to allow you to listen to the same stream as you're ripping it, and if that's what you want, the following script is superfluous. However, what I wanted was something slightly different: I didn't necessarily want to just listen to the stream live, instead, I wanted the ability to jump around between the tracks already downloaded, exploring different songs, but with the list of tracks ever expanding. That's what this script allows.

You'll need python-dbus and setuptools installed, then just install with:

easy_install http://github.com/EnigmaCurry/audacious-plugins/zipball/master

Startup StreamRipper with your favorite audio stream and point the tool at your target directory:

python -m ec_audacious.dynamic_filesystem_playlist /path/to/your/streamripper_location

Now when StreamRipper creates a new file, it will get automatically (instantaeneously actually, thanks to inotify!) to your Audacious playlist.

Alternatively, you can use the streamripper wrapper script that I've included to start both the filesystem monitor as well as streamripper in one go:

Put the following in your .bashrc file or somewhere equivalent:

alias streamripper="python -m ec_audacious.streamripper"

Then whenever you run streamripper, you'll actually be running the wrapper script instead:

streamripper http://your-cool-stream.com:8000 --audacious

By aliasing streamripper to point to the ec_audacious.streamripper wrapper script, we're effectively adding a new option to streamripper called --audacious which spawns our filesystem monitor.

Read and Post Comments

Bill of Responsibilities

April 18, 2010 at 11:55 AM | categories: Liberty Rants | View Comments

George Donnelly recently blogged about his personal Bill of Responsibilites. I think his approach to crafting a message of liberty, through the lens of personal responsibility, is a creatively powerful one. It is his post that has inspired this one.

I've tried in the past to formulate a consistent approach to describing to people what true liberty is, but I think quite often that message resorts to telling people that they are doing something wrong and/or immoral. While I might be correct, focusing on someone else's faults is often not very constructive. Instead, why not focus on how I choose to live my life and my justification for doing so?

This Bill of Responsibilities is essentially a contract with myself. These are things that I believe are central to my being a good and productive person. However, if I fail to do these things, I not only fail myself but also the rest of mankind. My hope is that by living up to my own expectations, I can provide a framework for others to emulate and improve upon.

So here goes, my own personal Bill of Responsibilities:

Preamble

I have the ultimate responsibility for my own survival. The division of labor that has evolved within mutual societies is wondrously beneficial to the progress of mankind and it should be taken advantage of in order to increase one's quality of life. However, the existence of such developed societies does not relieve my own personal responsibility to provide for my own needs and desires. In addition, every action I take in life will have some impact upon others. A free and prosperous society requires that I take responsibility to never use unjustified force or fraud against my fellow man.

Responsibilities

  1. I have the responsibility to take care of myself. I cannot rely on anyone else to provide for my shelter, sustenance, education, livelihood, security, health care, entertainment, retirement, or any other thing.

  2. I have the responsibility, as a civil member of a society, to only engage others in a voluntary and mutually-agreeable fashion. I have the responsibility to never force an individual to do what they do not want to do, unless that force is a justifiable reaction to their own aggression.

  3. I have the responsibility to keep my word in my dealings with others. If I fail to honor my agreements, I have the responsibility to make full restitution in as timely a fashion as possible. To do otherwise is fraudulent and manipulative.

  4. I have the responsibility for my mistakes. If my actions unjustifiably harm or endanger another person, I am responsible for making full restitution in as timely a fashion as possible. To do otherwise is reckless and violent.

  5. I have the responsibility to defend myself and my family from those that would hurt us. I cannot rely on any other individual to risk their own life or livelihood to protect me.

  6. I have the responsibility to educate myself. Schooling is insufficient, and in many cases, destructive of the cognitive abilities of the mind. Information, derived from any source, must be processed by an engaged, observant, and critical mind.

  7. I have the responsibility to resist cooperating with people that choose to conduct themselves in violent ways. To cooperate with such evil, would immediately endanger myself and my family. To be idle and complicit in any crime against myself, strengthens the aggressor and provides the potential of harming my fellow man.

  8. I have the responsibility to question authority. Does an authority conduct themselves in a responsible manner? Do their claims of authority stem from actual property rights, or do they stem from fraud or force to acquire your compliance for their own gain? To leave these questions unanswered, or worse, unquestioned, is to allow one's mind to degenerate into a state of Stockholm syndrome.

  9. I have the responsibility to speak out against injustice and to support others that do as well. In order to live in a free and prosperous society, justice must be served.

  10. I have the responsibility to continuously exercise my liberties, for they are precariously positioned to be lost if I am not practiced in defending them. I have the responsibility to continuously work to assert my retention of lost liberties, for the longer I wait and do nothing, the more unrecoverable they become.

Read and Post Comments

Initial Nexus One Impressions

January 06, 2010 at 06:39 PM | categories: Android | View Comments

Just got my Nexus One delivered :)

Although I had a company issued Blackberry (7100t) several years ago, I've never owned a smart phone of my own. I've certainly watched the technology progress over the years, but for the last several of those years I've been content to own a generic 3g slider phone (Samsung A737) and just tethering it to my Nokia N800.

Recently, smartphones have seemingly gotten a lot more powerful and I decided it was time for me to get one. Having loved my N800, I certainly had my eyes on the N900, not only because it adds a phone feature, but maemo 5 looks fscking awesome. However, I did my due dilligence and researched the other options available, and here are my thoughts on what's out there right now:

  • iPhone 3Gs: I've played with it several times at the Apple store, and held several owned by friends. It runs on fantastic hardware and even better core software. The iPhone is seriously stable and runs smoothly as far as I can tell. It only has one problem: Apple designed the software to be completely locked down. As a software developer (who wants to program for whatever phone he gets) I can't bring myself to become a slave to Apple, not being able to develop on anything but a mac, using a language that seemingly is only used to build Apple software, having to pay a large license fee to put applications on the only available method of distributing applications (THE app store), and to top all that off, I have absolutely no guarantee whatsoever that Apple will even accept my application, let alone in a timely fashion. No thanks.

  • Nokia N900: Oh, this phone has everything I want. Everything the N800 had and more. Completely open-source, completely unlocked device, surrounded by a (small by comparison) community that wants me to hack this device. Yea, this is my kind of phone. The idealist in me knows that this is the best phone on the market right now, and if adopted en masse, would shake the telecom industry to its core. A powerful phone like this, giving me as much freedom as it does, has the potential to force the telecom providers to compete solely on terms of network quality as opposed to competing over who has the coolest (locked down) phone. However, like with Betamax, there's more to winning than just superior technology. Nokia just doesn't have that something. This phone will serve geeks and enthusiasts well, but it just doesn't have the character to be adopted widely, and as a developer, I'd like to see the programs I write, as well as the skills that I will develop, still have relevance several years from now.

  • Android: Android is this happy medium between the two. The Android platform is open source. The phones... well, not so much. While they all run more or less the same open source android OS, they are still chained to the whims and pleasure of the manufacturer and telecom carrier, not the consumer. The recent Motorola Cliq is a perfect example of this. This is a new phone, having only been released since last November. But already the OS is quite outdated, running android 1.5, it's now three versions behind the latest that the Nexus One is running (2.1). I certainly understand that there are complications in upgrading the device, but it's the fact that Motorola/Tmobile has delivered a device that although is running an open source OS, is completely locked down disallowing the user to upgrade the phone himself. Ingenious hackers have rooted the device (without motorola's help mind you) but there is still trouble in installing new OS images. The Motorola Cliq is NOT an open source friendly phone and is defeinitly not the phone for me.

So a few weeks ago I was reading Android developer docs and was becoming really impressed with the platform. Even though it's all Java based, and not my beloved Python, at least it wasn't Objective C. And even though there are some closed source google APIs included, the great majority of android is open source. I was starting to the get feeling that this was a platform I could roll with. But the most modern phone available on a carrier I can afford (have you seen the prices for family plans on Verizon, sheesh) was the Motorola Cliq, and that phone deeply depresses me. So, did I want one of the older Android phones, the MyTouch or the G1? Hell no, I wanted something at least as powerful as the droid, if not as powerful as the N900 itself. Ah, but then all the rumors of the Nexus One starting cropping up all over the web.

  • Nexus One: A brand new, modern android phone, more powerful than the droid, hell more powerful than the N900 (at least on paper), not running any proprietary Motorola firmware, made by google who has an interest in making this the flagship android offering and playing nicely with developers, they made it easy to unlock the bootlader (literally just reboot holding down the trackball and entering a special command).. the list goes on. This phone is still no N900, but this just might be the first mainstream, truley open-source phone, that has the gumption to compete directly with the iPhone.

So I bought one :)

Here's my initial impressions:

  • Fedex is soo good at what they do. I set firefox to continuously reload http://www.google.com/phone during the Nexus One press launch, and as soon as the page went live I purchased the phone. Google paid the shipping and HTC sent it Fedex overnight. Less than 24 hours later, it was in my mailbox. Nice!

  • It's going to take me a while to get used to the keyboard. I have zero experience with touchscreen keyboards without the aid of a stylus.

  • Dictation works pretty well, kinda alleviates the problem above, although I probably would feel awkward using it in public.

  • The software keys at the bottom of the phone are very finicky. Although having used the phone for a few hours now, I think I got the handle of them now.

  • Navigation is fantastic. The GPS lockon was instantaneous, using dicatation to give the desired address worked flawlessly, the turn by turn speech is understandable, and the map displayed is updated quickly (even over EDGE) and looks great.

  • Just got Sipdroid setup and I can make VoIP calls for practically nothing :) (I have only tested it on WiFi so far, don't have 3G yet)

  • I can't connect to my home router that's only 8 feet away, even though it sees it, no idea why. I'm using WPA2 PSK AES, maybe it doesn't like AES? Can connect to the neighbors unprotected wifi ("linksys") no problem though ;)

  • The web browser works great and is speedy even on EDGE. I think something was terribly wrong in the Edgadget browser test because when I tried the same test (on WiFi), I got the page to load up at the exact same time the iphone did in the video, and seriously, why wouldn't it? Both the iphone and the Nexus One use webkit.

I'll update this list if anything else hits me.

Read and Post Comments

Writing an OpenOffice.org Calc extension in Python

December 13, 2009 at 10:08 AM | categories: Python, OpenOffice.org | View Comments

A very well organized group of thugs steals my money every day. I'm getting really tired of it, but I found a way to save at least some of my money so they don't steal nearly as much of it, nearly as often. For whatever reason, this gang hasn't devised a way to steal gold and silver nearly as efficiently as these little green pieces of paper that they call money. So I buy gold and silver whenever I can as a hedge against 'inflation' (which is really just their gang-speak for the wholesale-theft of my money.)

I want to keep track of how much gold and silver I've bought, when I bought it, and inevitably I'll still want to know how many green pieces of paper I could theoretically trade it all in for.

The easiest way to track all this information was to create a spreadsheet in OpenOffice.org's Calc. I created a sheet for gold purchases and another sheet for silver purchases. Everytime I make a purchase, I record the number of ounces, what form it is in (coins, bars, junk etc), who I bought it from, when I bought it, and the price I paid in FRNs (Federal Reserve Notes, aka green pieces of paper.) On another sheet I total the number of ounces I own and multiply it by the current spot price for the metal, which gives me the current price I could get if I sold it for FRNs. When tallying this total, I reference a special cell on the sheet, one that has the current spot price for gold, and another for silver.

But checking the spot price myself and manually updating those cells was just too tedious for my programmer's heart. I wanted OpenOffice.org to automatically retrieve this information for me. So, I started researching OpenOffice.org extensions (plugins).

Turns out, OpenOffice.org extensions can be written in my favorite programming language, Python (yea!), so I wrote the following extension a few weekends ago. It's on github and can be downloaded with git:

  git clone git://github.com/EnigmaCurry/SpotMetal.git

If you just want the pre-compiled extension, it can be downloaded here locally:

SpotMetal-0.1.oxt

You install it inside OpenOffice.org by going to Tools -> Extension Manager and clicking on Add and browsing to the SpotMetal-0.1.oxt file you downloaded or built yourself.

Once you have it installed, you now have a new Calc function available called SPOTMETAL which takes two arguments:

  • metal - Which metal you want to look up. Can be one of "gold", "silver", "platinum", or "palladium"
  • bidAsk - Whether you want the bid or the ask price. Can be either "bid" or "ask".

The price will automatically be refreshed every 5 minutes by default, but you can also force a refresh with the Calc function called SPOTMETALREFRESH.

Here's an example OpenOffice.org spreadhseet that shows how you might track your own precious metal investment portfolio. The big button labeled "Refresh Spot Price" does what it says it does, but requires a bit more boiler-plate code in order for it to actually display on screen. In OpenOffice.org, you can see another macro called doReCalculate:

  • Tools->Macros->Organize Macros->OpenOffice.org Basic
  • MetalTrackerExample.ods->Standard->SpotMetal->doReCalculate.

This extra macro is necessary to actually force the spreadsheet to request new data from the extension when you click the "Refresh Spot Price" button.

While this extension might be of use to you if you also invest in precious metals, I guess the main reason I posted this is because it took a good deal of time researching how to write a Python extension for OpenOffice.org. Check out the source code on github if you're looking to write your own extension, it's got it's own Makefile and hopefully it's documented well enough for it be useful for someone in the future.

Read and Post Comments

Next Page »