The 2 ways to learn how to code

Erwan ROUSSEL on November 19, 2018

After two years of programming, I can see two ways to learn to code. ⚠️ This is my opinion, if you don't agree with me don't hesitate to give yo... [Read Full]
markdown guide

That's an interesting observation. I've got a university background so I always viewed the 'theoretical' way of learning to be learning about computer science theory from textbooks, and not actually writing much code. Practical learning always involved building a project and referring to documentation to help me understand the 'right' way to do things for the framework/language concerned.

Where do you think reading blogs and watching tutorial videos falls in terms of learning?


Thanks for your reply. It depends on the blog post or the videos. If it's just a tutorial like "Getting started", it will take part of the practical way but if it explains how it works it will take part of the theoretical way.


I think that watching videos or reading blog post is somewhat like attending a lecture or reading a textbook but simplified. Although it depends if the video/post is guiding you through a project or something like that it would lean towards the practical side. I see it more like a spectrum.


Yes agree with this. I guess what I think of when I think of lectures, is like compiler theory which was mostly about first-order logic, or architecture units which focused on designing systems using class diagrams and UML. The actual act of programming definitely took a back seat haha. Most of the online video training I've seen is more comparable to a tutorial or lab at university. Either way it doesn't matter, it's just an interesting observation.


When I was 10, I learned how to code in BASIC. Then I learned how to code in 6502 assembly. Then C, Pascal, FORTRAN, and LISP. Then 68000 assembly. Then C++, TypeScript, JavaScript, C#, and more C++ (modern C++).

With many other languages too, for fun and for reals. Like REXX, Perl, Python, F#, Swift, Objective-C, Lua, D, various shell scripts, Forte, PowerBuilder, Squeak, Lego Mindstorms.

My advice, for what it is worth: don't stop learning. Whether its just to have some fun, or to go deep in a language.

I like learning a wide variety of languages. But that's atypical. Many people focus on learning one language and platform really, really well. And that's awesome, too.

There is more to learn than one person could possibly learn in a lifetime. Embrace it, relish it, and enjoy!


Recently someone said to me: "You can read about riding a bike, or you can just start peddling."

I think there's a time and place for both. The joy of coding is the challenge/reward in coding, so there's something to be said for learning by doing.

Great post!


I guess the difference here is that we first have to build the bike to peddle it (Don't misinterpret by thinking that you have to build a compiler. But we have to build not just use).


Thanks for your reply ! Very interesting metaphor



As everyone said: excellent!! very interesting.

I lost that will to learn by myself just trying all methods that i find in a language... but your post reminded me of the old days, when programming was fun at that time.


Yes, here at work - same thing everyday, nothing more to implement and i dont have new projects to do.

So, i looking for open source projects to contribute - but i have little time at the moment.


Im definitely in the "Practical way" camp, with a lot of focus on motivational factors in it.

If it goes on long enough, you will find that even those who self-built themselves the practical way, will one day pick up missing gaps in knowledge via the "Theoretical way" when needed, to help to improve their "Practical" craft.

Sometimes this can happen naturally as well, with new junior developers from university, educating the seasoned practical dev on specific "O(N)" problems - which for 90% of programming is not needed.


So I have been coding for about four years now and I would say that your learning will progress with you. Meaning that the more you code the more you learn how you learn. I have done a ton of courses (in fact I still take some courses to get a very quick overview), and I was always frustrated at the end because I fealt that I was just copy pasting and not really learning. Now I learn by building and reading the docs. I have an idea for something that I want to do, do the research on a good stack then just start piecing that all together. Long story short, how you learn is going to just get better and better just like your code.


Reminds me how I started coding (when I was about 13 too). I had a computer with Visual Studios (I don't remember how I got hold of it), a grade 4 computer text book (had introduction to QBASIC in it), and access to only 1 hour dial up internet in a cyber cafe during the weekend.

I just used the WYSIWYG interface of Visual Studios to build Windows Form apps with Visual Basic. Didn't really understand what all the code was doing, I just knew if I double click on a button, it'll take me to the part of the code which will run when clicking on the button.

I pretty much followed this strategy to learn HTML and CSS with Dreamweaver's GUI. After some time you just remember the HTML tags and CSS properties.

Only got to real formal programming when I finally got better access to internet.


Mine's a bit more practical but it's more like:

  • Acquire code sample (i.e. within a tutorial)
  • Try to figure out what code sample is doing theoretically.
  • Test parts of code sample and/or look up documentation to confirm guesses.
  • Make small tweaks (e.g. change an input) to code sample to change/modify or to achieve what I intended to do with the code sample and see if the result is as I intended.

I always find it easier to build up my own theoretical understanding of what I think something does, then confirm it against written documentation. It also involves a lot of error-free and experimentation with minimal consequences.


Learning to code is just one part of the much larger "learning to think", really. And that's why it's less about the lines of code written and more about the secure grasp of the problem + correct and elegant design of a solution. Beware also of all the appealing shiny new tools and apps and languages that promise to "make it easy" for you - that apparent easiness comes at the cost of robbing you of any chance to actually master the problems and therefore be in control. Essentially whenever you "try" new tools, you are just serving as a guinea pig for the tools, not gaining all that much in the process.

The above being said, learning (of coding like of anything else) is always best as a combination of theory & practice. And the greatest amount of fun comes from doing things as best as they can be done - there is not only personal growth for you in that but also pride in your work and a solid foundation for moving further. With that as with all learning, you can struggle on your own trying to literally lift yourself up or you can search for mentors that are working on interesting (rather than merely popular, this year's hype, to die next year) things and can guide you effectively. Then of course, it's also a matter of whether you can convince them to take you on at all.


Excellent post. Thank you. I enjoy both ways as I like to know what's happening in the back. It helps to troubleshoot I believe.


Learning by doing really works for me. Reading for a long time without doing something bores me a lot, but you know...You just have to learn how to balance learning using the two ways. Nice post 👍


From my experience documentation is king, Though it might be difficult and boring to understand how to read them, everyone style is different. The easier you understand your style the advantage


Good post as always. Smart kid, you are the only teenager who I values opinion, keep it up!


De las dos maneras se debería aprender, sin el concepto no se puede llegar al conocimiento profundo.

code of conduct - report abuse