I've been working with Java for about 500 hours now, and this is the kind of code I write. I'm wondering if I should be reading more books for another 500+ hours to improve my skills, or are there better ways to learn? I find it hard to see what I could optimize in my current code sample related to drawing in JavaFX. Any suggestions on how to advance my software engineering skills?
3 Answers
One idea is to create a data structure, like a binary tree, to handle your drawable elements. You could then write methods to iterate through the tree, allowing for more code reuse and modular design. This will teach you about organizing code better.
You can improve your code aesthetics by moving 'magic values' (constants) out of methods, making them parameters instead if needed, or defining them as private static final. Additionally, reorganize your code for clarity—keep related code close together, like declaring your ObservableList right before you use it in your loop. This makes it easier to read and understand!
To really get better, you should focus on building actual projects. Instead of just reading, dive into developing applications. Also, consider using FXML for your UI instead of keeping everything in code; that's a nightmare for larger projects! Look up idiomatic JavaFX practices and get into concepts like dependency injection and MVVM.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically