Posts from: 2007

22 Dec 2007

Awesome Holiday boredom

88 I got: A, ABBR, ACRONYM, APPLET, AREA, B, BASE, BASEFONT, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, DD, DEL, DFN, DIR, DIV, DL, DT, EM, FIELDSET, FONT, FORM, FRAME, FRAMESET, H1, H2, H3, H4, H5, H6, HEAD, HR, HTML, I, IFRAME, INPUT, INS, ISINDEX, KBD, LABEL, LEGEND, LI, LINK, MAP,

[...read the post]
15 Nov 2007

Anti-forward ammunition

Gently inform a loved one that forwarding hoaxes and chain letters is a waste of everyone’s time. I just got this. Get it to everyone fast as possible! >> Important! Pass it on…. >> >>> THIS IS NOT A JOKE! I confirmed it on Snope!!!! Please forward this >>> to everyone you know! In order

[...read the post]
10 Nov 2007

NPR music + Stephin Merritt

NPR just launched their new music site, which nicely gathers music stories and media from a lot of different NPR shows. My favorite feature: Their media player is Flash-based. It’s a little quirky in Opera, at least, but so much better than the works-some-of-the-time WMP plugin that Opera used, and don’t get me started on

[...read the post]
26 Oct 2007

Portal

Check out the trailer to Portal. It’s a first-person puzzler where your only ability is to create circular space/time portals between two locations. Your movement (and gravity!) does the rest. The trailer is also pretty funny. This would’ve made Berzerk so much easier.

[...read the post]
9 Oct 2007

LoadVars implements HTTP caching

Searching for info about Flash’s caching mechanism turned up endless posts on how to prevent caching, but none mentioned how LoadVars.load() handled server-sent Cache-Control headers. So I tested this myself. In the SWF, I loaded the same URL once every 5 seconds using setInterval() and LoadVars. The URL ran a PHP script that sent content

[...read the post]
22 Aug 2007

Please no more Red Book CDs

The Red Book standard defined how audio was to be encoded on a CD, and it was great for 1980, but it, well, kinda sucks now. 1. The error correction is too minimal to withstand real-world abuse (cars, friends, etc.). 2. Tracking is pretty loose, and a lot of players have trouble seeking to the

[...read the post]
16 Aug 2007

Robot pucks will destroy man

Really cool technology with video.

[...read the post]
15 Aug 2007

Average direction in SQL

Given a column of polar directions in degrees, this is a single SQL expression to compute their average, for use in a GROUP BY query. Some functions may be MySQL-specific. IF(DEGREES(ATAN2( -AVG(SIN(RADIANS(direction_deg))) ,-AVG(COS(RADIANS(direction_deg)))) ) < 180 ,DEGREES(ATAN2( -AVG(SIN(RADIANS(direction_deg))) ,-AVG(COS(RADIANS(direction_deg)))) ) + 180 ,DEGREES(ATAN2( -AVG(SIN(RADIANS(direction_deg))) ,-AVG(COS(RADIANS(direction_deg)))) ) – 180 ) Thought someone might like to run

[...read the post]
18 Jul 2007

Actionscript pains

I have an Actionscript 3 book lined up to tackle at some point, but generally my interaction with Actionscript is having to modify someone else’s SWF, most commonly old code from the 1.0 days. When I open one of these source files it sometimes takes time to even figure out where the code is. When

[...read the post]
16 Jul 2007

Thoughts on a Javascript “validator”

(X)HTML and CSS have their own validators, but we need one for Javascript as well. JSLint could be part of it, but what I’m imagining would flag the use of “native” objects/interfaces not defined by W3C or ECMA standards. E.g., document.layers or window.ActiveXObject. The hard part in doing this is finding a full Javascript interpreter

[...read the post]
27 Jun 2007

Hacking a 3rd party script for bookmarklet fun

A few weeks ago I created a simple bookmarklet that loads del.icio.us’s PlayTagger script into the current page. This post covers how some problems with this script were worked through. Too late The first challenge was that PlayTagger was designed to initialize itself (let’s call this method “init“) on window.onload: If a user fired the

[...read the post]
25 Jun 2007

Kill these DOM0 shortcuts

A problem a decade in the making You can refer to a form’s elements in your code by using the element’s name (from the NAME attribute) – an ancient Javascript spec. This means myForm.myElement is a shortcut for myForm.elements['myElement']. I’m sure this was seen as handy and harmless at the time, but the problem is

[...read the post]
31 May 2007

SketchUp action

Over the weekend I finally gave SketchUp a try and got pretty wrapped up in it. I was up till 3 Tuesday night putting the finishing touches on my first contribution to 3D Warehouse. Of course it’s a skate spot. A great feature is that you can recreate a scene in 3D using a 2D

[...read the post]
24 May 2007

Favorites of the php|tek 2007 slides

I didn’t go, of course (next year hopefully), but I can live vicariously through slides! Ilia Alshanetsky had my favorites: Securing PHP Applications (.pdf) – Comprehensive with good examples. If you read Chris Shiflett, there won’t be a lot new covered, but still a good read. PHP & Performance (.pdf) – Again, covering all the

[...read the post]
2 May 2007

Running PHP on .NET???

Phalanger is a .NET compiler for PHP5. Yes, PHP code compiled into CLR running on .NET (or Mono), with access to .NET classes as PHP objects (!), and apparently running almost twice as fast as on the PHP CGI. And they’ve implemented enough native PHP functions identically enough to run fairly extensive apps (MediaWiki, WordPress,

[...read the post]
15 Apr 2007

Google TechTalk: OLPC

Another brilliant Google TechTalk, this one on the massive tech challenges of the One Laptop Per Child project. The revolutionary hardware design was hard enough, but the software goals are incredibly ambitious, particularly in the areas of security and long-term user data persistence within a very small space. Right now the permanent data store is

[...read the post]