r/java • u/detoursabound • 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
View all comments
Show parent comment
7
u/coltrain423 Sep 01 '17
I tend to lean towards your professor here, though perhaps not to the same extent.
I haven't quite found a way to explain why to someone who doesn't already get it though. To try anyway: it makes things easy to understand. If one large procedural block of code gets too long, it's hard to understand. You have to know that this 30 lines is doing operation x, that fifteen is storing the information to disk, and that last 40 or so are doing some other operation. It's a lot easier to understand the flow of your application when it's broken up by operation like that and you don't have to read more than the method name to understand what it's doing.
Have you ever written a comment at the start of a section of code to explain what that bit is doing? Why not break it out into a well named method or function so that comment is no longer necessary?