You are here

Jonathan Hitchcock's blog

SATNAC Paper

Since my paper was eight pages long, and I'm submitting it as a Work In Progress (even though it's basically finished), and WIP papers are only supposed to be two pages long, I've had to more or less rewrite it.  I've finally finished it, and sent it off to Alf for a read, we'll see what he says.

Links: blogs are useless, but hacktivism is cool

An article on the Register about the proliferation of blogs, and an excellent (if badly spelled) Wired article about Hacktivism and the Cult of the Dead Cow.

With 8000 new bloggers every day, and almost half of the blogs out there being idle for the last three months, what does that say about blogging as a "phenomenon"? I know that I've started about three or four blogs myself - this current one being the most successful attempt so far. I suppose time will tell?

http://www.theregister.co.uk/2004/07/13/8000_bloggers_per_day/

The Cult of the Dead Cow recently turned 20 years old, and have managed to turn themselves from a l33t bunch of hax0rs who churn out scriptkiddie tools into a well-respected grass-roots activism organisation. Restecp:
http://www.wired.com/news/infostructure/0,1377,64193-2,00.html


Finished Paper

Well, I finished my paper.

And Alf liked it so much that now he wants me to change my thesis topic?!


My paper was about a user interface I wrote for Jason's software PBX.  I used Flash as the main frontend, but it needed a number of ways to communicate with the actual PBX - it needed to do database lookups, and all sorts of things.  Since Flash is not that powerful a language, I used what it had, and plugged it into my own scripts, written in more powerful languages - PHP, Python, Perl, and so on.

Apparently, when I write about my open source languages, and their benefits, and why I chose them, and the scripts I wrote in them, my writing is "much more mature" and "focussed". Possibly because I actually give a damn about it.  Anyway, because of this, Alfredo wants me to do my thesis on something like "wrapping a core system in user-friendly interfaces using open source tools", or some similar topic.  Frankly, it doesn't sound much like a Masters thesis to me, but we'll have to see.

Anyway, the paper is completed.  It was way too long, and now I have to slim it down substantially before I submit it, but the main slog is over.

SATNAC Paper: communicating between a Flash frontend and a software PBX

I'm supposed to be writing up the work I did on Jason's software PBX, and it's going very very slowly.

Apparently this paper is supposed to be a work-in-progress paper, which would mean that it is two pages long.  I'm on the sixth page, and nowhere near finished yet.  I had troubles with phrasing things at first - I couldn't get into the flow.  Now I'm in the flow, I don't know how much to write.  I could just keep writing for as long as you want, really - I could go in depth about Python/Twisted, and why event-based architectures are good for what I'm using them for, I could justify Perl and PHP for the uses I put them to, I could write thirty pages on this.

How much am I supposed to write?

Alfredo is getting antsy about this paper - he wants it in, understandably.  He has informed me that he is not going to give me my money until I hand it in.  Well, I want to hand it in as much as the next person.  I'm just so tired the whole time.  I'm exhausted now, I could really just collapse into bed.  What would make me feel even better is a nice cold beer and then a collapse-into-bed - the stress of tutoring RUMEP students who don't know how to use a mouse, combined with trying to remember everything else that has been going on is not doing me any good.

I'm basically going to just write as much as I think is sufficient for all the headings I've got, and hand it to him.  If he wants me to flesh it out, or summarise it, then I will.  For now, let me just get it done.

Hectic Week

Festival week is now over, and I am absolutely exhausted. Everybody who was here has left now - Jaco and Adeline and Claire, Bridget and Claire, Ross and Claire, the Squash people (one of whom was probably called Claire), etc. I still haven't finished my paper, but I'm getting closer and closer to it. Maybe I'll be able to get some sleep soon?


Another festival has come and gone. I didn't do much festival-wise - I basically went to things that other people invited me to. Giselle, the ballet, with Ingrid, was good, although not as good as Swan Lake last year, I thought. I did see some truly excellent Jazz, Carlo Mombelli on the bass, Marcus Wyatt on the trumpet. I also watched Prime Circle live, which was entertaining. I almost watched the Springbok Nude Girls - arguably South Africa's best band, whom I've been keen to see ever since I stupidly didn't watch them in my first year - but at the last moment, Bridget told me that she was tired after the trip, and wouldn't be going out, so I sold my ticket to Claire-from-Capetown, and went to spend some time with Bridget.

