We all know what good code looks like.
Here's your chance to use that knowledge for evil and write your worst Java ever.
- Fork this repo, and create a branch for yourself.
- Pick a class, and complete the skeleton method so that the tests still pass, but try and make the implementation as horrific to understand at as possible.
- Create a PR for visibility so we can all see your submission
- Use incorrectly named variables/methods/classes
- Make the formatting as horrible as possible
- Break all conventions
- Use Threads, Futures
- Make it overly complicated - add lots of extra classes and methods
- Use lots of casts/conversions
- Perform unnecessary calculations
- Use arrays to be more opaque
- Don't limit yourself to ASCII - use UTF-8, emojis, etc
- Abuse generics
- Add misleading comments
- Use Exceptions to move data around/as part of the execution flow
- Go all "enterprise" on it
- Splash the lambdas and functional programming everywhere
- Use reflection to bend the rules
Basically, make it look as horrible as possible.
Do everything you shouldn't.
Even better if anyone reading the code can't even work out what it does
No points/prizes - just the admiration/disgust of your fellow developers.
No additional libraries allowed - standard Java should provide more than enough scope
The tests should be correct, but let me know if they're not