Aquarionics

Category > programming

Making 'pooters do Stuff

Saturday 11th October 2003

Library

So, today I was searching on my shelves and retreived “C for Dummies” parts 1 & 2, “Database Systems (A practical approach to application design, implementation and management)” and “An Introduction to System Analysis and Design” all for the first time since Uni.

What’s this, then? A new project to write an IMAP server that doesn’t suck? the fabled reimplimentation of Epistula as a Client/Server system written in C? or the fabled New Thing?

Actually, I just needed something to stand on to replace a lightbulb.

This isn’t to say I’m not doing one of the above, just that I need the lights on whilst doing it.


General Public Virus

Today, I’m going to take a minute out of my working day and rant at you about software development.

I work for a company that does Cool Things With Data. That’s all you know, that’s all I’ll tell you. When we are looking for testers, I shall mention what it is, and you can all go “oooh”.

One of the things I’ve done in this is created the method by which RSS data is put into the program (Our automated statistics are generated into RSS, because I was fairly sure it would be easy to get it out again). Now I want to get it out again, so I’m going to have to write an RSS-Reading Thingy.

This is not my desire. The last thing I want to spend x amount of my life doing is writing RSS parsers. Far better minds than mine have spent ages on the problem of parsing the amount of really, truely horrible things that people do with RSS, and they have released these things.

The best and most respected that has been released in PHP, which is the environment I’m doing this in, is Magpie RSS, which you give a URL and it gives you an object containing data. So far, so hoopy. I installed it, integrated it, loved it and forgot about it.

Now we come to Second Stage stuff, and I’m looking at the licences of the bits we’re using. The sections we grabbed from Epistula are fine, because they’re BSD licenced. Magpie isn’t, because it’s GPL, and the GPL specifically states that I can’t include a GPL library if my code isn’t going to be GPL’d.

It isn’t. Not because of any “We want to trap our users” stuff, but simply because out continued existance of a company involves people paying us for our services. With this money, they can pay me. With this payment, I can write more software. And eat. And buy broadband. And spend my weekends making free software. And I realise that in the ivory tower of the Free Software Movement it doesn’t matter, because All Non-Free Software Is Evil.

Out of interest, any Free Software Zealots in the audience know how we programmers are supposed to earn our food?

This shouldn’t matter. This is Politics, and I don’t care that ESR supports Baring Arms, nor which direction Linus voted last election, nor what RMS thinks of his country’s economic prospects.

What I care about, as a user and a developer, is that I am currently unable to use the best tool for the job because of the politics of making something free.

So, the next time you decide you want to release under a free licence, remember there are other licences than the GPL that even Debian likes.

And now, Back to XML parsing. Yay.

Those who spoke on this:

gravatar image

ccooke:

2003-11-25 11:56 2 hrs after the Original Article

And besides, a library should generally be under the *L*GPL. I mean, interoperability? Bah.

Comment Link

gravatar image

Simon Callan:

2003-11-25 12:11 2 hrs after the Original Article

I presume that you have got in touch with the author to see if he is willing to allow you to use it under a different license, possibly a commercial one? As far as I am aware, there is nothing to stop the author doing this.
When I write for public use, I tend to simply slap GPL on it as it is convenient, but if anyone wants to use it for non-GPL compatible uses, I’m always willing to negotiate.
If he’s not willing to negotiate, you’ll just have to find another RSS parser, as if Magpie had never been written.

Comment Link

gravatar image

Dave:

2003-11-25 21:01 11 hrs after the Original Article

If you’re working for a company and you expect to sell the software and keep the source to yourself, then you should really be thinking about licences when you integrate any code into your company code-base. In fact, they should have some sort of policy or coding standard that defines that you must not put code in there that you can’t then use in the way that you expect.

Sorry dude, but bitching about the licence after the fact is your own problem, imo.

Comment Link

gravatar image

Jason:

2003-11-29 16:22 4 days after Dave

I think the problem is developers releasing their work under the GPL simply because it sounds cool, without thinking about the implication. I’ve no idea if the developer of this particular library really means to stop people using his code commercially, of course.

Comment Link

gravatar image

Aquarion:

2003-11-29 16:23 2 mins after Jason

In this case it was no choice. The library that they are based on (A PHP Connection class called “Snoopy”) is GPL, therefore so is Magpie, therefore I can’t use it.

Comment Link


Muttering

So, At close of play Sunday (02:45 AM) I’ve suceeded in writing the istic.net wonderful user system that will consolodate all the accounts on most of the various websites I’ve done. CIN/R has a design, said user system, campaigns, character class, preferences & architecture, CIN/F still needs to be designed then moved over (And probably rewritten, but that’s another job) JIN/HIN/NIN have to be confirmed – It’s an awfully stupid thing to do if I’m just going to scrap the whole idea again – Which leaves only Touchstone (Now CIN/S), Threadnaut (AIN/T) and Angelica (MIN?) on the geek-list. Of course, then there is Toffia, Alice, Cevearn, ACDS etc.

Tomorrow, then, should leave CIN/R with characters, games, lassos and approvals, with artifacts to follow.

Then, of course, I have to redesign CIN/F.

Those who spoke on this:

gravatar image

Pol:

2003-12-21 17:08 14 hrs after the Original Article

blink

