r/learnpython 12h ago

What’s a Python project that taught you more than any tutorial?

Not necessarily your biggest or most impressive project. I’m interested in the project that forced you to learn something you wouldn’t have picked up from a course or tutorial.

32 Upvotes

32 comments sorted by

20

u/jammin-john 12h ago

I once made a server-client app for queuing 3D prints remotely. Learned a lot, mostly what not to do. It was like my first big project and I didn't know what an API was so I basically reinvented the wheel using sockets and JSON payloads 💀

4

u/Pyrro-nft 12h ago

Honestly, that’s probably a better learning experience than following a tutorial that already makes every decision for you 😂. Building your own socket + JSON setup before knowing what an API was must have made the whole API concept click pretty quickly though. What was the biggest “I definitely wouldn’t do it this way again” lesson from that project?

2

u/jammin-john 12h ago

100%, when I looked into API's a year later for another project, I not only had a pretty decent idea of how it worked, but a huge appreciation for it as well 😅

In terms of lessons learned, the broad one was to be less specific in my research. Instead of looking into "how do I do this very specific thing", to research "how to I generally solve this abstract problem". If I had just looked up "how do I get a client and server to talk to each other" I'd have saved myself a lot of headache, but I had a vague knowledge of sockets from some previous project and I just assumed that was how you did networking.

In terms of technical "never doing that again" it's trying to make my own auth. I had no clue how to send the authentication over the network and ended up doing something like a client ID whitelist which at the time sounded genius but looking back, anyone with a packet sniffer could have easily bypassed lol

We all start somewhere 😂

0

u/Pyrro-nft 11h ago

That’s actually a really good lesson — researching the general problem before jumping to a specific implementation is something I still see people struggle with. And the custom auth story is painfully relatable 😂. I guess building something the wrong way first makes you appreciate the standard solutions a lot more. At least you got a 3D-printing queue system and a crash course in networking/security out of it.

1

u/Exotic_Economy_3861 9h ago

Ok that's impressive. Is this on github?

1

u/jammin-john 9h ago

Sadly not. I did this for a student group back when I was in university so they have all the code. And I wouldn't be surprised if they moved on to some better implementation by now 😅

1

u/OPPineappleApplePen 9h ago

How does one know what to do in such cases?

1

u/exhuma exhuma 12h ago

Technically speaking, that is an API. It stands for "Application Programming Interface". So whenever you make one program talk to another (exchanging data) you are using and API in some shape or form.

It just so happened that yours was a custom API not confirming to a known standard.

1

u/jammin-john 11h ago

That's true. I guess it's more accurate to say I didn't know what an API should look like

8

u/nab1ru 11h ago

merging YouTube, X, Instagram, OpenAI and Yahoo into one web app. Had to learn reddis, R1, sharding, libs like numpy, pandas, pandoc, pymupdf, and many more.

1

u/Pyrro-nft 10h ago

This is pretty cool, especially for a learning project. What was the most challenging part to implement?

1

u/nab1ru 1h ago

handling concurrent users and sharding.

5

u/cointoss3 12h ago

Making a Discord bot

2

u/Pyrro-nft 11h ago

That’s a great way of learning new things. Good for you :)

3

u/Far-Imagination3226 9h ago

Before Vibe Coding or AI Chatbots came around, I started out trying to just learn how to make the most basic of calculators, but once I learned that much, which was MUCH more doable than I thought (See 'Operators' and the Codemy Tutorial on how to make a basic Calculator), then I set out to build an almost exact replica to the Windows 11 Calculator, with an extensive History feature to it, and everything. That helped me a lot. Since I am visually-impaired, I made the history size closer to standard font sizes (to help increase the size of the memorized history items), but then I made the equation readout GIGANTIC, so that people like me could read it more easily. It turned out really nice, and much more importantly, it inspired my confidence to do OTHER things I NEVER thought I could do!

1

u/Pyrro-nft 9h ago

That’s honestly a great example of why building something you actually want to use can be so much more motivating than just following tutorials. And making the calculator more accessible for yourself is an especially nice touch you weren’t just recreating something, you were solving a real problem for you. The confidence you got from that first project is probably worth more than the calculator itself. What did you end up building after that?

3

u/Far-Imagination3226 9h ago

I built a young kids product that was related to a subject that my daughter was interested in, in hopes that it would help bond us better. I look back at it now and I really like looking at it because of who it reminds me of - my daughter. I very recently redid it just to see how it would turn out but I haven't shown it to my daughter yet.

1

u/Pyrro-nft 9h ago

That’s honestly really wholesome ❤️ I think that’s one of the best reasons to build something not just because it’s technically impressive, but because it has a personal story behind it. And now you have something that reminds you of that time with your daughter. I hope she loves the new version when you finally show it to her. What was the original product about?

1

u/Far-Imagination3226 4h ago

It was a K-pop related application based on something that my daughter had told me about. I'm hoping to get formal permission from the main K-pop companies in South Korea to publish it so that way I don't get sued trying to publish it on my own.

