june 2016.

More work at Čankovo. There was a serious downpour, and the weeds went wild, lots of it to scythe. The dug-in paths in the orchard on the right, left over from the time when the vegetables were there, aren't helping. I have to go up and down with the švorceniger, watching out not to slip (which did happen once or twice, without consequences).

The black currants that we planted five years ago have mostly dried, and the remaining two bore lots of fruit. But they're puny, I managed to pick just one glass, and then nobody would eat that, so eventually she decided to make a liquor of it. She poured a liter of tutifruti, put the currants in and then started adding honey. Which does ooze, but so slowly... She tried to push it through the funnel with a chopstick, which eventually worked, after half an hour.

Few weeks later she tried to measure the alcohol in that. Turned out negative, i.e. less than zero. Because the alcoholometer doesn't really measure alcohol in the solution, it measures density. With the three spoons of honey it was denser than water.

In the end nobody wanted to drink that. Few had sampled a small shot, nobody went for seconds. We redistilled with something else three years later.

At Firriver, Nina is toiling over the stored procedure to send SMS to patients. Which is a helter skelter of an add-on, with hundred faults. Ad one, it's always sent via middleman, because SMS sent from a computer is actually an email, but how to make a phone number into an email address - that's a datum that's not available to everyone. The providers could just publish that for free, but no, why would they, there's no income from that, the sender pays. So they rather sell that datum at some price which pays only to those who'd use it in bulk, hence middlemen, who then do it for multiple customers of theirs.

Codewise, this means writing a message record into the middleman's database (luckily, also a seaquel server, so no extra installation, the only obstacle that's missing here). Not immediately, but in some intervals (daily, as it were). The middle guy then processes it in some more frequent intervals, and also updates the status field on each unresolved message, one of „not sent yet“, „transfer error“ and „sent“. There's no „received“ status...

On top of that, we stuck to one middleman outfit for a couple of years, wherever David caught them, and then had to switch because they were as firm as a linden dick, so we switched to a different gang and, of course, had to readjust a bunch of thing around connection protocol, field names, some bits of logic.

The worst part is that when Jan wrote the initial version, he was in a phase where he thought that it all best be done inside SQL server, much faster than within Feds, but... Instead of using that proof-of-concept to now do it the regular way, to make the template message editable by users, just like they can do with mailmerges and some other reports, no: this version was copied over and over, and each copy got messed with (and up) separately. Inheritance via stevka (i.e. clipboard, v. house dictionary).

The text has field placeholders. The trouble is that the text is part of the stored procedure, which will send it after replacing the placeholders with real values - names, times etc. So it's something we have to write, each change each time. Worse, it's not object oriented, seakwel's language is procedural, there are no classes, no inheritance, no clear structure, where does it fit into the project, there's no project, no clear naming convention, nothing at all. The language doesn't even have decent functions for textmerge (to be honest, neither does m$ Word, but okay, it's a text processor and at least it does have fields). Instead, it's cleaver and string chopping, as if in some Basic of 30 years ago.

INSERT INTO SmsServer.dbo.Messages(Body, ToAddress, directionID, TypeID, Statusid, Customfield1, Customfield2)
SELECT 'Dear '+RTRIM(dem_firstname)+', This is a reminder that you''ve got a '+RTRIM(lst_procedure)+' appointment at '+
@ClinicName+' at ' + apt_apptime,
Phn_number, 2, 1, 1, Apt_pk, 'Appointment'
FROM #apts
WHERE apt_confirmed = 0

And so when there's an update or a new customer, even if it's only to move a comma in the text or add an extra field, it was Nick who put it on his shoulder. And even logic would change sometimes, there were extra requirements, e.g. to inform all patients who are scheduled for friday after 14:00 that they shouldn't come, pipe broke and majstors will be there to fix it. Now catching exactly those is not a problem when you know the database and work at Firriver... You only need to bring their records to... a new copy of this procedure, with a different text. The only mitigating factor is the utter lack of morphology in english, no cases no genders, excepf for a couple of avoidable pronouns.

If he gets in trouble, he'd call Nina or me, whomever he catches. The code was, of course, badly formatted, unreadable, chaotically laid out... pure trouble. But customers loved it, a clinic looks much more serious if it messages it patients.

In the following years this only got more complicated as the number of customers who wanted this grew, and then there was demand for 2-3-4 different kinds of messages, or extraordinary messages for special occasions (so many pipes broken...). And then it spread wildly. In the end I couldn't even follow what Nick was doing and where.

By the end of the month she started repainting the house, all white this time. First our bedroom, which will still be called the blue room. Next was the yellow, also still called yellow.

We noticed that at the garden a piece of mortar fell off the ceiling, in the front wing lobby, guess it drips somewhere. Also, the water found its way down the rear shed wall, and it doesn't look well. Called majstor Mile, he came, took a look, and we quickly agreed on what needs to be done. Starts on 2nd of july.


Mentions: Čankovo, David Berton, Feds, Firriver Fertility (Firriver), house dictionary, Jan Brenkelen, Majkrosoft (m$), majstor, majstor Mile, Nevena Sredljević (Nina), Nicolas O'Keefe (Nick), švorceniger, in serbian