|

How to REALLY learn to code in Javascript (or anything else)

I have been doing the Codecademy javascript lessons, along with 200,000 other people who joined up for Codeyear , resolving to complete a lesson a week and learn to code javascript better. So far, the lessons have been pretty easy.

Inspired by Sheila Tobias’ research (see her book, They’re not dumb, they’re different ) suggesting that non-science majors would succeed in science more given the right kinds of encouragement, let me offer some unsolicited advice to some of those 200,000 people, about half of whom are probably thinking of giving up on their New Year’s resolution already.

I just said the lessons were pretty easy. Actually, I was hoping they would get more difficult soon. Even more discouraging to you, I expect to finish the Codeyear lessons in three months or less. I was planning on doing it in January but I really won’t have the time. How the hell was that encouraging?

BUT … I found it easy because I have programmed in one language or another since my first Fortran class in (I think) 1977. A long time ago, anyway.  I am already very familiar with the concept of loops, Do-While, IF then/ else, object-oriented programming, function, objects, properties and methods, to name a few. The FIRST time I had to write a program using an object-oriented language, I found it very difficult and confusing.

snowflakes
Snowflake, Creative Commons license

So, if this is your first time, you’re not only not dumb, you’re not even very different, despite what your mama told you about us all being unique and special like a snowflake. The less previous knowledge you come with, the harder it is going to be to learn your FIRST language. That’s the bad news. The good news is that each one you learn after that gets easier. The more you learn, the easier it gets.

Another thing I’ve done to learn javascript is to read Jeanine Meyer’s book The Essential Guide to HTML5. As with many other ostensibly beginner books that start out, “No previous programming experience is required”, I am constantly marveling at how much harder this book would be to understand if you didn’t have any previous experience. Read it. Read over any chapter you don’t understand. Read another book.

 

Other things I’ve done lately to learn javascript better:

Modified several of the games in Meyer’s book to shoot buffalo in various forms to amuse my odd friends.

http://www.thejuliagroup.com/games/shootbuffalo1.html

http://www.thejuliagroup.com/games/shootbuffalo2.html

Enabled the Develop menu on Safari. (Click on this link to see where the Develop window is cleverly hidden.) This is extremely useful and already on your computer if you use Safari. Definitely check it out.

As well as the Codecademy site, I use textwrangler for coding on my Mac and notepad++ in boot camp. Yes, I know there are probably better packages out there but these were two that were already installed.

Notice, these are steps you won’t need to take the next time you are trying to learn a language, or learn a language you know better. You’ll have the Develop window enabled. You’ll have some text editor you like installed .

Read Javascript 24-hour trainer, by Jeremy McPeak and played the videos on the accompanying DVD,

Watched random “learn javascript” videos on youtube.

Poked around on a javascript forum just to see what people are talking about.

Here is a really big piece of advice, based on what I read of Tobias’ studies of science and non-science majors:

Non-science majors, she found, were frustrated because they wanted to see “The Big Picture”, how all of this fit together. It would seem like a waste of time to them that they were writing a function to concatenate first and last name. What’s the point? The science majors, on the other hand, accepted that you had to learn a lot of “boring stuff” before they got to the really fun, creative part of science.  

How could you ask and answer really interesting questions without a basis of knowledge,

said the science majors.

I want to know why I’m doing this stuff, and not be a mindless drone,

said the non-science people.

Here are my encouraging words …. once you’ve done some programming in one language, it is immediately obvious to you why you want to be able to write a function, loop, etc. A huge advantage that people like me have in learning a new language is that we know that we’ll figure out at some point the prototype object, concept of inheritance. We accept and even expect to go through a lot of silly games to make a buffalo fall over dead before we get to do the really useful stuff.

Zebra family
Thanks to Free Photo Bank for the zebras

Free photo bank.

Fine for me, you say, but you’re not me. You’re special like a snowflake and you want something different. Then maybe, in addition to the Codecademy course you may want to pick up a book to do whatever it is that you want to do – database, games, social network – start looking at those programs. Try  to write one. Of course it won’t work, what are you nuts, you just started.

However, as you work through THAT program and the Codecademy lessons simultaneously you will see more and more where the function, properties and methods fit into the program you’re writing for a social network site for Zebra lovers. Maybe when you get done, you’ll have both an understanding of javascript and your zebra site.

Another blog post on Codeyear can be found here, on Matt Waite’s blog. His main bit of advice – turn off everything else and focus when you are doing the lessons. I second that.

DISCLAIMER blah blah blah – It has been pointed out to me that bloggers should reveal their conflicts of interest. Are you fucking kidding me? I post things on this blog like how I would like to bitch-slap a couple of money-whore congressional representatives over their support of the Orwellian-named Research Works Act. Do you seriously think people PAY to have their products featured on a blog written by as, one commenter put it, “The foul-mouthed stats lady?” I am sure corporations consider paying me NOT to mention them,

“Hey, don’t do us any favors, all right?”

All opinions are my own. Several of the opinions you have are probably mine, too. Give them back.

Similar Posts

7 Comments

  1. Hahaha another great blog that had me rolling on the floor. Starting a disclaimer with “blah blah blah” is awesome.

    Not important, but you wrote “So, if this is your first time, you’re not only dumb, you’re not even very different…” I’m guessing you meant NOT dumb?

    Lastly, any advice for a starting point to writing an iphone-like app for a simpleton with c/c++ and basic scripting experience?

  2. Wow! You must have read that post right away. By the time, I re-read it and saw the typo, you had already caught it.

    As far as advice, in general, I would say, just start and you will learn by doing it. You are writing it in Cocoa, I assume? You said iphone-like.

    I think the best way to learn any new language is to have something you are interested in doing and just bang away at it.

  3. I didn’t even realize it was hot off the presses, just happened to click on it under Recent Posts.

    Yeah I’d like to try writing an iphone-like app. I was asking basically what language you’d recommend to start tinkering with. I’ll check Cocoa out. Thanks.

  4. “… have something you are interested in doing and just bang away at it.”

    Exactly right. It’s how I learned HPGL in the mid-80s, XLM (no, not XML) in the early 90s, and VBA in the mid-late 90s.

  5. No, I haven’t, Bethany. Thanks for the tip. I’ll check it out. As for what I’m doing now, I’ve written a few simple games and I am writing progressively more complicated ones just for fun.

Leave a Reply

Your email address will not be published. Required fields are marked *