I'm an apprentice in Germany and want to broaden my programming knowledge. I've been learning Java through personal projects and recently started using coding challenges to practice algorithms and data structures. I've learned about HashMaps and HashSets this way, but many problems are difficult and I often struggle to find a solution. I'm wondering whether I should study algorithms and data structures more formally, or focus mainly on building software.
So far, I've created a Swing note-taking app with text-file persistence, a Snake game that stores high scores in a database and supports multiple players, and a Spring Boot todo application to learn about REST APIs, asynchronous requests, and browser fetch calls. Each project has taught me something new, although I've had to work through plenty of difficulties.
Should I continue focusing on projects, or balance them with activities such as reading Java documentation, studying specific language topics, learning algorithms, writing tests, and practicing coding challenges? What learning approach has helped you improve most?
4 Answers
Try to build and maintain your projects without depending too heavily on autocomplete or generated solutions. After finishing a feature, ask how you would test it, deploy it safely, monitor it, and change it without breaking existing behavior. Testing and release practices are a major part of professional development and are just as important as learning another language feature. A good routine is to build something, investigate the concepts you meet, read reliable documentation, and then revisit the code to improve it.
Projects should probably remain your main learning method, especially when each one has a clear goal and introduces a new concept. Your progression from a desktop app to persistence, databases, and a Spring REST service is a good example of practical learning. When you get stuck, study the specific concept you need instead of trying to read an entire algorithms book from beginning to end.
Projects are valuable, but they work best when combined with deliberate study. Building things shows you what problems you actually have, while books and documentation give you tools you might not discover on your own. Learn about data structures, algorithms, APIs, concurrency, and design when they become relevant, then apply that knowledge in a project. Also try improving existing apps rather than always starting tiny new ones: add tests, separate layers, use SQLite, handle invalid data, or package and deploy the application.
Keep coding challenges in the mix, but understand what they are for. They can improve familiarity with data structures, algorithmic patterns, and solving problems without much tooling, which is useful for some technical interviews. However, they are not a complete measure of software development. Real development also involves architecture, debugging, maintainability, testing, version control, deployment, and working with existing code. Use challenges as a supplement rather than the center of your education.

That makes sense. I’ve mostly been starting new projects, so taking one of them further with testing and better structure could probably teach me more than immediately making another app.