OK, lots of acronyms, no content. You don’t write management reports where I work do you?

Comment Link


Best Joke Ever

What do you call a man in sandals?

Phillip Flop.

Today, I’ve been taught how wonderful Java is, how it runs perfectly on Solaris, and how it should backend onto Oracle.

You see, whilst all the interesting people get to go to eTech, I’ve spent today (and will spend tomorrow) at the Sun Tech Day here in Sunny (did you see what I did there?) London.

Yay.

Those who spoke on this:

gravatar image

Paul:

2004-02-17 22:21 3 hrs after the Original Article

Don’t let Aq here you talk about Java

and Oracle like that :)

Comment Link


Monday 29th March 2004

Errands and the End Of PHP

Got stuff done.

In this case, the stuff was of a many and varied nature and involved:

  • Sorting out bank accounts
  • Joining Blockbuster
  • Joining Library
  • Posting Stuff

But also:

  • Resolving that I will never again begin a personal project written in PHP.

Yesterday, you see, I managed to get PHP5 working on Atoll, my local server. It works fine, from a technical standpoint, it installed straight into the right place, it works, it access the databases and everything.

Epistula, however, doesn’t. Neither did AqWiki, Aquaintances, Klind or Pareidol. Why?

Because somewhere in the PHP5 development process, somebody wrote a function to return the contents of a directory back as an array, and called it scandir() which, co-incidentally, is the name of my stock function for returning the contents of a directory as an array. It means that, as of PHP5’s full release, my code is broken. This is, in fact, wrong.

One of the great benefits of PHP is it’s integration. Everything available was in the manual, which was searchable and contained the wit and wisdom of several years of PHP developers who had been where you are before you were there.

The greatest flaw PHP has is it’s integration. Functions have been added haphazardly over the five major revisions to the point where, given a two word function, it’s equal odds to be firstSecond() as first_second() depending on who coded it when. Also, the willingness of the development team to break every previous PHP tutorial in a minor revision (Witness the whole REGISTER GLOBALS debacle), Perl – the language with the most established collection of modules on the market – has a namespace system for added on functionality which works so well even Python copied it. PHP, however, is no longer a stable platform to develop releasable code on, since your code may stop working at any point. Worst, this will manifest itself as a PHP syntax error, and you cannot guard against new internal functions unless you check the existence of every function before you use it.

So, PHP, it’s been nice using you, but until you stop fucking around with the namespaces, it’s time to try something new.

Suggestions, anyone?

Those who spoke on this:

gravatar image

Simon Willison:

2004-03-29 17:22 22 mins after the Original Article

mod_python continues to rock my world. I think modules or some other way of avoiding polluting the default namespace is the one feature PHP needs more than anything else – they are up to nearly 3,000 functions now!

Comment Link

gravatar image

Adrian Holovaty:

2004-03-30 04:17 11 hrs after the Original Article

If you really must work in PHP, write a Python code generator that spits out the PHP for you. :-)

Comment Link

gravatar image

Tim Parkin:

2004-03-30 07:39 3 hrs after Adrian Holovaty

Parrot would be nice.. :)

Comment Link

gravatar image

Tim Parkin:

2004-03-30 07:39 3 hrs after Adrian Holovaty

Parrot would be nice.. :)

Comment Link

gravatar image

Tim Parkin:

2004-03-30 07:40 3 hrs after Adrian Holovaty

Parrot would be nice.. :)

Comment Link

gravatar image

Senji:

2004-03-30 09:40 2 hrs after Tim Parkin

Was that supposed to be mindlessly self-referential? :-)

Comment Link

gravatar image

Senji:

2004-03-30 09:46 6 mins after Themself

Is it supposed to say:

“Logging enabled, logged events have been written to the file /tmp/jabberlog.txt.”

Above the banner when I make a reply?

Comment Link

gravatar image

Aquarion:

2004-03-30 10:48 62 mins after Senji

ahem Yes, of course it is.

(Fixed the thing that caused the multiple comments, forgot to turn off logging afterwards)

Comment Link

gravatar image

Gary Fleming:

2004-03-30 13:23 20 hrs after the Original Article

Until PHP gets some proper namespace support, you should try prepending your own namespace function names, in the same way that the output buffering functions do.

Comment Link

gravatar image

SkepticJoe:

2005-01-15 15:12 42 wks after the Original Article

You have to be joking!?

Comment Link

gravatar image

Aquarion:

2005-01-15 16:13 62 mins after SkepticJoe

Joking how?

Joking by skipping out on PHP?

Annoyingly, I’ve been proved wrong. I’ve been doing little but PHP since I wrote that article – professionally now – but I’m still annoyed about how sucessive itterations of PHP will break both my own code and the codebase at work, purely because we didn’t have a crystal ball handy to see which functions the PHP Dev team would include in future releases.

Comment Link


Thursday 24th June 2004

Quick Bookmarklet

What is a bookmarklet? Basically it's a javascripted bookmark that, when you click on it, performs an action. Some might validate the page, some might highlight all the passive verbs in the document, there are loads of them.

This one searches the current site using Google. Install it by bookmarking the following link:

Search this site

Those who spoke on this:

gravatar image

stephen:

2004-06-25 10:50 14 hrs after the Original Article

