3 Reasons I Don't Write Code From Scratch
Jun 10, 2023 3:01 pm
A couple reminders:
You all have access to a 100% free course that helps you define a path to learn code.
If that sounds like something for you check it out here.
Also, you can book a free 30-minute call with me to chat, get some advice, or ask me any questions.
On to the newsletter...
__________________________________________
Writing From Scratch Was Never The Goal...
Something I obsessed about early in my career was being able to code with no guidance.
The goal seemed clear.
Find a problem, know what to do, and write code without hitting up good old www.google.com.
Turns out this was the wrong approach.
You will realize something as you progress in your career. Something that only got obvious to me after some time:
Coding has less to do with knowing languages and libraries.
And has a lot to do with understanding concepts.
For that reason:
Aiming to write code from scratch isn't a great idea.
In fact – figuring out how to use libraries and languages is the easy part.
It's easy to google:
"How to add headers to an HTTP call in Python"
It's hard to google:
"I'm getting this error in Python: [paste error]"
You simply can't know what you don't know.
If that doesn't convince you:
Here are 3 other reasons I think coding from scratch is the wrong approach to programming (and why you should copy instead).
There Are No Brownie Points
Nobody will find it impressive if you memorize every nuance of a library. Over time you get better at using it, but in general, most common libraries have documentation that you can read through.
It's a common misconception I see new developers have. They beat themselves up because they feel like Google is the "training wheels" on their bike and they need to kick them off to be a real programmer.
It's not training wheels.
It's the ultimate toolkit to get the most out of your bike.
Just another tool to learn.
And it might be more important than any programming language.
Nobody will judge you for using Google, ChatGPT, or documentation. They also won't give you props for doing it all by yourself.
They only judge you if you quit.
And give props if you get it done.
Odds Are There Are Better Ideas
No matter what programming language, library, or design pattern you are using:
It was made by people just like you
Odds are the creators of whatever you're using have thought of how to do most things in the language and may have documented it somewhere.
Your first instinct should always be to check and see if somebody else has done it first. The worst-case scenario is you find nothing, better case scenario is you get some ideas, and the best-case scenario is you learn a way of doing it that is 100x better than your original idea.
In general, you will learn it is rare to need to come up with never-before-done solutions in programming unless you are working on a never-before-done idea.
The Goal Is To Get it Done
Ultimately the goal is to get it done. It's not to fly through the code, write impressive one-liners that nobody can read, and know the ins and outs of every library you use.
When you use one library long term you get good at it anyways.
If you can copy some boilerplate from the documentation, find a good solution on StackOverflow, or copy a script from ChatGPT that does exactly what you need to do? Start there.
Just like writing papers in school, it is always easier to make writing better than it is to fill a blank page.
Find something you can work with and make it work for you.
Unless I know 100% that I know a better way to do something then pursuing the "perfect" solution only satisfies my ego.
Perfection is a selfish pursuit.
I define ego as the image of yourself that you portray to others.
Pursuing perfection shows you are unwilling to expose flaws in your image.
Perfection is an act of prioritizing your ego over giving to others.
Find an existing solution, refine it until it satisfies the goal, and get it done.
________________________
Thank you all for reading this week's newsletter.
I appreciate all of you who read to the end.
Email me at swdlodonnell@gmail.com with any questions
Check out my free course if you are learning to code
Book a free 30-minute call with me if you want to chat or have any questions.
Until next week!