Eric TF Bat's Journal

It's People Like You What Causes Unrest

Solutions
the-dark-batpup-returns
[info]etfb
I think I have a solution to the Shamble/Announce issue that will satisfy the whingers. We'll see how it goes.

I also have a solution to the fact that PHP5 doesn't fully support MySQL 5 stored procedures. It's functional so far; again, we'll see.

Now, I'm off to a party, if it's still on. Granted it started 3 hours ago, but what the hell: it's that or a night of programming...

Ho Hum
the-dark-batpup-returns
[info]etfb
Oh dear. Bijou flamewar-ette on the Shambles today. I posted yet another reminder about using Lochac Announce and NOT using the Shambles for announcements: the former because it's what it's for, and the latter because otherwise people will assume they can't get all their announcements without subscribing to both, on the principle that some people seeing announcements still on the Shambles will only post on the Shambles.

A certain baron took offence at my tone. A certain fencer got rather snippy. A certain former baroness damned me with praise so faint you'd need a magnifying glass to spot the traces, but you take what you can get. I was sorely tempted to publish my policy on People Who Get Offended, which I reproduce (again) from a comment on Stilgherrian's blog:

There is a class of person (not a very high-quality class, but a class nonetheless) who enjoy being offended. They want to feel outrage, they like to see their expectations thwarted and their standards denied. It gives them a little thrill, in reference to which I would probably use the word “frisson” if I were, you know, a wanker.

And who are we to deny them their enjoyment?

Let the poor sad buggers vent. It gives them something to do. It’s that or sexually assaulting the cat.


The irritating bit is: there's no downside to having two mailing lists (the offended parties were complaining that they've "always" gotten by with one, presumably because they don't choose to acknowledge the people for whom the Shambles is too noisy to be useful) and plenty of advantages. But some people just don't like the idea of anyone else making a change without asking them, or something. And so they turn it into a personality war instead of just learning to cope with change. It annoys me, because the people involved are otherwise sane, likeable individuals who I don't usually want to beat to death with clubs in real life. But they're happy to be breath-takingly rude on the list (while accusing me of the same) because they feel that everyone's opinion is equally worthy, regardless of how ill-informed it may be.

Sigh.

... Hmmm... thinks to himself: is it possible, using Mailman, to set up filters on what you receive? Could we have it set up so that, say, people could subscribe to a limited form of the list? Any message with a [A] in the header (and no "Re:" at the start) goes to everyone, and any message without that, or with a "Re:" indicating that it's a reply to an announcement, only goes to the normal subscribers. That would work, I think. Any mailman fans about?

Edit: nope, doesn't work. Messages with [A] in the header just don't go through, for some reason. Something screwy with the regexp parser or the assumptions it makes; I don't know. At any rate, it won't work.

Captain's Blogging
the-dark-batpup-returns
[info]etfb
After I mostly got my database layer working, I decided to rethink it. I do that sometimes; it's usually better to get the underpinnings right early on, because it only gets harder if you leave it: when you're putting the finishing touches on the wallpaper is no time to reconsider the floor plan. I've written database layers before, and also played with third-party ones, but never been entirely happy. Embedding SQL into PHP is a bad idea, the same way embedding PHP into HTML is: thinking bilingually is difficult, and besides they don't make dual syntax modes for text editors, even Emacs. The best solution I've invented is the Xenolith Engine one: a bunch of SQL queries in a separate .sql file, accessed by name from a database library. Probably I would have just used that, except... I now have access to MySQL 5.0 on all the servers I use (my own laptop; my personal webhost at Nearly Free Speech, and the better-years-late-than-never upgraded sca.org.au server), and MySQL 5 has stored procedures! So I can put the functions where they belong — in the database — and get past this bilingual piffle once and for all.

