At the end of the second year, I started working on a more complex networking system: BitTorrent. The biggest issue with the BitTorrent protocol for me was the lack of being able to test until I had the basic protocol down and the extension protocol to download the torrent files. Once I had that part down, I started working on creating smarter algorithms for pulling peers from trackers, distributing pieces of the peers and settings choke/interest flags on peers.

Once I had most of the parts down, I decided I want to implement the micro-transport protocol (uTP). I had significant issues with that, as my Stream class was just a giant mess of spaghetti code, which doesn’t work correctly.

This project is a bit special for me as I still work on it from time to time. I learned how legacy code gets introduced (damn you past me!), how to refactor code properly, and how to upgrade a project to use new language features.