Sunday, March 15, 2015

Relearning coding

Long, long ago in a galaxy far away in the days when personal computers and word processing programs were still a novelty, I attended a university that required graduate students to write their master's theses and doctoral dissertations using Script/GML on a mainframe computer. This didn't bother me much. I had attended Michigan Tech as an undergrad; MTU also encouraged students to write papers using Script/GML on the mainframe so unlike some of my colleagues I was already familiar with commands that created paragraph breaks or defined fonts. MTU, in fact, had a really nifty guide to Script/GML that had been written by an undergraduate in the Scientific and Technical Communications program. It was concise (under 50 pages IIRC), it was easy to follow, and it made perfect sense. Sufferers at VaTech, on the other hand, got stuck with a "user manual" that filled a 2-inch thick 3-ring binder and for all practical purposes was written in Urdu.

Within a few years, of course, the idea of using Script/GML for ordinary word processing was a thing of the past. Even at the time the university was telling grad students to use the mainframe, they were opening more and more computer labs where undergraduates and graduate students alike could use word processing programs like WordPerfect. Personal computers became more and more affordable, and unless a person was a total nerd and liked writing code for the fun of it (or worked in IT) most people forgot (or never knew to begin with) that GML had ever existed.

GML, or General Markup Language, is, of course, the ancestor of HTML, or Hypertext Markup Language. Those of us who blog know some bare bones HTML, like the commands for bolding text or inserting a link into a comment. Most of us would be thoroughly screwed, however, if we had to do anything that involved messing with the underlying architecture of a web page. What usually isn't obvious to the casual blogger or web site reader is that every web page is actually a table. Bloggers don't have to create that table: companies like Google or Yahoo or WordPress have already built basic templates that allow people with zero actual technical skills to create a web site, whether it's for a small business or for a blog, that looks good and doesn't require us to do much more than ordinary typing. We don't need to know how the cells on the table are defined; we're never going to have to worry about it.

Unless, of course, you find yourself in the awkward position of having to make updates to a website that was created using one host and then got transferred to another. That's when suddenly what you get to see are not nice neat blocks of text that would be remarkably easy to tweak. The days of being able to just log into Yahoo and make edits the way a person can log into Blogger and mess with blog posts are gone. Nope. The poor fool who's now the webmaster (mistress?) gets to use WinSCP to get into the bare bones of the website and work in HTML. What she gets to see is line after line of code defining first the table layout and then what goes into the different cells. A block of text that is multiple paragraphs on the website gets displayed as one line of text that goes off into infinity when it's displayed in HTML. That's when a person starts to wish that she had kept the Dream Weaver manual from a 2005 training instead of doing the ethical thing and leaving it at the office when she changed employers.

I am, in case there was any doubt, referring to the website for the Baraga County Historical Museum. Why the website had to move from one host to another is a long, unpleasant story. Suffice to say that what seemed like a good idea back in 2003, or whenever the museum's original website was created, turned out to be not such a hot idea eleven years later. The person who did the original work on the site became disabled so could no longer do updates, and there were problems with Yahoo. End result? The site is now hosted by Baraga Telephone (aka UP.net). If we have a problem with them, we can drive to the office and complain in person. Unfortunately, although they will provide some technical help, when it comes to the actual editing and updating that's our headache. Or, more precisely at the moment, mine.

Which is kind of why I'm wishing I remembered more from the days when I used GML. Not that it would help much -- HTML may have evolved from GML, but it has quite a few new elements. I had planned to work on updating the website while we're on the road. I can do that from any place we have an Internet connection. I'd also planned to have it all go faster than it actually has. I didn't realize until I actually got into the site to see the coding just how sloppy it all was (is?). Lots and lots of repetitive commands, for example, like multiple span definitions for no apparent reason, and other weirdness. It's been years since I had to do anything involving coding, but I know it should look a lot cleaner than this stuff does. HTML is very logical; this stuff just looks messy. In short, it's not just a case of fixing what's visible to site visitors; it's also a case of cleaning up the coding behind the scenes. The site was originally created using a Yahoo template; one can only assume that's where most of the sloppy stuff originated. I guess it's kind of like making a dress: if it looks good on the side people see, no one cares much about all the knots and snarled thread hiding on the inside of the seams.

On the other hand, the lines of code are starting to make sense, I've succeeded in cleaning up a few typos in the text (although there are still some huge glaring ones I haven't gotten to yet), I removed some dead links from a page referencing other sites relating to Baraga County, and I've begun improving the Publications page. (Take my word for it -- it's better now than it was a week ago.) Baby steps. If past experience is any guide, if I can manage to do a little bit every day or so, it won't take me too much longer to figure out what I need to do to clean up all of the problems.

In the meantime, if either of my two readers knows anything about HTML, take a look at the museum's home page and tell me what to look for to fix that annoying problem with the menu on the left. The background color makes it just about impossible to see the links to the other pages. It's a puzzle I know I'll eventually solve, but being handed a hint to speed the process along would be nice. Kiitos paljon.

5 comments:

  1. The green on the left side isn't so bad if the links text was yellow. Boy, been so long since I've done any coding that I can't help you.

    ReplyDelete
  2. Look at the line starting with <body ...

    You will see something saying 'link="#0000CC" vlink="#0000CC" as part of the tag. That is where link colors are set for the page as a whole. There does not appear to be anywhere else in the page that sets link colors.

    To set the link color to something different you'll need to define a style for that left margin, so that the link color doesn't change for everywhere else (where the dark blue makes sense). This is done with what's called CSS, or Cascading Style Sheets, which is a bag on the side of HTML to allow changing the styles of multiple HTML elements from one place at the top of the script. Here's a dummy guide for CSS that seems pretty good:

    http://wendypeck.com/css101.html

    You'll want to create a class for that left margin. Call it "menu", LOL! Then in your stylesheet (see the above link) you'll want to follow the directions given in the tutorial above for setting those colors. That tutorial tells you *exactly* how to make your left menu's links be the color you want them to be.

    You can use an HTML color picker like http://www.w3schools.com/tags/ref_colorpicker.asp to pick a color and turn it into the funny #xxyyzz numbers that CSS wants.

    That is probably all I can put into a comment. Feel free to email me at badtux99 @ gmail.com if the above links don't give you what you need.

    -E

    ReplyDelete
  3. There must be all kinds of DIY videos on Youtube. I find DIY videos very helpful. Greatest sales tool ever invented. First you watch the video; then you phone someone who actually knows how to do it.

    ReplyDelete
  4. BadTux, thank you! I'd have eventually figured it out, but this will speed things up. I figure that if I change the style for that page so it matches the way the styles are set for the other pages, it'll be more readable. All the other pages have the links in black against white; why the home page is different is a mystery. But then so are innumerable other things I've had to deal with since becoming involved with the museum. Well meaning amateurs can create some interesting snarls.

    ReplyDelete
  5. Anything I tell you would be dangerous.

    ReplyDelete

My space, my rules: play nice and keep it on topic.