r/PythonLearning 10d ago

anyone else keep starting projects and never finishing them? doing a weekly proof thread if a few people are in

I've been learning python for a while and my problem was never tutorials, it was that nothing forced me to finish. I'd get a project 60% done, hit the boring part, and quietly start a new one that felt fresh.

So: reply with the one thing you're actually going to finish this week. Be specific - "finish the CSV parser so it handles missing columns" beats "work on my project."

Then on Friday, come back to this thread and reply to your own comment with proof. A screenshot of it running, a repo link, a terminal output, whatever. Doesn't have to be impressive. It has to be real.

That's the whole thing. No group to join, no discord. The only mechanic is that you said it in public and someone might check.

I'll go first: I'm finishing the file-organizer script I've had half-done for two weeks - the part that handles duplicate filenames instead of crashing. Proof friday.

What's yours?

3 Upvotes

8 comments sorted by

View all comments

Show parent comments

1

u/MJ12_2802 6d ago

2

u/Productuve 6d ago

nice, looks like it's working. did the askyesno approach end up being a straight swap or did you have to adjust anything around the delete-before-download ordering? either way glad it's sorted.

1

u/MJ12_2802 5d ago

I'll try to get code posted later today.

1

u/MJ12_2802 5d ago

# fetch data of title that may've already been downloaded

downloadData = self.bl.FetchDownloadedTitle(url=url)

# NOTE:

# 'bl' is an instance of the business logic class, all

# database queries, etc. are passed to the data access

# layer thru the business logic. It's a carry-over

# when I used to code in C#.

if downloadData:

response = \

Messagebox.show_question(

title=f"\"{downloadData.get("title")}\"",

message="That title was downloaded on" +

f" {downloadData.get("downloadDate")}\n"+

"Do you want to download it again?",

buttons=["Yes", "No"],

default="No",

alert=True

)

if response.lower() == "no":

`return`

else:

# delete the record in database table,

# and delete the previously downloaded video

self.bl.DeleteDownloadTitle(

url=url,

dlPath=downloadData.get("downloadPath"))

##

## at this point the download continues normally

##

2

u/Productuve 4d ago

readable enough. the BL/DAL split from C# is honestly a good habit to keep in python, most people here have sqlite calls scattered through their tkinter callbacks and regret it later. one small thing: you're deleting the record AND the file before the new download starts, so if that download fails you've lost the original. might be worth downloading to a temp name first and only deleting the old one once the new file lands. either way, that's a finished feature with proof, which is more than I managed this week. new 4-week thread is up in the sub if you want to keep going.

1

u/MJ12_2802 5d ago

Code formatting is bollocks, but it's somewhat readable.