I Don’t Know How To Program

My case of “coder’s block” was unwarranted–though very real. I feared trying my ideas. I put everything off as long as I could. What a fool I am.

I am creating a website for a friend. It’s almost done, but it’s still at the stage where the “robots.txt” file is telling Google and Yahoo to stay away. It’s built on WordPress, a program I hardly know… in fact, until this project I’d never used it. I love it now.

Yeah WordPress, I love you.

This weekend I was going to enable some menus for the website. The site owner wanted them ordered in a specific way with some items excluded. I guessed at how it could be done. I anguished over it. I put off coding it. I didn’t start until 1:00 AM this morning!

It worked the first time. I’d ad libbed something the program wasn’t set up to do but was still capable of doing. One glance at the documentation was all it took. This program is great!

My case of “coder’s block” was unwarranted–though very real. I feared trying my ideas. I put everything off as long as I could. What a fool I am. This, unfortunately, is the story of my life. It is the weakest part of me. I hope my daughter doesn’t inherit this trait.

I enjoy programming. It is a very logical experience. I’d like to do more.

When you do something right the result is predictable and dependable. I wish I knew more about more languages. WordPress with its simple scripting language is easy. PHP, Perl, and Javascript–not so much.

There are things I’d like to do if I only knew how.

Something New On This Site

I remember the battle cry of the Internet entrepreneurs of the late 90’s: “Content is King!” I’m not sure whether that’s true, but I do enjoy adding fresh content to the website, especially if it is ‘live’ data.

That’s what I did today in adding weather advisories from Connecticut, where I live, and the rest of the United States. Of course, it’s not quite that simple. It was important to me that the data fit in with the look and feel of this site and that it be as fresh as possible.

The Weather Service has just started producing RSS feeds of this data. All I needed to do was find a way to convert it to a web readable format and I’d be on my way. I found a Perl program called JSMFeed.pl and installed it on the server. It produces a javascript file which can then be converted and inserted into my pages.

All I had to do was write the few short lines of code to do it. Considering I can’t explain any of what I wrote in the previous paragraph, this was going to be tough.

Javascript is a language I don’t know and have never written in. Luckily, once you know one programming language, you have an idea how to write in all of them, and the web is loaded with resources to help show you the proper usage.

Unlike high school, spelling and proper syntax do count. Misspell anything, or misplace anything in the program, and it won’t work… or worse, it will work but will subject your computer to an endless stream of gibberish.

My friend Kevin, who speaks a little javascript, was my mentor this afternoon. He’ll tell you he didn’t show me what to do. But having him on the phone allowed me to bounce ideas and move the process forward. Without Kevin, this wouldn’t have worked.

I also have to thank the folks (or person – who knows) at Creativyst, who donated this program for others to use for free.

If you’d like to try this new addition out, it’s on the right hand side of the screen. Just click a link and have fun.

Who Came Here in 2003

I don’t have an incredibly long history as a webmaster. So, for me, it’s often confusing and at the same time interesting to peek at the inner workings of this site. I have owned the domain name geofffox.com for a few years, but it’s only been since late July that I’ve mounted this blog and photo gallery.

My webserver is actually located in Chicago, and run by hostforweb.com. It is shared with other small websites. I have access to most of the server’s guts through shell programs.

In order for you to see what you’re reading now, I have to upload all the files and images and programs from home. There are a number of programs, like the one that produces the weather forecast meteograms that run on clocks and execute a few times a day. I had to write the scripts to do that too.

Running this website has forced me to learn a little about a bunch of computer disciplines, like php, Perl, bash shell scripts, html and a veritable alphabet soup of minutiae. It’s been challenging and like Blanche Du Bois, I am often dependent on the kindness of strangers. The more I learn about computers, the less I realize I know.

With the year over in less than four hours, I though I’d summarize a little of what’s gone through this site in 2003. Since it was only born in July, the stats are (hopefully) less than what I’ll get to publish in 2004.

7.76 GB That’s the total amount of data I’ve spit out. It melts down to 10 CDROM’s worth… or a few DVD’s. The majority of my hits go to the United States, but most of Europe and the Pacific Rim are represented as well.

