Talk: Hoe releasen minder pijnlijk werd bij de ANWB Alarmcentrale

Op 6 april 2017 hebben Jeroen Reijn en ik een presentatie gegeven op DevCon 2017 over hoe we continuous delivery hebben ingevoerd voor het case management systeem van de ANWB Alarmcentrale. We zijn daarbij ingegaan op welke uitdagingen we hadden en hoe we die weg hebben genomen.

Abstract

Continuous Delivery wordt vaak geassocieerd met een snellere time-to-market, maar wat als dat niet je voornaamste probleem is? Een aantal jaar geleden heeft de ANWB besloten om zich van een traditionele enterprise organisatie te transformeren naar een Agile organisatie. Bij de afdeling Hulpverlening zijn wij met drie teams bezig met het ontwikkelen van het nieuwe case-managementsysteem voor de ANWB Alarmcentrale. Als onderdeel van onze agile werkwijze maakten wij een release en rolden wij deze uit aan het eind van onze tweewekelijkse sprints. Dit leverde ons regelmatig verschillende problemen op en halverwege 2016 besloten we dat het anders moest. We hebben toen een beweging ingezet richting Continuous Delivery. In deze presentatie zullen we ingaan op de uitdagingen die we hadden, hoe we die hebben aangepakt, en op een aantal onverwachte voordelen.

Writing LibreOffice macros in BASIC

I had the questionable pleasure of needing to write some LibreOffice macros. This gave me some WTF moments that I will share here, in the hope that it will save a future reader 1 some agonising moments Googling these problems.

BASIC runtime error. Argument is not optional.BASIC runtime error. Argument is not optional.
This happens when you press “Run BASIC” (or F5) while the cursor is in a function or sub that requires an argument. Put the cursor in a sub that doesn’t require an argument (e.g. Main) and try running again.

BASIC syntax error. Label $(ARG1) undefined.BASIC syntax error. Label $(ARG1) undefined.
In other languages results from functions are often returned using the “return” keyword. This error occurs when you try to do the same in BASIC. Change it to FunctionName=ReturnValue.

Returning arrays/lists
If a function is called from a cell formula and an array is returned by that function, it will be converted to a 2D Array. This happens even if the function is immediately used as a parameter to another function, e.g. “=Function1(ListReturningFunction())“.

If you return a 1D Array, it will be converted to a 2D Array with 1 row and n columns. If you want to return n rows, you should define a 2D Array of 1 by n in your function:

Dim returnedArray(1 To n, 1 To 1)

Returning booleans
Similar to the Array-problem above, boolean values are converted when they are returned to a cell formula. They are converted to strings. Those strings cannot be used by formula functions that expect booleans (e.g. AND(), OR(), NOT()) . Have your BASIC functions return 0 for False and -1 for True instead.

Returning Null
Null is converted to an empty string. Some older sources suggest it as a way to fill the cell with an error value, without triggering error dialogs from the BASIC interpreter. That doesn’t work any more.

Recalculating
Use Ctrl-Shift-F9 to force a recalculation after changing a macro. Ordinary Recalculate (F9) does nothing and neither does autocalculate. I’ve had a few times where the forced recalculation (“hard recalculation” as it’s called) doesn’t work either. It might be a bug in the current version, but if you encounter it, closing and re-opening the sheet does seem to work.

Python
LibreOffice supports Python macros, somewhat. Apparently 2, embedding them in your document is a process that involves manually unzipping the .ods document 3, moving the scripts in the resulting folder, editing the manifest file and re-zipping them. That might not be much better than suffering a bit of BASIC.

Notes:

  1. That might very well be me.
  2. I’m aware that this is a link to OpenOffice.org. The LibreOffice people haven’t recreated all documentation after the fork.
  3. Like many modern file formats, Open Document Format files are just zipped folders.

Roundcube and X-notifier revisited

A couple of years ago I updated the X-notifier script for Roundcube to support multiple mailboxes. (Original post.) There was still an annoying bug in it: whenever the session expired the script wouldn’t recover. Lately that’s been bugging me more than usual. So, I figured I’d fix it. Continue reading “Roundcube and X-notifier revisited”

Roundcube and Google Contacts

The Roundcube logoOne of the reasons I use Roundcube is that when I was shopping for a webmail client, there was a plugin that provided Google Contacts integration. Unfortunately, that plugin hasn’t been updated for over a year and it has rate limiting issues. So, when upgrading my Roundcube installation to 0.8.4 I decided it had to be replaced. Updated for Roundcube 0.9. Continue reading “Roundcube and Google Contacts”

Roundcube and X-notifier

A couple of The X-notifier logoweeks ago I decided it was time to upgrade my Roundcube installation again. I don’t really enjoy doing that due to the amount of plugins I have installed. But it was overdue. In what must have been a stroke of pure brilliance, I allowed Webmail Notifier to upgrade too. (Part of that upgrade was a rename to X-notifier.) Continue reading “Roundcube and X-notifier”

Pensioen: wat kun je vandaag nog doen?

Voor veel mensen is pensioen nog ver weg. De helft van de Nederlanders denkt er dan ook niet over na. Toch is het wel belangrijk. Maar ja, moeilijk, moeilijk. Een andere keer dan maar? Nee! Hoe eerder je begint, hoe harder je pensioen groeit. Als je in 2004 inkomen had, is het zelfs extra belangrijk om dat nog dit jaar te doen. Continue reading “Pensioen: wat kun je vandaag nog doen?”