I popped in to a couple of local businesses to quiz them about their time-keeping techniques today. The account told me he uses time tracking built in to his tax software, which rings a bell, but I mentioned this to my mother (the ex-accountant) and she surmised that it probably wasn't a very good solution. The receptionist at the building inspection office said they don't usually track that sort of thing, but she half talked herself into believing that maybe they should, because they were relying on guestimates and they may be way off without realising it. She gave me the bosses' card, so I might give them a call when the prototype is working and see if they'd be interested in trying it out, free of charge for a little while, in return for a promise to let me know if it has an effect on their calculations. That kind of data is useful for marketing.

In other news: I got the Politarchopolis website back up and running. As I've probably mentioned, the PHP4 DOMXML library that I used for my XML stuff isn't available in PHP5, so I had to make some changes. Fortunately, I only had to change one library file, and once I found the right plan of attack it was fairly easy, even despite the documentation which, as is usual for PHP, was woeful. So at least that's out of the way.

Ho hum. Time to write some stored procedures. Goody.

Progress
the-dark-batpup-returns
[info]etfb
I've written a fairly simple database layer for Captain's Log, so I can avoid fiddling directly with SQL queries. I've done this before, but never in PHP5, so I did it from scratch and it took very little time. I want to expand it a bit, but there's a law of diminishing returns, so I'll leave it for now, use it as-is, and see if it really needs more work or if I should just tread lightly.

Meanwhile, in unprofitable realms: I've fixed one of the installation scripts for Canon Lore, so hopefully Baron Bartholomew will be able to come on board as one of [info]teffania Canon's minions. Hardest part of that: finding out where the frack I put my password to get onto the Canon Lore administrative subsite. Got it now, so I'm fine.

The Polit site is still down. Current problem: the new XML library is fussy about appending XML document fragments. I need to wade through the godawful computer-generated documentation to find out how to fix that, and then it should be fairly plain sailing. Still on track to have it working by Friday, [info]sleepy_ermine, don't fret!

Long term, I'm hoping to install WordPress MU on the sca.org.au server and move the entire Polit site over to it -- not just the blogs but all the content, if I can figure out how to integrate my own stuff properly. That way, someone else can take it over. I intend to do something similar for my own site, flurf.net, because rolling your own website engine is just too much pain for too little gain.

Now: sleeps.

Captain's Log: The Database
the-dark-batpup-returns
[info]etfb

Behold, this dump of test data from the Captain's Log database:

+--------------------------------+---------------------+
| Client                         | Staff Member        |
+--------------------------------+---------------------+
| Chapman & Co Phrasebooks       | NULL                |
| Idle's Bicycle Repairs         | NULL                |
| Jones and Jones Spam Supplies  | NULL                |
| Palin's Pet Shop               | NULL                |
| Cleese's Luxury Hotel, Torquay | Henry Wensleydale   |
| Gilliam's Cheeses              | Henry Wensleydale   |
| Mr Pither                      | Stavros Popolopolos |
| Mr Praline                     | Stavros Popolopolos |
| Raymond Luxury Yacht           | Stavros Popolopolos |
+--------------------------------+---------------------+

This is the beginnings of the data structure behind the software. My test data "user", Wensleydale's Cheese Emporium, employs two staff members, one to advise on cheeses and the other to give Greek Dancing lessons while playing the bouzouki. Rumour has it they also sell cheeses, but I'm not able to comment on that. Note how some clients "belong" to particular users, and others are available to both (and are therefore marked as NULL).

It took me entirely too long today to get the database worked out, because of a weird bug in the tool I was (perhaps foolishly) using to save me some time in setting things up: apparently, if you care, a table specified as "DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" is incompatible, in certain critical ways, with another one specified as "DEFAULT CHARSET=utf8", even to the point of refusing to allow foreign keys to be set up. The tool I was using told me they were identical, because some programmer got his event handlers in a twist and forgot to write the code to save the crucial piece of data. And of course, the error message is tremendously informative:

Cannot find an index in the referenced table where the
referenced columns appear as the first columns, or column types
in the table and the referenced table do not match for constraint.

