Critique my Code

Status
This thread has been locked.

Nyarrth

Developer || System Admin
Supreme
Feedback score
6
Posts
70
Reactions
41
Resources
0
Hi.

I am looking for constructive criticism on how I can improve my overall code design, in projects that I have released the source for. I've mainly worked on these plugins during my freetime while learning Bukkit over the past 4 years.

I've decided to get into Mobile/NodeJS Development along with Networking.

My GitLab Group (Minigame Network): https://gitlab.com/mine-aqua
My GitLab Profile: https://gitlab.com/shaunagostinho
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Gametron

Feedback score
0
Posts
10
Reactions
2
Resources
0
Here's a few things to note:
  • Instead of checking the value of a variable in multiple if statements, you could use a switch statement. You've done this at least in some places, which is good.
  • Secrets (passwords, API keys etc.) should be stored in environment variables that is not part of version control.
  • In general, you don't want to push IDE-specific settings (the .idea folder in this case) to version control.
  • Whitespace use is a bit inconsistent sometimes. In most cases, one line break is enough.
  • When your codebase gets larger and more complex, you might want to document it. One way to do it in Java is by writing an API documentation with Javadoc. It's not needed in every project but definitely something to look into and get familiar with since the same concept applies to other languages too.
The most critical of these is definitely the second one.

Good luck with learning mobile and Node.js development!
 
Status
This thread has been locked.
Top