Rainclouds and Olive Branches

Rainclouds and Olive Branches

By Frances Buontempo

Overload, 28(157):2-3, June 2020


Sometimes warning signs get missed or ignored. Frances Buontempo considers signs of trouble and seeds of hope.

By now, you might have realized I am unlikely to write an editorial, and you’re right. The warnings signs have been there for years. Before I make my excuses this time, let me apologise for the typos in the previous edition of Overload . When I read through the final draft my mind was on others things; telcos, meetings, deadlines, global pandemics. I suspected I wasn’t paying 100% attention. At that point, I should have stopped and asked for help, or at least stepped away from the keyboard for a while. Many thanks to Daniel and Bob for catching the mistakes and correcting the online version.

Do you ever have a nagging sense that you’re missing something? The pressure of a deadline or needing to get something out of the way might encourage you to ignore the sense of doubt, and press on anyway. Sometimes that’s the right thing to do – a distraction can derail you. However, sometimes you need to listen to your gut feelings. This discernment takes practice. If you’re trying to hunt the cause of a bug, experience can drive you to look for one kind of cause. This may or may not be pertinent to the problem at hand. A rigorous approach, adding tests round various possibilities and eliminating them one at a time might be the best way. Or, it might be worth trying your first instinct to initiate investigations. If you catch yourself with a sense of déjà vu some hours later, with a dim recollection of having tried that already, you do need to step away from the keyboard. Listen out for warning signs, then decide a course of action. Going with an impending sense of doom or possible looming disaster and forming action plans every time isn’t wise. Being aware that something might not work, and forming an exit strategy or plan B, or at least being prepared to, might be more sensible.

Some warnings are hidden in plain sight, for example compiler warnings. Do you ignore these or #pragma disable specific warnings? I deliberately turned off all warnings related to doxygen comments on a codebase a while ago, thereby reducing the number from a couple of thousand to about 40. Some may argue that turning off warnings is a crime – the warning is often telling you something important. However, in this case, the remaining problems were genuine issues, or rather ones that could affect the outputs of the system, which we managed to fix. Since we were used to the flood of warnings, we had ignored them, allowing new problems to hide in the noise. Linters and other code analysis tools can cause similar problems – a flood of issues makes it hard to know where to start. It’s OK to hide some problems for a while, shielded by an umbrella of some sort, as it were, and concentrate on what’s left.

It’s a shame you can’t turn off compiler errors at will. A way to avoid a deluge of error messages is to compile the code frequently – small baby steps. I used to write code for days before attempting to build it when I was a lot younger. When I finally got round to trying to compile, usually on a Friday afternoon, I ended up staying late, giving up in despair after several attempts to Ctrl-z my way back to something that might work. First, undo and redo isn’t a good way to do version control, and second, smaller changes means smaller, incremental builds. Furthermore, you can commit your code to a proper version control between steps, and get a proper weekend. I can’t face working the way I used to ever again, partly because I can’t hold that much state in my head any more, and partly because the smaller steps appear to make progress quicker. Regardless of whether you are working on a compiled or interpreted language, if you are walking in the shadow of the valley of a worrying cloud of errors and warnings, find a sheltered spot and fix one small thing at a time. Give yourself an olive branch of sorts – a glimmer of hope that the flood will stop soon.

I touched earlier on getting older changing my perspective; however, it can also cloud my judgement. If I see a problem that’s similar to something I’ve encountered before, I may filter the evidence or discussion through the eyes of my experience and miss subtle, or glaring differences. Sometimes the newest or youngest person in a group asks the best questions. You can suffer team-blindness or experience-blindness, rather like Hans Christian Anderson’s story of the Emperor’s new clothes [ Wikipedia-1 ]. Two weavers are paid a fortune to make the Emperor new clothes. They take the money and eventually hand over a magic invisible outfit, which he duly parades around town wearing. His subjects are too afraid to speak up but eventually a child cries out, “But he isn’t wearing anything at all!” The older people are perhaps afraid of the consequences of speaking up, or can’t understand why no one else is pointing out the obvious, so wait and wonder. It takes a child to point out the situation. In some kind of parallel, Greta Thunberg [ Wikipedia-2 ] has spoken out on climate change so many times. Her speeches elicit various reactions. Some would claim she is too young to understand the economy and will ‘grow out of it’ when she has bills to pay. Others would say there is no economy if everything is dead. I know which side I’m on. In both cases, a brave young person calls out a situation.

