Why You Should Learn To Code…Javascript
Over the last year and a half, there’s been a lot of activity in the independent study space specifically focused around “teaching people to code”. During this time, several well known programs have launched including MIT’s SICP on OpenCourseWare, Codeacdemy, and most recently the re-launched CS curriculum on Kahn Academy. These resources, including the others available, are all fantastic but they often leave new students wondering what language to learn and why.
Questions like this usually end up causing heated discussions between seasoned developers because there isn’t a single “right answer”. Personally, I think that learning to code using Javascript is an excellent choice for several reasons (in no particular order).
Its accessible
One of the most frustrating aspects of learning to code is getting started. For many people, this will be the first time they’ll have to install unfamiliar software (compilers, interpreters, IDEs, etc.) which often have cryptic error messages. On top of this, experimenting with certain languages may involve connecting to remote servers, setting up databases, and simultaneously learning the command line.
In contrast, running Javascript code typically only contains a modern browser because they all contain Javascript interpreters. Practically, this means that a new student only needs a text editor and a browser to start working with Javascript.
Another benefit to having Javascript available in your web browser is that it facilitates tight feedback loops and encourages collaboration. Students are able to easily read a lesson, write some code, see the results, and update their code all on the same page. In addition, because of this low friction students can easily share and collaborate on code.
Its immediately useful
This is really my opinion, but I think learning Javascript provides you the shortest path to being able to write code that will be personally useful to you. Because of the availability of Javascript and the ubiquity of the Internet, many “easy” problems can be solved with a couple of lines of Javascript.
A quick anecdote, a friend of mine was looking to pull together a list of universities in the US and ran across this list via the University of Texas. She looked at the list and realized it was going to take hours to manually go through the list to copy and paste each entry into a single cell of a spreadsheet. She sent me over the list and asked if I had any “tricks” to save her some time in putting together the spreadsheet. Turns out, she could extract all the institution names into a list with four lines of Javascript – . (Ok I cheated and used jQuery but stick with me.)
Any programming language would have been able to achieve the same result, but the gap between sitting down and “learning to code” and extracting the list would of been longer in almost any other language.
It make sense (for the most part)
For the most part, Javascript as a language is reasonably easy to follow and doesn’t suffer from to many weird quirks. Sure there’s a book titled Javascript: The Good Parts and a handful of weird equality quirks but for the most part straight Javascript usually works as intended. In addition to this, the types of errors new Javascript users encounter tend to be more straightforward and their messages are usually a bit more user friendly.
Interested in taking the dive? Head over to Code Academy or the CS curriculum on Kahn Academy to get started!
from BostInno http://bostinno.com/channels/why-you-should-learn-to-code-javascript/