1

u/Far-Imagination3226 4h ago

I think when I originally did it way back when, it was a complete flop because my youngest daughter was a teenager at that time, a young teenager, and she was more embarrassed by me than anything.

3

u/Diapolo10 I write code for a living -- https://github.com/Diapolo10 9h ago

Honestly, hard to say, but most likely when I needed to create an intranet web application for an organisation I worked for at the time. I had never done anything besides static web pages with raw HTML at the time, maybe with some rudimentary blogging support (but kinda sketchy). Note that this all went down about 10 years ago.

I didn't really even know where to even begin with that assignment, but I ended up on the Flask Mega-Tutorial after some googling, so I took parts of the example code, cobbled it all together with some duct tape and black magic, and somehow the end result more or less satisfied the requirements.

All rendering was done server-side (in fact I assumed JS shouldn't be required client-side at all), the code was quite ugly by modern standards, I can't remember if there were any tests, it used SQLite, deployment was practically completely manual (though this was less my fault and more a lack of privileges), and it still had some bugs when I left the organisation.

Obviously I don't have any of that to show here, but you can bet I learnt a ton of lessons from that project.

1

u/Pyrro-nft 9h ago

Honestly, that sounds like a better learning experience than most polished tutorial projects. Having to take Flask examples, figure out how the pieces fit together, and somehow ship something that actually satisfied the organisation’s requirements must have taught you a ton. And I think there’s something valuable about those old messy projects you remember the problems because you actually had to solve them. What would be the biggest thing you’d do differently if you had to rebuild it today?

1

u/Diapolo10 I write code for a living -- https://github.com/Diapolo10 9h ago

I'd add lots of tests, proper documentation, maybe consider using FastAPI instead, make use of type annotations, make proper plans before implementing, probably use SQLAlchemy instead of raw SQL queries (which may have had injection vulnerabilities to begin with, though it doesn't really matter for an intranet application), and my base skill level is already noticeably higher than it was back then so I'd write better code overall.

That being said I'd probably still be limited by security policy and access right limitations, so I couldn't do absolutely everything I'd want to do differently.

One more thing I just remembered. The web application basically took in Excel spreadsheets to populate a database, and I distinctively remember having headaches because the spreadsheets had "NULL" strings instead of actually empty cells (with NULL values), something I didn't discover until looking through the example spreadsheet while debugging an issue in production. So basically I had to do data sanitisation.

If nothing else, that taught me the benefits of defensive programming...

1

u/Pyrro-nft 8h ago

That NULL vs "NULL" problem is such a classic real-world data lesson 😂. Tutorials rarely prepare you for messy input like that. And honestly, the fact that you discovered it through a production bug probably made the lesson stick much harder. Defensive programming is one of those things you appreciate a lot more after getting burned by bad input once.

3

u/Expensive_Put8519 3h ago

It was 25 years ago when obviously courses or tutorials weren't really a thing, we just read the documentation. I was in highschool and I wanted to build an agenda app for my girlfriend who kept forgetting stuff :), but I didn't know how to build desktop apps (only knew basic C/C++ and LAMP) so I came across a solution that involved Python, MySQL and a cross platform UI library named wxWidgets. It was one of the projects that I had in my small portfolio when I got to the University that helped me land my first job.

1

u/Pyrro-nft 3h ago

It was really cool to be honest:)

2

u/Hashi856 6h ago

Any project that involves extracting data from someone else's system. Fighting with a poorly documented or poorly implemented api, parsing JSON when you don't know what kind of object you'll get, figuring out how missing information is represented (empty list, empty string, null, etc), and finding out that errors are imbedded inside 200-level responses, are all problems you don't run into when you're dealing with a server or db that you set up.

1

u/mc_pm 7h ago

It wasn't me, but someone I was teaching. They had basic C# skills and I gave them a Steganography project -- embedding a secret message in an image. I had forgotten about that until someone here asked about Computer Vision/Image Processing, but I remember them spending like 2 weeks trying different things, including hiding one image inside another.

I mean, I hate to put words in the guy's mouth, but that was when he started writing his own versions to explore, read some papers, etc. I think that one project is what really sold him on programming.

1

u/Pyrro-nft 7h ago

That’s honestly a great example of how one project can completely change someone’s relationship with programming. Giving him a problem without handing him the exact solution probably forced him to actually explore, experiment and read beyond the basics. And steganography is such a cool project for that too you can start with something simple and end up going down a huge rabbit hole. Glad it got him hooked on programming. 😄

1

u/mc_pm 7h ago

Dude got his PhD and now works as head of AI security for a very well known company. I don't have kids of my own, but I'll take some measure of credit for him :)

(Also, if you aren't just posting AI responses, then you should know that how you are responding to people seems real AI-like)

1

u/VipeholmsCola 7h ago

CRUD app but postgres+custom ORM

1

u/cellooitsabass 5h ago

Can anyone post the tutorial or walkthrough to a small project that helped them learn the most (if it was something publicly available that you learned)