What Happened to Demo 13?

What Happened to Demo 13?

By Frances Buontempo

Overload, 30(169):2-3, June 2022


Making mistakes and forgetting are facts of life. Frances Buontempo tries to find ways to tackle this.

I’ve not had time to write an editorial because I attended the ACCU conference in person this year and spoke. Travelling is surprisingly time consuming and tiring, especially if you’ve not done it in a while. Furthermore, being around crowds of people can be overwhelming when you are out of practice. My talk was about traffic flow and crowds of people moving in space, which involved simulations to remind me how this real life stuff works. The conference was run as a hybrid event this year, so some attended in person while others joined remotely. It worked well. If you’ve never been to a conference, find one and go. If you can’t afford it or persuade work to pay, you can sometimes volunteer and therefore get in for free. Also, don’t forget you get a discount for the ACCU conference if you are an ACCU member.

You will be unsurprised to learn my talk involved coding your way out of a paper bag. I have been using this as a toy problem to play around with various machine learning and simulation algorithms for a very long time now. Each attempt involves a paper bag and some blobs moving around trying to get out of the bag. Sometimes the blobs are ‘particles’ which either simulate Brownian motion [Wikipedia-1], or follow a particle swarm optimization [Wikipedia-2]. Sometimes they are ants, forming an ant colony [Dorigo04] or a bee colony [Scholarpedia]. You could even imagine a miniature cannon firing cannon balls and use genetic algorithms to decide the best angle and velocity to fire them with [Buontempo13]. Having a go-to toy problem often fires off lots of ideas and can also help you focus on specific areas rather than trying to research everything and leaving a trail of half-finished projects. Or maybe the deadline of giving a talk helps. Or both.

Managing to think of a topic and implement something is one thing. Writing up slides is another. This isn’t hard, but I’m never satisfied with them. I don’t want to crowd them with too many words, but I want enough there to remind me what to say. Speaker notes don’t help because trying to talk and look at people is enough multi-tasking without having to try to read as well. I also like to show a live demo of blobs moving in space, which introduces another problem. With about 16 demos, each taking various combinations of parameters, creating batch files meant I didn’t need to remember which parameters to use when. I considered naming these files, but naming is hard and I didn’t want to forget which order they were supposed to be in. The obvious solution was to number them instead. What could possibly go wrong? One demo per slide might have worked, but of course some slides had no demos, some had one and a few had several. Guess what? During my talk, an audience member asked a question. Great! However, I couldn’t remember how real life worked, misheard, and thought something about ‘Precinct 13’ had been mentioned so I missed the actual question. You may be familiar with the film Assault on Precinct 13 [IMDB], originally made by John Carpenter back in the 1970s, in which a gang siege a police station. That would be simulated by blobs surrounding a paper bag, whereas my blobs were trying to leave the paper bag at the time, so this ‘question’ seemed like a quip or suggestion for another talk another day. It then dawned on me I hadn’t been listening properly, so I asked for the question to be repeated. Turns out, I had shown demo 12 and then demo 14, begging the question, ‘What happened to demo 13?’ The 13th demonstration was duly shown and we all moved on. I think I got away with it.

Making mistakes is a fact of life. Sometimes you can gloss over problems, but owning them is often better. Or owning up you didn’t hear the question. By using numbers, the audience could spot I had missed something. No, not a lack of a file called demo13.cmd, not triskaidekaphobia, the fear of number 13, but rather an inability to count while trying to talk. Conventions, like numbering, help people follow what’s happening. People can spot where you have gone wrong or forgotten something if there’s some kind of pattern to follow. Conventions in naming help us spot when something seems out of place. What happened to demo 13? What happened to Windows 9? And so on. Convention and pattern recognition helps us navigate around ideas and physical space. You might expect butter to be somewhere near the bread at a buffet breakfast in a hotel. If you are looking for an even numbered house and each house you walk by is odd numbered, crossing the road may help. If you come down our end of the street that won’t work. Our house has a name rather than a number, which means a local taxi firm refuses to come here because their computer system can’t cope with addresses without building numbers. Furthermore, all the front doors down the road from us are even numbered, starting at 4 and ending at 12. What happened to number 2? I have no idea. And just to keep you on your toes, numbers 49 and 51 are opposite us. I suspect there may be ‘historical reasons’ for the unconventional numbering, though I can’t be sure what. I’ve been trying to find my way round a large, unfamiliar code-base recently. I resorted to asking a colleague for help locating some code and was told the source file was in an unusual place ‘for historical reasons’. This must be a euphemistic way of saying there is no sense in how things currently are, though they have ended up this way because changes made over time, including refactoring and repositioning, may have left a few bits and bobs in unusual places.

So-called ‘legacy’ code bases can be very difficult to work with, particularly if you don’t have the bandwidth to make them less confusing. Some say a complete re-write might be better than tinkering with the spaghetti mess. Others might say: ‘Nuke it from orbit, it’s the only way to be sure.’ Some of you may be familiar with this phrase, based on a quote from the film Aliens [IMDB2], “I say we take off and nuke the entire site from orbit. It’s the only way to be sure.” For me, it’s a stock phrase to use about certain types of code, so I was taken aback when I said this once and was told off for talking about nuclear weapons. The trouble with cultural references is they don’t work if a group of people don’t have a shared taste in films and the like. It’s easy to forget your go-to memes and quotes may not be universally understood. I’m aware I have mentioned a couple of films as I am writing, which you may or may not know, hence the inclusion of an IMDB link. Overload deliberately follows the academic style of including references so you can check writers’ claims and do further reading around a subject. This is not just convention for convention’s sake. Context and background help communication and learning, and sometimes force writers to check they are actually right.

