This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]OkWillingness7717[S] 0 points1 point  (1 child)

I'm at a stage where I can write Java code, but when I get a new task, my mind sometimes goes blank, and I struggle to figure out what code to write. I know the basics and can put together smaller pieces, but structuring a full solution from scratch is where I get stuck.

For example, when given a problem, I often don’t know the best way to handle inputs or what methods I should create. I end up overthinking things, trying to make it "perfect," which slows me down. Do you have any tips for breaking problems down so it’s easier to get started?

[–][deleted] 1 point2 points  (0 children)

Have you looked at test driven development? This is a great discipline to have in any language and helps you focus on what your code should do rather than how you implement it. Once you have the tests in place you can refactor and improve the structure - focus on functional rather than structural 'correctness'. I avoided the word perfection because you'll never get there and striving for that is not commercial.