January 14th, 2004
Christmas and New Year have come and gone and I haven't posted an entry for a long while. Initially this was because I was on holiday. More recently I've been spending most of my available time trying to finish off a technical manual I've been spending
way too long writing. The end is now in sight, so I may be able to think of other things again soon.
I spent some time yesterday trying to get to grips with some Javascript to make expand/collapse sections work in Mozilla, Opera and IE. I started with code based heavily on the way Microsoft do it in some of their HTML Help pages (e.g. there's a page about Accessibility in the online help for IE that uses expandable sections). The trouble is their way is a purely IE way and doesn't work in Mozilla. It uses IE-only Javascript properties like
innerHTML and
sourceindex – both of which are really useful, but I couldn't find Mozilla equivalents, so I had to start from scratch and write my own Javascript file. I'll post this up here sometime so that you can see how it works. What I came up with in the end works quite nicely and keeps the HTML very simple by doing all the formatting in a separate CSS file and using the Javascript to switch the class names of various elements onload, onmouseover and onclick. The images used for the expander links (+ and - icons) and the display properties ("block" or "none") of the expandable block are all defined in the CSS file. OK, it doesn't mean much until you see it!
I notice this week that Framemaker 7.1 has now been released. I have been given verbal approval to buy a copy at work, but I haven't yet managed to get a UK price for an upgrade copy. However, I'm not holding out
too much hope that 7.1 will solve all the round-tripping problems I had with 7.0. But I'll keep you posted.
Potentially similar posts
December 19th, 2003
I installed Visual Studio .NET 2003 last night. It took forever to install and by the time it finished I was too knackered to do anything other than check it was working. But I'm now ready to try my hand at a bit of C# programming.
Why am I even thinking about meddling with C#? It may seem a little dumb because I'm a technical author. I don't need to be able to code C#. But the reasons are historical.
In 1989 I was studying publishing and I needed a word processor. I bought myself an Amstrad PCW and fairly soon discovered that what I'd thought was just a glorified typewriter was actually a computer. It ran on the CP/M operating system and had a pretty good version of BASIC called Mallard BASIC. I used this to write simple games. The best of these was a program I called Chomp, which was inspired by PacMan. The trouble was that the more features I added to Chomp (different levels and configurable settings) the slower it ran.
I found out about C and it immediately seemed that a compiled program would obviously run must faster than an interpreted program. So I bought a copy of C for the PCW and started learning how to code in C. Straight away I was impressed by the way C helped you to write logically structured programs. I discovered the beauty of functions, and realised what a mess you can get yourself into with BASIC.
However, I then graduated and got a job and started a family and got married - all at about the same time - and stopped playing around with programming for several years. Then I quit the job I was doing, bought myself a computer and started freelancing. Now that I had a computer again I got back into coding. First I wanted to create an Access database for my business, so that involved learning how to use Visual Basic and learning more about database systems. Then I wanted to have my own website, so inevitably I came to know Perl.
Perl has been my programming language of choice for the last few years. It was originally specifically designed for working with text, so it's my kind of language. It makes sense to me and I find it easy to use. I like the fact that you don't have to worry about what type of data you assign to a variable, Perl figures it all out for you, and things are labelled with $, %, @, # so that you can see what they are at a glance.
But C was always there in the background as my first serious programming language. Over the summer I bought a C book for the first time since I bought the Kernighan and Ritchie book all those years ago, and I took it on holiday with me, with my laptop. I didn't plan to do any coding, but one night I thought I'd recreate a program I first wrote back in 1990, I think. It was the classic sentence builder program. You supply it with arrays of nouns, verbs, adverbs, adjectives, prepositions and conjunctions, and it churns out random, silly, but syntactically correct, sentences.
The kids had great fun running it and plugging in new words. And I felt that it was in some way educational for them - learning a little bit about grammar. Plus I was chuffed that I could still write C code.
So that's pretty much why I'm interested in C#. I pricked up my ears when I first heard about it a couple or so years ago, and I'd like to have some level of proficiency in a language other than Perl. Perl is always going to be more useful to me than C# - just because of what I do for a living and what Perl is very good at doing - but it would be nice to have a second string to my programming bow.
Needless to say, I've been reading up on the subject. I came across this useful website:
http://www.csharpfriends.comPotentially similar posts
December 17th, 2003
Switching to Thunderbird has, on the whole, been a good thing. However, one of the problems with IMAP is that, because your mail sits on the server, even once you've read it, you need to be able to access the server to see your mail. This morning I'm working from home (as I do most Tuesdays and Wednesdays at the moment) and I've been having problems getting through to my work network. I've just succeeded, on the third attempt. I don't usually have much of a problem. Occasionally it's very slow, depending on what people at work are doing on the network. But the logging on problem is caused by the dynamic IP address my ISP assigns me. The gateway machine for my work network only lets me in if I'm using addresses in a certain range. Usually my address is in that range, but this morning it obviously wasn't the first couple of times I dialled my Internet connection.
I'd like to go broadband, but at the moment I've got a free single-line ISDN connection, and I can't justify shelling out for what would be mainly an aesthetic improvement in my Internet experience.
But I must remember to copy my mail locally in Thunderbird, so that I can read it offline. There was a mail I got from someone at work that had an interesting article about why developers should use design specs, and I wanted to post it here. That'll have to wait. I need to do some work.
Potentially similar posts
December 16th, 2003
I went Christmas shopping at the weekend in Princes Street in Edinburgh. Princes Street is a long, straight street, with shops on one side and Princes Street Gardens on the other side, with Edinburgh Castle high above the gardens. At either end of the street is a Waterstones. I generally start at one end, spend half an hour or so in Waterstones, then fight my way along, through the crowds to the other end (visiting a few shops, as required), then spend maybe an hour in the other Waterstones, then either get a bus, or fight my way back along and pop in for one last browse. Inevitably I come back with more books than anything else, and usually at least some of them are for me.
So at the weekend I spent a good deal of time looking for starter books on C#. The problem was that the books are mainly either all incredibly dry code, code and more code, with no examples of real programs, or, if there are examples, they're all just little command line things. Or they're Visual Studio books that tell you all about how to draw a button and a drop-down list, but don't give you many examples of useful little Windows applications using C# - which is what I was after.
Anyway I settled on a couple of books: C# for Dummies and a nice big book on Visual C#. I'll digest these over Christmas.
When I was looking for C# info on the web I also came across the following site that has a big collection of links to C# development tools:
http://sharptoolbox.madgeek.com/Potentially similar posts
December 16th, 2003
IE has a vulnerability that allows the owner of a page to disguise the location of a page in the IE address bar. In the example this at:
http://www.zapthedingbat.com/security/ex01/vun1.htm
the page appears to a Microsoft page, with the address www.microsoft.com. In fact it's nothing to do with Microsoft.
I must admit using the domain in the address bar to reassure myself before filling in any online forms. I now use Firebird as my default browser. The trick described in the above link doesn't work in Firebird. But maybe some other trick does. Beware!
Potentially similar posts