Jaco and Adeline were down for the week. It was great to meet Jaco after knowing of him, and then knowing him, online - he really is an awesome guy, and incredibly bright. It's nice to have connections with various IT people around South Africa, but he's good to have as a friend too. Adeline is a friend of his from Cape Town, who occasionally appears on Lagnet, and she came down with him. It was fantastic to meet her, too: she's incredibly fun, and bright, and all-round good company. Claire is her over-exuberant friend, also from Cape Town, and, while a little scary, also fun.

Bridget left early this morning, having gone to bed at about half-past six yesterday evening. I was a little surprised, and rather disappointed, that she should just disappear so early - she phoned me to say "tired, sick, going to bed, see you next term". She wouldn't even let me go round to say goodbye. Puellae hostes sunt. Ah, well, I know what she's like when she's sick/tired, I don't blame her for throwing in the towel early.

My various digsmates are doing the shift-change, too - some leaving, some arriving back. Jess's brother Ross, and his girlfriend (also Claire), have left, too.

So, all is quietening down - schoolsfest is happening, but that's it. Ingrid has gone to Pretoria, Dave has gone to Knysna, Tim has gone back to Ladybrand (via Zimbabwe?) - it's just cliff, Russell and I left.

I am still tutoring the RUMEP people - it's exhausting, but quite rewarding when they understand something. It finishes on Thursday, praise the Lawd. By then, I will have finished this gawdamn paper, too, and I can relax a little.

Links: America, free literature, privacy, open source

Various articles (some most excellent) about America, freedom, and lack thereof...

Some links to free literature - one scifi novel, one Neil Gaiman novella, and one fairly amusing book.

A story about how Open Source makes you give birth to horses...

And stuff about privacy.

America:


"Patriotism (and shame) on the Fourth of July."
http://www.sfgate.com/cgi-bin/article.cgi?file=/chronicle/archive/2004/07/04/EDGD56N5O81.DTL

How fares American liberty on their independence day, 2004?
http://weblog.siliconvalley.com/column/dangillmor/archives/010555.shtml#010555

The continued scandal about the Patriot missiles (designed to automatically select baddie targets and kill them, but took out various friendly targets too):
http://www.theregister.co.uk/2004/07/06/patriot_plot_thickens/

"America's war with Blogistan": Blogs are entering the mainstream of accepted media, and becoming the political tools that all other media is:
http://www.wired.com/news/culture/0,1284,64113,00.html

The poor besieged movie industry, so damaged by such rife piracy, has made record earnings yet again:
http://slashdot.org/article.pl?sid=04/07/06/1828221

Fiction

My Tokyo Death Cult is the story of the end of the twentieth century and the birth of a new era where you no longer have to be a superpower to end the world.
http://home.earthlink.net/~mytokyodeathcult/

Dr Lewis B. Turndevelt's Big Book of Forewords:
http://www.davidrperry.com/

A short story by Neil Gaiman, "A Study in Emerald", awarded "Best Novelette" in the Locus awards, and nominated for a Hugo:
http://www.neilgaiman.com/exclusive/StudyinEmerald.asp

Open Source and Privacy

Surfers urged to stop using Internet Explorer, and switch to Firefox.  The funny thing about the second article is that it is published on MSN.  However, it does imply that the only reason Firefox is more secure is because nobody uses it, so nobody wants to hack it.  A bit of a wolf-in-sheep's-clothing, but still.
http://www.newsisfree.com/iclick/i,43317286,7221,f/
http://slate.msn.com/id/2103152/

The 2004 Big Brother privacy awards:
http://www.theregister.com/2004/07/05/privacy_awards/

Open Source software makes you give birth to horses:
http://www.theregister.co.uk/2004/07/06/sourcenext_horse/

Links: Michael Moore, America and Iraq, Daleks, Java

Michael Moore doesn't mind p2p downloads of Fahrenheit 9/11, how badly America screwed over Iraq, Daleks, open source Java, etc.
Michael Moore says he isn't losing any sleep over downloads of Fahrenheit 9/11. I think it'd be much cooler if he actually opened it under the creative commons or something, but ah well:
http://www.sundayherald.com/43167
http://www.boingboing.net/2004/07/04/moore_on_filesharing.html
And, related, an amusing "Michael Moore makes the same movie again":
http://www.kuro5hin.org/story/2004/7/4/84621/13655

