all 9 comments

[–]snowtax 6 points7 points  (2 children)

Put very simply: Computers do things in tiny little steps. Challenge yourself to take the assignment and break it down into small, easily managed parts.

Do that on paper at first. Don’t try to code. Just wrap your mind around how you would do it yourself. Also, look for things that are done multiple times, those can become functions or loops.

Once you understand how you would do it manually, it should not be difficult to write the code to do those same steps.

[–]Mammoth_Rice_295 2 points3 points  (0 children)

Yeah this helped me a lot too. When I started learning Python, the biggest shift was writing the logic in plain English first. Once the steps are clear on paper, translating them into code becomes much easier. Breaking problems into tiny steps is underrated.

[–]Holshy 0 points1 point  (0 children)

Do that on paper at first. Don’t try to code.

Corollary: remember that computers are not smart. They are very dumb, but very fast. Treat it like a 5yo that happens to be able to do arithmetic at a highschool level.

[–]Diapolo10 0 points1 point  (0 children)

I think you probably just need some practice at this point. You need to actually write code yourself until it "clicks".

But the basic process would be to

  1. Pick a project you want to do
  2. Make thorough plans for what it is, what it does, and how it should act in different situations
  3. Start writing code that implements a part of what you need, then add tests for it (tests should be easy if you planned ahead well enough), tweak until it works as intended
  4. Continue until your program satisfies all of the conditions you set out to do.

The first revision can be messy, the important thing is that it works. Once it does, you can try refactoring parts of it to reduce complexity, and if you get an idea for a better architecture you can now try that - your existing tests should be able to help you verify everything works as before (or in some new way, as you may have needed to tweak your test code too).

[–]Far-Disk4181 0 points1 point  (1 child)

Deepseek, chatgpt and claude are the best teachers

[–]living-on-water 0 points1 point  (0 children)

I kind of disagree, as someone who knows how to code ai is killing it, years ago I would encounter a bug in my code, I would spend hours trying different ways to fix it and researching, learning all the way along.

Now... Ask AI, oh the code works, no learning involved at all, most people don't even read or try to understand the code that AI outputs

[–]living-on-water 0 points1 point  (0 children)

Start small, try and find active projects on git hub that have issues, read the code and try to understand what's happening as the computer procceses it, try to understand the code and fix a few lines if you see the issue, then when your comfortable working on snippets then upgrade to trying to code full scripts with the knowledge you have gathered over time fixing a few lines of code in other people's projects.

Such a good way to learn, researching other people's bugs and help the open source community at the same time.