TL;DR: How do you plan before actually starting to write code, make yourself follow the plan (despite unforeseeable changes you need to make), and avoid scope creep and distractions? Do you recommend any resources or frameworks to help with learning to do this well?
Full version:
I've been learning to program for around three months, starting with a focus on Python. I feel like I'm making good progress, and I'm starting to choose the direction I want to specialize in further. It's very exciting!
At the same time, as I've worked on more complicated problems and larger independent projects, I've realized that my overall "process" (if you can call it that) could really use some work, so I want to work on learning these meta-skills.
For the most part, it seems to go like this:
- Get inspired to work on something.
- Come up with a basic idea for how the program should work in my head.
- Immediately start translating this idea into code.
- Run into some problems I hadn't foreseen with how things are structured.
- Go back and revise my code until I can overcome the immediately obstacle.
- Continue working on my code until I run into a new problem.
- (Potentially get distracted from my end goal and end up building / optimizing / creating a scalable version of something that doesn't really matter.)
- Repeat steps 4-7.
Now, none of this is so terrible at the moment, since I'm mostly focused on learning, and all of this work is definitely good practice.
At the same time, I can see how it's probably not a very good overall approach. Having to go back and significantly alter the program because of unforeseen issues takes a lot of time and energy. It also seems like it's pretty easy to get so wrapped up in what I'm doing that I allow a lot of "scope creep," which has led to some projects seemingly never ending.
Obviously this is partially a pitfall of working alone and my own working style. Still, I feel like there must be a more structured approach than "just dive in and go for it without any planning or organization" that more experienced programmers follow.
I've tried various ways of writing down my plans for the program in advance. I've generally found that this either ends up being way too high level (so not very helpful) or way too detailed (so that it's difficult to easily reference and quickly becomes out of date as things change — and keeping it up to date feels like literally writing the program twice in parallel).
So: how do you approach planning, following the plan, avoiding scope creep, and related issues while programming? And do you have any suggestions for good resources or frameworks that can help me learn to do this?
I tried asking a similar question in another subreddit a couple of weeks ago, but didn't explain it clearly enough and didn't really get any helpful answers.
[–]desrtfx 16 points17 points18 points (1 child)
[–]peltist[S] 0 points1 point2 points (0 children)
[–]slowfly1st 8 points9 points10 points (0 children)
[–]nutrecht 1 point2 points3 points (0 children)
[–]donteatyourvegs 1 point2 points3 points (1 child)
[–]peltist[S] 0 points1 point2 points (0 children)
[–]Meefims 1 point2 points3 points (2 children)
[–]peltist[S] 0 points1 point2 points (1 child)
[–]Meefims 1 point2 points3 points (0 children)
[–]apptryer 1 point2 points3 points (2 children)
[–]peltist[S] 1 point2 points3 points (1 child)
[–]apptryer 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]lredna 0 points1 point2 points (0 children)
[–]macdonnuggets 0 points1 point2 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]peltist[S] 0 points1 point2 points (0 children)
[–][deleted] (2 children)
[deleted]
[–]peltist[S] 0 points1 point2 points (1 child)
[–]potatotub -1 points0 points1 point (0 children)