An excellent article on America's occupation of Iraq:
http://www.iol.co.za/index.php?set_id=1&click_id=79&art_id=vn20040704123906734C470228

Hush my darling, be still my darling, the lion's on the phone. Finally, the writers get their rights:
http://www.reuters.com/newsArticle.jhtml?type=entertainmentNews&storyID=5575753

British kids will never be disciplined:
http://news.bbc.co.uk/1/hi/uk/3865277.stm

Dalek's were Exterminated from the new Dr Who, and invade New York in protest:
http://www.theregister.co.uk/2004/07/05/daleks_invade_new_york/

Microsoft are actually being sensible about email and sender authentication:
http://www.theregister.co.uk/2004/07/05/sender_authentication/

Sun opensourcing Java?
http://zdnet.com.com/2100-1104_2-5256228.html

Links: TMBG, America's leadership, SkyOS, Zimbabwe

Today's links:
They Might Be Giants are cool, Linux users are spoiled, Online MD5 Cracking service, America and its cracked up leadership, SkyOS, solving the Zimbabwean problem.

They Might Be Giants are, and always have been, an awesome band. They're something of a geek meme - nobody else has ever heard of them. And they're clearly catching on to the new age of DRM:
http://slashdot.org/article.pl?sid=04/07/04/0249245

Open Source is about choice, and Linux users are spoiled. I knew it anyway:
http://slashdot.org/article.pl?sid=04/07/03/211212

Online MD5 cracking service!? So what does "f3789b3c1be47758203f9e8a4d8c6a2a" mean? I suppose this is no worse than being able to download john the ripper for free, but it's still a bit scary.
http://passcracking.com/

Weird little online movies:
http://www.shannonplumb.com/

A novel about how to kill the American President? I'd love to see how people react to this.
http://www.boingboing.net/2004/07/03/new_fiction_novel_fe.html
While on the subject, somebody should take out the VP, too - how can anybody take him seriously?
http://www.boingboing.net/2004/06/25/mr_vice_president_ha.html

SkyOS? Never heard of it. Who wants to try it? I actually think I might install this on rei. Just for kicks. Like I don't have plenty to do anyway.
http://www2.skyos.org/aboutnew.php

"Quiet Diplomacy in Zimbabwe has failed, but we're going to carry on with it anyway." I was actually discussing this with Ross two nights ago - Mbeki doesn't really have a choice in this matter. Mugabe was the original Nelson Mandela of Africa, he was pretty much the first person to stand up against Britain and tell them where to shove their colonialism. People look up to him, even though everybody probably realises that he's fucked it up a bit now. If Mbeki went up against him, as people seem to want him to, Mbeki would lose face, not Mugabe. The onyl real "solution" is for Mugabe just to die, and be replaced by something better.
http://www.newsisfree.com/iclick/i,43092179,7221,f/


New web layout

I've restructured my website, and changed the backend engine, because it's What I Do. Jonathan Hitchcock, another webpage, another thesis, another bot, another blog.

In this entry, I discuss how themable websites *should* be structured, and what I've done for this site.

I've abandoned the old mod_layout+XSLT method of skinning my website, because it didn't really work.

XSLT relies on everything being XML, which means I have to write pure XHTML 1.0. This is fine, since I try my damnedest to do that anyway, but sometimes it doesn't pan out, and then instead of failing gracefully, I get weird XSLT errors everywhere. The thing I like about XSLT is that it gives complete separation of content and form, or rather, of meaning and presentation. That is, you give XSLT an XML file that contains a description of what your site means, and it turns it into something pretty. You'd give it something like this:
<site>
<heading> My heading </heading>
<body>
<leftpanel>
<item> I am online </item>
<item> Click to go home </item>
</leftpanel>
<main>
My site, hope you like it.
</main>
</body>
</site>
As you can see, this shows what each bit actually is ("this is the left panel, this is the heading"). This would get converted into some HTML, full of <div> and <h1> and suchlike, which loses something of the meaning of the site - the difference between a right panel and a left panel is now all in where it is placed. That's fine for those two, since that's the difference between right and left, as well, but if I had "main table of contents" and "page specific links" instead of "left panel" and "right panel", then I would lose that meaning when it got converted into almost identical HTML with merely a presentational difference.

