Previous 10

May. 4th, 2012

Why. Why would he ruin the joke like that.

While an observer was being shown around at work:

Pete: And this is Kurt. He'll be building and configuring the servers for that system over there.
Me: Actually, David's going to be right next to me, helping me the whole way. I've told him to mimic my movements, so if you cross your eyes just right it'll look like a single person, but in 3D.
Pete: It'll also look like their heights and hair colors will average out.
Me: Whoa! Pete. You need to reel that in.
Pete: Too much?
Me: Too much.

Tags:

May. 3rd, 2012

Announcing feedparser 5.1.2

Howdy everybody,

I'm pleased to announce that feedparser 5.1.2 is available for immediate download, and I want to stress the word "immediate"! This is a security release, and all users and developers are strongly encouraged to upgrade immediately.

Security fix

Yesterday while working on a character encoding bug I noticed that it was possible to slip XML ENTITY declarations past feedparser's filter by encoding the document in a non-ASCII-compatible character encoding. ENTITY declarations are like variables or placeholders in XML. When an XML parser finds an entity (like Á) it will substitute whatever text corresponds to the entity (like Á). The problem is that entities can reference other entities, which can lead to exponential memory consumption, even in small documents.

As an example, the following series of ENTITY declarations can demonstrate the problem:

<!ENTITY exponential1 "long text to be repeated">
<!ENTITY exponential2 "&exponential1;&exponential1;">
<!ENTITY exponential3 "&exponential2;&exponential2;">
...

Each additional entity doubles the number of times 'exponential1' has to be repeated. This has the potential to be used as an attack vector, and feedparser has a filter in place to strip dangerous ENTITY declarations from documents prior to parsing them. Unfortunately, the filter was being run before the character decoding code, which allowed ENTITY declarations through if the document was not ASCII-compatible.

This is now fixed, and you should upgrade immediately!

Other fixes

After the last release I received reports that the RFC822 date parser couldn't handle single-digit days. This has been fixed. feedparser can now also handle feeds that have been compressed with the deflate algorithm but that are missing headers and checksum data. It will also try to continue parsing if it encounters a decompression error that might be recoverable (which can happen if a feed claims to be compressed but is not).

Finally, magnet URIs are now considered safe, and there have been a few other minor fixes.

Go get it

As always, feedparser can be downloaded from PyPI or from Google Code:

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

Remember, this is a security release, so hurry and upgrade before it goes out of style!

May. 1st, 2012

Turning a phrase

While discussing my brother's typical weekend:

Frederick: I think they're planning on pushing it back to 5:00pm.
Me: You mean, 'push it up to 5:00pm'?
Frederick: I've never been clear on 'pushing it back' versus 'pushing it forward'. Just like how people say 'turn up the air conditioning' when they want to drop the temperature.
Me: I think that comes from wanting to increase the amount of cool.
Frederick: Hey, this guy doesn't need to increase his amount of cool.

Tags:

Apr. 24th, 2012

Customizing websites using a scalpel

My computer is absurdly old. I hand-selected the components and assembled it back in 2002. It was a marvel of processing power at the time, but you'd never know it now. As software has become more featureful, my computer has proven unable to keep up. Nowadays some websites cause Firefox to hang for seconds at a time. As an example, two weeks ago I had reason to visit SoundCloud.com.

One of my brothers was in town, and we had stopped at Jimmy John's for lunch, but what's this? They had some absolutely bangin' music on! I asked the guy behind the counter about it, and he grinned and said "This is Unprotected Sex." While I silently congratulated myself on my word choice, he continued that it was his and his friend's music, and that I could check it out on SoundCloud. (The track in question was "Wizardsbro demo".)

SoundCloud's music player has an interesting feature: users can leave comments at specific moments in the song, and the website will put their avatar underneath the player at the point that they left the comment. For popular artists like Porter Robinson or Skrillex, this means that there are hundreds upon hundreds of overlapping images to load, and my computer can't handle that.

