Skip to content

caluml/worst-java-ever

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Worst Java - ever

Overview

We all know what good code looks like.
Here's your chance to use that knowledge for evil and write your worst Java ever.

Instructions

  1. Fork this repo, and create a branch for yourself.
  2. 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.
  3. Create a PR for visibility so we can all see your submission

Some ideas to get you started

  • 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.

Notes

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

About

Write the worst Java ever

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages