When
· Naughties
· · 2004
· · · July
· · · · 06 (2 entries)

Last First Program? · I just wrote my first Python program. It occurs to me, given the generally grey colour of my beard, that this may be the last time I learn a new programming language. Which, frankly, would be OK, it’s real work. This thing scans all the feeds coming out of <a href='http://www.planetsun.org/'>Planet Sun</a> using Mark Pilgrim’s <a href='http://www.feedparser.org/'>Universal Feed Parser</a>, detects any that have changed in the last day, and pings weblogs.com, technorati.com, and blo.gs to let them know. (Question: who else should be pinged? <i>Answer: thanks to the many people who wrote about <a href='http://www.pingomatic.com/'>Ping-o-matic</a>; doesn’t quite fit our bill, but interesting.</i>) It’s only 57 lines of code, but I had to learn a modest amount of Web wrangling, string munging, time arithmetic, and data structure walking to get it going. I suspect it’s not a very <em>good</em> Python program, but I can live with that. If you’re going to scale the Pythonic slopes, you’ll need one browser tab open to <a href='http://diveintopython.org/'>Dive Into Python</a>, another to the <a href='http://docs.python.org/tut/tut.html'>Python Tutorial</a>, a shell window handy where you can type things like <code>pydoc time</code>, and a nontrivial chunk of Python code in a nearby editor buffer (I used the Feed Parser) so you can look up idioms. At the end of the day, the code looks distinctly weird to my eye, kind of ragged without a supporting visual lattice of <code>{</code>’s <code>}</code>’s, and <code>;</code>’s. But I’m sure you get used to it quickly.
 
Sunbeams · Well, I said once a week, and it’s been longer than that, but we’ve all been busy. To start on a cheerful note, <a href='http://blogs.sun.com/roller/page/jsolof/20040626#a_href_http_www_amazon7'>here’s Jeff Solof</a> on child sacrifice and theological page-turners (really). Staying nontechnical, <a href='http://blogs.sun.com/roller/page/simons/20040626#rare_digital_books'>Josh Simons writes about rare digital books</a>, which will get any bibliophile’s heart pounding; Geoff Arnold <a href='http://www.geoffarnold.com/mt-archives/000137.html'>points us</a> at an amusing note from Neil Gaiman and adds a chuckle to it. Moving to technology, <a href='http://blogs.sun.com/roller/page/bmc/20040706#whither_usenix'>Bryan Cantrill worries</a> about keeping Usenix relevant. And last week, one big news story was <a href='http://archives.java.sun.com/cgi-bin/wa?A2=ind0406&L=java3d-interest&F=&S=&P=24617'>the open-sourcing of Java3D</a>. I am one of the few living humans to have actually <a href='/ongoing/When/200x/2003/03/04/Calgary'>shipped a working J3D app</a>, so this turns my crank a bit, if you need 3D I doubt there’s a smoother API in the world for it; check it out. I’m going to have to go revive my <a href='http://www.textuality.com/zig/'>Pseudobabyloniana</a> project, should be a snap to move it from Perl to J3D.
 
author · Dad · software · colophon · rights
Random image, linked to its containing fragment

By

I am an employee of Amazon.com, but the opinions expressed here are my own, and no other party necessarily agrees with them.

A full disclosure of my professional interests is on the author page.