epershand: "Python: programming the way Guido indented it" (python)
You know, I kvetch about the AO3 a lot, and their coding team has been doing a lot of hustling lately without getting a lot of love but damn. Sometimes I am just hit by how fucking RIGHT they've done something.

For example: right now I'm helping out [personal profile] starlady with a fandom studies project, by writing her a script that looks at fanfiction html and extracts fandom, ship, publication date, etc. I'm writing dedicated parsers for a few major fic archives.

This is (roughly speaking) what my code looks like for the AO3:

def GetAo3Metadata(self):
"""Extract metadata from Archive of Our Own Beautiful Soup object."""
self.metadata.author = # Find the "a" tag with the class "login author"
self.metadata.title = # Find the "h2" tag with the class title heading"
self.metadata.rating = # Get all items from the list with the class "rating tags"

This is, roughly speaking, what the code looks like for everything else:

def ParseFanfictionNetMetadata(self):
"""Extract metadata from Fanfiction.net Beautiful Soup object."""
# Find the block called "gui_table1" because, you know, that's meaningful.
# Fuck it, just extract all the text from that block.
# And then do a regular expression search.
# And then take a shot.

Or like this:

def ParseYuletideTreaureMetadata(self):
"""Extract metadata from Yuletidetreasure.org Beautiful Soup object."""
# Fuck is this the nineties? Are there really NO DIVS in this code?
# Or class attributes?
# Or even fucking paragraph blocks?
# Fuck it, I'm drinking.
epershand: A speech bubble with "tl;dr" (tl;dr)
All this week, I have been making the same mistake. I look at the clock and think "huh, I should go to bed soon. Maybe I'll just read a chapter of Dive Into HTML5 before I go to bed."

It is generally about two hours after this that I pull myself away from whatever fascinating and specific Wikipedia or Quora article or Joel on Software blog post or whatever I am currently reading, because Dive Into HTML5 is the TV Tropes of computer manuals.

Seriously, read the chapter A Quite Biased History of HTML5 and tell me if YOU can drag yourself away from it and its links. Browser wars! Extended quotations of Marc Andreessen's emails! Snarky commentary on the methods of standards bodies!

This thing is BETTER THAN THE DINOSAUR OPERATING SYSTEMS TEXTBOOK. (This is, for the record, the highest praise I can bestow on any book about computers.) But now I've got this fear that it's going to be like it was after that month where I read all the Sarah Vowell books. I went around wanting to tell people Exciting Facts! And the response was always "oh yeah, I think I read something like that in a Sarah Vowell book once." I am totally going to be all "BROWSER WARS!" and people will be like "oh yeah, that was an awesome chapter in Dive Into HTML5."

So far, the people on twitter I've enthused at have linked me to:
This snarky Pilgrim essay on XML
This commentary on the positive things IE did in the world of browser development

Oh also the wikipedia page on BROWSER WARS! Is amazing. But you already know that because you have read the chapter above, which links to it.


epershand: An ampersand (Default)

July 2014

2122232425 2627

Expand Cut Tags

No cut tags

Most Popular Tags

Style Credit