Love your code for who they are!

The unrealistic ideals of writing beautiful code

Soooo, I've spent the past few weeks trying to learn Python and Typescript. I've spent countless of hours reading some great tutorials, watching very well produced videos on YouTube. Today I finally realised I have made a big mistake in the way my learning is structured - I will tell you why!

I'm so grateful to all the talented and brilliant people out there that's sharing their knowledge. It's amazing how easy it is to gather information about a new topic or interest that it makes me anxious to think about how I'm not utilising that fact. Oh, that sounds like a topic for my next post :) Anyways... when diving in to a new topic, Python for example, what I did was:

  1. Go the official website to find some background info about Python
  2. Try to find the name of that cool snake I saw while on vacation in Thailand 10 years ago
  3. Go to and search for "Introduction to Python for dummies, and some cool snake photos while you are at it, please and thanks!"
  4. Get amased by the cool stuff you can do, and how easy it looks!

"THIS is great! Looks like I can actually build something cool and have my friends think I'm a genius." - Nils, 2021

After going through the basics of Python (still not knowing the name of that damn Thai snake), my process looks something along these lines:

  1. Read a good tutorial
  2. Try to actually understand what is going on
  3. Copy/paste the code and modify it to work for your use case
  4. Try to rewrite said code from scratch
  5. ?????

You shall not pass!

This is where I got stuck, time and time again... Am I really THAT stupid?

It took me a while, but I have now finally come to the realisation that step 4 (and partially 3) is completely useless - at least for me. What I found out is that I actually HAVE the knowledge to solve the same problem that was solved in the tutorial. I just can't do it as good, yet... What was stopping me seems to have been a fear of writing "bad" code or me being afraid of embarassing myself in front of myself(!?). I don't know enough about psychology to go down that route... My process would now look like this:

  1. Read a good tutorial
  2. Try to actually understand what is going on
  3. Get working on solving the same problem with the limited skill I have
  4. IT ACTUALLY F**ING WORKS!!!!!
  5. Improve until I feel happy
  6. See #5

Happy nerd!

What I'm trying to say with this is - Don't fall in to the trap that I did and try to solve everything exactly as the tutorials/books are showing you. Are the tutorials what Instagram is for setting unrealistic body expecations? Maybe not... but still, you should not compare your code to the super models out there, especially not when you are just starting out. Start with what you know. Let it be a bit ugly. Let it stink a bit. While learning, I would rather have some stinky code that works and I can call MINE than a slightly modified example that I got working without knowing how.

The code is more loveable, and the enjoyment it brings is so much greater!

PS. I'm not recommending anyone to actually ship their ugly and stinky code to a production environment! There's a reason I am not on the cat walk of a Victoria secret's show, and that reason is (mostly) good. There are some norms the society set for us that we, sadly, must/should follow.