Unix That Just Works.

Wednesday, 6 August 2003, 04:34 pm

Creeping toward Movable Type, I’ve been working through a good set of articles at O'Reilly, brushing up on the care and feeding of Apache, and finding out what’s special about running it on OS X. Thanks to the clear and witty writing of Kevin Hemenway, I’ve got a local web server running, nicely sealed off from the outside world, cheerfully serving out SSI and handling PHP.

Watching my access logs, making sure that nothing was getting out or in, I was noticing this once an hour or so. I should have guessed that it was another Windows worm—Code Red in this case— being safely nipped in the bud. Noticing the alarming rate at which the logs grew (something I had forgotten about with Apache), I realised that I needed to rotate the logs occasionally. I poked around to see if anyone had knocked up something I could pinch, then gave up and wrote this to run weekly:

echo "Rotating Apache logs in /var/log/httpd"
cd /var/log/httpd
for log in access_log agent_log error_log referer_log
do
    if [ -f $log ]
    then
        [ -f $log.6.gz ] && mv -f $log.6.gz $log.7.gz
        [ -f $log.5.gz ] && mv -f $log.5.gz $log.6.gz
        [ -f $log.4.gz ] && mv -f $log.4.gz $log.5.gz
        [ -f $log.3.gz ] && mv -f $log.3.gz $log.4.gz
        [ -f $log.2.gz ] && mv -f $log.2.gz $log.3.gz
        [ -f $log.1.gz ] && mv -f $log.1.gz $log.2.gz
        if [ -f $log.0 ] 
        then
            gzip -9 $log.0
            mv -f $log.0.gz $log.1.gz
        fi
        [ -f $log ] && mv -f $log $log.0
    fi
done
apachectl graceful

Keeping that many logs is probably overkill, but your mileage may vary. If you wanted to get fancy, you could sleep after calling apachectl for ten minutes, then gzip the most recent log, but by keeping it simple like this you get the advantage of having both the current and the previous logs uncompressed. Purists will of course note all sorts of things to improve in this script for safety and security. I notice them too, but I’m being lazy because I know what the runtime environment is. Improving the script is left as an exercise to the student.

Because I’m going to need MySQL soon, I started off following the notes in the articles at O'Reilly. I first installed version 4.0.14 based on the materials at the outstanding web site put together by Marc Liyanage, which worked just nicely. While poking around, however, I found out about the CompleteMySql bundle at Apple containing 4.0.13 and some other stuff I was interested in, so I tossed away 4.0.14 and installed that bundle instead. The best thing about Mac OS X: it makes complicated things really easy, as long as all the developers follow the rules. OS X — Unix That Just Works.

While I was doing that, I also grabbed CocoaMySql, giving me a slick GUI interface to MySql. Oh Happy Days. I just wish the “real” commercial databases and Unix products were this well packaged and easy to install and manage.

Remaindered Links.

Wednesday, 6 August 2003, 08:57 am

Before diving bodily into the installation of MySQL, some bits and pieces that caught my eye, perhaps giving you an idea of what I like to read early in the morning.

The Story So Far: while concentrating a little too much on the personalities, CNET gives a good summary of the recent furore over RSS.

No one doubts Winer’s contention that the market for a Web content syndication format is expanding. But Ruby and his followers have ample evidence to suggest that the growing market is increasingly willing to follow them away from Winer's RSS.

Antipixel dumps out a marvelous rant about the pretty awful Apple Help Viewer. Via the comments there, this fascinating blog, Usable Help, by one of the engineers working on fixing the mess. Tech writing and documentation systems may not ring everyone’s bells, but they give mine a bit of a tingle, particularly when you get this sort of from-the-trenches insight.

John Gruber has pulled out his shotgun and fired a few rounds at Andrew Stone again. John’s diatribes are usually amusing and well written, but more importantly they’re generally correct:

But now, a few months later, I’ve come to a different conclusion: Andrew Stone is out of his f—— mind.

Mark reinstalled Windows XP without resorting to a sledge hammer (just). Chuq responds. (Insert obligatory snide remark about Microsoft here). While you’re over there, read Chuq’s description about how he got his 80 year old mother going with video chat:

And that’s why I work for Apple. Because it enables 80 year old women to do things like take up audio and video chats with her friends around the globe. Anyone can build these things for geeks who like to dink with stuff. With Apple, you plug it in, it works. And it changes the world, one person at a time.

I found this a few days ago, and need to note it for future reference: B. Scott Andersen on The Future of UML. I try to peek in Artima every few days, as it increasingly is a watering hole for ancient crufty zen-master coders like Andersen, and you often find eye-wateringly important documents like this one: “What is the best UML tool?” “A white board marker.”

In a simliar vein, Five Lessons You Should Learn from XP over at O’Reilly. I’ve spent a lot of time maintaining code and can put my hand on my heart and attest that if everyone followed these rules, the cost of software maintenance in the future will plummet.

