Coding Diary Entry #1 - Fear and Doubts in Javascript World

in #coding6 years ago

simon-abrams-286276.jpg
Photo by Simon Abrams on Unsplash

The First Entry

This is the first entry to my coding diary, this is the place where I share my thoughts, feelings, ideas, things I love and things I don't like about my journey into becoming a programmer.

Fear and Doubts...Can I Even Read?

I've been coding in Javascript for almost 3 weeks now. I've went over loops, variables, arrays, objects, the DOM and many exercises where I've coded along with the instructor to do simple little projects.

Here I was this weekend working on a simple RGB color guessing game. I shadowed the instructor and halfway through I realize that I didn't really understand the code that I was writing. I stopped the videos and try redoing everything that I've done so far but without shadowing the instructor.

Only after 5 hours and a few peeking into the solution document that I was able to get it to work...but still...while I am reading the code this morning, I'm still not sure that I understand what's going on in the javascript file and unsure I could do it again without any solution document.

Here is the codepen of what I built...I tried to take it apart with notes but it doesn't seem enough at this point.

Can I even read code?

That is the question that I am asking myself...

It's easy to code when I copy someone else on a screen but am I truly understanding what I am being taught? Should I move along and hope that things get clearer for me in the future modules or should I redo the exercise again and again until I can write it without looking into the solution document?

I'm tempted to do the later and just code until I get it before jumping into JQuery.

Thoughts?

Sort:  

Unlike with human languages, you learn programming languages by writing rather than reading. At first with the help of a teacher/tutorial. Then, as soon as possible, by writing your own mini projects.

Couple of hints that are quite obvious for experts, but might be useful for novices:

  1. When reading code, starting at the top of the file is not always the best approach. Try to follow the execution order rather than line order. In your example it makes sense to start from the loop, since that's the first executed part that's actually doing something apart from initializing values.

  2. When you try to understand the big picture, you should read the code layer-by-layer (kinda like BFS). When you stumble upon a function, you shouldn't immediately jump into it to understand what it's doing. Instead leave it in your mind as a 'black box' that you will open later, once the rest of the program on the top level is obvious. For this to be possible functions in your code should be simple enough to describe them in few words, and should be named appropriately.

  3. When something is just not clear, or doesn't work as expected, it's time to dig deeper in DFS manner. Choose one input state of the program, start from the location in code close to where the problem occurs, but where the state of the program is still understood by you. Add print statements to display the values and check whether the values are what you would expect of them. Once print outputs are clear - move them closer to the "target". Repeat the loop until you've understood what's happening or bug is fixed.

  4. For me at least, diagrams are immensely useful. You don't need full blown UML, or any standard for that matter, since you're the only reader. So concentrate on content instead of form. Try to visualize what connects to what in your code with the help of lines, squares, circles and squiggles in whatever matter you find convenient.

Try it, and let me know if you found my advises helpful. Good luck in your journey.

Yay!!! I've been waiting all day to read your coding post. I always have a lot to learn from it.



It's easy to code when I copy someone else on a screen but am I truly understanding what I am being taught? Should I move along and hope that things get clearer for me in the future modules or should I redo the exercise again and again until I can write it without looking into the solution document?

As a newbie in coding, I'm sometimes faced with exactly this same issue - getting into a tight corner when I try to put into practice what I watched in the coding tutorial or lesson. It is sometimes difficult and it becomes more complicated when I'm not even sure if I'm doing the right thing.

One of the ways I help myself is to rewatch the video or tutorials again and then read more about that topic online, watch more videos about it and see if I'll be able to grasp it.

Sometimes it's still difficult to comprehend, so I move on to another topic hoping that I will one day come across somebody who will really sit me down and explain to me how it is done in a more clearer way.


In other news, I've got a friend from India and he's good in python coding. Met him on reddit and he's been wonderful and teaching me well.


Also, I've been following your tips too @cryptoctopus and it really helps me a lot.

Thanks for this Diary, I'll be following it up to keep learning from your experiences.

Happy Steeming

