Monday, June 23, 2003
- Spring 1.3 is out. Download.
- The structure of content and metadata.
- Lambertin & Grotegerd (great CSS)
- The Animatrix.
- Doc Query in SQL.
- Storing Hierarchical Data in a Database. I need this for my photo gallery cross-reference.
- Python considered harmful.
- Bruce Eckel: Strong Typing vs. Strong Testing.
- Why Pascal is not my favorite programming language.
- Computers > Programming > Languages > Comparison and review. Look ma, an entire DMOZ category of flames and trolls.
- History of RSS from 0.90 to 1.0.
- A common syndication format? July 2, 1999, and still out of the loop on RSS 0.91. But it’s OK, we all stretch the truth a little on our resumes.
- Paul Ford: Software Story.
- Phil Ringnalda: RSS Reader tidbits.
- Leslie Harpold: Possible scenarios for heaven.
- Famous Gary Larson cartoon. First panel: a man talking to his dog. “What we say to dogs: ‘I’ve told you before, Ginger, stay out of the trash! Do you hear me, Ginger?’” Next panel: “What dogs hear: ‘Blah blah blah, Ginger. Blah blah blah blah, Ginger?’”
- What David Mertz says: Functional programming in Python becomes lazy: using combinatorial functions in the itertools module. What I understand: “Blah blah blah, Python, blah blah blah blah.”
- Andy Todd: Iterators and Databases.
- Simon Willison: Easier form validation with PHP.
- Project VII: Uberlink CSS Rollovers.
- Aaron Swartz: PowerPoint remix.
- Subflavour plug-in for Blosxom.
- Michael Barrish: Oars.
- And finally, my friend Clint has a lawn now.
Filed under css, linkdump, osx, python, rss, sql, utilities
Preorder tree traversal is truly the king of hierarchical-data storing methods.
As for the ‘indent level’ thing that’s mentioned in that article, it’s even easier than that; it can all be done in SQL. Just join your hierarchy table back onto itself:
SELECT title, COUNT(*) AS level
FROM tree
LEFT JOIN tree AS treelevels
ON (tree.lft between treelevels.lft and treelevels.rgt)
GROUP BY TITLE
It’s slightly tricky to understand, but trust me, it’s nifty.
One thing that’s a bitch, though, which I mention purely in case anyone decides to convert their database holus-bolus and then gets caught out: it’s very tricky indeed to get the children ordered alphabetically. If you add ‘Green’ and then ‘Apple’ below ‘Fruit’, you’d better hope you never want to retrieve:
Green / Apple / Red / Cherry / Yellow / Banana
like that, because you’ll be bald in an hour, I swear.
Comment by Paul — Monday, June 23, 2003 @ 2:43 am
The “Python Considered Harmful” link is historically interesting.
I read the post, vehemently disagreed with it, and then read the follow-ups. To my surprise, not a single response suggested using unit tests as a substitute for compile-time checking. I didn’t quite understand this until I looked at the top of the page and saw the year the thread occurred: 1999. These days, you wouldn’t be able to get away with that sort of question without at least ten people invoking Kent Beck.
Then I realised how recent 1999 actually was.
Comment by Charles Miller — Monday, June 23, 2003 @ 7:06 am
Here is a method for trees in Sql posted on Ward’s Wiki that is very, very slick and efficient.
http://c2.com/cgi/wiki?TreeInSql
Comment by Keith Wright — Monday, June 23, 2003 @ 10:49 am
I think we need another one of those meme-image banners, this one saying “No *I* co-authored RSS!”
Comment by xian — Monday, June 23, 2003 @ 12:39 pm
I co-authored RSS, and so did my wife!
Comment by Brian — Monday, June 23, 2003 @ 1:00 pm
http://diveintomark.org/images/noIcoauthoredrss.gif
Comment by Mark — Monday, June 23, 2003 @ 1:13 pm