r/ProgrammerHumor • • Sep 18 '15

How To Write Unmaintainable Code

https://www.doc.ic.ac.uk/~susan/475/unmain.html
69 Upvotes

2 comments sorted by

8

u/[deleted] Sep 19 '15

53. Java is schizophrenic about array declarations.
You can do them the old C way, String x[], (which uses mixed pre-postfix notation) or the new way String[] x, which uses pure prefix notation.
If you want to really confuse people, mix the notations:
e.g. byte[] rowvector, colvector, matrix[];
which is equivalent to:
byte[] rowvector;
byte[] colvector;
byte[][] matrix;

Well, that's just plain evil.

4

u/[deleted] Sep 18 '15

A classic article. I find it again every few year and re-read it. Never gets old.