This is also the main idea behind CSS: HTML must just become a bunch of "div" statements with associated classes ("<div class='maintable'>", "<div class='pagespecific'>"), which are then rendered by the correct CSS to be pretty. However, it rarely turns out that way - HTML is still full of presentation. The CSS Zen Garden does kind of provide a counter-example to this claim, but viewing the source is always a scary process on those pages.

XSLT is just too hectic for anything smaller than a massive content-system that will be viewed in ten different media, I think. So, for now, one must settle for a happy medium - leave most formatting to the CSS, and try to keep the HTML as meaningful but formless as possible, and wait for the W3C to make everything better.

In addition to the XSLT, I'd like to lose mod_layout, too, since it's not perfect - I'd ideally like to be able to make lists of which files to layout, and which files not to layout, and specify defaults by directory. I know that you can do it with <FilesMatch> and LayoutIgnoreURI things, but it's very kludgy. So far, I'm doing fine, and I can't think of a better way to skin an entire site just yet. I don't want to have to include code in every page on my site - this would require that they are all PHP files, which adds to the processing load. Again, I could use SSI (Server Side Includes) in HTML files, but that just means nasty CGI processing, and is just messy. It also ignores the point that I don't want to have to include code in every page on my site - I want to drop a page in and have it themed nicely. One method that I briefly considered was virtual directories: have a hidden index.php (I'd have to do some mod_rewrite stuff for that probably), which does the skinning, and takes all the rest of the URI as asking for a specific file, and just whips that in. It's an interesting way of doign it - similar to the way Nevow and other non-Apache, non-filesystem-based webservers decide how to serve files.

Let me summarise those thoughts:
Need a way to skin entire site
  • Could include code in every file:
    • Including PHP code in every file that skins it means lots of processing
    • Including SSI CGI code in every file is just ugly
    • I don't want to put code in every file, I want it to be drop-in
  • Could use just one file that has skinning code, and uses virtual directories, mod_rewrite, etc, to include the rest of the site into the skin
  • mod_layout automatically applies a layout to an entire site - that's what it's for
    • It's not perfect, I'd like a finer grained control, but it works
Anyway, regardless, what I'm doing now is, I feel, rather nice. The blogging software I use, Serendipity, has a nice template system (you can see it on the right if you're viewing this from the actual blog, and not RSS). I examined their code, and worked out how the templating system works, and I've incorporated it into the rest of the site.

Unfortunately, part of their system involves a layout.php file, which gets include()'d by PHP - this generates some HTML which CSS is later applied to. I can't use the layout.php that comes with each skin, because it has lots of calls to the Serendipity API, to suck in the sidebars, and the content, and so on. In theory, I could duplicate the API in my own code, but that seems overboard. I may as well just use the blog for my entire site, or something. Anyway, my solution turned out to be a rather nasty kludge involving a special case. Almost all of the templates use a table to format their HTML - only one of them uses <div> tags with CSS placement. So, in my code, I checked which template was being used, and created <div>s for the one, and used a table for the rest. It's a special case, and isn't perfect, but it works for now, so screw you all.

This relates back to what I said about HTML containing some of the form, and not just the meaning. The blog should generate non-formatted, meaningful HTML, and the template should be nothing but a bunch of CSS that gets applied. I designate this system "The counter-counter-example to the counter-example of the CSS Zen Garden".

Anyway, I use mod_layout to suck in a container.php file that does some stuff like storing page-hits in a database, setting some global variables (like one that contains the base URL for my site, and so on) (a lot of this stuff was taken from the web maestro Russell himself), and then generating HTML, sucking in the page being viewed at the right point.

The nice thing about my site, however, is the CSS it uses. The URL for the CSS I use on my pages is http://vhata.rucus.net/include/css.php. This is a script that looks in Serendipity's own database, to work out what template it is using, and uses that one. The theme changer on the side in my main site is also one I wrote, to duplicate the functionality of Serendipity's theme changer plugin (which plugs heavily into the serendipity API, and thus can't be used directly).

As a result, my entire site looks exactly like my blog, and changing the theme in one of them will cause the theme to be changed in the rest. The current theme is stored in the Session, so it will go away when you go away, and next time you visit, you'll be back to my default theme, but that's your tough tackies.

Pages

Subscribe to RSS - Jonathan Hitchcock's blog