Archive

Archive for the ‘activities’ Category

Science and Art

August 29, 2014 Leave a comment

My loyal readers might have noticed that I haven’t written a blog post for a while despite the abundance of source material I could have used. There is a simple explanation for this: I am working on too many other projects just at the moment and have tended to spend time on those instead. Contrary to what you might think I do spend a reasonable amount of time researching, writing, and revising each blog post and they’re not just tossed together in 5 minutes!

Most of what I am working on currently are programming projects which all seem to have become critical at the same time. But that doesn’t really worry me because (and I’m sorry if this sounds really geeky) programming is fun. It’s one of those rare creative activities which results in something which is actually useful (well, at least in most cases).

When I create a new system (and my current projects all involve web-based databases and apps written using PHP and MySQL) I like to create something which is easier to use, more reliable, faster, and just generally more elegant than the alternatives. There are some pretty impressive web-based systems out there now but there is a much greater number of truly terrible ones, so in general I just hope to raise the average a bit.

It’s quite amusing using another person’s web system and noticing all the design and functional errors they have made and smugly thinking “amateurs! my projects never suffer from that problem!” Of course, I shouldn’t be too smart because every system has its faults.

As I have said in the past, programming is a great combination of art and science, or at least it should be because both are required to get the best outcome. The art component doesn’t just involve superficial factors like graphics and typography, it is deeper than that and requires creation of a friendly, logical, and flexible user interaction. The science component should be obvious: programs must be technically correct, perform calculations accurately, but also more subtly be fault tolerant, easy to enhance, and interact with other systems properly.

All of this is not easy to achieve and I have made plenty of mistakes myself, so it is even better when something does magically come together in a positive way. And that description is significant because the way I work a project is an evolving, organic thing which often changes form and function as it progresses. I always have a plan, diagrams for the database structure, flow diagrams for the general functional flow of the program, and technical notes on how certain functions should be performed before I start coding, but by the time the project is finished all of these have changed.

And I am often asked to write technical documentation while I am creating a new system but that is useless because I change the details so often that it’s better just to write that documentation when the project is complete.

When I look back at old projects I am sometimes amused at the naive techniques I used “back in the day” but more often I am quite amazed at some of the awesome, complex code and clever techniques I have used. It’s not usually that I set out to write really clever, complex code, it’s more that as more functions and features evolved the code became more and more impressive. But it is too easy in that situation to let things become convoluted and clumsy. In that case I toss that section out and start again. Sometimes my systems take a little bit longer to complete but they always work properly!

And that brings me to my last design philosophy. I don’t re-use a lot of code, I rarely recycle libraries and classes, and I definitely avoid using other people’s code. Also I don’t use rapid prototyping tools and I don’t use graphical tools to create markup code like HTML. No, it’s all done “on the bare metal”.

In fact that’s not really true, or course. I was recently tidying up some shelves in my office and found some old machine code programs I wrote back on the 80s. Now that was really coding on the bare metal! Multiplying two numbers together was a big job in that environment (the 6502 had no multiply instruction) so PHP and hand-coded HTML are pure luxury compared with that!

Well that’s enough talking about it, it’s time to get back to doing it. I’ve got a nasty bit of database backup code to debug right now. Some sort of privileges error I think, time for some science and not so much art.

Advertisements

Low Flying

April 12, 2012 Leave a comment

Last Sunday I did my usual biennial visit to the Warbirds Over Wanaka air show. I left about 7.30 in the morning and was there by about 10.30. Yes, I did a bit of “low flying” getting there (I won’t mention my maximum speed here) and got my first speeding fine for about 2 years. But I just see the occasional speeding fine as an added cost of driving. I know other people who have been let off with a warning for doing more than I did, so the whole thing is just not fair! (See my other blog entries for similar experiences of “Fred”.)

Once I got there I enjoyed the low flying of the various aircraft on display. I don’t think the show was quite as good as some in the past but it was still well worth attending, even though a lot of what was shown I had already seen in past shows.