Hi, I've been a web developer for years (HTML/CSS/PHP, not Wordpress) and have recently decided to learn Javascript - after years of using others' code via JQuery.

My motivation was to become more involved with Blockchain dev and really understanding what's going on in crypto. As Javascript will be an entry into bloackchain, and I already have a basic understanding of it, it seemed the perfect place to start.

But I, like was struggleing to UNDERSTAND the code, rather than just get it working. I was trying to teach myself via free content and experimenting (as I originally learnt HTML/PHP back in the day), but then came across a good course on Udemy.

It teaches Javascript, but through a thorough understanding of what's going on behind the scenes. I'm only around 15% to 20% into the course, so can't 100% recommend it, but I'd give the intro videos a watch and see what you think - I'm finding it very good so far.

I'm in no way affiliated to the author/creator, I'm just recommending you check out something I'm finding useful. On Udemy, search "Javascript understanding the weird parts" by Anthony Alicea (and good luck)

I have the course but it was too advanced for me. :-)

Now there's a coincidence! Yes, it is hard, but I'd say it's probably the best way to learn if you want a deep understanding. Even if you have to watch the early lessons over a few times and then look up supplementary content on the topics to get a better understanding. Might be slow progress to start, but you'll come out a better programmer.

Also, if you're like me, and learning in relation to crypto, I'd also recommend following @ivanli on Steemit.

Udemy is a good place to start learning programming. There are lots of courses there which are really good.

@cryptoctopus,
You did it well, it works perfectly! Now the question is you can't assure you are 100% readable this code and you understood it 100%.
Don't worry, you know with experience you will read it well. We all are not 100% accurate, it takes time to make that happen! Therefore, don't worry you made a good short program and it works perfect! Congratz friend!

Cheers~

Repetition can be a good thing for memorizing, but it isn’t that good at getting understanding. Is There a way you can reach out to the instructor for a little more info on that module? It may prove worthwhile for him to add something to it for future students.

It's easy to code when I copy someone else on a screen but am I truly understanding what I am being taught?

This is the first step, if you are understanding other's code, then yes, one day you will be able to write a complete program yourself.

I went through the course you're taking, it's good but I don't think so it's good to learn JS before you completely master HTML and CSS.

I would suggest to take this course first, a complete course where you will be developing your own website from scratch. This course helped me understand some basic concepts that I never knew.

And don't give up please. I dived into this coding stuff 6 months ago at the age of 29 and 7 months and I have been facing the same issue while learning PHP but I know, once I master this language, I will have a whole new world to explore!

I think that learning to code is like learning a New language. It takes a really long time studying it to understand It. It takes time and it doesnt make Sense for a while, but then come a time when It clicks, and It all makes Sense.

When a small kid blabbers some syllables, just repeats sounds and tries to communicate by pointing his finger and repeating what he things he hears does he ponder the question:

"Can I even communicate?"

No.

Don't expect mastery to come within a few weeks. Trial and error is still the best way learn things. You may think you're beating yourself up over one small detail for hours, find a solution and think you took ages for such a simple thing, chances are you'll never forget that detail and it will bring you much benefit in the future..

Stay strong, keep going!!

@cryptoctopus - Sir I'm a housewife & my knowledge about coding is pretty bad... I know little about HTML :) My husband is an IT professional... Having a busy life & a stressful life... But I can assure you Sir, he doesn't keep reminds coding... Google is the god of him... :)
In last few weeks you work hard, you are absorbing coding into your brain... It's not one day process Sir... My husband doesn't all inches of coding very well Sir... The practice made a professional coder through him... If he doesn't know he google... I think it works Sir...

+W+

where did you failed? this simple program works well. how did you fail then? actually you didn't fail, but you are not satisfied. for me you made it well & impressive application works on javascript. congratulations @cryptoctopus

@resteemia
reteemed & upvoted & commented & followed

Coin Marketplace

STEEM 0.26
TRX 0.11
JST 0.032
BTC 64799.61
ETH 3102.94
USDT 1.00
SBD 3.83