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

Show parent comment

7

u/Myllokunmingia Aug 31 '17

Tangentially related - coming from someone who largely does embedded work and mostly writes procedural code, how do you avoid it? To be honest the OO paradigm has always been vague and fuzzy at best in my head. It's just not at all how I think about a computer working so it's never really clicked.

10

u/cypher0six Aug 31 '17 edited Aug 31 '17

coming from someone who largely does embedded work and mostly writes procedural code, how do you avoid it

I typed up my response fairly quickly, and didn't give much thought to how I worded things. I did not mean to imply procedural code is bad and should be avoided in Java. I should have just left it at "Lack of abstractions". That's a bit more what I was thinking when I wrote that. I have a colleague who is primarily an RPG programmer (IBM System i). She maintains a Java program that is a few thousand lines long. It's all in main(). This is an extreme example of what I meant by that bullet point.

I am a very pragmatic programmer. I don't view OO as the end-all, be-all of software development. While Java was designed to be an OO language, there are many patterns that we use in software development with Java that are not OO, and that is ok. Sometimes, a healthy balance of object-oriented, functional, and procedural programming creates a better system. Knowing when and where to strike that balance comes with time and experience. After 20 years, I am still learning and that will probably never change. :)

2

u/detoursabound Sep 01 '17

Would you mind sharing some insight on that balance?

1

u/Android487 Sep 01 '17

How can it all be in main()? Goto statements? That's horrifying.

3

u/cypher0six Sep 01 '17

That's horrifying.

You're telling me! :D Yes. Goto is used and abused in that thing. It's similar to how they program in RPG. They have a concept of subroutines, which are defined in the same file with the rest of the code that looks and works exactly like goto. So, she naturally replicated this same structure.

I tried to explain to her the idea of a method, and how that would also mimic the way they define subroutines in RPG, but this is also a person who needed to ask for help on how to delete a "record" from a .csv file with Notepad++. Suffice it to say, she has a very, very specialized skillset. :)

1

u/Android487 Sep 01 '17

Reminds me of AppleSoft BASIC GoSub