271.69 MB That’s what Google slurped up. Loads of spiders and crawlers moved through the site, picking up the data that goes into search engines. Google took down nearly 5 times as much data as the next biggest search engine and was responsible for 6711 page views by users. I have chronicled elsewhere my rise in the Google rankings – a feat which both intrigues and fascinates me.

Giblet gravy That’s the most used search engine phrase that sent people to the site. They must have been disappointed because I used the phrase to illustrate a point that had nothing to do with cooking. The next most requested phrase was Scotty Crowe, John Mayer’s road manager.

Thanks to everyone who’s written to ask me for John’s email address. Even if I had it, I couldn’t give it out. You will be glad to know your admiration is not misplaced. There’s a whole lot to admire about John. I don’t think he’ll be spoiled by success.

I’m not sure how or why, but people searching for dangerous Internet cafes in las vegas nv and she had to remove her shoes airport ended up being sent to geofffox.com.

My cousin Michael and his wife Melissa in Sunny Southern California became blog readers. More than anyone, Michael made me realize I could use an editor from time-to-time. I try to spell and grammar check, but you need a dispassionate eye too.

My dad reads the blog every day. That pleases me more than he’ll ever know.

From time to time I’ve looked at my logs, seeing where readers are coming from. There’s someone at NBC in NY who reads pretty regularly, same at the vendor of our station’s weather equipment and Mississippi State University, where I’m taking courses. Most readers are connecting through residential addresses, but I’m amazed by all the different companies and universities that are listed.

Once, I made reference to probes of my home computer by a virus ensconced in a PC at a San Fransisco Honda dealer. I made an analogy that used the word ‘doorknob’. A few days later a computer at a doorknob manufacturer downloaded a significant portion of this site. They’ll be as surprised as the giblet gravy crowd.

In 2003 approximately 17,000 separate viewers came calling to this site. Collectively you visited 30,000 times, downloading 872,000 files. My page counter now sits just north of 60,000.

Every word I write is read, re-read, edited, punched up and perused again before it goes online. One of the more pleasant surprises of blogging is how challenging and how much fun it is to write. I never felt that way about writing before.

Often it is a cathartic experience, allowing me to get something off my chest. Other times it’s fun to let you in on something I observed and want to share.

My family puts up with this to a point. I reveal a lot in this blog, but not everything. A friend wrote to tell me he was surprised to see this ‘warts and all’ self assessment. If there are warts here, they are a small portion of my own personal wart colony. Like most people, I keep a few skeletons in my closet.

Thanks for reading. It really means a lot to me. Really.

Oh My God!

I woke up this morning and took a quick look at the web page and all of a sudden, it was September 1st!

Reload. Same thing!

It seems my host ( www.hostforweb.com ) had a crash of a RAID array, and their latest backup was 2 weeks ago. Everything – gone.

And, it’s not only what you see here on the front page, but also programs I wrote in perl and all sorts of customizations and changes.

Words alone cannot express how upset I am.

More later.

What I’m Working On

Note: I know a lot of people are linking here looking for my fake hurricane photo. You can find it by clicking here. When you’re done, you might enjoy the rest of my blog, starting with today’s entry.

I found a very cool applet called Weathergraph. The idea is to chart a graph of temperature, windchill/heat index, and wind on 4 graphs; daily, weekly, monthly and yearly. Because of a graphing database tool call RRD, the database stays the same size even as the graphs ingest more data.

If it were only this easy.

The program required installing a Perl (Perl is an interpereted computer language heavily used in web applications) module call Geo::Metar and RRD Tool. So I won’t become a pain in the butt to my webhost, I decided to install these myself… local to my site. I bet if I knew Perl or even Bash scripting this would have been easier.

Perl modules don’t want to be installed locally, and when they are… they cry.

There’s a concept in Linux (which is what geofffox.com runs on) called ‘superuser’ or su. I don’t have that privilege on this server. That means there are lots of things I can’t do. Many of those would make all of this easier.

I got it done, but please don’t ask me to retrace my steps. I have no idea!

