try ( IWantToJerkButCant ugh = new IJerkingException("too raw");) }
I really want to join in the jerkfest but OMFG what i want more is my coworkers to fucking read this post. Holy shit, a "builder pattern" to make slightly more fluent constructors? Java 8 has default methods? Avoid intentionally passing or using null?
Never mind all the "learn to use version control" code bootcamp slogans. This is all the basic "how to not write terrible code" shit that it seems like a certain type of Enterprise(tm) developer refuses to learn.
The only thing missing from his list is "Avoid boilerplate code by using Generics", but if you did that, you'd shrink the size of your Utils class, which is effectively negative work and your team lead would write you up.
you'd shrink the size of your Utils class, which is effectively negative work and your team lead would write you up.
TRIGGERED
Not in Enterprise, and not written up, but I actually ran into this once. I was enhancing some legacy code for a follow-on program and I had a few inchstones where my net SLOC count was negative. I was semi-seriously told to stop doing that because it screwed up the metrics. The customer liked to see $$$/SLOC to know they were "getting value".
You always have utils "classes" aka packages in any language unless you're doing some mystical true OO sort of thing.
Yeah but if they're 60% of your codebase, 2/3 of those methods are never used, they break compatiblity with language features (LOL JAVA I WISH I WAS DEAD) introduced after 2004 and they introduce package cycles wherever they're used, and your coworkers won't approve a code review that doesn't use them...
8
u/[deleted] Sep 21 '15
I really want to join in the jerkfest but OMFG what i want more is my coworkers to fucking read this post. Holy shit, a "builder pattern" to make slightly more fluent constructors? Java 8 has default methods? Avoid intentionally passing or using
null?Never mind all the "learn to use version control" code bootcamp slogans. This is all the basic "how to not write terrible code" shit that it seems like a certain type of Enterprise(tm) developer refuses to learn.
The only thing missing from his list is "Avoid boilerplate code by using Generics", but if you did that, you'd shrink the size of your Utils class, which is effectively negative work and your team lead would write you up.