I love it when people who know what they’re doing do something and then I get it for free and it makes my browsing experience that little bit better. Thanks aq!

Comment Link

gravatar image

Dave the Lurker:

2004-06-25 18:26 22 hrs after the Original Article

This is one of the most useful things I’ve seen on the net for some time.

Comment Link


Instant Cat Pictures

Since I’ve had my new camera-phone, I’ve been taking random shots occasionally. After a fairly brief stint using Gallery and moblog.co.uk I’ve done my usual thing of writing an Epistula Module to do it a) the way I want it, and b) within my own site. (I started off adapting the webcam module, but that’s bitrotted slightly and was never very good, so I rewrote a whole new thing that uses EXIF data – which my mobile doesn’t do, but my full camera does – and pretty CSS effects.

Anyway, the upshots of this are that to the left on the front page is “That Which Is Seen”, the latest moblog picture, and clicking on it will take you to /moblog, an archive of everything. I need to make the archiving better and make it generate thumbnails properly, but for now this end is working. Next end is the python script to take a piped email and send the graphic and caption to the right places, then I’ll fix the front end properly. Meanwhile, it’s half one and I have work in the morning…


Wednesday 22nd September 2004

Cantrip Diary - ZopeTastic

Okay, so my new workplace use Zope, so it’s probably a good idea for me to use that as a framework. I mean, enough people use it for it not to be too bad, right?

Dear god does it suck. I mean, Whales though really thin gauze, it sucks that badly. I got it working on my local network after swearing at it quite loudly. It’s own personal religion of “Not Invented Here” is going to really annoy me, I can tell.

Lets start with the web server. It doesn’t run though Apache without a tremendous amount of futzing around. I like Apache, and run everything else off Apache, so the fact that all my Zope applications will run off a non-standard port (There are fixes for this, yes, but they also require a tremendous amount of futzing around). This is annoying.

Then there is the user system. I have a user account on this machine, you could even talk to it though LDAP. Requiring your own little world to run in – let alone where you don’t tell me the initial username & password, or where the access file is, or anything – is really annoying. Also, it should be noted that in every SINGLE guide I found on how to reset the password manually it missed the fairly basic piece of information that once you have reset the password, you must restart the Zope server otherwise you will spend half an hour working out why it doesn’t take the data. This, admittedly, is partly a Debian Package problem, but since delving has lead me to believe that it used to ask you for a default username and password on configure, and now doesn’t, I’m leaping to the conclusion that whining isn’t going to fix this any.

It should be a default requirement that every Debian package contains a file in /usr/share/docs explaining a) Which configure options were used, b) What you’re going to have to do next to make the package work, and c) Common pitfalls of the above.

Three, the interface. In the last six months or so, the bar for a web-based interface has gone from a minor hurdle to a max-height pole-vault, mostly due to GMail. However, I can state with no fear of derision that <textarea /> is the single most fucking awful method of inputting code since I used a C64 with a broken delete key, and the fact that the physical location of the source files is shielded from me (and will, I suspect, be chowned something silly anyway) means the best way I can see to develop with this pile of shit is to copy/paste from my default text editor, which is just retarded (And yes, that is exactly how I compose blog entries, but I don’t normally need to keep blog entries in CVS). I suspect there is a better way to do this. In fact, I’m sure there must be, or else Zope would be deader than a very dead thing, which brings me to my next point.

The Docs

My first problem with the docs is the inline commenting system. When I’m trying to digest a reasonably complex idea it is of no use whatsoever for the flow of the text to be interrupted constantly by inane slashdotesque comment. On the other hand, without the inline commenting I’d not have known that the introduction to Zope tutorial – which is far better than the one included in the distro – existed, also, I’d have read the chapter on DTML before the chapter on the more advanced, easier to use, designer friendly and new paradigm of Zope Page Templates, which starts off by pointing out how crap everything you read in the previous chapter was. ARGH

Nevertheless, I shall persevere with this Evil, because I’ve got no choice but to know it, in the hope that I will learn my way around it.

Okay, so “find / -iname ZopeZoo” has failed to find any of the files that are part of the tutorial. Where the hell is Zope putting the bloody files? *ARGH*

Those who spoke on this:

gravatar image

Senji:

2004-09-22 19:00 2 hrs after the Original Article

Mozex is your friend.

Comment Link

gravatar image

Aquarion:

2004-09-22 19:22 22 mins after Senji

Not the right problem.

As I say, copying and pasting into a text area is fine, it’s the fact I want to use a VCS that makes me hate it so much.

Comment Link

gravatar image

Sarabian:

2004-09-22 19:14 2 hrs after the Original Article

Don’t beat about the bush, tell us what you really think of Zope :)

Comment Link

gravatar image

Pingter:

2004-09-23 05:27 12 hrs after the Original Article

“and the fact that the physical location of the source files is shielded from me (and will, I suspect, be chowned something silly anyway)”

No such luck—it’s stored in its own database file of a format I don’t know. Look for a var/Data.fs under /var/lib/zope(2.7)/

However, you can access all your files via Zope’s FTP server, which runs on port 8021 or some such, which is a bit nicer.

Comment Link


Logging

