|
News/Construction History Wednesday, February 6, 2002
|
|
|
Big news on the site this day. As of this day, this page had a functioning JavaScript script in it. Woohoo! Here it is:
*Actually, this is an example I copied out of the O'Reilly book.
I spent two hours debugging this little, piece-of-[blank] script, and I had copied it out of a book! After comparing my typing to what was in the book, I first thought this had a chance of being one of those "you need a server" issues. But right away I realized that this is what client-side JavaScript is all about: one only needs a browser. (This realization was helped along by the fact that I remembered that a mini-script that I had copied the day before worked just fine.) So, I compared again to the book: no obvious differences. I had changed the formatting so that the code was more natural for me to read and understand. But I had read in the book (in an effort to get myself to sleep the night before) that JavaScript interpreters automatically place a semicolon at the end of a line if one is not present. Aha! My reformatting had put a line break some place important, and the JavaScript interpreter in IE was placing a semicolon somewhere I didn't want one. I spent some time removing a bunch of carriage returns, making my code borderline unreadable. No dice. What the eff! Okay, I went to the O'Reilly site and downloaded the example. It worked fine. I opened up the two files side by side and pored over them. They were the same in every way that should be significant. The same, damn it! Oh. Except for one place where the book and download had "payments" as a variable name, and I had typed "years". Is that really such a meaningful difference?! Computers can be so fickle. (If you are curious to view the source code for the loan calculator, but don't want to wade through a text version of all my ramblings, look here.) When I was growing up, teachers told me that copying homework and test answers wouldn't teach me anything. They were so full of it! Copying is a valuable life skill! If I had copied more in the third grade, I would have saved myself two effing hours! Forget it. From now on, I'm downloading everything. Copy and paste, baby. There's all kinds of stuff on the Web free for the taking. From now on, my goal is to became a master of web development without learning a damned thing! (Then, I'm going to put up a website that has doctored pictures with all my copying-discouraging teachers' heads pasted onto the bodies of pigs and cows.) I got another piece of rather embarrassing email this day. This was from my friend Nick, who works with that other troublemaker, "localhost Jim". He pointed out that my Ars Digita link was broken. I had accidentally used a relative href when I made the hyperlink, causing that link, when posted on the Prodigy server, to point to http://pages.prodigy.net/totalidiot/www.arsdigita.com. The worst part of this mistake was that I had once entertained thoughts of working with Nick and Jim doing Quality Assurance. Hah! I didn't even check the links in my own website! What kind of quality assurance could I possibly provide? Who the hell did I think I was, a developer?! Susan made Low Fat Tuna Melts for lunch. Each sandwich was worth four points, and we each had two, so Susan had to have a low point dinner (again). The sandwiches were quite satisfying, though, and well worth the points. I made our "best bang for the buck" low point dinner again, cream of vegetable soup. But to keep us from getting to bored, I did a few things differently. I left the peppers out of the soup and sauteed them slightly with Italian seasoning and salt. I also cut up our portions of light bread, shook them in a bag with salt and garlic powder, and toasted them into garlic croutons. We served the soup with the peppers and croutons on top. After dinner, Matt and I watched a neat show he wanted me to see called Time Team about archaeologists who go somewhere and dig for two days to see what they can find. Susan had to deal with a phone call, and we all took turns helping Cam to refuse his bedtime bottle every few minutes while he used the love seat as a jungle gym. After that, Matt and Susan went to bed without dessert! On Weight Watchers, one cannot bank more than five points in a day. Matt was actually close to forfeiting points, so, during Time Team, he had had 1.5 ounces of a Jersey cheese that is like a mature cheddar. (That's the original Jersey, not New Jersey.) Anyway, to make a long story, er, what it is, after they went to bed, I found myself facing forfeiting points if I didn't consume something. So I had a beer. It was great. It was a half liter bottle of Fuller's London Pride (the same Fuller's famous for its ESB). It cost me five effing points, but it was really good. The only drawback from drinking it was that it made me want to stuff a 16" pepperoni pizza down my throat with it. Actually, that's not really a fair criticism of the London Pride experience. On Weight Watchers, even breathing makes one want to stuff a 16" pepperoni pizza down one's throat.
|
||
| Set date mark cookie and go back to main page | Go to next entry | |