Getting older means you have had more time to develop deeply ingrained habits, some may be good, some may not. I’ve been trying to do at least 10k steps a day for a while now. I do wonder where the magic number came from, but that’s another story. Wandering off to have a cigarette outside might not do much for my health, but it does up my step count. Standing up during our daily stand up and pacing on the other hand might be a good thing. However, I need to remind myself that being a few hundred steps away from my target isn’t a disaster – for any routine or habit, you need to understand why a specific approach is being taken or metric is being used. Cargo-cult style rumours or superstitious going on [ Buontempo14 ] are prevalent. “Have you tried turning it off and on again?” “You have to do this in the right order”. “You mustn’t write tests for this – it’s just a script.” “It is written.” Such across-the-board statements should be questioned. Sometimes ideas are recommendations written by experts, perhaps giving best practice guidelines. They may not apply in all circumstances across the board, but it’s worth listening to people who know what they are talking about. It’s OK to have questions, for example examining the source code used to model epidemiology data and wondering if it’s thread-safe. That doesn’t make you a full-on Luddite.

If you are given general advice or guidelines, ask “Why? For what purpose? For what reason?” I’ve mentioned the five whys before [ Wikipedia-3 ]. Do the same if you have a habit or ritual you stick to. Some things are helpful for a while, but end up no longer applying. Some things are hard to stick to, like exercise, but reminding yourself why can be motivational. Other things are total nonsense and need calling out. Sometimes, you really can’t tell what’s for the best, so need to sit tight and see what happens.

When you question approaches, you may find nobody knows what will happen if things change. In that case, you need a way to ask “What-if” type questions. When I worked in finance, I worked on countless risk systems, trying to measure how much money might be lost under various circumstances, and insure against possible outcomes, I also came across ‘PnL attribution’ engines [ Wikipedia-4 ]. These attempt to find root causes of changes in value – the PnL, profit and loss of the name. Both types of systems allow you to ask “what if” questions. What if interest rates go negative? What if there’s a recession? Some questions may not be covered in the model: negative interest rates caused problems, not just in real life, negative prices of commodities may not be catered for, everybody staying indoors for weeks and giving up shopping apart from buying bread flour may also be somewhat specific and not covered. This doesn’t make the models useless. They can’t deal with some situations, but they still allow you to explore what might happen under a change of circumstances.

However good or bad such system are, they require some form of mathematical model or rules (think finite state machine), which need encoding. Many systems are incredibly complicated so it’s hard to know where to start. Nonetheless, starting somewhere, with a simple model or set of rules gives a starting point. A glimmer of hope. If you want to see what happens if you change the interest rate, r , slap the interest rate in your model and try what-if scenarios. See what happens. It may do flaky unlikely things, so improve your model, after you have tested it thoroughly and made sure you don’t have lots of bugs. Don’t panic. Currently, another r , the r number, is making the news. Again, don’t panic. This r , the reproduction number, works rather like an interest rate – it gives exponential growth. If it’s less than 1, then things don’t grow/spread out of hand. However, let’s ignore the pandemic elephant in the room for now. It’s surprising to see how surprised people appear to be about exponential growth, if the number of times it has been explained on the news is anything to go by.

Without a numerical problem, you can still ask what-if questions. Try role-playing a situation with someone, or running a discussion in your head, like fixing a bug. I’ve mentioned rubber duck debugging before [ Buontempo20 ]. Believe it or not, you can build computer simulations to explore possibilities rather than giving a repeatable output for a given set of inputs. One claimed form of AI, chatbots, may help you role play to decide how to proceed. Another, to my mind, canonical example, are cellular automata, ‘Conway’s Game of Life’ being well known [ Wikipedia-5 ]. I am told John Conway recently died of the pandemic [ Guardian20 ]. As I saw tributes flow in, one reminded me of using the game of life to build a simulated computer, which could run the game Tetris [ StackExchange13 ]. Over-engineered, but fun.

