Previous 10

Jan. 16th, 2012

Business as usual

I read this morning that the internet censorship bill, SOPA, was killed by Rep. Eric Cantor (R-VA), but there are other similar bills that still need to be killed. The discussion on Slashdot cracked me up, though.

Spritzer (950539): I for one have been in contact with my Rep. and have written letters to both of my Senators. I will also being calling them both today. We're making progress. Let's keep it up.
Killjoy_NL (719667): I live in the Netherlands, I wish I could call my senator for this.
LynnwoodRooster (966895): Any rep from Chicago or Senator from Illinois will gladly represent you.... And any dead relatives you believe would be impacted by these bills.

I haven't heard a Chicago politics joke for a while. The last time was while talking with a coworker who was joking about entering politics:

Ben: No, I'd be with the Socialism ticket, or the Fascism ticket to prove a point. Then I'd run in Chicago and my platform would be "I promise not to go to prison". There'd be no way to lose.

And of course, a recent Wondermark comic is also very relevant.

Jan. 15th, 2012

Fixed it!

After spending some time researching what I needed and where I could buy things from, I settled on a replacement iPod screen and a classy electronics toolkit from iFixit. They emailed a few hours later to let me know that the products had been shipped, and two days later everything arrived.

Thanks to their handy guide, I had the screen replaced in short order. You can see the results for yourself!

Photos of my iPod, before and after screen replacement

Tags: , ,

Jan. 13th, 2012

pdb post-mortem debugging

I misread a recent feedparser bug report and thought that the author had mistyped a bbcode- or wiki-formatted link. Consequently, I wasted time debugging the code.

Turns out, I wasted a lot of time, because I spent more than zero time debugging the code. Yes, zero time. I was using a conditional breakpoint when I should have been using pdb's post_mortem() (or pm() for short). I had no idea what post-mortem debugging was until I ran across Doug Hellmann's article on pdb. I barely finished reading the following two sentences before I alt-tabbed back and found the problem:

Debugging a failure after a program terminates is called post-mortem debugging. pdb supports post-mortem debugging through the pm() and post_mortem() functions.

So my debugging session should have looked like:

import feedparser
import pdb
feedparser.parse('offending-url')
# huge traceback
pdb.pm()

Pressing u a few times took me up the call stack, and then p uri printed out the offending...wait, that's what the bug reporter already told me.

The important thing here is that I discovered a time-saving tool. (And found a performance problem with feedparser: it calls _urijoin() hundreds of times for no discernible reason. Reducing that call volume may improve performance.) Learning is fun!

Jan. 5th, 2012

YouTube for the XBox 360

Having previously ranted about Hulu Plus for the XBox 360, I'll briefly share my thoughts about YouTube's new XBox app.

Basically, it's hit and miss. I wanted to watch the excellent and hilarious "Linux Torvalds on git" video. Nope, it's not available. Okay, maybe "7 Habits For Effective Text Editing 2.0"? Nope. Sigh. So videos uploaded by Google itself aren't available. What is?

Music videos. Popular and trending videos. Sports videos. Big whoop. But, happily, so is the David Blaine spoof that I love so dearly. To this day I still occasionally quote that video!

Solely for having that video available, I'll bump the app up to a three out of five. You might be thinking "What the chopsticks?! Only three out of five?" Yup. I can't watch the videos I want to, and the text entry is inferior to that of Netflix because I can't enter a space using the Y button.

UPDATE: Okay, turns out New Netflix' text entry is also inferior to that of Old Netflix. They removed one-button spaces.

UPDATE 2: I'm disgusted to report that YouTube's search doesn't handle partial text matching. You have to spell out the entire word for it to match, which is an extremely laborious process.

Tags: ,

Jan. 3rd, 2012

Gifts and surprises

While one of my brothers was in town he gave me a fourth generation iPod with a severely cracked screen. He found it while going through some old stuff of his but couldn't remember where he got it from. After plugging it in and discovering that it could charge, I started going through the untagged songs and realized I knew exactly who gave it to him.

