5 ms·
Best one liner I've ever seen in "professional" code: String myBoolean = "yes"
by philbarr 10y ago
Best one liner I've ever seen in "professional" code:
String myBoolean = "yes"
- sillysaurus3 10y agoI liked enum Boolean { TRUE, FALSE, FILE_NOT_FOUND };
- arethuza 10y agoNot sure I'd say it was he best, but it was certainly memorable: boolean alanIsABastard = true; As I was the only person in the company with that name it was clearly meant for me! :-)
- cjslep 10y agoI was horrified to see: public void encryptCreditCard(int[] cc) { int tmp = cc[0]; cc[0] = cc[6]; cc[6] = tmp; // and so on... } Decrypt version just did the steps in reverse, of course.
- TeMPOraL 10y agoI once had to implement "encryption" that consisted of rot13(base64(data)). The class ended up being named SecurityTheatreUtils, to ensure no one else in our team ends up thinking it does any actual encryption...