This is a detailing of some things I discovered/found out whilst making TWaIT.

Oh yeah I should probably start detailing shouldn’t I?

  1. Check Pull Requests:
    I’m gonna start with this one as it’s the one that I can still feel the pain of. If your tool / script / program / whatever is open source and you allow Pull Requests, you’re gonna wanna make sure you check the changes. There was one pull request that I didn’t check which later cost me a good 2-3 hours of work. The worst part? It was over a SINGLE SQUARE BRACKET. TWO HOURS. Luckily I knew the person who made the pull request in real life so I could slap them for it, although I’m still not sure if I forgive them.

  2. Python is REALLY flexible:
    So, my tool really wasn’t that complex. I mean, for most of the core functionality all the difficult stuff was handled by another tool, one which I did not create. However, I still had to program some of the functionality. One of the main snippets I had to write was some code to open a HTML file, add a script tag into the file and close the file. Now, I went through many different methods of doing this, eventually settling on using the open() function built-in to Python. I decided to use this as it was the simplest, but I could have easily used one of the (maybe) 5 other versions I tried.

  3. Structure is important:
    Whilst making TWaIT, I had to change a lot of things. I mean, even the name was changed. So I learned the hard way that is things like structure and comments aren’t in your code, you’re gonna have a bad time (cue Megolovania) . Once I started to take the time to add comments to my code, not only did it make it easier for other people to contribute, it also helped my abissmal memory.

Okay. That’s it. I’m done now…
I should probably sleep

Dan
^C