Finally, via Miriablis, this Museum of Ancient Inventions. My favourite? The 4000 year old folding stool, indistinquishable from the modern version. A demonstration, once again, that our remote ancestors were no more stupid than we are. Actually, when you consider how many correct solutions were developed way back in the day, you could argue that they were brighter: do you know anyone who could invent candles if they hadn’t already been invented?

Construction in progress.

Monday, 4 August 2003, 5:42 pm

I’ve decided to halt my testing of iBlog and adopt Movable Type. iBlog isn’t a bad product—it’s actually quite a good product—it’s just not the tool I’m looking for.

The rough game plan at this stage is to move these journal entries into the archives, flatten the iBlog test entries into some sort of stand-alone archive, then hammer the front page into a menu (possibly a literal menu…). After that I’ll re-launch the journal one layer down, driven by Movable Type. This will take a week or so, as there is a certain amount of infrastructure work that needs to go on, including knocking up a few variant designs for the MT pages. This should keep me happily busy through the remaining cold winter nights.

Thinking of cold winter nights, I’m not sure what the most surreal sight was on Sunday out at History Alive: the half-track full of German infantry driving past the medieval tents, or the Russian soldiers smoking beside the Brisbane river.

Testing in progress.

Saturday, 2nd August, 11:26 am

I’ve beaten the journal testbed page into shape, and put up a few variations just to exercise the page and give me a chance to think about colours and schemes. I’ve pushed it out as a sort of delta point, and will now go back and see if I can pour the iBlog pages into the structure, or some approximation of it.

The next phase will be to get all the meme-links in place in the navigation area, and the navigation links around the site. That will be quite trivial, but the phase after won’t be. I’m going to adopt, like almost everyone in the world, I think, Doug Bowman’s ideas about background replacement in order to tart up the currently fairly bland and Mondrianesque designs.

Sources of inspiration.

Sunday, 27 July 2003, 8:32 pm

Robyn was wondering if there were any sites that showcased different design ideas or have provided inspiration.Here are some of the places that have caught my eye:

I will probably come back over the next few days and update that list.

In case you were wondering, my tests of iBlog over there are still continuing, and entries are dribbling in there. I’ve spent a great slab of time today working on the testbed page for journal layouts, and I’m now going to go back and beat the iBlog templates into shape, after reading a bunch of CSS design pages. Which means it will probably happen Thursday instead.

Test Pages.

Saturday, 26 July 2003, 6:08 pm

Robyn has suggested that a site redesign is in order. Co-incidentally, that’s what I was thinking as well. I’m going to move the journal contents down a layer in the hierarchy and turn the front page into a splash page / menu page. Before embarking on a large-scale makeover, though, I want to do some tests of different layouts and ideas. To that end, I’ll expose my test pages. Comments and feedback eagerly sought.

Is this thing turned on?

Monday, 19 July 2003, 7:07 pm

Testing. Testing. 1 — 2 — 3… Hello, is this thing turned on?

I’m doing some more serious testing of iBlog over there trying to make up my mind whether to go that way or not. Please ignore the color-scheme, markup goofs and clumsy layout — there is rather a lot of tinkering to do.

Where was I?

Thursday, 17 July 2003, 6:53 pm

There are a stack of things that I’ve noted over the last little while. I’m trying to decide how many of them I’ll throw on the cutting room floor at this stage. Let’s see what survives.

A List Apart discusses a very interesting standards-based approach for doing a “newspaper” style page layout, as shown at A Donkey On The Edge. I may consider adopting this, or some derivative, although I’m still toying with the idea of moving to iBlog. The thing is, it would be handy to have a point-and-shoot tool for doing the mechanical bits of writing this journal — putting in titles and timestamps, archiving old entries, pushing changes to the server. It might also make it a bit easier to integrate with the .Mac tools, particularly if I pushed the journal down one level in the structure of the site, and made the front page a more-or-less static index. The main gripe I have with the .Mac way of publishing pages is that they really want that main page to be theirs, or to have none of the site elements generated by their tools, which means that the front index page keeps getting blown away. If it was fairly static, it becomes trivial to just put it back in place when it goes away.

Thinking is in progress on all of this. iBlog is very sweet, and almost definitely worth paying for. Unless Apple build their own tool and bundle it with .Mac in January. The big problem with comitting to a tool like that which wants to structure things in a particular way is that you’ pretty well stuck with it until you abandon it completely and go back to maintaining things by hand. What I’ll probably do is put up a little parallel test blog for a few weeks, and see how it pans out.

What else?

While poking through an article at Joel On Software, I came across a very powerful insight that I wasn’t familiar with, but is astonishingly accurate:

Years later, when I got to college, I learned about an important theory of psychology called Learned Helplessness, developed by Dr. Martin E. P. Seligman. This theory, backed up by years of research, is that a great deal of depression grows out of a feeling of helplessness: the feeling that you cannot control your environment.

