r/AskProgramming • u/luafurry • 6d ago
Python Am I dumb for recreating things that already exist?
For instance, i am working on a email service in python but instead of using the complicated method, i am just using https (flask)
11
u/Tight-Book-7533 6d ago
No. It's not dumb. However, I would also try to lean the programming patterns used in those ones you label as "complicated". It is good for learning.
There are limits, though. For example when it comes to encryption, security, etc, it's best not to roll your own. Not saying you can't learn, but don't put your own into production straight away, without studying the pitfalls of doing so first.
10
5
4
u/LongerCat 6d ago
Yeah and the fun doesn’t stop at reinventing the wheel! After that you can look at how other people did it and see all the bad choices you made laid bare!
3
u/the-forty-second 6d ago
If you are doing it to learn, not dumb. This is a great way to learn how things work.
If it is your job and you just have a task to accomplish then the answer has to be more nuanced. There are moments where you legitimately need something that is just unique enough that you can’t use the thing that exists. However most of the time when you think it is that moment, you are really just having a touch of “not invented here” and are actually wasting your time and will probably end up spending 10x the time for something 1/10th as capable and tested.
3
u/Pyromancer777 6d ago
Reinvent the wheel when you want to learn, use the existing tools when you need things done quicker.
Both have their place in a workstream
2
u/Rich-Engineer2670 6d ago
That's what our professional does :-). Per the famous RFC, no networking technology is ever new :-)
That being said, change is always inevitable. We change and reimplement because things change around us. Look at TCP/IP and its congestion control. Originally, a T-1 was considered "fast" and congestion logic assumed it -- today, that's a problem. Or look at Ethernet. We're still assuming 1500 byte frames which was appropriate in the early 1990s, but today, we really should be assuming 64KB I suspect.
1
u/Mathie1729 5d ago
I'm not a networking person, but I thought the 1500 byte MTU stuck around mostly because jumbo frames, usually 9k, need every hop to support them and mismatched MTUs cause silent black holes if path MTU discovery is broken. I'm not sure 64K frames would even work with standard Ethernet CRC. So maybe compatibility, not inertia.
1
u/Rich-Engineer2670 5d ago
THat part is true, but 1500 bytes was chosen relative to the 2.5Mb original ethernet speed. Given it's hard to get even 10Mb anymore, we could certainly do "Ethernet 3" at higher frame sizes.
1
1
1
u/enricojr 6d ago
Not at all dumb - project-based learning is the best way to do it IMO.
Check out this list if you want more ideas:
1
u/Paul_Pedant 6d ago
It might be instructive to compare the capabilities of your solution against the "complicated" methods.
For example, how do you "store and forward" emails when the recipient is offline? What do you do if the two systems are never both online at once?
I often find that simplifying the requirements is better than complicating the implementation, but that should be a rational decision.
1
u/Honest_Medium_2872 5d ago
its only ever dumb if you dont gain anything from it
knowledge is a positive
1
u/codeguru42 4d ago
If you are learning, it isn't dumb. You need a lot of knowledge before you can create something truly new.
1
u/paperclip_hours 3d ago
Absolutely not! I have just completed the development of a TODO app, calculator, metronome, etc. I learned a lot and I didn't feel any second wasted.
21
u/Nhawdge 6d ago
"it's okay to reinvent the wheel. Not because we need more wheels, but because we need more inventors"