Finally, A New Job (Thursday, August 28th, 2003) |
OK, so, I've got a job working for a company in Kelso Washington (60 miles north of here). For the moment I'm just building a new web site for them, as a contractor working from home, which is great because I don't have to commute for an hour each direction - also, I already have all the tools I need at home: a good editor, a pile of books (plus access to Google), a web server, an SQL server, and about two dozen browsers on five operating systems. I'm learning some new stuff for this project: although I was already familiar with JavaScript and CSS, I'm learning more about both, and I'm finally learning PHP. I borrowed O'Reilly's JavaScript: The Definitive Guide from my new boss. Wow. This book is awesome. There's a lot more to JavaScript than I was really aware of, and it's great to finally have a resource like this available. Brings back memories of high school, when I'd bring home 2″-thick programming books from the library and read them pretty much cover to cover. This should have been one of them. PHP is about what I expected. It's mostly like Perl,
but a bit simpler, which has both advantages and disadvantages. The way PHP
can loop through an associative array and get both the key and value in
their own variables (instead of just the key as in Perl) is a neat shortcut
(in Perl you'd have to add one extra line to do that, or just use
One of the things that's really awkward to get used to is, in both PHP and JavaScript, variables are scoped to the function, not to the block. It's a step up from BASIC where everything's global, and now that I think about it HyperCard variables worked the same way, but I've gotten used to block-scoping in Perl (C and Java are the same). In JavaScript: if(2+2==4) {
var foo="bar";
}
document.write(foo);
That works fine in JavaScript and the equivalent would work in PHP, but in Perl: if(2+2==4) {
my $foo="bar";
}
print($foo);
Because I used The most annoying part about this project, of course, is that browser compatibility is just as big a problem now as it was five years ago. You'd think that since everyone is using at least a 4.0 browser or equivalent now, and the World Wide Web Consortium's specifications have been standardized for so long, that it should be simple to just build a page that conforms to the W3C's specs, and everything should be fine. It doesn't work that way at all. Read my rant on Slashdot that I posted last night. |
Themes |
Random Quote |
“...The Mac reached out and guided me into all the ways I could use
it. It was exactly right. Some years later, I tried Windows, but come on
now. Start two computers, side by side, one with Mac OS, one with
Windows, and what reasonable person could argue that Windows is not the
wallflower?”
- Roger Ebert, 1996 |