I’ve found myself looking back at my biggest mistakes in life. Which is a surprisingly tricky task, as I’m more of a live in the moment person. I usually take my actions and consequences for granted. I do learn from my mistakes, but the knowledge obtained is shallow and more of a reflex rather than deep and cautious in a way. This post is probably more useful to me than it is for you. I might write about my personal mistakes in life in a part 2 later on.
In no particular order:
The Hambro switch
We were having issues with the cabled internet at the Hackerspace at my university. I closed the issue after some rummaging. All that was left was to attach all loose cables to a switch; we now call this the Hambro switch. Little did I know that I had inadvertently plugged two ethernet outlets to the switch. These two outlets were in turn connected to the same switch in the switching room. Thus a Switching loop was created, and we lost internet again. However, I had now made the issue larger. The switch behind the wall outlets did not isolate any of its ports, so, it cut all internet access on all of its ports. This affected the wireless network as well, disconnecting some 250+ employees from the internet for half an hour. Some 100 work hours were probably less useful. A chill guy from the IT department came around and fixed the issue. He told me what I’d done and how to avoid it in the future.
- Hopefully, the IT department learned more from this than I did.
We’d just launched a small website for the said Hackerspace in its early days. None of us knew Docker well, but it was cool and edgy: we just had to use it. We did our best and got something up and running. We had no idea what we were doing. Neither was the poor guy who wanted to make production up to date with the code base. One miscommunication and a
docker down was all it took to destroy the website. All the data in our database was permanently lost. We hadn’t used any persistent storage for our docker setup. We didn’t have any backup in place either. The only solace we had was that there wasn’t much data to lose.
- Remember the dangers of using new technology
- Sucking at something is the first step at becoming sorta good at something. We all start at zero, and it’s OK to make mistakes.
- However, remember to weigh in the risk of mistakes you potentially do.
- Setup backup and regularly test that it works.
Bump User profile year grade
This story is less mistake and more of a peculiar bug. We had a database of users with which grades they were in, with values from 1-6. 1 is the first year and 6 means finished. Each year we’d run a SQL query to increase the grade number, just before we received new students. We’d recently moved from Wordpress to Django, and we, therefore, needed new code for this. The snippet looked something like:
for grade in [1,2,3,4,5]: students = User.objects.filter(grade=grade) students.update(grade=grade+1)
Everything looks good with a glance. The result was that every student got registered as finished,
grade=6. What surprised me was that it wasn’t so easy to spot at first. Some of my friends are quick while others ponder a bit longer, understandably. Hint: the solution is to loop backward through the grades, or use ´F()´ in Django.
- Not all bugs or mistakes are easy to spot
One day, I assumed my display was on when it was off. My reflex when unlocking my computer was that the display would turn on after I’d typed my full password. So I typed my desktop password into a Facebook chat. Accident nr 1. My brain was shown a new password a few minutes later, which was forgotten instantly. I hadn’t written the password down anywhere either. Mistake nr 1. A screen timeout later and I got locked out from my computer.
The only hope I had was my stubbornness and one piece of my password which I remembered. I extracted the
shadow-file and cracked it using John the Ripper.
- Write down your passwords somewhere. I could have saved it to my LastPass account for instance.
- Accidents happen