OpenOffice.org 2.0

Well, I installed the preview packages in Ubuntu on my desktop this morning – just to play with for a few mins. Guess What? It looks like it doesn’t completely suck!

Some of the UI still feels/looks really weird – but that seems to be a legacy of the strange widget stuff that it used to use.

The “File->Send->Document as E-Mail” and “Document as PDF Attachment” are pretty funky things (assuming they link into evo properly).

The presentation module, Impress looks to have improved no-end. 1.1 was sucky (just like PowerPoint). If you’ve ever used Apple’s Keynote, you know how good presentation software can be. The new one looks to be usable and may mean I swear a lot less when preparing presentations.

Although why OO.org has it’s own package manager is totally beyond me.

I do wish the MySQL connectivity worked out of the box though… maybe it’s just this beta (or the fact that when you select OO.org in synaptic, it doesn’t load up all the Java stuff needed for JDBC connectivity, or ODBC).

Note that I still love Gnumeric and Abiword.

Building the MySQL GUI tools on Debian


sudo apt-get install libgtkmm2.0-dev libglade2-0 \
libglade2-dev libgtkhtml3.0-4 libgtkhtml3.0-dev \
libxml2 libxml2-dev uuid-dev libuuid1

Then, grab the source trees (mysql-gui-common, mysql-administrator, mysql-query-browser). You should probably grab source tarballs rather than using the BK trees… I had to edit some files to get it to build – but that’s probably just today. Tomorrow it will be a different story.

you’ll want to add the path to mysql_config to your PATH

cd mysql-gui-common; sh ./autogen.sh –prefix=/whatever/you/want && make && make install

cd ../mysql-adiministrator; sh ./autogen.sh –prefix=/whatever/you/want && make && make install

cd ../mysql-query-browser; sh ./autogen.sh –prefix=/whatever/you/want && make && make install

you should then be able to run them and connect to a mysql server

BK emacs integration

I finally got around to installing the bk-emacs integration that i cloned way back when. Seems useful enough. I do like emacs – some things I do wish were better (especially how to get started – it’s annoying having to learn weird keys for things). But, once you know it – it’s great! Very fast to navigate around and very powerful (and customisable to whatever you’re doing atm).

bk://bk-emacs.bkbits.net/emacs

although the web is probably better :)

http://bk-emacs.bkbits.net/emacs

helping in public forums

So, what’s my deal with helping out in public forums?

we seem to all be a helpful lot at mysql… hanging out in the web based forums at dev.mysql.com (for some obscure reason, some people actually like web based forums. give me usenet anyday), or on the lists (like the cluster list) and in #mysql on freenode.

i guess i help where i can (and it’s quick, or a likely bug, or when it’s a good idea to clearly document something). Also, reading the forum/list can help me learn some stuff too.

I less enjoy it when it is “Distributing (basic) clue to users”. Especially when it’s just simple bloody obvious things. People tend to actually have well thought out questions on a list. IRC it tends to be different.

although i wont go and spend time investigating something for a list/forum Q. I figure that if i have to expend effort, then it’s probably something that should be put to support – as in paid support.

I remember asking for a fair bit of handholding into GNU Arch. But that is a bit of a “once it clicks, it’s all good”, and i was trying to get into it before there was the wiki and stuff with lots of useful info and stuff.

although this is just my ramblings and thoughts… will have to look up if there’s any actual policy on this.

over use of XML when XML is not what you want

sometimes XML is great. Sometimes, it’s not. If GnuCash used a database (e.g. embedded mysql) – we’d be in great shape. I could easily extract stuff out of it into my own reports and stuff and it’d rock. Instead, I can’t and have to learn some other way. annoying. Accounts.gnucash is now about 700kb. That’s less than a year. Going to be lots of fun in a few years… hrrmm.

All this finance data is in tables. You know what that means? A relational database is ideal.

same with Gnome Time Tracker. cool app. Won’t scale at some point no doubt. Currently, i have a greater than 300kb gnotime-data.xml file. why? I ask. Surely there is a better way. How is it going to run when i’ve been using it every day for year?