Immediately, I realized I didn’t care as much about windchill/heat index as I did in dew point. No problem. Just rewrite the program.

Again, I don’t know Perl. But, I’ve come to the conclusion that most computer languages are very similar, and with the help of a few books, I think I figured it out.

Unfortunately, every time a graph was plotted, the dew point and temperature were the same. No good.

Back to the program. If you’ve never seen what computer programs look like, here’s a small sample:

$req = new HTTP::Request GET =>

“http://weather.noaa.gov/cgi-bin/mgetmetar.pl?cccc=$site_code”;

$response = $ua->request($req);

if ($response->is_error) {

$failed[$i] = $response->as_string;

sleep(90);

}

}

if ($response->is_error) {

for ( $j = 1; $j <= 5 ; $j++){ print $failed[$j]; } die;

I’m still not 100% sure (because once this program gets running it takes a significant amount of time before it will actually plot a graph) but it seems like the problem was in the windchill/heat index routines. I had turned all mentions of windchill/heat index into dew point, but didn’t realize the program still wanted to apply the rules of windchill/heat index to the dew point. And tonight, there is no windchill or heat index.

I pulled that section of code from the program.

This may be way beyond me. Who knows? I am nothing more than a 53 year old ‘script kiddie.’

When the graphs go ‘live’, I’ll post an announcement. I expect to have one for each ‘official’ weather station in connecticut and maybe a few others. Each graph will cost me 233 Kbytes of my limited space.

New York City trip – The Producers

Ivy the dog is still in the hospital There was some improvement today, which I’ll get to later. Still, Helaine felt it was best for her to stay home… and she did.

Steffie and I took our three tickets to see The Producers, got in the car around 9:00AM, and headed into New York City. After Dunkin’ Donuts and gas (there’s a joke here somewhere), we hit the open road, convertible top down.

This was actually risky. The mostly cloudy sky turned overcast as we moved west from Bridgeport (In Connecticut, the east-west Connecticut Turnpike is labeled north-south. This makes a geographically challenged adult population even more confused). I expected to have to pull over, under an underpass, at any moment to get the top up. But, by the time we hit the Cross Bronx Expressway, the sun had returned and the air began to get steamy.

The trip to New York, though shared with lots of other cars, was never hampered by traffic.

We followed the CBE to the West Side Highway (following the Last Exit in New York signs) and headed south along the Hudson River. The view to New Jersey was a little hazy. The river itself was pretty empty.

I parked the car ($30, thank you) on West 44th Street, just west of 8th Avenue. I always put up the top when parking, even in attended parking, and that was a good thing, since it later rained.

It was near 11:00 AM and the show wasn’t until 2:00 PM, so we headed into the subway at the corner and went downtown to Canal Street.

For some unknown reason, I thought the IRT #1 train would be the closest (it wasn’t). I mention this, because the subway stairs at 8th and 44th bring you to the 8 Avenue Line IND station with connecting corridors to the IRT (mentioning IND and IRT only helps to show I’m getting older. These labels, a throwback to the era when some subways lines were privately owned, haven’t been used in decades.) It seemed like we were walking to Canal Street as the narrow, tiled, dingy, hot tubes led up and down, left and right, until we were on the downtown platform. We took the express a few stops and then walked across the platform to take the #1 to Canal.

New Yorkers leave the city in droves during the summer, and I’m sure that’s especially true for Labor Day weekend. At the same time tourists pour in. Canal Street was jammed.

Maybe I’ve mentioned this before, but I’m sure Kate Spade, Christian Dior or Louis Vuitton (is there really a Louis Vuitton?) would clutch their collective chests and fall to the ground in cardiac arrest if they ever saw Canal Street. Everything is a knock off… but a nearly perfect knock off.

When a bag says Prada on the outside, it also has Prada on the hardware and Prada “franked” on the leather inside. It’s a pretty thorough job.

Today, I actually stopped as I bought a bottle of Poland Springs water from a vendor, thinking maybe it too wasn’t the real thing. Hey, it’s Canal Street, who knows?

I continue to look, to no avail, for a Breitling combination analog/LCD watch. Obviously, Breitling has them, but that’s a little out of my price range for a watch… maybe not for a car, but for a watch.

Steffie went bag, wallet and shoe shopping. Is it an obsession? Sure. There should be some 12 step program to get her back on the right track. But, at least on Canal Street you can indulge your fantasy. She bought a few things, including some shoes she had been lusting after.

I found a few computer books. One was on Perl, a computer language (which will not make my spell checker happy) used on websites like this one, that I want to learn. The second had to do with Cascading Style Sheets. Again, it’s a concept used on this website and something I had heard about for years without understanding. Like Perl, if I’m going to administer this site, I need to learn at least a little bit about it. Books on Canal Street go for 1/2 retail price or a little less.

A few Canal Street observations. There is a street side display ad for Tag Heuer watches. These watches are sold on Canal Street… they’re just not real. It’s an odd place for an ad like this.

Canal Street is old and tired. There hasn’t been new construction here since the 1930’s or maybe earlier. Little shops are crammed into spaces no larger than a small closet. And, my guess is, this was never an upscale neighborhood, even back in the day. That’s why it was interesting to see beautiful detail work on some of the older industrial buildings.

Finally, even in the midst of urban congestion, people find comfort in things growing. I found this ‘city garden’ on a fire escape. There’s no doubt it’s against fire code, but it is nice to see.

With a 2:00 PM curtain, we headed back into the subway and north to the 42 Street stop on the E train. Up the stairs and, astoundingly enough, we were a half a block from the theater. But, there was a problem. We had Helaine’s ticket!

A try outside the theater yielded nothing. It didn’t seem like the right place to sell it. So, we headed to the TKTS booth in Duffy Square. This is where you’d likely find people looking for tickets, and Producers tickets were always tough to come by.

I walked parallel to the line at TKTS. “Single ticket to The Producers.” Once, twice, three times… and then as I was about to try one more time, Steffie turned me to a woman in line who was interested. She asked how much? I hadn’t thought about it, so asked her to make me an offer. She said half, and the deal was done.

As it turned out, she was Japanese, in New York by herself (though she said she had friends there) and had only come in earlier in the day. She was about to sit dead center in the 6th row, and I was subsidizing 50% of the cost.

The Producers was excellent. It is everything the movie was, though the story has been adapted and simplified for the stage. The current cast is considered “B” next to Matthew Broderick and Nathan Lane. Even then, like most New Yorkers, some of the biggest players were out-of-town, replaced by stand-ins. Lewis J. Stadlen, the lead, was replaced by John Treacy Egan, which meant Egan was also covered by an understudy.

I would very much like to see the show again, with Nathan Lane and Matthew Broderick. As the originators of Bialystock and Bloom, and with the theatrical clout to be a little ‘over the top’, my guess is they bring the show up a few notches.

The dialog and sensibility of the show was pure Mel Brooks. You could hear his voice in nearly every line. And, in fact, his voice was heard (lip sync’ed by an actor) during Springtime for Hitler; “Don’t be stupid, be a Smarty – sign up with the Nazi Party!” I believe he did this line in the film as well.

Brad Musgrove as the astoundingly gay Carmen Ghia was a hoot. He got the biggest ovation of the non-principals.

After the play broke, we headed away from the car, and back toward Times Square. Steffie wanted a henna tattoo, which we never found.

We did see a few things in Times Square that you only see in Times Square. The most notable is the “Naked Cowboy.” It is, stripped to its essence, a man wearing a cowboy hat, boots and underwear. That’s it. He charges to pose for photos, and does a pretty brisk business.

For the cowboy challenged, there was also Spiderman, available for a price. In the spirit on New York, I doubt any of his take goes to the copyright owner.

What we did find was rain! What had been a sprinkle as we left the theater turned into a downpour. We were near 42nd Street by this point, so we headed to the ESPN Zone. With a 30 minute wait, we turned back up Broadway and ended up at Planet Hollywood.

When in Times Square, Steffie and I eat at Planet Hollywood more often than not. The food was fine, but more importantly, the restaurant was dry. We were soaked when we got in. Luckily, the camera, books, bags, shoes and the like were in plastic bags. Steffie’s purse had been outside, but tonight, it seemed none the worse for water.

We headed back to the car, only to run into the New York City Fire Department. Something was going on above West 44th Street. Four or five pieces of fire rolling stock and at least a dozen, firefighters (each wearing oxygen packs) stood around chatting as a ladder was extended from a truck and two firefighters climbed to the roof of the theater adjacent to the St. James (where The Producers plays).

If there was cause for alarm, it was well hidden. No one was breaknig a sweat. Steffie wanted to stay and watch, which we did for a few minutes. But, as time went on, it became clear that whatever was going on, was going on out of sight… and wasn’t all that dramatic.

By 6:00 we were in the car, turned north on 8th Avenue, and headed home… with the top down.

Best of New Haven Advocate

Ivy the dog is still in the hospital There was some improvement today, which I’ll get to later. Still, Helaine felt it was best for her to stay home… and she did.

Steffie and I took our three tickets to see The Producers, got in the car around 9:00AM, and headed into New York City. After Dunkin’ Donuts and gas (there’s a joke here somewhere), we hit the open road, convertible top down.

This was actually risky. The mostly cloudy sky turned overcast as we moved west from Bridgeport (In Connecticut, the east-west Connecticut Turnpike is labeled north-south. This makes a geographically challenged adult population even more confused). I expected to have to pull over, under an underpass, at any moment to get the top up. But, by the time we hit the Cross Bronx Expressway, the sun had returned and the air began to get steamy.

The trip to New York, though shared with lots of other cars, was never hampered by traffic.

We followed the CBE to the West Side Highway (following the Last Exit in New York signs) and headed south along the Hudson River. The view to New Jersey was a little hazy. The river itself was pretty empty.

I parked the car ($30, thank you) on West 44th Street, just west of 8th Avenue. I always put up the top when parking, even in attended parking, and that was a good thing, since it later rained.

It was near 11:00 AM and the show wasn’t until 2:00 PM, so we headed into the subway at the corner to head to Canal Street.

For some unknown reason, I thought the IRT #1 train would be the closest (it wasn’t). I mention this, because the subway stairs at 8th and 44th bring you to the 8 Avenue Line IND station with connecting corridors to the IRT (mentioning IND and IRT only helps to show I’m getting older. These labels, a throwback to the era when some subways lines were privately owned, haven’t been used in decades.) It seemed like we were walking to Canal Street as the narrow, tiled, dingy, hot tubes led up and down, left and right, until we were on the downtown platform. We took the express a few stops and then walked across the platform to take the #1 to Canal.

New Yorkers leave the city in droves during the summer, and I’m sure that’s especially true for Labor Day weekend. At the same time tourists pour in. Canal Street was jammed.

Maybe I’ve mentioned this before, but I’m sure Kate Spade, Christian Dior or Louis Vuitton (is there really a Louis Vuitton?) would clutch their collective chests and fall to the ground in cardiac arrest if they ever saw Canal Street. Everything is a knock off… but a nearly perfect knock off.

Today, I actually stopped as I bought a bottle of Poland Springs water from a vendor, thinking maybe it too wasn’t the real thing. Hey, it’s Canal Street, who knows?

I continue to look, to no avail, for a Breitling combination analog/LCD watch. Obviously, Breitling has them, but that’s a little out of my price range for a watch… maybe not for a car, but for a watch.

Steffie went bag, wallet and show shopping. Is it an obsession? Sure. There should be some 12 step program to get her back on the right track. But, at least on Canal Street you can indulge your fantasy. She bought a few things, including some shoes she had been lusting after.

I found a few computer books. One was on Perl, a computer language (which will not make my spell checker happy) used on websites like this one, that I want to learn. The second had to do with Cascading Style Sheets. Again, it’s a concept used on this website and something I had heard about for years without understanding. Like Perl, if I’m going to administer this site, I need to learn at least a little bit about it. Books on Canal Street go for 1/2 retail price or a little less.

A few Canal Street observations. There is a street side display ad for Tag Heuer watches. These watches are sold on Canal Street… they’re just not real. It’s an odd place for an ad like this.

Canal Street is old and tired. There hasn’t been new construction here since the 1930’s or maybe earlier. Little shops are crammed into spaces no larger than a small closet. And, my guess is, this was never an upscale neighborhood, even back in the day. That’s why it was interesting to see beautiful detail work on some of the older industrial buildings.

Finally, even in the midst of urban congestion, people find comfort in things growing. I found this ‘city garden’ on a fire escape. There’s no doubt it’s against fire code, but it is nice to see.

With a 2:00 PM curtain, we headed back into the subway and north to the 42 Street stop on the E train. Up the stairs and, astoundingly enough, we were a half a block from the theater. But, there was a problem. We had Helaine’s ticket!

A try outside the theater yielded nothing. It didn’t seem like the right place to sell it. So, we headed to the TKTS booth in Duffy Square. This is where you’d likely find people looking for tickets, and Producers tickets were always tough to come by.

I walked parallel to the line at TKTS. “Single ticket to The Producers.” Once, twice, three times… and then as I was about to try one more time, Steffie turned me to a woman in line who was interested. She asked how much? I hadn’t thought about it, so asked her to make me an offer. She said half, and the deal was done.

As it turned out, she was Japanese, in New York by herself (though she said she had friends there) and had only come in earlier in the day. She was about to sit dead center in the 6th row, and I was subsidizing 50% of the cost.

The Producers was excellent. It is everything the movie was, though the story has been adapted and simplified for the stage. The current cast is considered “B” next to Matthew Broderick and Nathan Lane. Even then, like most New Yorkers, some of the biggest players were out-of-town, replaced by stand-ins. Lewis J. Stadlen, the lead, was replaced by John Treacy Egan, which meant Egan was also covered by an understudy.

I would very much like to see the show again, with Nathan Lane and Matthew Broderick. As the originators of Bialystock and Blum, and with the theatrical clout to be a little ‘over the top’, my guess is they bring the show up a few notches.

The dialog and sensibility of the show was pure Mel Brooks. You could hear his voice in nearly every line. And, in fact, his voice was heard (lip sync’ed by an actor) during Springtime for Hitler; “Don’t be stupid, be a Smarty – sign up with the Nazi Party!” I believe he did this line in the film as well.

Brad Musgrove as the astoundingly gay Carmen Ghia was a hoot. He got the biggest ovation of the non-principals.

After the play broke, we headed away from the car, and back toward Times Square. Steffie wanted a henna tattoo, which we never found.

We did see a few things in Times Square that you only see in Times Square. The most notable is the “naked cowboy.” It is, stripped to its essence, a man wearing a cowboy hat, boots and underwear. That’s it. He charges to pose for photos, and does a pretty brisk business.

For the cowboy challenged, there was also Spiderman, available for a price. In the spirit on New York, I doubt any of his take goes to the copyright owner.

What we did find was rain! What had been a sprinkle as we left the theater turned into a downpour. We were near 42nd Street by this point, so we headed to the ESPN Zone. With a 30 minute wait, we turned back up Broadway and ended up at Planet Hollywood.

When in Times Square, Steffie and I eat at Planet Hollywood more often than not. The food was fine, but more importantly, the restaurant was dry. We were soaked when we got in. Luckily, the camera, books, bags, shoes and the like were in plastic bags. Steffie’s purse had been outside, but tonight, it seemed none the worse for water.

We headed back to the car, only to run into the New York City Fire Department. Something was going on above West 44th Street. Four or five pieces of fire rolling stock and at least a dozen, firefighters (each wearing oxygen packs) stood around chatting as a ladder was extended from a truck and two firefighters climbed to the roof of the theater adjacent to the St. James (where The Producers plays).

If there was cause for alarm, it was well hidden. No one was breaknig a sweat. Steffie wanted to stay and watch, which we did for a few minutes. But, as time went on, it became clear that whatever was going on, was going on out of sight… and wasn’t all that dramatic.

By 6:00 we were in the car, turned north on 8th Avenue, and headed home… with the top down.