Prototype.js cheat sheet set

May 26th, 2006

These are a visual and a hypertext cheat sheet for the Prototype.js library. Prototype.js is the foundation of Script.aculo.us and Rico, among others.

http://www.snook.ca/archives/prototype1280.png
http://www.sergiopereira.com/articles/prototype.js.html

More on what to do with Prototype.js after the jump.
Read the rest of this entry »

“To become a member of the Internet of Things”

May 26th, 2006

I would like a word that means “to become part of the Internet of Things.” Hopefully the Web’s next generation can do better than “Web-ify,” (ugh) and “go digital” doesn’t cover it.

I need a single verb that means “go digital, go wireless, go mobile, become automated, begin writing log files about activity, provide surveillance capabilities, become extensible, become standardized, and become platform-independent.”

Laziness, Impatience and Hubris are the three virtues of a programmer

May 16th, 2006

The three virtues of programming are laziness, impatience and hubris. — Larry Wall

Level 60 del.icio.us Characters

May 16th, 2006

del.icio.us pioneers tracks the del.icio.us members who post the most new material which becomes a popular link. These are the level 60 del.icio.us Characters! Observation: a list of del.icio.us names looks identical to a list of names of WOW characters… like I can talk, when my name is thefangmonster ;)

Note to self, this is not the best way to set an element’s style

April 29th, 2006

I love coming up with solutions on the fly. It’s fun to read the code later and see where my brain is at, under extreme pressure.

Bless this mess of CSS. :)

add(newTag('style', 'textarea{width:100%;height:100%;}'));
add(newTag('textarea', u));

Windows Active Desktop is good for something!

April 24th, 2006

My main accomplishment today was the discovery of a use for Windows Active Desktop! I managed to get it so the Bryant Park Webcam is my desktop. The desktop refreshes every 10 minutes, just like the webcam. All this required was some serious drill-down into the Display control panel:

Here are the steps to get a webcam image displayed on the desktop; and set it so the image on the desktop updates with the one on the web:
Read the rest of this entry »

Learning to appreciate Selenium 1.0.6

April 22nd, 2006

Earlier this month I had a problem with Selenium. This was because I was trying to test rollovers, and I didn’t realized the Selenium can only trigger rollover events when run in Internet Explorer!

Today I am setting up unit testing on the canonical e-commerce interface.

I’ve left my canonical interface rough around the edges to more accurately simulate my typical clients’ production environment. Image names are not consistent, for instance, and the data structures I use are bloated, with barely-mnemonic naming schemes. This has so far prevented me from getting a false sense of ease and thus overvonfidence when working on my own application.

So I was able to appreciate the rigor with which writing Selenium tests forced me to examine my own code. Which div has the mouseover that triggers the image switch? Are all of the image names consistent? These questions all too often don’t get answered until there’s a bug which requires their investigation.

A Selenium test can be a narrative format in which to describe the optimal functioning of an application. The test itself creates a record of the required functionality of a given application.

Overlooked technical issues in client-side Web Development

April 20th, 2006
Rapid Prototyping
Don’t create static HTML files, ever. Use PHP or mod_perl, or even Ajax, to generate HTML comps on the fly. The same goes for “flat” HTML pages that are created prior to integration into a content management system. Even though it may seem troublesome to maintain a local installation of Apache (it isn’t!) the tradeoff in speed is worth it.
Automated Backup
Run a tape once a day and back up every workstation, fileshare, and staging server. Keep a box of 30 tapes and rotate them out so there is a month of backups. Sure its a pain and a bit OCD… but the look at the gains: the magical ability to erase mistakes and restore lost data, sometimes in seconds.

Big Web Application weekend

April 19th, 2006

This week I put together the largest JavaScript application I have attempted so far. It was a lot of fun to learn all the new Web 2.0 techniques. I got to try out script.aculo.us, Rico and prototype.js. Most importantly I learned how to generate HTML using JavaScript’s ability to manipulate the DOM tree. I can see a day ahead where I don’t type any tags at all, except for maybe HEAD, SCRIPT and BODY. :)

I also designed a UI from the ground up for the first time. Nothing complicated, aespecially lthough I did create some 3d buttons, which was fun. I know a lot more about Photoshop than I thought, when I have a good tutorial in front of me.

One thing I didn’t have time to do, that would have really helped, is to learn the command set for the Selenium client-side testing suite. Although it was very easy to install, I haven’t figured out how to check rollovers with it, so it wasn’t very useful.

4.22 Rollover testing AFAIK* only works in MSIE, which is why I was having so much trouble. In fact I think I had a test that would have run, had I tried it on MSIE instead of Firefox. Yet another example of why it’s important to always test in multiple browsers.

*I read this fact on a forum whose url I can no longer remember. It is, in fact the case, as I have tested it several times (MSIE 6 vs. FF 1.5.0.1 on XP SP 2).

the purposeful destruction of information is the essence of intelligent work

April 11th, 2006

“the purposeful destruction of information is the essence of intelligent work” –Ray Kurzweil, “the age of intelligent machines”