How obvious. Sigh. So, not much done apart from creating the database and doing up a bit of test data. Next trick will be to make the mockup display the test data, instead of the hard-coded bits it shows right now. That will have to wait a day or two though, since I also have to get the bloody Politarchopolis website sorted out...


Captain's Log: BETA!
the-dark-batpup-returns
[info]etfb
(Well, very early alpha, really, but nobody knows what that means any more.)

Want to see what Captain's Log might look like, kinda sorta? I've put up a mockup. Gradually, I'll make the various parts of the mockup work, until it's no longer a mockup and is actually usable for daily timekeeping. If you want to play with it, I'll keep posting regular status reports here, so you know when you can give it a whirl.

Notice the very childish icons and graphics. That's to emphasise that this is not a finished product. A proper graphic design will be the final step, when everything else is working flawlessly. That way, you'll never be fooled into thinking you're using the finished product and then accuse me of incompetence because it doesn't seem to work.

Captain's Log
mildly-retarded
[info]etfb
A long time ago, I wrote a program called Captain's Log. It was a Windows 3.x application written in Delphi 1 (I said it was a long time ago) and it sold modestly — very modestly — for a while until I got distracted by full-time employment and kind of let it fizzle. It still has its loyal users, but in general it's pretty close to abandonware.

I'm thinking maybe it's time to resurrect it.

Captain's Log helps professionals keep track of their time. The problem it solves (because all software should solve a problem, even if it's just "I have too much free time, how can I waste it?") is the billing of time to clients. Suppose you're an accountant or a lawyer. Every day, you deal with clients, and you're expected to keep track of how much time you spend with each one, or doing work for them, or answering their phone calls, so they can be charged like a wounded bull a fair price for your efforts. As a general rule, doing this manually is a pain in the arse, and ends up eating hours a week with fairly mediocre results.

The big flaw in most time and billing programs is that they work after the fact. "What are you working on right now?" they ask at random times during the day. Or, worse, "What did you work on today?" You have to guess, fudge the figures, and generally get it wrong.

Captain's Log is different. It has a four main buttons: Start, Interrupt, Pause, Stop. When you begin work on a task, you click the Start button and, at your leisure, fill in the details of what you're doing. It tracks your time from your initial click, so that if you're not quite sure what you're working on until you're getting into it, you can still bill the time as soon as you know. When you get an interruption, be it phone call or email or scheduled appointment, you click Interrupt, and again fill in the details. The difference here is that as soon as you dismiss the interruption, it takes you back to whatever you were working on previously. For lunch breaks, and loo breaks if your boss is really picky, you click Pause, and when you come back you dismiss the pause box and carry on -- it's just a special form of Interrupt where client = your digestive system, generally. And at the end of the day, you click Stop. At no time does the program interrupt your train of thought to ask what you're working on, which is the part of my employer's time tracker that I particularly hate. And it doesn't need you to sit down at the end of the day and make up some plausible sounding numbers, because they're all there already. You get into the habit: I'm changing what I'm doing, so I click a button and off I go.

Experience with the original version of Captain's Log is that people billed thirty percent more than they had with the guesswork-and-stupid-questions method. They also spent close to zero time on the chore of time tracking, instead of hours.

So I'm thinking: I could turn Captain's Log into a web-hosted service. Write a Windows client with the four big buttons, and have it sit in the system tray (sorry, notification area; sheesh!) and let it communicate with the server by HTTP. Users would pay a license, maintain their own client and task lists, and get reports in PDF, HTML or Excel spreadsheet format. The underlying tech is really very simple, so maybe there'd be copycats, but I don't expect to get rich. I'd just like to bring the old dog back from the seaman's mission and see if he can still sail.

If anyone out there currently struggles in their mundane life with the billing of customers, drop me a line or post a comment; I'd like to hear how you manage, and if this sounds like something you'd like to try.

Home