One of my favourite planes is the Hawker Hunter and that flew at the show. I also saw a few planes I hadn’t seen before, such as the Avenger, Fokker D.VIII, Strikemaster, and Agusta 109 helicopter.

I did my usual photography, both still and video, and got some pretty brilliant photos (and I say that with all appropriate modesty). My report on the show, with photos, videos, and commentary is here.

It Worked!

May 19, 2011 Leave a comment

I’m not going to comment on the pathetic excuse for a budget our (New Zealand) government had the temerity to release today. I’ll think about it for a while and then comment. Maybe after that time I will have seen some merit in it, or more likely it will seem even worse than it does now!

No, in this entry I want to comment on something far more positive: how well my server transition went yesterday. For a few years now my main web server has been an old Power Mac G4 and I wanted to upgrade to something slightly more modern: a Power Mac G5 (yes, I did say it was only slightly more modern).

The problem is that my server runs 8 web sites, although only one is very substantial, and has many databases running in the background. There are also some custom configurations it requires to run. Of course I wanted the web sites to be down for the minimum amount of time during the transition. Oh, and to make things slightly more complicated I had to do all this in my spare time between doing “real work”.

There was one factor on my side though: I was using Macs!

As you can probably tell from my triumphant tone (and the title of this blog) it worked really well! All of the web sites are running correctly. The databases (including this blogging system) are all running as expected, and the new system is significantly faster than the old one (although the upstream speed of my internet connection is still a bit slow for this purpose).

So I installed new hardware, a much more modern operating system, new versions of PHP, MySQL, and Apache, and the latest versions of all the web sites, plus I maintained the data (over a million records) from all of the databases with a total down time of about 2 minutes. And now, 24 hours later, I haven’t found any problems.

So that’s my happy computer story. On most days I encounter enough weird computer problems which I have to waste a lot of time to solve, so it’s nice to win for a change!

Old Books

April 22, 2011 1 comment

Over the years I have bought a lot of computer books. I’ve bought books about programming and other practical technical subjects, textbooks I used when I was a computer science student, and lots of magazines and other material about general computer subjects. They have been sitting on a bookshelf in our spare room and I haven’t used any of them for years.

Today we needed to clear some space and I went through the books and realised that they were almost all useless. The hardware, the programming languages, the application programs, and most of the techniques have changed so much that practically none of the books were relevant any more.

Not only that but I don’t use traditional books any more. All of my technical documentation, my reference material, and my user manuals are stored on my computer as PDFs and other formats. And my fiction books and magazines are on my iPad in electronic formats like EPUB. I really do seem to have made significant progress towards achieving a paperless life.

Some simple calculations show just how efficient computer storage really is. A 1 terabyte drive (not huge by modern standards) can store 1 million average size books. Sure, I agree that is just text (based on 2K per page and 500 pages per book) and graphics would require significantly more storage, but the basic principle is clear: one drive can store a lot more than the total knowledge of the ancient world found at the Great Library of Alexandria – and I currently have 10 drives!

When I was looking through the old material I realised that things have progressed greatly in most ways but I also realised there was a lot of older stuff which was actually really good and is either no longer available or has become unfashionable in some way.

One example is Hypercard, Apple’s program which was extremely popular for making “stacks” which performed many varied tasks. Hypercard was a great fast development environment with a scripting language which was both easy to use and powerful. And while I’m on the subject of programming languages, I still think Pascal is better than C! But I never liked some of the other older languages much so the three programming manuals for COBOL I had never got much use!

I’m not sure whether electronic books are better than paper books from an environmental or sustainability perspective. I’m not sure whether ebooks are more natural or pleasant to use than paper books. But I am certain that ebooks are a lot easier to search and a lot easier to keep up to date. And they are certainly a lot easier to store!

I Have Nothing to Say

April 12, 2010 Leave a comment

I have been writing this blog for a long time – since before most people even knew what a blog is in fact. My first blog entry was written over 7 years ago in April 2003. Since then I have written well over 1000 entries which are the equivalent of about 900 A4 pages of text. Then there’s all the comments: over 2600 on my main blog (which I wrote about half of) plus many more on other blogging sites I publish the same information on.