Aquarionics' logging system was designed to work against mod_log_sql, a module that, er, logs to an SQL database. This worked until we upgraded to Apache 2, which log_sql didn't support until recently. Since part of the logging system is the bit of AqCom that shows who linked here recently, I'd rather not convert it to run off plain text files (though I may be converting it to use Sqlite at some point), so I created a perl script that feeds the log into the database in log_sql's format. It looks like this:

#!/usr/bin/perl

use DBD::mysql;

#Database options:
$dbUser = "user";
$dbPass = "password";
$dbName = "epistula";

$database = DBI->connect("dbi:mysql:$dbName:localhost:1114", $dbUser, $dbPass);

#204.95.98.252 - - [24/Dec/2003:15:23:38 +0000] "GET /archive/writing/2003/08/ 
	19 HTTP/1.0" 200 11873 "-" "msnbot/0.11 (+http://search.msn.com/msnbot.htm)"

while (<>) {
  my ($client, $identuser, $authuser, $date, $method,
      $url, $protocol, $status, $bytes, $referer,$agent) =

/^(S+) (S+) (S+) [(.*?)] "(S+) (.*?) (S+)" (S+) (S+) "(.*?)" "(.*?)"$/;
  # ...
        #$database->quote($thisdir);
        $q = "insert into apachelogs (remote_host, remote_user, request_time, 
			request_method, request_uri, request_protocol, status, bytes_sent, referer, agent)
        values
        (".$database->quote($client).", ".$database->quote($authuser).", '".$date."', "
			.$database->quote($method).", ".$database->quote($url).", "
			.$database->quote($protocol).", ".$database->quote($status).", "
			.$database->quote($bytes).", ".$database->quote($referer).", "
			.$database->quote($agent).")";

        #print $database->quote($url)."n";
        my $sth = $database->prepare($q);
        $sth->execute();

}

...and is run using this crontab line:

@reboot tail -f /var/log/apache2/www.aquarionics.com | $EPBIN/apache2db.pl &

Now, the important thing to remember is that this gets pretty big pretty quickly, since it logs every line. It's vitally important that you don't under any circumstances, forget that you commented out this crontab line:

@daily echo "delete from apachelogs where time_stamp < `date +%Y%m%d --date '1 month ago'`" | mysql epistula

Because otherwise you'll discover that your daily database dumps start to hit 16Mb each... BZ compressed... 380Mb uncompressed... oh, lets say four months and twelve days later.

For example.

(I ran the above query, or one like it, just before I started this entry. It's just stopped:

mysql> delete from apachelogs where time_stamp < 20040825;
Query OK, 913830 rows affected (21 min 44.87 sec)

Reformatting for the girlymen who don't have 2000px wide displays and are reading the RSS feed. See? This is why I want to only do partial content, because that way when I do something like this it only fucks up in IE


Coding, Not going postal, and Going Postal

So, today I took time out of my busy schedule to go buy tea.

Actually, I wasn’t getting any work done, really. I’m having a small concentration problem since we entered testing, in that the stuff I’m currently working on is Deep System stuff that is interdependant on almost everything else. This means it takes about fifteen to twenty minutes to swap all the various memory pages into place before I’m producing much new code of any real worth. Each time someone in our open plan office asks me a question, it shatters this delicate balance as I have to swap in other processes like the HTML/CSS structure. The first couple of times this happens I could possibly be refered to as “ratty” at the shattering. After five, I feel the urge to hit things. Not that the office have any real way of telling that I’m currently juggling – to switch metaphors – a couple of dozen balls at the moment, and would like to be left alone.

Net result is that I had a minor argument with someone else that is, in fact, solvable by inserting quote marks, something I realised when I had time to actually think about the problem, rather than desperatly trying not to lose my place in what I was doing to answer the question.

So I went to buy tea.

Since I’m abandoning London for the forseeable, and had run out of English Breakfast (Leaving me with only four types of black tea, five of green (which I don’t drink, but LC does), one of white and three types of Infusions) I decided to go visit Drury in Covent Garden. Naturally I got lost, so I navigated to Covent Garden Market (Specifically, the big square where the bloke who walks on his hands does his show. I’ve never been to Covent Garden without him performing there) and navigated from there. I replaced my Breakfast Tea, got some Ceylon Orange Pekoe and two packets of “Fruit Flavoured” tea – One Apricot, One Mango – and considered that I’d got off lightly.

Then I passed Waterstones.

Or rather, I didn’t. Actually, I went in. I resisted buying a number of books before I found Going Postal. Going Postal is the new Discworld book, It’s good, and it doesn’t come out until the 7th October. You could tell it wasn’t out yet, because there was a noticable lack of large displays with it on or any of the other paraphernalia I usually expect with a new DW release. Specifically, the store only had five copies.

Obviously, it now has four.

It’s good. It’s a ‘standalone’ book in the same way ‘The Truth’ was. Being that it takes place in Ankh Morpork there’s going to be background people you’ve seen before, but the only central person who is a major character is Vetinari, who starts of in a scene that is incredibly similar to one from the Colour of Magic and goes on from there.

It’s good. It also leads neatly on to the next book in the series, which is about Thud. You should go buy Going Postal

Those who spoke on this:

gravatar image

Senji:

2004-09-27 21:42 45 mins after the Original Article

For a book that’s not out yet, it’s been in Borders in Cambridge for a surprisingly long week….

Comment Link

gravatar image

stephen:

2004-09-28 09:15 12 hrs after the Original Article

you can buy white teabags? wtf? I used to drink Earl Grey, until the thrill of barking ‘Tea, Earl Grey, hot’ at the kettle wore off.

*hangs head in shame.

Comment Link

gravatar image

Aquarion:

2004-09-28 10:13 58 mins after stephen

You can, and it’s nice. I don’t buy loose leaved white tea, because it’s five pounds for a 50g bag.

Comment Link

gravatar image

stephen:

2004-09-28 19:37 9 hrs after Aquarion

A little Googling has revealed to my disappointment that the white tea in question is not in fact some kind of innovative tea + powdered milk combination. Now there’s an idea…

Comment Link

gravatar image

lonecat:

2004-09-29 09:36 14 hrs after stephen

It’s been done, by Typhoo. It was called QT and didn’t sell particularly well from what I recall. It sounded rather nasty, to be honest.

Comment Link

gravatar image

Aquarion:

2004-09-29 10:19 43 mins after lonecat

There is also instant tea, along the same lines as Instant Coffee.

Comment Link

gravatar image

Rory Parle:

2004-09-28 11:10 14 hrs after the Original Article

I would take your advice an go buy it if it wasn’t for one thing. It’s apparently “not out” in Ireland in much the same way as it’s “not out” over there. It’s “not out” because it’s “in” my bedroom on the locker.

Comment Link

gravatar image

Tayra:

2004-09-29 00:22 1 day after the Original Article

You can’t, say, put in earplugs to keep out the noise, then put a sign up on your desk that says ‘I’m sorry, but I’m really quite busy and concentrating quite hard, and if you interrupt me you’ll ruin several hours worth of work, which I will take out of your paycheck, so please just leave a note here next to this sign and I’ll get back to you later’? Something like that, anyway.

Comment Link


Saturday 11th December 2004

Projectiles

The Projects Page is back, semi-updated, and using the Epistula design library at last (Only took me two years), also Random acts of Senseless Scripting has also been updated with the new design (It’s been broken since Julyish) and a couple of new early warning scripts.


Thursday 30th December 2004

Code in C

(sung to The Beatles "Let it Be")

(I've never found out who wrote this one, or this varient. I've modified it slightly from the text I found)

When I find my code in tons of trouble,
Friends and colleagues come to me,
Speaking words of wisdom:
"Code in C."

As the deadline fast approaches,
And bugs are all that I can see,
Somewhere, someone whispers
"Code in C."

Code in C, Code in C,
Code in C, Code in C.
LISP is dead and buried,
Code in C.

I used to write a lot of FORTRAN,
for science it worked flawlessly.
Try using it for graphics!
Code in C.

If you've just spent 30 hours
Debugging some assembly,
Soon you will be glad to
Code in C.

Code in C, Code in C,
Code in C, yeah, Code in C.
Only wimps use Python.
Code in C.

Code in C, Code in C,
Code in C, oh, Code in C.
Pascal won't quite cut it.
Code in C.

{ Guitar Solo }

Code in C, Code in C,
Code in C, yeah, Code in C.
Don't even mention COBOL.
Code in C.

And when the screen is fuzzy,
And the edior is bugging me.
I'm sick of ones and zeroes.
Code in C.

A thousand people people swear that T.P.
Seven is the one for me.
I hate the word PROCEDURE,
Code in C.

Code in C, Code in C,
Code in C, yeah, Code in C.
PL1 is 80's,
Code in C.

Code in C, Code in C,
Code in C, yeah, Code in C.
The government loves ADA,
Code in C.

Those who spoke on this:

gravatar image

ruthi:

2004-12-30 14:56 5 hrs after the Original Article

applause

Comment Link


Tuesday 8th March 2005

Magic

One of the things I like most about Python is the lack of Magic things.

The way that solutions don’t take the form of “Prefix the argument with a round blue diamond to make the nasal demons put sugar in the coffee” type thing.

Therefore, getting the answer “Prefix the connection string with a minus symbol” is something that is reasonably likely to make me want to kill things.

Those who spoke on this:

gravatar image

Stuart Langridge:

2005-03-08 15:03 49 mins after the Original Article

Whence came such a comment? That does seem alarmingly unPythonic…

Comment Link

gravatar image

Ben Hutchings:

2005-03-09 01:25 11 hrs after the Original Article

Is this an SQL database connection string? I think every SQL implementation and API turns out to be bizarre and annoying in unexpected ways. I implemented the database interface layer for our application server and spent probably the majority of the time discovering and working around bugs and oddities in the database drivers. In my opinion Python’s DB-API is seriously flawed because it completely punts on the problem of differing query syntax, even to the point of allowing different placeholders syntaxes.

Comment Link


Saturday 2nd April 2005

Project Scout

Somewhat to my suprise, I have recieved not one, but two patches to open source projects that I run. That is that gilmae submitted a better install document for AqWiki, and John Meadows has submitted a new version of the viewer file for MusicDB

Flush with this success, I’ve started a new project. Well, two. Threeish, really. First, I’ve gone back to the base system that Cantrip and Escape will be built on, which is actually the Epistula execution model rebuilt in python and mod_python. This is almost finished (yay) and is far neater than the PHP version (double yay) but I’m having trouble with one thing. So, pythonites who are still reading this crap: How do I initalise a class where the name of the class is contained in a variable?

Two, and more importantly, how should I have known this?

The third thing is a collision of a few technologies I’ve been wanting to use for a while: XMLTV, SQLite and AJAX, or DHTML, or whatever we’re calling it today, with a dash of new-media SMS stuff thrown in. Basic premise for project Scout is that it sends you an SMS ten minutes before a TV program that you wanted is due to start. It’s a little more complicated than that, but not much (Until you get to the AJAX bits, really). Enough for me to be able to use it to drink even more of the Python kool-aid, while having something more useful at the end than a random philosophy generator.


Simplicity

So yeah, new year, newish design. It isn’t perfect, but it’s a start. And the new new design is trapped in PSP until I get a new 30 day trial :-D

Simplicity

I like simplicity. It appeals to my sense of design, and the light grey with some of the most delicate shading I could make visible is nothing if not simple. The boxes and curves design is lifted from previous designs, but where there they were gradiented and filled here they are lightly hinted at rather than rigidly defined. The construction marks on the logo I like too :-)

Complexity

It’s a long way from the new design, which is slightly more heavy on the photographic backgrounds than I usually do, and is therefore something of a departure. Changes are good.

Smart

Today I spent a long time in a car, and a slightly shorter time in an actual meeting with actual clients. For this I am wearing a suit, and am reminded – as I am always reminded – that I need a new suit at some point. I don’t wear suits very often, and part of the reason for that is my enjoyment of the reaction of people who haven’t seen it before. I hate with a passion, however, the shiny clompy shoes, because the shiny clompy shoes are clompy – and I don’t like being clompy – and the shiny clompy shoes go clomp-clomp-clomp all the way home until they wear though my socks and make the backs of my ankles bleed. Which, you know, hurts.

Tech

I suspect that, with all the lack-of-updatingness and the cheese-sandwichingness (though currently it’s a bacon sandwich. Mmm, bacon) I’ve lost most of the geeky percentage of my audience. Though the geeky percentage probably didn’t notice the not-updatingness because they all use RSS readers, and the rest all use friends lists. Why do I bother with the designing of actual web pages again?

Anyway.

Current things that I have been mucking around with include “DOM Scripting” (as well I might), which I will get around to mentioning in a bit, Scripting in computer games (Both Civilization 4 and Vampire The Masquerade use Python as their primary game scripting language, which I find interesting, and have on my list of Things To Write An Article About) and Visual Studio Express.

Open Sorcery types, you can switch off now, because I don’t need your next reaction.

So, I have downloaded Visual Studio Express which is what happens when Microsoft miss the point. Amateur coders are mostly nowadays developing in things like Python, Perl, PHP and if they have had their brains fiddled with, GCC and Java. Lots on Linux. This is, indeed, partly because Visual Studio costs TEN MILLION DOLLARS per license.

Actually, it doesn’t, but as a non-professional developer it might as well do, as the high licensing puts something of a boot-strapping problem in front of learning to dev for Win32, or even Win64. So, Visual Studio Express you can download for Free (as in Beer). Well, you can download a demo for free (as in beer), but you do have to register for free (as in, be spammed for eternity) and have a Passport account (as in “submit to the almighty Gates empire”. Much like you have to do for OpenSolaris) (Except different empire, obviously) (Yeash, you guys are pedantic). So yeah, I’m downloading VC++ (Because I want to design a Half life 2 mod about killing lawnchairs) (Incidentally, Valve’s Developer docs are all in a Wiki, isn’t that interesting?) (Yes, too many brackets, Sosumi) and it’s taking an eternity, though not as long as XCode did. I mean, what do you have to put into an IDE to make it 800mb?

Oh, right. OS X. Chrome, naturally.

So yeah, updates as and when. Also about the Mysterious Project Breakfast, assuming I get around to that too.

Sushi

Bedford has a sushi restaurant. I swear the things follow me around. I am, of course, doomed, but I am doomed with expensive raw fish, and that somehow makes it all worth while.

Dead Ken(nedy)

Charles Kennedy, leader of the UK Liberal Democrats Governmental party, has, shortly after some people accused him of not being a good leader, admitted to having a drinking problem. His chances are not looking terribly rosy.

(From The Friday Thing Dead Kennedy Pool):
When Charles finally goes, the nearest prediction will win its predictor a bottle of Talisker 18 Year Old Single Malt Whisky. And the country will win a second opposition party with an actual leader. Everyone’s a winner.

(Thats three times I’ve attempted to spell “Kennedy” as “Khennedy”, which is your fault, Jason)

Tuesday, Ten AM.

Shortly afterwards all the people who said they wouldn’t run against him in a leadership election will, in fact, run against him in a leadership election “In the interests of the party”.

Wednesday, Thirteen Fifteen, Sir Malcolm Rifkind will announce that he’s actually really been a spy for the Liberal Democrats all along, will enter – and win – the leadership election, and then all three major parties will be basically Tory. This will set off a chain of Heath Robinson events which will naturally lead to the collapse of the entire political system across the world, leading to the rise and rule of a little known previously almost silent group called the “Bloggers” who will alternate between demanding that everyone be nice to everyone else and being so emo their hair cuts itself, their first action will demand that every person in the entire universe gets a weblog or other online journal and the resulting influx of new accounts at LiveJournal will mean that Six Apart become the single source of money in the entire world, except for Sun, who they buy servers from. Sun will open source world government, leading to rule by whoever argues most consistently on the mailing list, which will eventually lead to the population of the world being run by the commentators on Slashdot, leading to great leaps forward in technological research, the population of Space, a new version of Doom, and a world famine as no money is spent on any food that doesn’t go into either kool aid or cookies. We all die, and it’s all Charlie’s fault for telling us about his drinking problem.

Selfish bastard.

Those who spoke on this:

gravatar image

Senji:

2006-01-07 08:31 12 hrs after the Original Article

Mmm, clompy shoes.

Comment Link

gravatar image

Jens Ayton:

2006-01-07 10:00 14 hrs after the Original Article

Hey, these little stamped stamp thingies look a bit out of place now, dont they?

XCode is only 45 megs. The XCode tools, on the other hand, include over a gig of documentation, the three cross-development SDKs and header files for the various system frameworks and libraries although much of the latter lot is redundant, and clever arranging of files in the archive could probably be used to save quite a lot of space.

And, of course, you get lots of useful utilities, like Quartz Composer and, er, Shader Builder. Whee.

Comment Link

gravatar image

Aquarion:

2006-01-07 12:35 3 hrs after Jens Ayton

bq .Hey, these little stamped stamp thingies look a bit out of place now, dont they?

Slightly, yeah. They’ve been removed until I can work out a better way…

Comment Link

gravatar image

dearg:

2006-01-07 10:04 14 hrs after the Original Article

I still read the website version, even though I have an RSS aggregator (and FireFox does RSS), because I ‘m too lazy to work through all the sites I wish to read. Instead, I still intermittently check all the websites of people I find interesting. So, after the long while of seeing the previous design, I was fairly shocked by the new design. My initial thought was that CSS hadn’t been applied, until I looked more closely.

Thinnish clicky-when-you-walk shoes better than clompy shoes when wearing suits. Although I can advise against wearing them for long periods, as the soreness is still an issue unless you buy expensive ones. We could always try to revive the 80’s habit of suits and trainers…

I am wholly in favour of the Mysterious Project Breakfast. I have, in fact, implemented my own version, which resulted in fresh croissants from the local French delicatessen.

Comment Link

gravatar image

Aquarion:

2006-01-07 21:28 1 day after the Original Article

Okay, checking new trigger code to stop it sending double emails occasionally. Pay no attention to the mind behind the curtain.

Comment Link


Wednesday 10th May 2006

Tickybox

(This may not work in aggregators, or possibly at all)

Tickybox

Tickybox

Those who spoke on this:

gravatar image

Stephen:

2006-05-10 14:07 56 mins after the Original Article

Bah; why do I slavishly do everything the internet tells me?

Mind you, it did work out that time I enlarged my penis safely AND naturally…

Comment Link


Tuesday 4th July 2006

Happy Birthday To You

Since I have so far missed both parents and both siblings birthdays because I am incapable of remembering anything, it seems fitting that this is a couple of days late.

Friday, June 30th was the 7th birthday of Mozilla bug 9101, that Firefox should support the soft hyphen properly, on the basis that not having it makes supporting languages with long words more difficult.

Reading seven years of comments, you’ll notice that various people have come up with fixes for the actual problem, but they have either been rejected because they didn’t fix another, related but completely seperate, problem. Or they’ve been ignored entirely.

Seven years, it’s still marked as new, and I fully suspect I shall be posting another entry like this in three years time. One day, I’ll have enough spare money to put a bounty on it.

Sometimes Open Source fails.

Those who spoke on this:

gravatar image

Wafermouse:

2006-07-04 21:52 2 hrs after the Original Article

Sometimes, no kidding. I wonder why some open source projects even have feedback channels.

Comment Link


Tuesday 15th August 2006

Free as in Mortgage Repayment

Okay, so in the first (zeroth?) hashlugradio broadcast, I put forth the view that the OS business model treated the programmers time as worthless. I wasn’t called upon it in the broadcast, but have been since. This is what I mean:

I am an individual programmer – not part of a massive company – I believe whole-heartedly in the Free/Open Source Movement. I scratch itches. I spend my time programming. I give away the results. I do not get paid for this.

How do I pay my rent?

Those who spoke on this:

gravatar image

Edmund Schluessel:

2006-08-15 13:23 45 mins after the Original Article

There’s always the dockyards.

Comment Link

gravatar image

sil:

2006-08-15 13:43 65 mins after the Original Article

A few ways, all of which you already know about:

1. Get a job with an OSS company, who will pay you to hack on Free code (the Linus Torvalds approach)
2. Allow people to influence the direction you hack in on software of your choice with money (i.e., they say “make this thing your priority, because we need it, and here’s some cash”) (the Divmod/Twisted approach)
3. Help people install or run your software with personal contact (rather than just referring them to the FAQ); essentially here you’re acting as a consultant for that particular software (the Lemur/Xapian approach)
4. Charge for support contracts (a bit different from 3 above) and do the support (the Red Hat/Novell approach)
5. Sell nicer versions of your software (with a box and a printed manual, etc) (the Red Hat/Novell approach again)

Comment Link

gravatar image

SJ:

2006-08-16 08:46 20 hrs after the Original Article

In fact, I had this discussion with rory of Soylentred.net ages ago. I have always held that ’the labourer is deserving of his reward’ as my boss would say.

The free software movement is fantastic, excellent and more nice things for end-users like me. it ‘s even a nice hobby for enthusiasts. At the same time, it si the application of marketable skills to prduce a product which you then give away. Seems a shame. It’s not like I wouldn’t pay a small amount for Firefox or videolan or whatever.

I realise that this isn ‘t helping to pay the rent either; but I suppose that the skills you use in writing Open-Source are transferable? are there not commercial entities who’ll pay for your work? or at least universities that’ll give grants?

I dunno, I find the whole thing a little too communist…

Comment Link

gravatar image

mrben:

2006-08-21 10:09 6 days after the Original Article

Simple – you sell your software.

When you are contracted to do work as a programmer, you get people to pay for the work that you do, on the understanding that the benefit they get is the software that you have produced for them, but that the software itself will be released as open source.

As ESR points out in CATB, for the majority of people the value they get is from having the software, not from selling it. If someone contracts you to write software, and at the end they have the software, then there should be no problem with you open sourcing it (assuming it is written into the contract). Thus you pay the rent, and benefit the community.

Whether this works in practice is a whole other kettle of fish.

Comment Link


Tuesday 3rd July 2007

Softly softly

Yesterday, one of my pet bugs in the Mozilla codebase was finally fixed. Almost exactly one year ago today I mentioned the birthday of Mozilla/Fx’s inability to support Soft Hyphens.

After eight years, that’s no longer true

Sometimes Open Source does work.


Saturday 1st September 2007

Vizzinibugs, Heisenbugs and the vanishing birthday

Heisenbugs are bugs that vanish when you turn debugging on.

Schrodinbugs are bugs that don’t manifest until you read the code and realize they could never possibly have worked, whereupon they don’t. These are impossible, yet happen despite this.

Vizzinibugs are the single most common type of user interface bug. They are when the user follows an action path inconceivable to the original programmer. These include things like “What do you mean ‘Esc’ isn’t part of ‘Press Any Key To Continue’”, “I always fill out the password field first”, “I put in October in the ‘From’, and March in the ‘To’ so they’d come back in the opposite order” and the all-time classic, “But what if I want to put commas in my titles?”.

Okay, not an all-time classic, but one bug that Epistula doesn’t have anymore. I’m not sure why anyone would want commas in titles, but there you go. Vizzinibugs are such not because they are inherantly stupid requests, but more that the programmer just didn’t even conceive someone might do that.

But my favourite Vizzinibug of all time was actually my fault. It was in a piece of software for a company I worked for ages ago which, as part of the signup form, requested the date of birth for the customer. It was part of a batch of changes, so I duped another column, built some Crazy drop-downs to input it & change it, take the result, format it and dump it into the date column in the database. So far, so hoopy.

I tested it. Over the next couple of months my coworker tested it, the line manager of our traditional-webdev no-person-over-35 team tested it, the young, hoopy client tested it and ran though the whole thing, and it went into internal beta, all were happy.

A little while later, we started getting back some reports. Apparently some people couldn’t get the thing to save their birthday. The young, hoopy client tested it, and couldn’t reproduce it. My line manager couldn’t reproduce it. Neither could me or my coworker.

Humm.

Okay, could you send us the user id of an affected user please? Meantime marked as WTF.

From us to manager to client contact to users to contact to manager to us, and we had an example. Time to go database diving…

... This user has a birthday set. Oh, that’s a coincidence, it’s January 1st 19… oh. Nineteen seventy.

January the first 1970 is an important date in the Unix world. It’s zero. The Unix Epoch time format is defined, in fact, as seconds since then, and quite a few things work in it. My dropdowns didn’t. The database didn’t. But the functions to format the dropdown results and make sure they were a valid date, and not allow the 31st Feb?

Yeah.

Clicky, Clicky, Fix.

The thing is every person who tested it, from us right to the client, used their own birthday. And since not a single person had a birthday before 1970 – one person was _in_ 1970, but didn’t trigger it – we entirely missed the problem. One of those things that makes you look twice at data validation things, really.

And testing, of course.

Those who spoke on this:

gravatar image

random_c:

2007-09-01 19:29 65 mins after the Original Article

Classic! I may have to send this to noise… or possibly dev.

Comment Link


Nicholas 'Aquarion' Avenell is a web developer in London, you can find out more about him or how to get in touch.

There are more Articles, Projects, Journal Entries, Photographs and things that defy description here, too.

If you're looking for something specific, there are Calendar & Category -based lists of everything.

And if you want to follow stuff that appears here, try a Syndication Feed, or the generic Feed of everything.


Aquarion's last Twitter was: [updating]
Twitter last updated


[RSS Icon][ESF Icon][CDF Icon]
© 2000 to 2008 inclusive Nicholas Avenell
All comments are the property of their creators, published with permission
(Unless otherwise indicated, the opinions and sentiments expressed on this site are those of the author and not of any organisation of which he is an affiliate, including his employer. Caveat Lector, E&OE. sigh)
0.886 seconds, 345 queries, 2.95Mb on Wed, 01 Oct 2008 10:36:18 +0000
Generated by Epistula Version 2.0.3