Entries
Filters: Sorted by date
RELAX NG now an ISO standard
Via James Robertson, RELAX NG (altogether too many caps) has been published by ISO as an International Standard. RELAX NG compact syntax is will hopefully join it soon.
[... 149 words]More CSS trickery
Stu Nicholls dropped me a line earlier to pimp his new CSS demo site, www.s7u.co.uk. He’s got some really nice tricks and the site warrants serious exploration. There’s a good take on the classic 3 column layout with header and footer problem, a bunch of neat menus and a bunch of fun demos that defy categorisation.
Joel on Eric
Joel Spolsky’s latest essay reviews Eric Raymond’s The Art of Unix Programming (a book I really want to pick up) and uses it as background for a discussion of the cultural differences between Windows and Unix programmers. As always, it’s an insightful piece.
[... 197 words]Mac buying advice needed
I’m in the market for a new laptop, and I’m almost 100% certain it’s going to be a Mac. I’m going to be using it as my primary personal computing platform, but the vast majority of what I do with a computer is browsing, using email and messing around Python, Apache and other geeky toys. I’m sorely tempted by one of the 14" iBooks. Since I’ll be using this thing a lot (and I’ve never been a huge fan of laptop keyboards) 12 inches seems to small, and I’m not convinced that the extra cash for a PowerBook is worthwhile now that iBooks go up to 1 GHz.
[... 417 words]Javascript debugging: IE Option gotcha
I’ve been debugging Javascript today. I like Javascript as a language, but I doubt anyone would disagree that it’s a horrible, horrible language to debug across multiple browsers. Firebird at least has good debugging support—I currently use the Javascript Console and Jesse Ruderman’s shell bookmarklet and I really need to learn to use Venkman some day. If anyone knows a better way of debugging Javascript in IE than relying on the lame popup box I’d love to hear about it.
[... 238 words]Grouping table data by header
Andy’s latest Javascript experiment is over a week old now but I managed to miss it the first time round. It’s an interesting twist on the sortable tables idea, allowing table data to be grouped as well as sorted by dragging each table header on to a box at the top of the table. Unfortunately the grouping feature seems unstable in IE but it works a treat in Firebird.
New Python Computer Science text book
Python Programming: An Introduction to Computer Science is a new Computer Science text book designed for use in introduction to programming classes, written by John Zelle, who’s Teaching with Python page . Kirby Urner recently posted a mostly positive review of the book to the Python Edu-SIG mailing list, which sparked an interesting discussion about Python’s place in the CS curriculum.
[... 183 words]Static content generation
Ian Bicking has an interesting pieces on using static publishing in a CMS. The choice between static and dynamic when building software for the web is a critical one, and one that I think deserves in-depth discussion.
[... 672 words]My first SitePoint article
Enhancing Structural Markup with JavaScript is my first published article for SitePoint, a web development portal that is also home to some of the best web design forums on the web. I’ve been a big fan of SitePoint for a number of years and it’s great to finally have contributed something to the site. The article discusses two methods of building useful Javascript effects on top of well structured markup and is based on my easytoggle and blockquote citations experiments, both previously featured on this blog.
[... 119 words]More blogmark tweaks
I’m up to 110 blogmarks now, and from my point of view they’re the single most useful feature I’ve added to this site in a long time. I’ve modified my day archive pages to show the blogmarks added on that day, and I’m considering adding them to individual entry pages as well so that an entry is displayed along with the blogmarks added while that entry was at the top of my blog. The idea there is that I could aim to blogmark “related items” for the top entry, although obviously unrelated sites would end up in there as well.
[... 204 words]Implementing filesystems in Python
LUFS-Python provides a relatively simple API for implementing new Linux filesystems in pure Python. You install the package, write a class implementing methods for handling filesystem operations such as creating a directory, opening/reading/writing/closing a file, creating symlinks etc and finally mount your new filesystem with some special arguments to the mount command.
[... 371 words]Nasty new IE vulnerability
Most people reading are probably aware of the common trick whereby spammers and other assorted ne’er-do-wells publish URLs with usernames that look like hostnames to fool people in to trusting a malicious site—for example, http://www.microsoft.com&session%123123123@simon.incutio.com. This trick is frequently used by spammers to steal people’s PayPal accounts, by tricking them in to “resetting” their password at a site owned by the spammer but disguised as PayPal.com.
[... 164 words]YAGNI and DRY
Two acronyms that have been seeing a lot of action at work recently are YAGNI and DRY. They’re great principles to go by in any case, but in a pair programming environment they take on a whole new level of utility.
[... 230 words]How not to use OOP
Via Hans Nowak, Understanding Object Oriented Programming, or how to turn 19 lines of easily maintained code in to an OO monstrosity spanning 7 class files. This is not the way to make code more maintainable. For comparison, here’s how I would implement a solution to the same problem in Python, assuming the availability of an equivalent function to Java’s System.getProperty("os.name") (os.name is similar but inappropriate for this example):
Bounty Hunting
Via Jeremy Hylton, Mark Shuttleworth (super-rich geek and space tourist) is offering $100,000 worth of bounties in 2004 to developers willing to help out with a number of Open Source projects, most of which are to be developed in Python. A comparison can be made here with Mitch Kapor, another geek-done-well who funds open source development through his sponsorship of the Open Source Applications Foundation.
[... 207 words]New PHP community site
Via The Farm, Chris Shiflett is calling for assistance in setting up a new PHP community site to run along similar lines to use Perl. Chris has already secured an offer of hosting and support from O’Reilly and is now seeking offers of help from potential contributers. PHP has long needed a site of this kind (PHP Builder has lost a lot of momentum since being sold by Tim Perdue) so this could be a worth while project to get involved with if you have the time.
[... 140 words]Simpler content managment
Perls of wisdom in a sea of site mismanagement, via the ever-excellent Column Two:
[... 497 words]GAWDS now inviting new members
The Guild of Accessible Web Designers is a world wide organisation of web designers and developers committed to helping each other, and promoting the message that accessible web design is ’good for business’
. I’d describe the organisation in detail here, but the official site does a far better job than I could. If you’ve been following the web accessibility community in any detail You’re likely to recognise a number of the names on the registered members list; I’ve been following GAWDS developments for a while and its shaping up to be a great resource for accessibility minded designers. I’ve also contributed an article on Writing good ALT text which hopefully provides some useful advice on a frequently misunderstood topic.
Dates on the web
D. Keith Robinson writes about Using Dates For Featured Web Content. Keith’s right, including a date with your content really is a no-brainer. I’ll add an anecdote of my own. Several years ago I ran a popular news site for Team Fortress Classic, a team based online first person shooter game with a thriving clan scene. I was careful to include dates on every piece of content, but in my youthful naivety I neglected to include the year. The years rolled by and the content built up until I suddenly realised that I was no longer sure what year some of it was written in! The site has sadly now passed in to history but the lesson remains: the web moves faster than you might think, so omitting the year in your dates is a pretty dumb thing to do.
[... 220 words]Extracting the length from MP3 files with Python
Ned Batchelder recently wrote about the difficulties involved in extracting the length from an MP3 file. We’re going to need to solve this problem soon at work; luckily, it seems that the answer may lie in the Python bindings for mpgedit, an audio file editing library available for both Windows and Linux.
[... 149 words]Downloading your hotmail inbox
Adrian just pointed me to a fantastic tool: Gotmail, a utility to download mail from Hotmail accounts. It’s a command line utitlity, written in Perl and making use of the curl binary, which can connect to Hotmail over the web and grab any new emails, saving them locally as an mbox file and deleting them from the Hotmail server.
[... 289 words]HTML entities for email addresses: don’t bother
I’ve suspected this for a long time, and now here’s the empirical evidence: Popular Spam Protection Technique Doesn’t Work. If you’re relying on HTML entities to protect your email address from spam harvesters—for example username@example.com—your email address may as well be in plain text. Chip Rosenthal downloaded a tool called “Web Data Extractor v4.0” and tried it on some test data to prove once and for all that the technique doesn’t work.
Selectutorial
New from Russ Weakley: Selectutorial, which taks his widely acclaimed step by step CSS tutorial style and applies it to CSS selectors. Having a full understanding of selectors is critical if you’re going to take full advantage of CSS, so if you don’t get them yet you should really check this out.
Repartitioning with Knoppix
I’ve been long bemoaning the fact that if you want to repartition your hard drive to install Linux as a dual boot with an existing Windows system the most frequently recommended method is to buy a copy of Partion Magic. You would have thought the open source software world would have provided a free alternative by now.
[... 217 words]IXR 2.0
Harry Fuecks has been hacking on my XML-RPC library, and has released a new version with some significant changes. His article on phpPatterns describes the changes and provides a link to download the updated code. He’s made a bunch of interesting architectural changes which take advantage of a number of useful PEAR classes, including HTTP_Request which provides support for proxies and authentication, two frequently requested features.
[... 127 words]Why run Windows on an ATM?
So you’re writing the software for an ATM. It needs to display something pretty on the screen, control the hardware that serves out the money and talk securely to your central servers. It also needs to be stable, secure, reliable and allow remote administration. Why on earth would you choose Windows as the operating system?
[... 213 words]Pyrex
Pyrex is a language for writing Python extension modules. It’s pretty interesting—the syntax looks very similar to Python (the authors claim you can write C extension modules without knowing anything about the Python/C API) but uses additional type hints to compile down to ultra efficient C code, ready to be imported in to your Python applications. The prime numbers example maakes things a lot more clear:
[... 236 words]Discovering Berkeley DB
I’m working on a project at the moment which involves exporting a whole bunch of data out of an existing system. The system is written in Perl and uses Berkeley DB files for most of its storage.
[... 339 words]