I finally fixed the problem using the Element Hiding Helper extension, a companion to Adblock Plus. It let me quickly zero in on the offending HTML and block it forever:

soundcloud.com##OL.timestamped-comments:last-child

I've again extended the life of my computer, so while I'm an idiot for doing so, at least...um...

Well, the point is that Element Hiding Helper is awesome, and you should use it to excise the stupid stuff websites throw at you.

Apr. 18th, 2012

listparser now has a unified codebase

listparser now supports both Python 2 and Python 3 with a single codebase. I'd wondered how difficult it would be, and it turns out: not very! I'm delighted with the results, particularly because I can now generate coverage reports that take into account every interpreter that listparser runs on (including Jython, and excepting IronPython).

As a side benefit, I can take this experience and apply it to the feedparser codebase in the future. However, I have some bug reports and documentation changes to tend to first...

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.

Apr. 7th, 2012

You know what they say about assumptions

I walked into the cafeteria at work and, as I passed one of the cafeteria ladies, I pouted and rubbed my tummy.

Me: ¡Tengo hambre, Angie!
Angie: Ha ha, you're just like my kids! But wait, why do you think I understand Spanish? Because of the color of my skin?
Me: Wh...
Angie: Ha ha, I'm just playing with you. You're crazy!

One of the guys at work is a young Puerto Rican that listens exclusively to rap and R&B. We were working on servers together and I heard him hum the tune to "It's a Hard Knock Life".

Me: Wait, was that "It's a Hard Knock Life"?
Julio: Yeah, I love that song.
Me: Really.
Julio: Love it. I was listening to it on the way in. Jay-Z was just killin' it.
Me: Jay-Z?
Wayne: Kurt, I don't think he's seen "Annie".
Julio: Annie?
Me: Oh Julio, you'd love it. It's the touching story of a young white girl who overcomes adversity.
Julio: That doesn't sound like my kind of thing.

Tags:

Mar. 20th, 2012

Announcing feedparser 5.1.1

I'm pleased to announce the release of feedparser 5.1.1!

This release contains a number of important changes that range from fixed crasher bugs to improved date and time string parsing. There are also some bug fixes that affect how various elements are parsed.

Unit test fixes

Several Linux distribution maintainers came forward after the last release and pointed out issues that ranged from missing unit test files to failures that only seemed to occur on x64 platforms. I believe all of the issues have been ironed out in this release, so feedparser 5.1.1 shouldn't pose a problem to include in package repositories.

Parsing changes

This release contains a couple of changes to how certain elements are parsed.

The itunes:keywords element is now split on commas, not whitespace. This brings feedparser in line with the element's description on Apple's website.

Further, pubDate now maps to published rather than updated in the dictionary that feedparser returns. By mapping pubDate to published, its semantic meaning is retained, but developers may need to modify their software if they're only checking the updated key. One software developer already pointed out that old versions of his software will be affected by this change, so a temporary fix is in place to give developers time to change their software:

If updated does not exist, membership tests will always return False.

However, if updated does not exist, and if published does exist, and if the software accesses updated, feedparser will return the contents of published.

Here's an example:

>>> from feedparser import FeedParserDict
>>> d = FeedParserDict(published='pub')
>>> 'updated' in d
False
>>> d['updated']
'pub'
>>> d = FeedParserDict(published='pub', updated='today')
>>> 'updated' in d
True
>>> d['updated']
'today'

Remember that this is only a stopgap measure. It's intended to help avoid affecting users, should they be using an old version of some software with a new version of feedparser. This hack will be removed in a future version of feedparser.

In conclusion

A big thank you to everyone who contributed to this release! As always, if you find an issue don't hesitate to file a report on the issue tracker.

Feb. 12th, 2012

A case for forgetting

