r/ProgrammerTIL • u/thehazarika • Dec 01 '20
Other 4 design mistakes you need to avoid as a intermediate level programmer
After a few years of programming, you are no longer a beginner. You have the power to create some serious things.
And at this phase, you will make some mistake that all of us makes. So this is an attempt to save you that some of the trial and error. Hope you'll like it.
( TL;DR is at the top of the page if you have just 2 minutes )
http://thehazarika.com/blog/programming/design-mistakes-you-will-make-as-software-developer/
52
Upvotes
38
u/Corporate_Drone31 Dec 01 '20
Just a tiny nitpick" your site doesn't have HTTPS enabled. You might want to do that because web browsers will be soon showing warnings for non-TLS content. Let's Encrypt is a fairly easy way to have automatic TLS certs for free, you don't even registration or anything.
15
u/dudinax Dec 01 '20
What's worse, adding an abstraction too early or waiting too long to put it in?
Working code usually ends up doing more than originally planned, not less.
14
u/AgoAndAnon Dec 01 '20
I'm not sure where "4" plays into this. There are 7 things on the tldr, and then 5 at the end. But no 4 that I noticed.
4
u/Sokaron Dec 01 '20
No disrespect intended but it may benefit you to run your blog post through a spellchecker quickly before you post it.
6
u/hesdeadjim Dec 01 '20
Point #2 can apply to almost every engineer I've ever worked with at any skill level. Programmers see an opportunity for cleverness, and often can't resist doing it even though that code might only be used for a single purpose. On the team that I run I enforce a simple policy: unless code is about to be duplicated a third time, no abstractions allowed. Exceptions exist obviously, but this has been a good solution to avoid this problem.
As a recovered abstract-fier, I recognize now that premature abstractions have a huge negative impact on a project that you only understand through experience. When you see a problem, and jump to the generic solution because of a nebulous future use case, what happens is that you've made a very hard-to-modify solution to a problem that may have unknown future requirements. Only until you've actually seen those requirements, implemented them, and now can see generic patterns emerge, you've wasted time and made code more obfuscated for zero gain.
The primary exception to this rule is if you are implementing something you have implemented in the past, and for near-identical reasons and use cases.