#Some general tipps for a coding beginner

6 messages · Page 1 of 1 (latest)

full pier
#

Hey guys,

I recently started to get a little more into coding and i'd like to start with well readable and understandable code. So my question is, do you have any tipps for me, regarding the code right here?
I take all the tipps I can get. For example about the comments, general tipps or big dont's in my code.

Thanks in advance,
Alex

https://hastebin.com/share/uxolesihel.java

wooden crater
#

Code looks alright, I'd suggest to run your IDE's auto-formatter just to get rid of additional newlines etc.

Some of the comments seem a bit out of place as well (see screenshot)

You don't have to check for condition == true or condition != true (like in line 176), you can just do if (!u.curChosenGender.equals("--Gender)) here

Does it make sense to add all of the inputs in one block (line 151-162) or would it make sense to add each component after it is created? I feel like having the code for each element split up in two places makes it easy to miss one of them when you're adding or removing components

#

Looks good tho, not much to comment really

full pier
wooden crater
#

Basically just not comparing to true & false

covert lodge
#

oh