DEV Community

Cover image for 2 ways to learn how to code
Erwan ROUSSEL
Erwan ROUSSEL

Posted on • Updated on

2 ways to learn how to code

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 your mind in a comment ⚠️

Practical way

When I started programming two years ago, I was 13, I still wanted to code without reading documentation or without to know basics.

That's how I started to learn HTML, then I learned PHP, in the beginning, I learned the Copy/Paste Oriented Programming. But over time I learned a lot of things through practice. I started to stop copy paste and to test the libs I was using by testing all methods/functions/class which was in those libraries. And that's how I discovered the practical way to learn to code.

Good points

  • Fast to learn

  • Very fun

Bad points

  • You can skip something important
  • It is difficult to debug something when you didn't read the documentation.

Theoretical way

Lately, I discovered the theoretical way. I wanted to learn how to use React. So I went to the getting started and the documentation offers to way to learn React, I decided to try practical way and... I didn't understand anything. Since a few months, I need to know how it works behind the code to use something so I decided to read the theoretical guide and I understood everything.

Good points

  • You know how it works
  • Easier to debug

Bad points

  • It takes a lot of time
  • It is sometimes boring

What I prefer

Like I said, since a few months I need to know how it works behind my code to understand how to use something. That's why I started to read a lot of documentation and to code less.

What should you use

I can't say you should use this one because it's personal. To answer this question, you have to try those two ways to know what you should use.

Top comments (39)

Collapse
 
ondrejs profile image
Ondrej

The trick is to mix these two approaches in mix that works for you.

Collapse
 
dimensi0n profile image
Erwan ROUSSEL

I totally agree 😄

Collapse
 
codymccodeface profile image
Daniel Parker

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?

Collapse
 
dimensi0n profile image
Erwan ROUSSEL

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.

Collapse
 
eljayadobe profile image
Eljay-Adobe

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!

Collapse
 
ronaldoperes profile image
Ronaldo Peres

Hi,

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.

Collapse
 
dimensi0n profile image
Erwan ROUSSEL

Programming isn't fun anymore ?

Collapse
 
ronaldoperes profile image
Ronaldo Peres

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.

Thread Thread
 
dimensi0n profile image
Erwan ROUSSEL

That's sad

Collapse
 
codymccodeface profile image
Daniel Parker

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.

Collapse
 
squgeim profile image
Shreya Dahal • Edited

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.

Collapse
 
dimensi0n profile image
Erwan ROUSSEL

Thanks for your reply. I love your story

Collapse
 
matthras profile image
Matthew Mack

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.

Collapse
 
theringleman profile image
Sam Ringleman

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.

Collapse
 
dimensi0n profile image
Erwan ROUSSEL

Thanks for your reply 😄

Collapse
 
picocreator profile image
Eugene Cheah

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.

Collapse
 
dianacoman profile image
Diana Coman

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.

Collapse
 
thewhitechild profile image
Amoo Olusola Simeon

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 👍

Collapse
 
dimensi0n profile image
Erwan ROUSSEL

Thanks ^

Collapse
 
thewhitechild profile image
Amoo Olusola Simeon

You're welcome 😉

Collapse
 
ffreemanjr profile image
ffreemanjr

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.

Collapse
 
dimensi0n profile image
Erwan ROUSSEL

Thanks for your reply guy 😄

Collapse
 
camille22_12 profile image
camille⚡️

I don’t understand but it’s a good work

Collapse
 
dimensi0n profile image
Erwan ROUSSEL

<3

Collapse
 
thomashighbaugh profile image
Thomas Leon Highbaugh

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

Collapse
 
dimensi0n profile image
Erwan ROUSSEL

Thanks 😄

Collapse
 
antonrich profile image
Anton

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).

Some comments may only be visible to logged-in visitors. Sign in to view all comments.