Page: 0 ... 5 ... 10 ... 15 20 21 22 23 24 25 26 27 28 ... 30 ... 35 ... 40 ... 45 ... 50 ... 55 ... 60 ... 65 ... 70 ... 75 ... 80
Using XML in the real world.
Date: 13/10/2008
Some people have some very er... interesting ways to use XML. Myself, on the other hand think of it as a flexible data store for lightweight things like application options and as glue between 2 disparate systems. Said interesting people have tendencies to mirror all the XML elements in C++ with arcane, long winded, fragile and complicated class hierarchies where each element and attribute has it's own class. I however am not insane.

I like tools that reduce the lines of code I have to write. And I almost always use generic DOM trees for all my work, keeps the lines of code to a minimum.

My latest little innovation is a little UI glue library that makes my lightweight XML library (DOM tree style) talk to standard Lgi controls. I've actually been using this for quite a while in the simple case of converting an XML element's attributes to values in controls on a dialog and back again for serializing UI to disk. i.e. take a string value from the XML, stuff it in an editbox, let the user change it, then write it back into the XML element's attribute and then eventually to disk. Fairly mundane.

However this week I'm starting to experiment, successfully, with serializing more complex controls, like list boxes and tree controls to XML elements. I found myself writing the same code over and over, i.e. taking lists of XML elements and using them to instantiate rows into a listbox and back again. So this week I wrote that functionality into the base XML<->UI layer. I plan to apply the same idea to tree controls as well at some point, probably when the need arises. The main change to make that feasible was adding a virtual method to the GList class so that the UI glue code can ask the list item to read or write itself to XML.

I'm always a little careful about breaking the ABI, I'd rather not if it's all the same. But I think thats the great thing about Lgi, it's small enough not to worry about frozen versions that I can't change, if a change would improve the apps and make my life easy... do it.
(0) Comments | Add Comment

Dogfood: Scribe v2
Date: 8/10/2008
I'm going to try using v2 as my day to day client from here on. I don't know why I didn't do that earlier but I'm always busy and well it was a little bit chicken and egg, it's not quite stable enough for everyday usage, because I don't use it everyday. So here I go.

The IMAP code has come a long way but I don't get very far when I work on the IMAP codebase. It's all reasonably well designed but I keep bumping into new issues that disappear when I try and reproduce them. So I think I need a whole bunch of unit tests that I can run over and over. But I havn't done graphical unit tests before so I'm thinking I'll have to use the built in Scribe scripting... maybe. It's a lot of work just to make that happen. I keep finding little issues in the scripting language compiler or VM that means it's not ready for the unwashed masses. But for IMAP unit tests I'd need to be controlling the server as well as the client. Which adds to the complexity even more.

But if I just bumble around doing testing on my own it's very time consuming anyway. There is no easy way to work on the stability and completeness without getting myself into a lot of work.

Anyway I'll get the mail2 back end working smoothly enough for everyday usage in the meantime. Which is mostly smoothing over issues in the UI <-> back end changes, which applies to all the back end layers. So thats still very useful.
(0) Comments | Add Comment

76 MPG
Date: 4/10/2008
Oh yeah, I hit 76 MPG on that last tank. Lots of nanny riding for sure, but that's a personal best. :D

That's about 3.07 liters/100km in metric.

But it's no Bajaj, which are known to hit 100km/lt (235 MPG) on the highway with a 125cc engine (same as my scooter).


In other news someone I know IRL is converting their car to electric. I bumped into that URL when I was moaning about 300kW V8's being legal here whereas 300w electric bicycles are not on the communal white board and Carmel wrote her URL beneath. I would too, but I can't afford to convert my car (say ~$20k?) at the moment. However I might be able to afford converting the scooter at some point. Muhaha.
(0) Comments | Add Comment

Linux Stack Traces
Date: 30/9/2008
For a long time now, the windows port of Lgi has had the ability to print out a stack trace on crash or via the LgiStackTrace method. Well I thought I'd have a look around for a similar way to do this on Linux and well, there is! So I've implemented that and using c++filt it prints out a quite readable version of the current calling stack. The only downside is that it doesn't do line numbers because the line number information is buried in some obscure ELF block that has it's own instruction set. Yes I don't want to believe it either but this IS Linux after all. *sigh*

2 steps forward... 1 back.
(0) Comments | Add Comment

Backup Software
Date: 29/9/2008
I'm looking for some backup software, something reliable that I can schedule to run once a day. But then I thought of some others that'd be nice.
  • Keep older versions of files, but at least one latest version.
  • Offsite FTP support with encryption (gpg would be best)
  • Would be nice: Portable (Local settings + Mac / Win)
  • Lightweight.
  • Free?
Anyone know of something like that?
(3) Comments | Add Comment

Mobile Phone Development?
Date: 23/9/2008
The current state of affairs in the Apple iPhone App Store is just enough to keep me from diving into doing mobile phone apps. Currently I'm waiting for Android to show up and see how it works on actual hardware before committing to anything platform wise. My old v3x is the most abominable piece of crap I've ever had to live with, it promises things and then takes them away because they don't work. Whereas the simple text mode phone I had before that didn't promise much but delivered in spades (old Nokia).

So the iPhone was on the top of my list of possible replacement phones. But there are a few too many limitations in the iPhone for me to be happy with it. I did actually play with one in person a week ago for the first time. And it's amazing sure, it's even "The Future(tm)" that we like to joke about. Definitely a long way ahead of the competition, who aren't even in the same ball park. But Google have a reputation for doing things right and well, maybe they'll pull off a miracle and bring a series competitive devices out via their partners. It's a really good sign that they use the same Webkit back end for HTML rendering. And from what I hear the whole system is designed to be very flexible. Something that most phone vendors DO NOT GET. Which is very refreshing to see.

If Apple cleaned up their act with the App Store and made the iPhone do MMS I'd be there with bells on, till then it's wait and see.... wait and see.
(1) Comment | Add Comment