Sunday, March 27, 2005
Blog Entry #2
Hmmm...with my current system, I am evidently not going to be able to make use of Blogger's vaunted WYSIWYG post editor for writing my blog entries. According to the Blogger Browser Matrix, Blogger's Compose mode is supported by Netscape 7.2 for the Mac, which requires a more advanced operating system, a faster processor, and more physical RAM than my computer currently has. I do have Netscape 7.02 on my machine, but my attempts to bring 'focus' to the Compose textarea field using Netscape 7.02 are unsuccessful...it would thus appear, friends and neighbors, that I will have to hand-code my own blog-entry HTML. Horrors! But this is probably all for the better; otherwise, my HTML knowledge, such as it is, will get rusty. As an aside, in HTMLGoodies' introductory HTML primer, Joe Burns notes that he himself codes using the NotePad text editor, and not an HTML editor, most of the time.
1) objects, which are analogous to nouns;
2) methods, which are analogous to verbs; and
3) properties, which are analogous to adjectives.
giving us in this case:
document.write("write this to my page")
in which the quoted code "write this to my page" - which can be text, HTML, or a combination thereof (as in the primer example) - in the write( ) parentheses is written to a Web page. Pretty simple.
Quick comments on other issues that crop up in the primer
The <script> tag
Shape of the script, margins, and whitespace
("<FONT COLOR='RED'>This Is Red Text</FONT>")
However, I did generate errors when I inserted line-breaks after various space characters in the script. For example, upon breaking the ("<FONT COLOR='RED'>This Is Red Text</FONT>") line in two by hitting Return just before the word Red:
("<FONT COLOR='RED'>This Is
In the primer example, the entire parameter of the write( ) method is enclosed in double quotes, whereas the value ('RED') of the color attribute of the inner <font> tag is enclosed in single quotes. Joe summarizes, "Remember: Inside of double quotes... use single quotes." But it could actually also be the other way around, i.e., double quotes inside of single quotes:
document.write('<FONT COLOR="RED">This Is Red Text</FONT>')
Either quote format works just fine - try it yourself. (And although it's a bit sloppy, the script will also work without any quotes at all around the "RED" value, not that I'm encouraging HTML sloppiness on anyone's part, of course.) Joe correctly notes that using double quotes inside of double quotes will cause the script to "think it has met the end of the line and...that will throw an error" (as will using single quotes inside of single quotes).
The end-of-primer assignment and its answer
(Per our earlier discussion, there is in fact no line-break in the above code.)
Friday, March 18, 2005
"A writer is someone for whom writing is more difficult than it is for other people."
- Thomas Mann
Hello, everyone, and welcome to my blog. These are my first, tentative steps into the ‘blogosphere’ - wish me luck.
I have written to Joe Burns, the founder of HTMLGoodies, and informed him that I would launch such a blog. As of this writing, he hasn’t replied to me, so I can’t claim Joe’s ‘blessing’ for this project, but on the other hand, he hasn’t written back threatening to sue me, so onward we go.
I have no formal training in the use or programming of computers, although I’ve been using computers since the late 1980s when I was a graduate student. Today, like many people, I spend a lot of time on the Web, and it occurred to me, "Y’know, maybe I should learn something, at least a little bit, about how programming for the Web is done." Accordingly, I began a course of self-instruction in this regard with an article in the Fall 2001 issue of EarthLink’s now-defunct bLink magazine, "The ABCs of HTML" (p 32). (I’ll have more to say about EarthLink, my ISP, and instructional material relating to the Web at a later time.) This short, two-page introductory article on HTML concluded with a URL (www.earthlink.net/blink/aug99/workshop.html) for "our [EarthLink’s] HTML tag reference" that annoyingly led to a "Page Not Found" page.
I emailed EarthLink’s customer support, asking "Does EarthLink still have a reference page on HTML tags and/or attributes on its Web site, and if so, can you please send me its URL? Thank you." The response: "With regards to your inquiry about the given site, we are very sorry to report that we have no more reference page [sic] on HTML tags. To help you, you may use the search tool on http://www.google.com to get URLs about HTML tags." Pretty lame for an ISP of EarthLink’s stature, wouldn’t you say? But go to Google I did in my quest to learn more.
I soon found my way to HTMLGoodies. There are, to be sure, lots of sites on the Web that offer instructional material on HTML, but what sets HTMLGoodies apart, it seems to me, is that HTMLGoodies ‘assumes the least’ about a user’s beginning level of coding knowledge; in other words, it’s the most elementary of all the Web programming instruction sites that I’ve come across. Because I myself was starting from absolute scratch, I thus decided to have a go at HTMLGoodies ‘program’ and see what I could get out of it.
1) It begins with a series of 30 introductory Primers.
2) The Primers are supplemented with a series of "Script Tips".
3) Rounding things out is a collection of relatively more advanced tutorials.
As noted above, my blog will cover this material (or at least the Primers and Script Tips) in some depth.
Having said this, however, there is very much a limit as to how many stones I’m willing to throw at Joe. After all, Joe was the one who put all this stuff on the Web, where it can be accessed by people like me for free, in the first place. If I at times level criticism at Joe and HTMLGoodies, it is very much in the spirit of Sir Isaac Newton’s famous quote, "If I have seen further than others, it is by standing upon the shoulders of giants."
For anyone who might read or follow this blog, let me repeat for the record that I am NOT a professional programmer, nor any sort of ‘expert’; I am a hobbyist. My own inexperience is to blame if I say something that is confusing or wrong. Comments that can bring me up-to-speed on a particular point are always welcome, and if I can make heads or tails of what you’ve said, then I may discuss it in the blog and hopefully make it a "teaching moment" for us all.
Hyperlinks to other resources will be provided where relevant.
Some final notes on my ‘Web interface’:
- my computer is a vintage iMac 350 whose currently installed operating system is Mac OS 9.1; (old school, I know)
- as noted above, EarthLink connects me to the Internet;
- my preferred Web browser is Internet Explorer* (version on my machine: 5.1.6), although blogger.com is going to get me back into using Netscape.
(*I’m sure this disqualifies me from being a full-fledged member of the Cult of Mac; I also use Outlook Express as my email client, BTW.)