I let iGoogle move in about six months ago, mostly for the calendar and Gmail, and then I began to notice how popular the gadgets were. 1.3 million people have added Quotes of the Day, 500 thousand people subscribe to Current Moon Phase (huh?), and 14 million people are using Weather. To get a sense of these numbers, 3.5 million people use Gmail.
So I decided that my first project, post high school teaching, would be to write a gadget. The Google developer's guide indicated that the tools were JavaScript and XML, both of which I wanted to learn more about. Of course, this also seemed like a way of paying homage to our new master.
Prior to the gadget, I had assumed that JavaScript was a minor player in the HTML world, a way to add small decorations to your web page. For my son's web site, for example, I had written a few lines of code that displayed his current age on the main page. This became, in fact, the genesis for the gadget - Age Gauge - which would display a picture of your child (or grandchild, spouse) and their current age, in a variety of formats.
But JavaScript turns out to be a complete programming language, almost object oriented, that gives you powerful tools for manipulating the web display on the client side. Translation: it happens right in your browser, so you don't have the sluggishness associated with a server conversation. The technical name for JavaScript, by the way, is ECMAScript, which nobody uses. It sounds too much like a skin disease.
I'm not going to get into details of the programming here; you can get the code and a limited amount of documentation on the examples page. Instead, I want to describe a couple of ways in which the development process now differs from what I was doing in the previous century.
In 1998 and before, most of the time I was working with one language, and the languages were compact. C, for example, has something like fourteen words, and I can say anything I want to with those fourteen. Perl, by contrast, not only starts big (I'm not going to say a word about regular expressions), but seems to get bigger every five minutes. Want to (fill in the blank)? There's a package that does just that. In addition, I now use three or four languages daily, and the differences between them often lead me astray. In Perl, for example, "if statements" need braces; nobody else cares. JavaScript and Flash concatenate strings with plus, Perl and PHP with a dot.
The solution to this verbosity, of course, is Lord Google. I usually don't even bother going to the online language references. It takes too many clicks. I just ask Google to find "javascript concatenate strings" and the first or second hit gives me the answer.
Which leads me to the second big change in programming. If I didn't know the answer to a problem in 1998, and the guy down the hall didn't either, then I dug in and figured it out. The one book on my shelf was The C Programming Language. Now help is everywhere. When I was writing my second gadget, I hit an obscure snag related to communication between Flash and JavaScript. When I posted this question on a message board, someone was kind enough to write back the same day.
Even more than the message boards, examples abound. Before I wrote a line of code for Age Gauge, or even thought about it very much, I downloaded and dissected the source to Google's Todo gadget. The examples not only outline the general landscape of the problem, but they also give you the gritty details. In Todo, for example, I learned how to detect that an Enter key was pressed in various browsers.
Next week: Flash.
[ 2 comments ] ( 15 views ) | permalink
In The World of Mathematics, James Newman writes about Truman Henry Safford, who, at the age of ten, was able to square an 18-digit number in his head in less than a minute. While he was performing this incredible feat, however, he “flew around the room like a top, pulled his pantaloons over the tops of his boots, bit his hands, rolled his eyes in their sockets, sometimes smiling and talking.”
There are many days when I feel like that boy. Give me a minute to explain.
In 1965, I learned to program on an IBM 1620 (pictured). It was the size of a desk, but much heavier, owing to the fact that the 20k of memory in the base consisted of little hunks of iron (several years later, when I was teaching at the Woodberry Forest School, I broke my car jack trying to move the school’s 1620 a few inches.)I learned Fortran and assembly language on the 1620, which was pretty much what there was at the time. In 1977, when I left high school teaching to work as a programmer, the computer landscape was still very familiar. I worked for a couple of consulting companies in Washington on a wide range of projects, and while the problems were harder, the tools were essentially the same (mostly Fortran, with sprinkles of 360 assembly language and SAS).
In 1982, I started one company, in which I created Dr. Halo and other graphics tools, and later helped start (with Garry McDaniels) a second company, which produced the SkillsBank (now SkillsTutor) educational products. A lot of my work focused on the hardware (you try to make an Apple II do something interesting), but bit by bit, the hardware and the software tools evolved. I moved to C++ in 1996, which was a conceptual shift, but a completely natural one. It reminded me of a homology course I had taken in graduate school, in which the ideas of group theory and topology, already fairly abstruse, were abstracted one level further.
When I left SkillsBank in 1998, the web was not a factor in our development efforts. We were selling to the educational market, which had always been a step behind the times. We still produced Apple II versions of our products, for example, until 1994.
After SkillsBank, I went back to college, taught high school for several years, and now, nine years after I left it, have returned to the world of computers. I haven’t completely lost touch with technology – my work in education had led me to create a few web sites and develop some Flash applications – but a whole lot had changed behind my back. XML, Java, DOM, Ajax, PHP, MySQL, C#, Flex, Ruby. Not only are there a lot of acronyms, but I’m learning that if you want to accomplish anything useful, you actually have to know how to use them. On any given day, you’ll find me in my office, channeling Truman Henry Safford, all systems on overdrive.
What do you have to know now to make a living in the software world? This is what I’m going to write about. Along the way I will explain some of the technical problems I have encountered and solved in my work on various projects, and what I have found to be the best tools.
Next week: how to write a Google gadget.
[ 1 comment ] ( 17 views ) | permalink

Calendar