On the other hand – using XML for documents in OOo and stuff is like the best thing ever (it makes sense). For RPC it still seems like a huge amount of overkill.

it’s another rant on ‘the right tools for the right job’

MySQL port of MemberDB

Spent probably about 3 hours today porting the database schema to MySQL 5 along with finding some bugs in the process. Pretty minor ones, mainly to do with how things could be improved to improve compatibility with schemas written with postgresql in mind.

While chasing up some stuff on why the serial type alias in mysql wasn’t exactly the same as postgresql serial type (which is an integer with a sequence and default value) i found this gem in the postgresql docs:

Note: Prior to PostgreSQL 7.3, serial implied UNIQUE. This is no longer automatic. If you wish a serial column to be in a unique constraint or a primary key, it must now be specified, same as with any other data type.

Great huh? So upgrade postgresql and don’t go sifting through your tables (now come on, everybody uses a serial/auto_increment field in a lot of tables) you loose!

i.e. there’s bugs in memberdb now that weren’t there when i started and i didn’t change any code to make them. hrrm…

anyway, i’ll write at some time the few easy steps it took to get the schema across (it takes no time once you know what you’re doing – like a few commands and a few search and replaces).

for now, you can get stuff from arch: stewart@flamingspork.com–memberdb/memberdb–mysql–0.4

the schema loads, i’ll have to change one bit of code to make it all work – otherwise everything should be fine (but let me test first – or provide fixes, not complaints :)

effective bk usage

(inspired by jimw talking about it on Planet MySQL)

I take a bit of a different approach…

I’ve got directories for 4.0, 4.1 and 5.0, and within them, i have clones of the main ndb tree (called ndb, so there’s a path like “MySQL/5.0/ndb”). I don’t ever edit in this tree, it’s my clean one. I use it for pulling and pushing.

I then ‘bk clone -lq ndb foobar’ (where foobar is what i’m doing, or ndb-foobar, depending on mood). If i have a seperate part to foobar (e.g. stage2 foobar), i’d clone it off the foobar tree (e.g. ‘bk clone -lq foobar foobar2’). The idea being I can work on stage 2 before stage 1 is pushed (and find any problems with stage 1 and pull before i pull into stage2 and can no longer do work).

i use the -q option (quiet) to bk often because printing out a few thousand lines to screen tends to slow things down.

It would be interesting to investigate ways to improve hardlinking performance as a clone takes longer than it really should (read about 20000 inodes, write about 20000 inodes). Although (i haven’t checked this) – a clone probably *copies* the checked out files, not link them. So it’s really copy about 10000 files and link about 10000 files.

A ‘du -sh’ on a 5.0-ndb clone says 232MB. After ‘bk -r clean’ (i.e. have no files checked out) is 136MB. i.e. you are saving 136MB for cloning with the -l option. Now, if BK (and us really), we’d check out files always as read-only, which would also be hard linked across clones. This would further save 96MB per clone. When you check out a file for writing, it then creates a copy of it – so you only use the disk space for the files your editing (and only use the disk space for the sfile when you check in).

“What about directory disk usage?” I hear you ask. Well, a MySQL 5.0 clone has 1053 directories. So, for each clone, we’re using 1053 inodes. On XFS with 256 byte inodes (the default) this works out to be 263kb of disk space. Let’s consider a bad case where we need another block of disk space for each of these directories (to hold all those directory entries for those 10000 files). This would mean 4MB of disk usage.

For a really clever bk (and config) you could have a clean tree of 232MB and each clone only take up less than 5MB of disk space. As it is, the checked out files aren’t hard linked, so each clone takes up an extra 96MB of disk space.

In essence, we’re using 19 times more disk space per clone than we need to.

Now, if ccache is really clever (i don’t know if it is) it would hardlink object files so we use even *less* disk space for a compiled tree (a ‘du -sh’ on a compiled max-debug tree is about 1GB).

