links for 2006-04-30
-
I'd watch these now but this page is the top post on digg, so I can't :(
-
portal about cookies
« March 2006 | Main | May 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));
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:
NOTE: To get the desktop to look exactly how you want, it may be necessary to move or resize the "live content." Just go back uncheck the Lock Desktop Items checkbox.
These instructions have been tested on a Windows NT/XP box and on a recent installation of Windows XP SP2. But this procedure is not recommended. Ever. It's something cool that can be done with Windows, but it will slow down your general operating speed; and likely it will occasionally crash certain processor intensive programs, such as video games.
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.
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" --Ray Kurzweil, "the age of intelligent machines"
Yesterday I installed MediaWiki on Mac OS X 10.3/Jaguar. Apache is installed by default on OS X. So is PHP, but I couldn't get it to run. So I wound up installing binaries of PHP and MySQL.
I learned a lot, but maybe the most important thing was that on OS X, starting PHP tags must have the form:
<?phpOtherwise the code does not run. I saw quite a few confused netizens asking why their scripts suddenly didn't run when tried on OS X.
It took a couple of tries to get the MediaWiki first-time-configuration script to run. It kept asking me for a root password, in order to set up a new MySQL account. It took me a few tries to realize this was my MySQL password, not the BSD root user's password.
I didn't expect to need to configure the DNS. I just had an IP address, no hostname. When I put in the direct ip of my machine, fine. As soon as I switched to a subdirectory, 404. It was the UseCanonicalName directive in the httpd.conf file. Once I set that to off, everything was fine.
I learned that on OS X the default directory where Apache serves files is:
/Library/Webserver/Documents/
sudo bashopens up a new shell as root.
To start and stop Apache, I used the Sharing control panel (Apple Menu > System Preferences > Sharing) Apache is called Personal Web Sharing and there's a big, shiny button that turns it on and off.
httpd.conf iss located by default in:
/etc/httpd/httpd.conf
httpd -V
How about a single word that means "is it really going to be ready by the deadline?"
Example:
"I've just finished the spec for a new all-seeing widget engine that's going to be integrated into all our products!"
"Sounds great but, _________."