DEV Community

Christian Mondorf
Christian Mondorf

Posted on

What do you wish you had learned when learning your first programming language?

Maybe you learned how to code through a book, a tutorial, a bootcamp, your school. Whatever the case may be, this question applies to you: What do you wish you had been taught but weren't?

I have the impression many resources focus on syntax which is good, except they tend to do it at the expense of everything else. A lot of habits, methods, and strategies to write solid code, to debug, etc. seem to get left out.

Top comments (2)

Collapse
 
ben profile image
Ben Halpern

I wish I'd been taught more than one programming language when I was first introduced to coding. We could have focused on just one, but a journey through some other paradigms on the side would have given me a lot more context for the whole craft.

When you only learn one environment, it's hard to gain an abstract understanding of what is actually going on when a program is running.

Collapse
 
itamarst profile image
Itamar Turner-Trauring

The really short version is "everything I learned in the next 20 years", but that's not very helpful :)

But one thing I've noticed made a big difference for my ability to write working code is the idea of object ownership: who has permission to change this object, and who doesn't? This is critical for languages like C or C++ without garbage collection, and important in most other languages. Write about it here: codewithoutrules.com/2017/01/26/ob...

David MacIver suggests "keeping track of the type of a variable in your head" as an important skill: drmaciver.com/2016/07/it-might-be-...