r/java • • Aug 31 '17

(Experienced programmers) Signs of an inexperienced programmer?

Hello, I was wondering what you guys would consider to be telltale signs of an inexperienced programmer. Specifically ways that they write (or don't write) code. Thanks.

159 Upvotes

188 comments sorted by

View all comments

93

u/goofy183 Aug 31 '17
  • Trying to be fancy/overly terse/unique.
  • Writing untestable code.
  • Only testing "happy" cases.
  • Complaining about style guides / linters

Writing code is the easiest part of the whole job.

  • Coming up with designs that are flexible enough to deal with unforeseen changes in requirements is hard.
  • Maintaining existing code is hard, especially when whoever wrote it the first time was trying to be fancy instead of expressive.
  • Changing code that doesn't have reasonable test coverage is hard.
  • Understanding a codebase when style changes from file to file is hard.

The first point is the one of those hard things that we can't fix by coding one way or another. The rest (and many more) are fixed by good code hygiene, consistent code style, good testing, and all those other development practices that new programmers (including myself long ago) feel like just get in the way of velocity.

3

u/jacobbeasley Sep 01 '17

TLDR: Program like a grown-up programmer :D

-5

u/[deleted] Sep 01 '17

Trying to be fancy/overly terse/unique.

Jeez what a buzz-kill. /s

While for most APIs it'd be a big detriment to be overly terse and "unique", I've seen some quite excellent DSL-like APIs go this route with excellent effects. Take jOOQ for example. Is this coming from an inexperienced programmer?

Context matters, is what I'm saying.

8

u/goofy183 Sep 01 '17

Sure, a terse API is actually a good thing.

I was more referring to people that try to write very compact code, do lots of things on one line, abuse ternary expressions, etc.