Wednesday, June 13th, 2007 •
Related •
Filed Under
Several of my work buddies have quit smoking recently, which means I need to recruit new smokers to join me for smoke breaks. To help with this, here is the first in possibly a series of pro-smoking pieces. (This is adapted from The Easy Way to Start Smoking.)
Is smoking cool?
Taking even the most objective and [...]
Read More
Monday, June 11th, 2007 •
Related •
Filed Under
…That's what a buddy of mine (who is in fact more than six years old) told me recently.
Here's an equivalent (albeit much more flexible and efficient ) jibe, in regex:
(you)?(?(1)\u2665((?:reg(?:ular expressions?|ex(?:p|e[ns])?))++)|(?!))(?>\1\2)
This is just an attempt at über-geeky regex humor.
Read More
Sunday, June 10th, 2007 •
Related •
Filed Under
RegexBuddy is one of those tools which, now that I've gotten used to having around, I'd have a hard time living without—kind of like regular expressions themselves. I'm happy to see that the recently released (but little publicized) RegexBuddy 3.0 beta pushes what's already the best regex builder/tester on the market quite a bit further. [...]
Read More
Saturday, June 9th, 2007 •
Related •
Filed Under
Update: The documentation below has been updated for the new Date Format 1.2. Get it now!
Although JavaScript provides a bunch of methods for getting and setting parts of a date object, it lacks a simple way to format dates and times according to a user-specified mask. There are a few scripts out there which provide [...]
Read More
Thursday, June 7th, 2007 •
Related •
Filed Under
Since JavaScript doesn't include a trim method natively, it's included by countless JavaScript libraries – usually as a global function or appended to String.prototype. However, I've never seen an implementation which performs as well as it could, probably because most programmers don't deeply understand or care about regex efficiency issues.
After seeing a particularly bad trim [...]
Read More