This is from my American Express blue online statement. Apparently "24, 25, 26, 25" is descending order. Sigh.
Category Archives: web
BPW’s ugly web site
Hello, BPW? 1995 called. It wants its web site back.
Craigslist suggestion: pause and resume listings
Here’s a feature suggestion: I’d like the ability to pause and resume a post on Craigslist. Here’s the scenario: I post an ad in free stuff I get 10 responses immediately I want to stop getting responses until I can deal with the ones I’ve already received If I delete the ad, I can’t repost …
Continue reading “Craigslist suggestion: pause and resume listings”
JavaScript date validation
I was searching the web for JavaScript date validation code. All I found were lots of really bad ideas. Some were quite complicated. John Gang was on the right track. I didn’t see Chris Hogben’s article initially, but he used the right algorithm. Still, nobody offered the complete solution. Given a date string YYYY-MM-DD, is …
My Toronto Star crossword puzzle fetcher
On weekday afternoons, the Toronto Star publishes an eight-page PDF edition, “Star PM.” I download this for one reason: the free crossword puzzle. But sometimes I forget to download this, and since there’s no archive, I lose the opportunity to do that day’s crossword. So I wrote a script to automatically fetch today’s Star PM …
MySpace and its shit-ass design
Sean Bonner rips into MySpace, calling out its poor usability (far, far too many clicks to do anything). Sean was inspired by Evan Williams’ analysis of how MySpace gets so many page views. Evan was in turn building on Mike Davidson’s analysis. Mike’s characterization of MySpace as an “Unnecessary Click Factory” is spot-on. Oh, and …
the magic growing text box
Here’s a text box that grows as you type to hold just the right amount of text: <textarea name=”foo” rows=”1″ cols=”20″ onkeypress=”resizeme(this);”></textarea> <script type=”text/javascript” charset=”utf-8″> // <![CDATA[ function resizeme(t) { var characterCount = t.value.length; // assuming proportional font var columnCount = Math.floor(t.cols * 1.25); var height = t.rows; var newHeight = 1 + Math.floor(characterCount/columnCount); if …
Using CURL in PHP
In Python, to read a URL, I do the following: import urllib data = urllib.urlopen(‘http://foo.com/’).read() PHP links against cURL, which lets you accomplish the same thing … in five lines of code. If this is something you plan to do more than, say, once, you’ll want an easier way of doing this. Here’s the function …
the importance of net neutrality
the execs at the telcos (perhaps the same people whose secretaries print their emails — who knows) have this great idea to make money off the internet: meter everything. their argument is that google is getting a “free ride” on their network. well, no, they aren’t. they are paying for bandwidth at their end, and …
Better Google Finance URLs
It would be nice if Google Finance allowed you to use easy-to-type URLs, i.e. http://finance.google.com/goog Which could redirect you here: http://finance.google.com/finance?q=goog Perhaps something like: RedirectMatch /([a-z]{4}) http://finance.google.com/finance?q=$1