So writing blog entries is a big commitment and one that I can’t keep up with at all times. There are so many interesting issues I want to comment on: from new discoveries that our universe might be part of a multiverse to the (inaccurately reported) news that Richard Dawkins wants to arrest the Pope!

But I have been blogging less recently and that will probably continue for a while because I have so many other commitments which I need to use my spare time pursuing. I’m afraid that most of them are work related: web sites, databases, and other geeky computer stuff, but hopefully that will lessen as time passes and I might get back to the “glory days” of mid 2008 when I wrote something almost every day.

So really it’s not that I’ve got nothing to say but more that I don’t have time to say it. Or at least not in a reasonably lucid form which has been reasonably thoroughly checked and is backed up with at least a basic amount of research. So I’ll get on with that work now and get back to the Pope being arrested later – hopefully in the near future.

Warbirds 2010

April 5, 2010 Leave a comment

Yesterday I went to the Warbirds Over Wanaka air show. The show is run every second year (at Wanaka airport, Otago, New Zealand) and I attend most years (although I didn’t go last time). As well as enjoying watching the aircraft (which is one of my interests) it’s also a great opportunity to take some interesting photos, and photographing fast moving objects is usually quite challenging.

I took several hundred photos and quite a bit of standard definition and high definition video and I will use some of these in the report I will write for my web site. I already have reports for the same show in 1992, 1996, 1998, 2000, 2004, and 2006.

Originally the show specialised in World War II era aircraft but more recently there has been a much wider range displayed. In 2006 these ranged from the 1918 Bleriot capable of 70 kilometers per hour to the F-111 from the Australian Air Force which is capable of about 3000! An impressive change in just 50 years.

There’s usually a rare fighter shown at each show. In the past there was a Messerschmitt Me 109, Polikarpov I-16s, a Hawker Hurricane, and the Russian Yak 3 and LA9. This year there was a Japanese Zero. There are also the more common P-51 Mustangs, Spitfires, Corsair and Kittyhawks which appear every year – yes, I know, I hate to to call the Spitfire “common”!

The Lithuanian aerobatics pilot Yurgis Kairys has made an appearance at several shows and he was there again this year flying a crazy and spectacular series of maneuvers in the aircraft he designed himself. That’s always a highlight.

The RNZAF put on a good display (especially considering it doesn’t even have a fighter wing any more) with its Seasprite and Iroquois helicopters, Orion and Hercules transport planes, its parachute team, and various other aircraft.

The New Zealand Air Force may lack spectacular fighters but Australia certainly doesn’t. The RAAF sent 4 F/A-18 Hornets and they were just awesome! They flew in unexpectedly and they fly fast so they are well ahead of their sound. They just arrive without warning, fly over, then the sound hits you. On a fast, low pass over the airfield the sound is just indescribable.

My report on the show, including photos, sound and movies, will be on my web site (the airshow section is here) in the next week or two (it’s hard to find time to work on this between other projects) so if you are interested in this sort of stuff stay tuned.

Dorky Dawkins?

February 5, 2010 6 comments

Yesterday I was sitting in one of the cafes we have distributed around the campus of the university I work at writing some notes on Richard Dawkins’ latest book, The Greatest Show on Earth, when an odd person came up to me and claimed: “he’s a real dork you know”. I enquired: “who do you mean, Richard Dawkins? What’s the problem?” but by that time he had scuttled away.

So it seems that Dawkins’ influence is significant with all kinds of different people. I have no idea what this particular individual’s problem was – presumably he was some sort of religious freak who didn’t like criticism of his beliefs – and its unfortunate I couldn’t have got some more details. Actually, now that I think about it more, maybe its fortunate I didn’t engage this person in debate because I suspect he might not have made much sense (so much for universities being the center for informed intellectual debate!)

Anyway, if you are interested in the subject, my brief summary of some of the highlights from the book (which is actually well written and very readable) is here. If you have any comments please leave them in the discussion system, but please make it a bit more consequential than an ad hominem attack on the author!