In 2006 I spent months listening to mopey, wallowing songs, or songs that otherwise brought back memories I wanted to dwell on (James Blunt's "You're Beautiful", Avril Lavigne's "My Happy Ending", and Phantom Planet's "California" were at the top of the booby-trapped playlist). I distinctly remember finding that playlist online and pointing a friend to it. Apparently he downloaded the songs, loaded them onto his iPod, then broke the screen and handed it to my brother. Now, after a half-decade of giddy waiting, they all jumped out of that cake and caused my heart to skip several beats in surprise.

To show those memories who's boss (me, yo!), I looked up replacement iPod screens and instructions. It's like a 30 minute procedure and costs about $25.

I'm the boss.

UPDATE: Done. I'll upload before-and-after photos this weekend with links to where I bought the screen and tools.

Tags: ,

Dec. 17th, 2011

listparser 0.16 - "Refresh"

I'm pleased to announce that a new version of listparser has been released!

The big change this release is that users can now more easily install listparser in Python 3 environments, thanks to an updated setup.py file. This is made possible by running listparser through the 2to3 tool automatically if setup.py detects it is being run by a Python 3 interpreter.

Download it, and report back if you find any bugs!

listparser is a Python library that parses subscription lists (also called reading lists) and returns all of the feeds, subscription lists, and "opportunity" URLs that it finds. It supports OPML, RDF+FOAF, and the iGoogle exported settings format.

[ homepage | documentation | bugs ]

Dec. 16th, 2011

They turk ur jurbs!

While at work, we were discussing where a co-worker could get a good coat. Someone mentioned Old Navy:

Wayne: I don't like Old Navy.
Joe: We should boycott Old Navy!
Me: Yeah, they didn't just outsource the acting for their commercials, they gave the jobs to mannequins!

Tags:

Dec. 2nd, 2011

Announcing feedparser 5.1

I'm pleased to announce the release of feedparser 5.1! This release includes a boatload of bug fixes, support for Python 3.2 and partial support for Jython, extensive unit test refactoring, and a massive documentation conversion to ReST format. You can download the release at one of the following locations:

http://pypi.python.org/pypi/feedparser/
https://code.google.com/p/feedparser/downloads/list

After downloading the package you can run python setup.py install. You can also run easy_install feedparser on your system and the latest and greatest will be downloaded and installed. Best of all, these commands will now work for Python 3 installations as well.

Unit tests

Earlier this year I began improving the unit tests. I found duplicated tests, mislabeled tests, and tests that literally only verified that 1 == True! In addition, there were always two versions of each file: one for the strict XML parser and another for the loose sgmllib-based parser.

By modifying the test harness so that both parsers used the same files I was able to almost halve the number of unit test files! As a result, adding test cases is significantly easier and less error prone.

Documentation

Previously, feedparser's documentation was contained in a monolithic XML file. After one or two encounters it became apparent that the format was too daunting to maintain. Because of my familiarity with ReST (the reStructuredText format) and Sphinx (the same engine that generates the official Python documentation from ReST documents) I chose to migrate to the ReST format. You can now find the official documentation at:

http://packages.python.org/feedparser/

Please note that the documentation may be converted, but it is not fully updated! If you find areas in which it can be improved, please don't hesitate to report the problem at the issue tracker.

Other changes

There were lots and lots of changes to the source code since the 5.0.1 release. Most of them were bug fixes that you're going to love, but some of them were efforts to prune untestable code and questionable features. As an example, the Zope compatibility hack has been removed. Additionally, "Hot RSS" support has been removed, since the format doesn't actually exist (Mark sardonically added support when CNET accidentally published an XML file that resembled an RSS feed -- their file remains the only example in existence).

Of special note, Mark shuttered the feedparser.org domain a couple of months ago. When linking to the project or the documentation, please use the following links:

https://code.google.com/p/feedparser/
http://packages.python.org/feedparser/

As always, bug reports and patches are welcome. Happy holidays!

Sep. 25th, 2011

Photo managers

For a number of years I've used F-Spot as my photo manager. I have strong mixed feelings about the software, but it's generally served as a crucial part of my personal content management. Unfortunately, after an F-Spot bug ruined my photos' date/times for the second time, I haven't organized any of my photos since 2008!

With a digital camera chock full of photos from my roadtrip through five states, an engagement party in Mexico, and two separate weddings (not to mention the daunting, dusty collection of college graduation photos) I checked to see if F-Spot had had any recent updates...and discovered that F-Spot is no longer under development.

Previously I had considered trying Shotwell but was turned off by some missing features I felt I needed. The latest version now appears to all of those features, and even a wish I had had for years: it supports videos, too! If all goes well, expect to see some new photos on Flickr soon!

Sep. 15th, 2011

Changing keys

I recently realized that I dread key changes in the music I listen to, and most surprising was the realization that I view it as a barren musical device: it frequently suggests a lack of inspiration. Most of the time it feels like the composer simply reached the end of the bridge and decided "I'm going for it".

That's not a reason, ever, to switch keys on me. Some people are going to eat that up, but I won't let that garbage fly past me without noting its formulaic application...and judging the composer for it.

These revelations struck me quite hard while listening to Miho Fukuhara's "Starlight". At 2:40 I cringed, just waiting for her to usher in a pedestrian key change. Imagine my surprise when she didn't!

So be sure you don't try to impress me by switching keys at the end of the bridge.

Tags:

Previous 10

January 2012

S M T W T F S
1234567
891011121314
15161718192021
22232425262728
293031    

Syndicate

RSS Atom
Powered by LiveJournal.com