r/learnpython • u/acfot • 14h ago
I keep starting small Python projects and abandoning them at like 70% — how do you actually finish one?
I've got this folder on my laptop that's basically a graveyard of half-finished Python stuff. There's a script that was supposed to sort my Shorts clips by game, a little tool for my Telegram bot that I got working and then just... stopped touching, and a data thing I started after watching one too many pandas tutorials.
They all get to the same point. The fun part's done, the thing mostly works, and then there's this last boring bit left — error handling, or making it not break on weird input, or just tidying it up enough that I'd actually use it. And that's where I lose interest and open a new file instead.
It's weird because I do finish things when someone else is waiting on them. College assignments get done, obviously. But the stuff that's just for me? It sits there at 70% forever.
So how do people actually push through that last stretch? Do you just force yourself to finish one small thing a week, or do you pick projects that are small enough that there is no boring last bit? Still figuring out whether my problem is discipline or just picking projects that are too big for the time I actually have.
2
1
u/MezzoScettico 12h ago
Just do it. And I'm pointing the finger at myself as I write that sentence. Last December, I got the closest I've ever done to getting all the stars from last year's Advent of Code. Just had one puzzle left to go, and it was half written. But I got bogged down trying to make the class work that I was creating for it. (There was an easy workaround good enough for the puzzle, but I wanted this class to work as a challenge to myself). And the new series starts in a couple of weeks.
I know that for me the trick is just to start. Once I have a certain amount of thought invested in a code project, I start to get slightly obsessive and keep poking away at it in spare moments. I just have to get over that threshold of getting re-interested again.
Had a similar issue with another puzzle code. My wife bought me a puzzle-a-day calendar last year and there was one in February that I found tedious to do by hand so I wrote a program to do a lot of the grunt work. It still left a lot of manual work to complete the solution. Never fully automated it.
Then the same puzzle came up about a week ago and I said to myself, "dammit, I'm going to see what it takes to make it fully automated." Only took a couple of hours once I got into it.
I think one key might be trying to make it do just a little bit more, one more small thing. Then you can see that thing and feel satisfaction. Run it a few times just to enjoy it doing what you wanted it to do. Then tackle another thing. A few of those and suddenly you're interested again.
1
u/BursleysFinest 9h ago
Take on a project that actually helps you in your daily life. Creating a app that does something cool for practice is nice, but creating something useful will give you motivation to finish. Upshot to that is that if it's useful to you, its more likely to be useful to others down the line.
1
u/Asly97 6h ago
Your own post kind of answers it: you finish when someone is waiting. So the trick is making something wait on it. A few things that help:
Write down what done means before you start, one or two lines. "Moves each clip into a folder per game and skips files it can't read" is done. "Handles every weird input" never is.
Ship it ugly. A clip sorter that chokes on one odd filename but works on the other 95% is finished enough to use. Fix edge cases when they actually bite you, not before.
Start using it for real the moment it sort of works. Once you rely on it, the bugs stop being boring and start being annoying, and annoying stuff gets fixed.
When you stop for the day, leave the single next step as a comment at the top of the file. Coming back to "wrap the file move in try/except" is way easier than coming back to a vague 70%.
No new project folder until one old one is either finished or deleted on purpose.
Also, if the pandas one was mostly about learning pandas, it might already be done. Calling it finished and moving on is allowed.
1
u/acfot 2h ago
defining done before i start is such a simple fix, honestly never done that. writing it down in one line next time.
1
•
u/BotSlamminDayNNight 24m ago
sounds like a motivation problem. you could open source it. if somebody asks you for a change or they make a change and you have to decide if it's ok to merge, you're another step on the way to getting it done. also, when you know others are looking at it, you might care more that they are accessing a well-done project.
6
u/desrtfx but other languages pro 14h ago edited 13h ago
If you think that you are 70% finished, you are in the "Pareto Principle" realm. According to the original definition the split is at 80% where in software this means that 80% completion take 20% of time and the remaining 20% take 80% (in reality rather 120% to 140%) of allotted time.
The novelty of your project wears off and you lose interest. That's absolutely common. Yet, the only way here is to muster the discipline to push through and finish. Maybe, convince yourself that this is work for a hypothetical client with a delivery deadline and daily penalty (e.g. something that you despise doing, but that actually needs to get done) for not delivering on time.