Saturday, July 3, 2010
What do text messaging, email, and voicemail have in common? They're all asynchronous forms of communication.
Friday, March 26, 2010
I recently attended the fantastic PyCon in Atlanta, GA. It was awesome to see what people were doing with Python and what improvements people were proposing; the Python community is really powerful, and everyone wants to see the language evolve. I learned a ton and had a *great* time.
Wednesday, July 8, 2009
I'm currently searching for a new car, and one of the things that is most important to me is reliability. So I decided to write a little python script to scrape all the statistics from JD Power's website for my own analysis.
While the system is currently being revamped to include data from more sources and persist data in a SQLite database, it will be available here shortly. One of the more interesting things I've done already is create boxplots (also known as box-and-whisker plots) of all the data derived from the Vehicle Dependability Study for each automaker. Data was collected from the "Overall Dependability" score for every car of every year for each automaker and put into matplotlib to make boxplots.
Essentially, these plots show the ranges in dependability scores as well as their general distributions. Each whisker and side of the box is a quartile, with the red line in the middle representing the median. Outliers are marked by plus signs. Higher scores are better.
Because the study is about problems in the first three years of ownership, data includes cars as old as 2001 models and as new as 2006 models. The number of data points for each automaker varies. The data is not guaranteed accurate, though I have no reason to doubt it.
JD Power on the Vehicle Dependability Study:
"Overall Dependability: Taken from the Vehicle Dependability Study (VDS), which looks at owner-reported problems in the first 3 years of new-vehicle ownership, this score is based on problems that have caused a complete breakdown or malfunction of any component, feature, or item (i.e., components that stop working or trim pieces that break or come loose)."I hope you find the plots as interesting as I did!
Saturday, April 11, 2009
Having heard that ZFS is the last word in filesystems, and after talking to a few people who have implemented it, I decided to take the plunge and set up a test system with intentions of replacing my current Linux fileserver with it.
Solaris (and OpenSolaris) is pretty picky about hardware, but at least there's a hardware compatibility database that is OK to navigate. Here's the hardware I ended up buying:
- Intel S3200SHV motherboard - $200
- Intel Core 2 Duo E7400 - $110
- Hitachi Deskstar 1TB drives x 3 - $85 each
- Corsair TX650 PSU - $80 after MIR
- 4GB Kingston ECC memory - $50
- LG SATA DVD drive - $25
The biggest decision to make was the motherboard. The S3200SHV was a great choice because it incorporated Intel Gigabit LAN, the Core 2 Duo architecture, and 6 SATA ports. Onboard video was a good thought, but I came to find out it doesn't work in OpenSolaris 2008.11 (more on this later). Intel LAN is important because it's known to work well with OpenSolaris and be very fast. I know the ICH9R bus will be supported and is also very fast.
It has turned out to be pretty good hardware, and I also didn't spend too much.
Which brings us to the one big problem: OpenSolaris 2008.11 does not support the integrated graphics in the S3200SHV. Short version: Buy an Nvidia graphics card. On to the long version... So the graphical installation doesn't work? Well, I can just use the text mode installer right? Uh, no. There is no text mode installer. >_< OK. Intel's OS compatibility guide for the S3200SHV says there is a fix once you get it installed. Googling for a solution, I found you can install it using the GUI using X11 tunneling over SSH.
You can use the GUI installer over SSH by booting the text console, logging in (jack/jack) and assuming the root role (su, with password 'opensolaris'). After this you must start the SSH service and SSH from another *nix machine with the -X flag to forward X11. Then execute 'pfexec gui-install' to launch the installer. Sweet, it's installed to disk. On a side note, it's kind of cool that I can install an OS over SSH with X11 tunneling. But should I have to? NO!
Intel's OS compatibility guide states that for Solaris 10, one must:
"Edit /usr/bin/X11/Xserver and use the following arguments to make color depth not larger than 16 bit: SERVERARGS="-depth 16 -fbbpp 16""
So I rebooted, entered text mode, and followed that simple instruction to change the color depth. Still no luck after rebooting again, so I gave up and ordered a cheap PCIe graphics card from Newegg which was supported from the start.
Hoping that my compatibility issues have all been resolved, I pushed forward with configuration.
If you managed to get the integrated graphics working, please leave me a comment or shoot me an email!
Friday, February 27, 2009
The battery capacity of my beloved Logitech MX1000 mouse had deteriorated over time. It was lasting only 2-3 days tops before the charge level would turn red, its lowest level. So I decided to find out how I could replace the internal, "non-replaceable" battery.
As it turns out, doing so isn't too bad. There are multiple sites available with instructions. While they are OK instructions, I have a few comments.
I ordered an NP-120 camera battery to replace the one inside the MX1000. Before we put in the new battery, we decided to take apart the old one. Inside the blue casing of the original battery, the three wires are soldered to a small circuit board. It was easy to unsolder the wires, and this allowed us to use the full length of the wire. Having more wire to work with made things a lot easier, because there isn't a lot of room to play with.
It is generally not a good idea to expose batteries to heat, so why would you think to put a very hot soldering iron to it? We came up with a better idea. We cut small strips of brass which we bent into U shapes and soldered the battery wires to the brass plates. Then we put the bent brass plates up against the battery contacts, and held them in place using self-fusing silicon tape. This kind of tape may also be known as "self-vulcanizing tape" although I believe the use of that word is incorrect. The tape isn't sticky at all, but has a layer of plastic which you peel off, allowing the tape to fuse to itself. Before you try to put the battery in the mouse, it is a very good idea to check the contacts by connecting a voltmeter to the socketed end that plugs into the PCB. As usual, red is positive and black is negative.
We ran into more problems when we tried to put the battery back in. It appeared that our tape arrangement had added too much thickness to the battery, and it wouldn't fit very well in the casing. Putting it back together might go well for a bit, but we found it was simply too much when we tried to fit the whole mouse back together. Since we didn't want to change our arrangement of the battery contact, we decided to get rid of the entire battery holder and hot glue the battery to the inside top of the mouse. This ended up working quite well, and the mouse fit together with a snap.
The result is a much better performing MX1000. The battery now lasts a solid 7 days before needing a recharge, and I'm quite happy with that. If I ever need to, I can replace the battery again for $10 and get more life out of a great mouse.
Like hardware hacking? You might try hacking your toner drums to get more life out of them.
Thursday, February 12, 2009
Whenever I burn a CD from an ISO, I md5sum the CD to confirm the data was written correctly. Using the beauty of Linux, I can md5sum the cdrom device directly using "md5sum /dev/cdrom".
One day I was trying to burn OpenSolaris 2008.11 to check out the awesomeness of ZFS. After I burned the disk using Brasero, I tried to md5sum it. I was greeted with a rather strange error: "md5sum: /dev/cdrom: Input/output error". Input/output error? Is my drive going bad? I presumed it was the media. I put in another CD of the same brand and tried again. Nope. The batch of media was pretty old, so I decided to try another brand/batch. Maybe it's my drive? Five coasters later...
At this point I'm starting to think this is a software issue. Was there an update in 8.10 that made this not work? No, it worked on other disks. Googling, I came to this page at BigAdmin which describes the symptoms perfectly.
As it turns out, Brasero was burning the ISO using track-at-once. The problem with this is, as quoted from BigAdmin:
"the last block may be confused with the lead out area, and some drives will not read it properly. Thus your MD5 checksums will fail. You can pad the last blocks using the -pad option of cdrecord, but your checksums still might not match as you have added additional data to the CD that was not present in the original ISO image."
The solution? Make sure to set the record mode to disc-at-once (session-at-once may also work) in your CD burning software. I simply could not find this setting in Brasero, so I installed K3B and found it easily under "Writing Mode". Lesson learned.
Has this ever happened to you? Leave a comment!
Wednesday, February 11, 2009
There has been a recent trend in consumer printers that really annoys me: Printers that lie to the user and report that they are out of ink or toner when they are not.
A couple days ago the toner light started flashing on my relatively new Brother HL-2140 laser printer. It had printed less than 500 pages since I bought it, and I really wasn't too impressed with the starter drum. In addition, the last pages I printed left no indication that the toner was running out. I had heard rumors that there was a way to trick the printer into thinking that the toner drum was full, thus enabling me to continue to print. I pulled information from multiple sites, so I will summarize here:
- Turn off printer, unplug
- Take out the drum
- Find the holes / areas used for detecting how much toner is left.
- Cover found holes with something opaque. A small piece of paper and transparent tape works well, as does black electrical tape.
- Put the drum back in
- Plug in and turn on printer
After doing this to my own printer, the toner light went off, I continued to print about 30 some pages just fine, and everything seems to be working. I've heard of people getting quite a bit more life out of their toner drums using this method, but I'm ordering a new drum to be on the safe side.
Photos of what I did on both ends of the drum:
Did this work for you? Do you know more about how the printer senses the ink level? Leave a comment!