r/badcode • • Jul 06 '20

[deleted by user]

[removed]

175 Upvotes

56 comments sorted by

View all comments

6

u/RavynousHunter Jul 06 '20

My C# implementation! It should work under .NET Core 3.1; at least, it does in the C# Playground I found. "Features" include:

  • Bitwise maths instead of simple conditionals.
  • Borderline incomprehensible variable naming.
  • Reinventing the wheel.
  • Using both method call and standard query LINQ syntax.
  • Mapping they key binding backwards.
  • Using some weird list-of-tuple nonsense instead of a regular dictionary.
  • Repeated code.
  • Multiply-nested foreach loops!

Its...certainly a sight to behold, that's for sure.

0

u/[deleted] Jul 06 '20

[deleted] — view deleted comment