Let’s face the elephant in the room. The pandemic had warning signs. I watched news of Wuhan going into lockdown and worried for people living there. It never occurred to me this would spread. I suspect I’m not alone. Back in 2015, Bill Gates gave a TED talk entitled ‘The next outbreak? We’re not ready’ [ Gates15 ]. It takes expertise and discernment to know how to respond warning signs. During the pandemic, I notice people misunderstanding information. When we are told over 60s with underlying health conditions are more at risk, some people hear, “If you’re under sixty or don’t have health problems, you won’t catch the virus.” As we all know, trying to convey technical information is hard. Does making code multi-threaded make it quicker? It depends. People want easy answers but that’s not always possible. Andrew Peck wrote a short piece for us [ Peck14 ] a while ago, exploring technical communication, describing us as prophets, scribes and high priests. Re-listening to Bill Gate’s talk certainly makes him seem like some kind of prophet. But, as they say, hindsight is 20/20. Mind you, that seems to mean average eyesight [ UrbanDictionary ] – I’m not sure if that’s a good thing or not.

I’ve talked mainly about rain clouds so far. There are some olive branches, or rays of hope on the way though. By looking at warnings, a few at a time, you can overcome problems. I hope we can look back on what’s going on across the globe now, and form our own rainbow of promises, figuring out things that need to stop or change, and finding new ways of working and even living. These two thoughts are well expressed by Schopenhauer,

All truth passes through three stages. First, it is ridiculed. Second, it is violently opposed. Third, it is accepted as being self-evident.

Mostly it is loss which teaches us about the worth of things.

References

[Buontempo14] Frances Buontempo (2014) ‘Peer Reviewed’ (editorial), Overload 123, October 2014, available at: https://accu.org/index.php/journals/2017

[Buontempo20] Frances Buontempo (2020) ‘R.E.S.P.E.C.T.’ (editorial), Overload 156, April 2020, available at: https://accu.org/index.php/journals/2775

[Gates15] Bill Gates, March 2015, ‘The next outbreak? We’re not ready’ available at: https://www.ted.com/talks/bill_gates_the_next_outbreak_we_re_not_ready?language=en

[Guardian20] ‘John Horton Conway obituary’, The Guardian , 23 April 2020, available at: https://www.theguardian.com/science/2020/apr/23/john-horton-conway-obituary

[Peck14] Andrew Peck (2014) ‘People of the Doc’, Overload 124, available at: https://accu.org/index.php/journals/2044

[StackExchange13] ‘Build a working game of Tetris in Conway’s Game of Life’, available at: https://codegolf.stackexchange.com/questions/11880/build-a-working-game-of-tetris-in-conways-game-of-life

[UrbanDictionary] ‘Hindsight is 20/20’: https://www.urbandictionary.com/define.php?term=Hindsight%20is%2020%2F20

[Wikipedia-1] ‘The Emperor’s New Clothes’, https://en.wikipedia.org/wiki/The_Emperor%27s_New_Clothes

[Wikipedia-2] Greta Thunberg: https://en.wikipedia.org/wiki/Greta_Thunberg

[Wikipedia-3] ‘Five whys’: https://en.wikipedia.org/wiki/Five_whys

[Wikipedia-4] ‘PnL Explained: https://en.wikipedia.org/wiki/PnL_Explained

[Wikipedia-5] ‘Conway’s Game of Life’: https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life

Frances Buontempo has a BA in Maths + Philosophy, an MSc in Pure Maths and a PhD technically in Chemical Engineering, but mainly programming and learning about AI and data mining. She has been a programmer since the 90s, and learnt to program by reading the manual for her Dad’s BBC model B machine.