Important Things to Remember When Coding
medium.com
medium.com
"Worrying about “geek cred” will slowly kill you"
This one rang particularly true as I easily overlook any successes I've had because they're rarely made public. The ones that make it to the light of day are never what I consider my best work. I'll see more popular programmers, lament my relative obscurity and then the whole Impostor Syndrome will flare up and nearly stop me in my tracks.
It's such a fantastic feeling to have leaned to say "meh, fuck it" and focus on what I love about my vocation.
> I’ve found that a big difference between new coders and experienced coders is faith: faith that things are going wrong for a logical and discoverable reason, faith that problems are fixable, faith that there is a way to accomplish the goal. The path from “not working” to “working” might not be obvious, but with patience you can usually find it.
In my many years of coding, I can't count the number of times that completely baffling bugs have eventually been traced down to errors that were concrete, understandable and usually embodied in just a tiny amount of erroneous code. My many, many experiences with this outcome gives me the confidence to keep digging even when I have no clue where to look. Without those experiences, what I do every day would seem like an unending stream of hopeless situations. That's why it's important to share that confidence with new coders --to help prevent them from failing due to despair just long enough for them to succeed.
Don't get me wrong, I'm in favor of the concept, I just find that most people seem to put very little thought into what it means in practice.
Comments are not "code". Your code should, when written impossibly well, explain itself through variables, function names and composition. Better code equals less comments needed.
I can write perfectly idiomatic code in Perl, using map, grep, simple postconditionals, taking advantage of built in functions that topicalize, knowledge of when items are passed by reference or copy (or a sort of alias), and the code will be very succinct and readable to Perl programmers. Should I forego some of that to make the code more readable to general programmers? Doing so will necessarily make the code slightly less readable to those expecting idiomatic Perl.
I'm not espousing one way over the other, just that it should be thought about with regard to the purpose of the code, who owns it, and who will be looking at it in the future. The exact answer may differ in different situations.
(but I'm not saying that it's not an important point)
In an era of coding bootcamps that claim to compress a 4-year CS degree into 4-10 weeks of adrenaline-fueled CSS/HTML/JS/Ruby memorization, and deem their graduates programmers, it seems like many people follow that sentiment.
I believe this kind of thinking is not so much harmful as laughable - in my experience studying programming has been an exercise in learning about the existence of more and more complex topics I don't understand yet. First it was OOP, then design patterns, then functional programming, and now I'm glancing over the horizon towards type theory, language theory, etc.
Getting pointers and recursion are very, very, early steps (though hard ones!) on a long journey.
[0] s/boys/girls s/men/women
Today there are a lot of people "learning to code" from other backgrounds. There are Marketing majors who follow the HTML -> CSS -> JS -> Ruby path that you mention. Good for them to start the path. Picking up recursion is an advanced topic for them - and good for them. It's all relative to the starting point. And I hope many of these folks stick it out to get good, because Stanford and MIT aren't churning out enough people to satisfy the demand.
With OS and applications programming, you typically have to know a handful of concepts, but you have to know them really well. With web programming, you typically have to know a lot -- it can be an obnoxiously broad field of practice -- but you don't have to know it all perfectly well. CSS or JS or PHP or Python or Ruby or what-have-you generally immediately works or doesn't work, you generally don't encounter those annoying null ptr situations.
I doubt there are a lot of C programmers that could do web development (front and back end) very well. I doubt there are a lot of web developers that could do OS development very well.
But it's all just programming.
All of software development would be a hell of a lot better environment if people would quit waving their egos around.
All of the bolded items seemed extremely accurate. Especially for people I've worked with, those early in their career can really struggle with them. I'd love it if they took these lessons to heart.
Thus the title/subtitle:
> Things I Wish Someone Had Told Me When I Was Learning How to Code; And what I’ve learned from teaching others
In the past, I found the best methods of picking up coding or new languages is to work on a small multi day/week project, and preferably with a friend that's just as lost as you are. It's great cause you'll have a support system in place and having two brains thinking about the same problems, which helps tremendously when treading carefully - or spontaneously (up to you :)