The more you feel that you can control your environment, and that the things you do are actually working, the happier you are. When you find yourself frustrated, angry, and upset, it’s probably because of something that happened that you could not control: even something small. The space bar on your keyboard is not working well. When you type, some of the words are stuck together. This gets frustrating, because you are pressing the space bar and nothing is happening. The key to your front door doesn’t work very well. When you try to turn it, it sticks. Another tiny frustration. These things add up; these are the things that make us unhappy on a day-to-day basis. Even though they seem too petty to dwell on (I mean, there are people starving in Africa, for heaven’s sake, I can’t get upset about space bars), nonetheless they change our moods.

Another CSS bit of interest is this, which provides some nifty ways of implementing drop shadows using CSS. For all those folk who think a web-page is not complete until it has drop shadows. Which probably includes some folk who think that life won’t be complete until they’ve added a hit counter to their .Mac homepage. Not me, no sirree. I know there’s at least one reader (hello Nuck!), and that’s enough for me.

A site of impeccable design and wit that is really worth visiting is HiveLogic. Through the magic of RSS I can even have it delivered to my door by doing nothing more than cut-and-paste.

Considering other things technological, I notice that Paelographics has good prices on those little thumb-drive solid state disks. I think I’m going to get myself one, one of these days. It would be handy for being able to easily cart around a few dozen megabytes of stuff, in read-write form, rather than burning stuff to CD to transport. I don’t miss floppy drives, they really got too small (relatively) to be much use, but I do rather miss being able to cart around junk when I need to. I’m still lusting after a digital camera, in a very sort of laid-back, non-urgent, when-I-get-around-to-it sort of way. Meanwhile, waiting and watching the technology improve, it’s handy to come across articles like this one which debate the merits of various models and makes. Thanks Derrick.

Thinking of .Mac (well, I was), Apple are doing some pretty groovy things with that and Safari. The ability to sync Safari bookmarks so that you can get at them from anywhere is seriously cool, and whichever bright young thing came up with that one definitely deserves a gold star for effort. In my copious-spare-time™, I want to have a play with the Applescript bookmarks that they’ve put together. Too many toys, too little time, but they look very useful. Another toy, although I’m a bit ambivalent about it, is the suite from OpenOffice. While I like the idea of being able to, more-or-less (and mainly more), work with Microsoft Office files, I just wish it was, well, more Macintosh. Part of my growing impatience with AppleWorks is that it basically does a really ugly job of painting stuff on screen when compared to all the newer software. Unfortunately, OpenOffice is, well, a bit ugly too.

Speaking of ugly, check out Perk, the rocking Kobold. It’s amazing when you stop to think about it that it’s so easy for individuals and groups on a low or zero budget to knock out stuff like this for fun.

What else? For Mac folk, how about a comprehensive list of all those weird magic keystrokes? Fun how things go around. I poked around the rest of Dave’s site, thinking “sounds like a nice guy” Then I realized it’s the same Dave Polaschek that I bought a book about mead from years and years ago, and that yes, from the conversations we had back in the day, he’s a nice guy.

That’s it. Almost done. Just a few things to stick in the Sable Rose site, and my in-tray is empty. Thanks for your patience, you’ve been a wonderful audience. Audio-tapes of this journal are available in the foyer.

Blurred

Monday, 14 July 2003, 8:30 pm

Well. That was a long weekend. I’ll comment properly on it soon, but briefly: it all went very well, apart from the low point of some bottom-feeder apparently reaching under the edge of the tent to take all the cash out of my wallet. Everything else went superbly well, thanks to everyone’s efforts.

I noticed two interesting things that changed dramatically between tonight and the last time that I was away from email and news for a few days. Firstly, there was a lot more spam. Even though Mail.app does a very fine job of filtering it out, and not much gets to me, almost half the mail that had queued up was junk. Click, drag, delete. The other thing was that rather than browsing around to catch up on news, I simply sat back and let NetNewsWire Lite do the browsing for me. In just a few minutes I got a good feel for what had been going on, ferreted down on a few things, and was amused at how far the spat between Mark and Dave is sprawling.

Focused

Sunday, 22 June 2003, 8:08 pm

Things have been very quiet here for a few weeks. I’m still here, I’ve just been a little, um, focused on preparations for the Sable Rose< show in a few weeks. If you’re interested, we’ll be at the Abbey Museum for the 14th Annual Tournament on both days. Pop in and say hello.

Preparations are going well, and I’m actually getting a chance to fit a life around them. This suggests that the preparations for BMF 2003 paid off, since what I’m mainly doing is enhancements and a few things I’ve mean to do for years.

There may be some distractions though. Bioware have finally released what they’re calling a “technology demo” for the Mac version of Neverwinter Nights which is seriously good. When it finally reaches us — only about a year after everyone else — I can see at least 90 hours going down the tubes while I work through the single player module. Maybe if I’m a good boy and do all my homework Santa will bring it to me for Christmas.

A merman as a footer

Colophon

FAQ

Contact

Archive

Return to top