Why have I gone on about this so much? Well, disk is cheap – except in laptops where replacing disk or getting a big one isn’t easy or cheap.

Also, backup is expensive, slow and awkward.

maybe at some later time i’ll talk about the theoretical IO usage of some things….

Reprogramming with a large, sharp axe.

Somebody needs to do this for the Australian Business Register web site.

“Help” on the forms for registering for an Australian Business Number and GST can be “if yes, click yes”. Oh really… I thought i’d just click ‘no’ when I really meant ‘yes’.

Plus, it can ask you all sorts of strange questions that befuddle the reader if they have no real idea on the fine details of australian taxation law (i have no such knowledge, and don’t care for it).

And they have a field in the form – “declaration completion date”. which is, (from the help) “The declaration field records the date the application is completed.”.

I’d like to know why they can’t auto-complete that field. Today is probably a safe bet.

On the brighter side of life – talking to someone at ING Direct was a lot more pleasurable.

and one more thing…. the ‘Exit’ button at the end of the ABN process doesn’t work. I’ll never get out now! NOOOOOOO!

wish for a useful tool

I’ve started to draw up (by hand) some UML diagrams of parts of the cluster code – I figure this way I can better learn (and remember) what belongs to what and what has what.

This really useful where the question comes up of “I need a NdbMgmHandle.. now where are we storing one of those?”

In the past, cscope has been a hell of a useful tool for all this – but it seems to fall down on C++… at least through the emacs mode i’m so fond of. There was also a similar in house tool at SGI which I was incredibly fond of (I don’t think a single day went by where I didn’t use it) – maybe I’ll have to bug people to release it as open source :)

I was thinking a nice perl script could produce some Dia XML (for a bit of by-hand processing i guess). Just chuck it a bunch of header files (with the class definitions in them) and it can sort out a graph of what has what etc.

Maybe Dia XML could be a bit complex for the first go – but hey, even some kind of web thingy could be useful.

I want a quick-glance image, not a pour through everything or grep.

Although I do wish cscope was a bit less broken – it can really get royally confused on some (quite valid) source.

Weatherall’s Law

If you don’t already – point your RSS feed reader over to Weatherall’s Law

and examine her most recent writings about Software Patents.

Kim describes her blog as “Being the thoughts and comments of an Australian IP Academic on IP, IT, etc.”

There is, of course, the legal disclamier that the views expressed there are her own and not that of….

which for some reason makes me giggle. Maybe it’s because she’s a lawyer and isn’t just putting it on there to sound cool.

big clean up and office supply shop

since my office is moving out of my bedroom and into an actual room, I went and did some office supply and furniture shopping.

I hate traffic.

I REALLY hate traffic. It’s boring, slow, not fuel efficient and really wastes your time while you’re sitting in it. I haven’t driven through the CBD and near-CBD during the day in so long that I’d forgotten how bad it really is. urghe.

But Ikea was great. The big store in Richmond – wow, i could spend hours in there (and a few thousand bucks no doubt).

I bought a (smaller) desk. This’ll go in the bedroom (always need somewhere to do stuff) – and move my big one downstairs (not looking forward to that).

Also got a nice big thing to hold my ever-expanding CD collection.

It’s interesting… working for a company based in sweden and buying office stuff from Ikea. I guess it’s in the spirit of things.

The reason i was in the CBD was to get a copy of my birth certificate. Without which, it’s a lot harder to get a passport (which, beleive it or not, i’ve managed to do without all my life). But now, work requires it – so I’m getting one.

Getting the piece of paper took about two minutes, getting in and out of the city took forever.

Bloody city car park. coming out, i swear there was less than an inch either side of my mirrors. talk about crapping myself as driving out. That and it was next to impossible to get out of the car once i had parked (and spent about 5 or 10 mins actually looking for the darned thing).

Been sorting out my filing cabinet too. Trying to separate the work and personal stuff. will put work stuff somewhere more specific. Going to need to – what with expenses et al now being sorted out from home (can’t just leave them at work until i fill out the form).

but should all be good…. just have to get on with that task i’ve been assigned.