Conventions also tend to come and go. Consider ‘Here come the beards’, which often gets rolled out when older programmers speak up. So, what happened to all the women? OK, we know what the phrase means; however, not all old people grow beards and in fact many young men are growing beards and wearing their hair up in a bun. Things change and our stock-phrases might need to change accordingly. Let’s not hold on to them for historical reasons.

Conventions can be a help. As discussed, the layout of food at a buffet can enable people to move round space and find what they need. Clearly marked exits help people find their way out of buildings. Using pictures as well as words, for example in airports, is useful for people who don’t speak the local language. Many usual approaches seem sensible at first sight. For example, write ups and talks frequently seem polished and don’t go into false starts and dead ends. We expect to be told the good things and not the bad. The Guardian recently wrote about research articles [Guardian22]. Covering various aspects of scientific journals, including paper copies potentially becoming redundant, it also talks about publication bias. If journals want positive results (this works) rather than negative results (this doesn’t work), this can skew the research that gets written up. It’s actually really useful to know what approaches have failed and muse on why. This can lead to new ideas or stop people wasting time on things that don’t and can’t work. The Guardian article also claims:

Studies almost always throw up weird, unexpected numbers that complicate any simple interpretation. But a traditional paper – word count and all – pretty well forces you to dumb things down.

If you have tried to do something and it didn’t work, then write an article. If you have weird unexpected numbers (or strings) then chat about it on the accu general mailing list [ACCU]. Maybe write that up too.

Patterns help us spot outliers and mistakes. Similarly protocols, such as driving on a specific side of the road, help life flow smoothly. Memes and similar can be a great, succinct way of communicating, however, it’s worth taking stock once in a while to consider if times have changed or there is now a better way to do things. Our brains seem to be wired up to spot patterns. The last Overload had an article about Wordle [Handley22], a daily puzzle to guess a five letter word. Wordle has sprouted many similar games, including Primel, which involves guessing a five digit prime number [Primel]. Prime numbers don’t have handy patterns like vowel and consonant combinations, though there are a few rules to help you get started, for example no five digit number (apart from 00002) is even and none end in a five (apart from 00005). For a choice of five digits, some can only be arranged in one way to get a prime number, for example 99991. Other combinations are not prime, for example 19999 is 7 × 2857. Nonetheless a surprising number of five digit choices can be arranged in several ways to make a prime. 13789 has loads. I periodically get three of the five digits in the right place and find several other prime numbers that would match the pattern. I could make a list or a little program with some regex to find out how many such numbers there are, hoping to find an amazing pattern, but I know full well I won’t. It’s possible to say many things about prime numbers but I’ve never seen any useful rules to quickly detect if a number is prime or not, let alone find a prime number containing certain digits.

Patterns can help or hinder. Much has be written about the display of information and how to avoid giving the wrong impressions. For example you may have been encouraged to use donut charts rather than pie charts, since humans seem to be better at judging distances, here the length of the donut’s sections, rather than areas which a traditional pie chart uses [Robertson16]. You may also be aware of Simpson’s paradox [Stanford]wherein two variables may seem to have a positive or negative (or no) correlation and yet dividing the data into subgroups and running the same analysis make the correlation disappear (or appear). Simpson’s original example showed this happening with a medical treatment. For the whole population there was a 50% success rate, so no evidence of any difference in recovery between those taking the medication and those not. However, when he grouped the data by gender, the subgroups each showed a higher success rate with the treatment. Patterns can appear or disappear as your perspective shifts. If you spot an oversight or mistake, call it out. And if you spot any typos in this publication, let me know. They do slip through, even though a whole review team and the production editor try to flush them out. And finally, if you forget what you are doing, having supportive people around to help you out is tremendous. So, thanks to everyone for a great conference this year and thanks to Overload’s writers and review team for their hard work.

References

[ACCU] accu-general mailing list: https://accu.org/members/mailing-lists

[Buontempo13] Frances Buontempo (2013) ‘How to program your way out of a paper bag using genetic algorithms’ in Overload 118, published December 2013, available from: https://accu.org/journals/overload/21/118/buontempo_1825/

[Dorigo04] Marco Dorigo and Thomas Stützle (2004) Ant Colony Optimization MIT Press

[Guardian22] Stuart Ritchie ‘The big idea: should we get rid of the scientific paper’ published 11 April 2022 at: https://www.theguardian.com/books/2022/apr/11/the-big-idea-should-we-get-rid-of-the-scientific-paper

[Handley22] James Handley (2022) ‘Taming Wordle with the Command Line’ in Overload 168, published April 2022, available from: https://accu.org/journals/overload/30/168/overload168.pdf

[IMDB] Assault on Precint 13 (1976): https://www.imdb.com/title/tt0074156/

[IMDB2] Aliens (1986): https://www.imdb.com/title/tt0090605/?ref_=nv_sr_srsg_0

[Primel] Primel game: https://converged.yt/primel/

[Robertson16] Andrea Robertson (2016) ‘Pie Chart vs Donut Chart: Showdown in the Ring, published 6 December 2016, available at https://medium.com/@hypsypops/pie-chart-vs-donut-chart-showdown-in-the-ring-5d24fd86a9ce

[Scholarpedia] ‘Artificial bee colony algortihm’, available at: http://www.scholarpedia.org/article/Artificial_bee_colony_algorithm

[Stanford] ‘Simpson’s Paradox’ on Stanford Encyclopedia of Philosophy, published 24 March 2021, available at: https://plato.stanford.edu/entries/paradox-simpson/

[Wikipedia-1] ‘Brownian motion’, available at: https://en.wikipedia.org/wiki/Brownian_motion

[Wikipedia-2] ‘Particle swarm optimization’, available at: https://en.wikipedia.org/wiki/Particle_swarm_optimization

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.






Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED


By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED



Settings can be changed at any time from the Cookie Policy page.