Entries
Filters: Sorted by date
The power of Javascript
Spotted on paranoidfish.org/links, JavaScript: The World’s Most Misunderstood Programming Language dispells some myths about Javascript and shows how it is actually a very powerful and expressive language. The comparisons made to Lisp are particularly interesting.
[... 128 words]Glastonbury sold out
Bloody hell—Glastonbury 2003 has sold out within just 24 hours of tickets going on sale! My first thought was that this must be an April Fool’s thing, but it seems extremely unlikely considering that Glasto fans are already being driven to paying double the price of the ticket from ticket touts (if it is a joke, it’s gone horribly wrong). Luckily the main group of friends I’m going with all got there in time, but any hopes I had of convincing other friends to go are well and truly squashed.
[... 122 words]getElementsByClassName() rewritten
Andy has rewritten getElementsByClassName, resulting in much cleaner code and a method which can be called on any DOM element, not just the document object.
Playing with REBOL
Yesterday, inspired by Keith’s Programming page, I decided to take a look at REBOL. REBOL is a very high level scripting language designed for working with the internet. It has the interbnet built in to its very core—its 45 core datatypes include email addresses and URIs and it includes support for 14 standard protocols including HTTP, FTP, POP and even finger.
[... 209 words]Getting Linux to talk to an iPAQ
I’m playing around with a borrowed Compaq iPAQ at the moment. Unfortunately I don’t have permission to go the whole hog and install linux on it but, as the next best thing, I’ve been working out how to get it to talk to my Linux box. A quick Google search brought up SynCE, an open source project providing all kinds of software to allow communication between *nix and handhelds running Pocket PC. So far I’ve got the command line tools working which allow me to transfer files to and from the iPAQ and start up iPAQ programs remotely. The next step is synchronisation with Evolution.
I can’t believe its not a table
Via Craig, Big John’s new CSS layout “I can’t believe it’s not a table!”. I’ve played with the key concept of this before: using a background-left image on the body and a background-right on an all-encompassing div to create the illusion of two columns stretching the length of the page, but I never got it working quite as well as this. Big John’s layout uses that trick and a few others to get it rock solid across all browsers, then explains exactly how it all works in excruciating detail. Essential reading.
Sitepoint XHTML tutorial
SitePoint are running an excellent new tutorial series: XHTML Web Design for Beginners. There’s little there for non-beginnners, but I’ll certainly be sending new learners in that direction.
Glastonbury does CSS
Cool—the new Glastonbury Festival website uses a CSS layout! Unfortunately it completely fails to validate as XHTML Transitional, but comes to within an inch of validating as HTML 4.01 Transitional (they just need to change the doctype, take out a few XHTML specific attributes and clean up a misplaced <b> tag).
Smarter CSS positioning
Daniel Glazman’s proposal for smarter positioning in CSS (see also this blog entry) makes a lot of sense.
Usability myths
UIE debunk three usability “myths” (the three click rule, the idea that users give up on slow loading web sites, and the “5 to 8 test subjects should post most usability problems” idea). 37Signals do a pretty good job of debunking the debunkers.
SmartPHP.net
SmartPHP.net has some useful looking classes, including SmartTemplate (like Smarty but much simpler to use) and SmartCache, a very intelligent caching class that can be used to cache data objects as well as the output from whole pages. The example given caches a database query using the SQL statement as a unique cache key:
[... 108 words]Ruler bookmarklet
This Ruler bookmarklet is really cool—it shows the current coordinates of the cursor within the browser window and allows you to draw boxes and see how large they are in pixels—invaluable for tweaking CSS layouts.
Time traveller busted for insider trading
“Time-Traveller” Busted for Insider Trading (via Tony Bowden). This just has to be some kind of early April fools.
[... 242 words]Programming concepts
Two interesting reads relating to the Programming Languages course I’m taking at University:
[... 104 words]Sergey Brin interviewed
Jeremy Allaire has posted notes on an interview with Sergey Brin of Google, conducted at the PC Forum conference. Some highlights:
[... 240 words]Why XML doesn’t suck
Tim Bray: Why XML Doesn’t Suck (a follow up to XML Is Too Hard For Programmers). I’d quote the best bits but there are just too many—this article clears up all of the loose ends in my understanding of why XML is such an important technology.
Attribute selectors now supported
I’ve updated document.getElementsBySelector to support CSS2 and CSS3 attribute selectors, as described here. Attribute selectors allow you to match elements based on any attribute using a variety or different rules including begins-with, ends-with, contains and more. The new version is tested in Mozilla, Phoenix and IE5/Windows (and I’m almost certain it works in IE6). There is a slight bug in Opera 7 preventing the ends-with selector from working which I have been unable to track down—any Opera javascript experts out there?
Retrieving all DOM descendants
First observation of the day: IE 5 for Windows doesn’t understand element.getElementsByTagName('*') to retrieve all descendants of an element in the DOM. element.all has the desired effect for that browser. So to retrieve all descendants in a way that will work on standards compliant browsers plus IE 5, the following seems to be the best bet:
getElementsBySelector()
Inspired by Andy, I decided to have a crack at something I’ve been thinking about trying for a long time. document.getElementsBySelector is a javascript function which takes a standard CSS style selector and returns an array of elements objects from the document that match that selector. For example:
Date-centric vs Entry-centric
When I started this blog, I made the decision to use days rather than entries as the principle navigation unit of the site. Each day’s entries are grouped under a single heading for that day, archives are arranged by day (with permalinks linking to anchors on those pages) and individual entries come without titles, to emphasise the fact that they are part of a larger whole.
[... 602 words]Useful mySQL articles
Paul DuBois, the author of the huge great MySQL Book I have sat on my bookshelf, has a whole bunch of useful MySQL articles published on his site.
A PHP Installer
Wez Furlong is working on a generic PHP installation script. If he finds a nice solution to the safe_mode and open_basedir restrictions mentioned in his post this could be a hugely useful tool for the PHP community.
The goodness of binary search
Tim Bray provides an in depth, practical explanation of the binary search algorithm with example code in Java. Great revision material for second year computer scientists like myself.
Smart scripted URLs
Dan Kalowsky is realising the importance of using a smart scripting technique to generate “nice” URLs:
[... 62 words]UltraEdit regular expressions
Every now and then I find myself needing to use a regular expression in UltraEdit, and whenever I do I invariably have to spend five minutes re-reading that section of the manual to remind myself how its syntax differs from more traditional regular expressions. This time, I’m recording the result in the hope that it might jog my memory next time I need to use them.
[... 104 words]