News for hackers. Stuff that matters.
Re:Building a BitTorrent client from scratch in C# by whoisthemachine on Tuesday July 05, 2016 @08:14AM (#12035847)
Also, fantastic work. The readability of C# really shines through here - I could grok all of this code instantly :)
Re:Building a BitTorrent client from scratch in C# by cheatdeath on Tuesday July 05, 2016 @08:36AM (#12035932)
Thanks.

Actually organising the write up forced me to tidy up the code much more than I otherwise would have. I definitely find C# to be one of the more readable languages although I have had to debug and untangle some C# messes before.

Yeah I remember changing it to a SortedDictionary but I changed it back. I can't remember exactly why, possibly because it's supposed to be sorted by raw UTF8 bytes rather than a nice neat C# string and I didn't want to start using byte arrays for dictionary keys. I guess it only needs to be sorted when in the BEncoding format and it felt better to keep the internal structure as simple as possible. The tradeoff is it doesn't support incorrectly encoded torrent files – I'm really not sure how much of an issue that is.

Re:Building a BitTorrent client from scratch in C# by kidmenot on Tuesday July 05, 2016 @08:49AM (#12035999)
Agreed. Properly written C# code is very readable. I write most things in it these days and couldn't be happier about what this language has become.

I have a few minor gripes with id, but they mainly relate to missing syntactic sugar rather than actual shortcomings.

Kudos to OP, great job.

EDIT: fix up grammar mistake.