My software never forgets what I tell it. I've accumulated over a dozen dozen passwords, door codes, and PINs over the years, but while I don't use most of those 150-some services these days they're still clogging my password manager. My address book has hundreds of entries spanning almost a decade, but while all of those people are memorable, most I haven't thought about for years. My music player is full of music that I bought years ago but no longer enjoy or don't prefer to hear outside of the holiday season.

What I want is software that can archive information I don't need or want, but can retrieve it when necessary. Most of the birthdays on my calendar are for people in my address book that I lost contact with long ago. I haven't logged into the Seventeen or Bust website for years, but I might again one day (despite the lecherous name, it's actually a math thing I ran into while taking courses on Chaos Theory). I don't want Christmas music to pop up when my music player's set to random, but that doesn't mean I want to delete it. Archiving and later retrieving forgotten content is a common concept in email clients, but for some reason its musical equivalent is embodied only by "Best of the Decade" compilations from Readers Digest.

I hope one day I have software that meets this need. I'm also waiting anxiously for the "Best of the 90's" three disc set: I haven't listened to that one Tal Bachman song in about a minute!

Tags: ,

Feb. 6th, 2012

Book burning

Recently I received an e-reader as gift, and I've been trying to decide what to read on it. Then I remembered I already own several books that I haven't read. Ooh, and then I can get rid of the physical copies and cut down on space! As a show of good faith, I emailed the publishers of those books and asked if they had conversion/exchange programs, the goal being to get rid of the physical copy and receive an e-book in return. All of the responses amounted to "We want you to pay us again for content you already own," so no surprise there.

I researched book scanners and found a website about DIY Book Scanning. Building a camera-based system with custom uniform lighting may be too ambitious for me, however. I could also cut the binding on the books and run them through a scanner, then convert the PDF to epub format, but that means I'll have to ruin the books to get digital copies. Then it occurred to me that other people may have already done the work for me.

Indeed, the Pirate Bay actually has a few torrents of the books that I own, but I'm concerned that I'll have to keep the books indefinitely to prove that I wasn't committing copyright infringement. That negates the major benefit of the whole enterprise!

All I want to do is burn my books like I burn my CDs. Are there any other options or services out there that I should know about? Does anybody have experience with -- and recommendations for -- doing this?

Feb. 4th, 2012

How old am I?

A number of my friends have their birthdays clustered at the beginning of February, and when the first birthday hit I fired off a quick message. However, my friend never responded, and as I pondered his silence it suddenly occurred to me: how old am I? I honestly couldn't remember.

From September on my life has been a blur of work. I enjoy my job, but it has demanded all of my time and energy. Coupled with a decreasing social circle I've had absolutely nothing to punctuate my existence. I don't remember the last time I successfully threw a party, though I remember attempting to many months back: I sent about 20 invitations two weeks out, and sent reminders several days beforehand. I got three responses back -- all 'no' -- and everybody else just refused to respond. When I emailed people to say I was officially canceling I got another three responses -- two more 'no', and one 'Aw, I was planning on coming!'. Hell, before that I had to throw two apartment warming parties because nobody came to the first one!

Reaching further back into memory, I haven't had a true birthday party since 2008. We flew kites at the beach, played volleyball and frisbee, played on a big sand dune, got stuck in an elevator between floors, and had to be rescued by the fire department. Later, pizza! I can remember so much from that day, but I can't remember anything I did in the past six months, and a few days ago I couldn't remember how old I was.

I find myself increasingly feeling socially malnourished and detached. Further, I feel that my work schedule (often 12 hour days and on weekends, sometimes without notice) has not only forced me into this situation, but through its weekend uncertainty is blocking the few opportunities I have to pull myself up and out of this circumstance. In the past month, through an ongoing email conversation, I'd begun to internally articulate how I've been feeling, but having to break out a calculator to figure out my age has convinced me that I have to make a change.

Tags:

Previous 10

May 2012

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
2728293031  

Syndicate

RSS Atom
Powered by LiveJournal.com