Six reasons to learn JavaScript


Published on

Presentation at Happy Hacking Day 2013

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Six reasons to learn JavaScript

  1. 1. Happy Hacking Day6 reasons everybodyshould learn JavaScriptOtto KekäläinenHelsinki 2.5.2013Hello, Im Otto and I work for Seravo, a companyspecialised in open source. Our customers arecompanies and public sector organisations thatwant to use open source software as much aspossible. We enable them to do that by selecting,installing and administering the software and ingeneral by taking the responsibility that everythingruns smoothly.We also enhance and develop software according toour customer needs and nowadays most of that isdone using HTML5 technologies and a lot of JSboth on the client and server side.Personally I like the JS ecosystem a lot and today Iam here to present you 6 compelling reasons whyyou should learn JS, or learn more JS if youalready know some.
  2. 2. 1. JavaScript iseasyIf you are about to learn something new, youll begrateful if it is easy, right? Youre time learning it willfeel useful as youll quickly reach a skill level whereyou actually can do some real world things.Compared to other programming languagesJavaScript is easy. You dont need any specificintegrated development environment and youll beable to immediately run it without any compiling.The syntax is straight-forward and there is no needfor complex variable definitions or any other up-front work. You can just immediately start codingfeatures you want your software to do.JavaScript is so easy, that I even recommend it topeople who have no programming skills at all andwho just want to learn some programming tounderstand a little bit about how computers workand develop their so called computational thinkingskills.
  3. 3. JavaScript vs C#var x = 7, y = 5;console.log(x+y: + (x+y));console.log(x-y: + (x-y));console.log(x*y: + (x*y));console.log(x/y: + (x/y));.........using System;class Program {public static void Main() {int x, y, result;float floatresult;x = 7;y = 5;result = x+y;Console.WriteLine("x+y: {0}", result);result = x-y;Console.WriteLine("x-y: {0}", result);result = x*y;Console.WriteLine("x*y: {0}", result);floatresult = (float)x/(float)y;Console.WriteLine("x/y: {0}", floatresult);}}Here is JavaScript compared to C++.You can immediately see how JavaScript is simpler.And in this case the simplicity does not mean itwould have less features. No, it is just that natty-gritty details are handled automatically inJavaScript so you dont have to.JavaScript is designed to be a high-level languagewhich makes the coder very productive and able toachieve a lot in a little time.And if you ever need to learn some otherprogramming language like Java, C++ or PHP,those will feel familiar to you when you masterJavaScript, since there are many similarities inthese languages. So, it is not just that JavaScript iseasy in itself, but later it will also make otherlanguages easier to learn!
  4. 4. 2. JavaScript isversatileEven if JavaScript is easy, it is not oversimplified noris it restricted to one single programming style orparadigm. You can use JavaScript in many ways.With JavaScript you can do traditional proceduralprogramming or you can do event basedprogramming.Your code can be flat or you can do it object oriented.You can even use it to do functional programming.JavaScript is versatile because it does not force astyle on you. However if you dont already havefavourite style, with JavaScript you will be inclinedto to follow an object-oriented and event basedway, which certainly is a good style which will takeyou far and fast.
  5. 5. 3. JavaScript isopen sourceReason number two was versatile because JS givesyou technical freedom. But that is not enough, youalso want freedom in legal terms, and in everyother way too, so that you can build solidbusinesses using the technology.JavaScript itself is made as an open standard calledECMAScript and anybody can implement thespecification without restrictions. The best and mostpopular JavaScript engines are open source and allrelated development tools are open source.There is also an ever growing mass of libraries. Thatis really important, as it enables you to concentrateon making new cool things instead of reinventingthe wheel.
  6. 6. 4. JavaScript isuniversalThe concept of universal code has been a dream forfor a long time. Write once, run everywhere.JavaScript might actually make this reality. Writeonce, run everywhere.If in some case the code cannot run flawlesslysomewhere, JavaScript is at least an universallanguage which you can use everywhere. Learnonce, use everywhere
  7. 7. ✓any web browser✓in many user interface componentsin NoSQL queries✓✓independently with Node.js✓shell scripts with #!/usr/bin/env nodeEverybody knows that JavaScript is the nativelanguage in browsers and you can use JavaScriptto do website user interfaces that will work on anybrowser without any plug-ins.With Node.js you can also use JavaScript to write thewebsite back-end or any kind of server or actuallyany kind of application, even apps that havenothing to do with browsers.If a system has Node.js, you can also as a systemadministrator choose to write your shell scripts inJavaScript.Today JavaScript can be found built-in in manyplaces outside web browsers. For example Gnome,the most popular Linux desktop environment, has alot of JavaScript in its UI. Another example areNoSQL databases, as most of them haveJavaScript built-in into their query procedures.
  8. 8. 5. JavaScript isin demandIts not just only that JavaScript can be usedeverywhere. It is also that it is used everywhere.And because of that fact, there is a huge demand forprogrammers with JavaScript skills. We looked at30 job announcements for programmers and SWdevelopers at this morning and 21 of themmentioned as a requirement either JavaScriptdirectly or some JavaScript library like jQuery orAngular.js.To all students in the IT field here today Id like tomake this very clear: if you dont have JavaScriptskills by the time you graduate, you will not beready for the job market.Hands up, how many of you seek a career as aprogrammer? Who of you are fluent in JavaScript?Who has now decided to develop their JavaScriptskills? The last reason to learn JS on my list is..
  9. 9. 6. Because youllhave to anywayIf you dont learn JavaScript now, youll have to learnit at some point in the future anyway.We already live in a connected world where theInternet plays a central role in both business,science, entertainment and politics. In a form oranother, everything has or will very soon have aweb presence, and the web means the browser,and the browser means running JavaScript.Today Antti from Intel talked about HTML5. It mayvery well be that in the future everything is HTML5,which means JavaScript. There might still be leftsome other technologies too, but we can beabsolutely sure that there will be no job positionsfor programmers that would not have anything withJavaScript to do.So, eventually youll have to learn JavaScript anyway.Learn it now so you can master it in the future.
  10. 10. Learn JavaScript because its1. easy2. versatile3. open source4. universal5. in demand6. because youllhave to anywaySo to conclude... (read out loud)
  11. 11. Start today!Learn and practice:codecademy.comRead online:eloquentjavascript.netGo to and sign up for theirinteractive online courses on JavaScript. Or if youlike to learn by reading, check out the excellentbook Eloquent JavaScript by Marijn Haverbekewhich is also available online.