I want to choose JavaScript as my main development field, alongside HTML and CSS to become a developer commonly known as front-end developer. But I don't know how to become a JavaScript professional. I've read many books and learned the pieces including data types, syntax, tools usage (like IDEs, Debuggers, etc.), jQuery, etc. But when I look at some sophisticated JavaScript codes including famous libraries, I'm like "I never could write that code". What's wrong here? What step should I had taken that I didn't? I feel I'm missing something here to become a professional JavaScript developer. I also watched training movies, including Douglas Crockford's movies at Yahoo Theater.
|
closed as not constructive by Yannis Rizos♦ Feb 17 '12 at 18:31
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.
|
Your answer is experience. I'm afraid there is no other way to become good at it without practise. Try and create similar libraries to the ones you've looked at as an exercise. Keep reading but practise, practise, practise! |
|||||||||||||||||||
|
Really? Try it first. |
|||||||
|
|
You have to program ... a lot. Check what Google Closure brings to the table. |
|||
|
I agree with what was said above, you just need practice. It's also important to understand the design patterns used in high-end javascript code. I think once you understand the patterns used and why they used them, it may become a lot clearer. Pro JavaScript Design Patterns by Harmes and Diaz is a good start. Also take a look at Osmani's Essential JavaScript Design Patterns For Beginners. |
|||
|
|
|
If you chose this field, be prepared to be paid less and be considered less professional/good than c/c++/c#/java/etc. This is usually the case, especially in terms of salaries. It's very easy to find really good js + html + css coders, but it's kind of hard to find really good c/c++/c# programmers. This is the problem the company I work for (around 300 employees) is facing now. Even students having a good grasp of the mentioned languages were paid better than seasoned JS developers. Most JS devs learn from tutorials from the internet, and participate in open-source projects, which is quite a good thing - maybe find some FOSS project which uses JS heavily (front-end development for gnome 3, to give you an example) and contribute to it. This way you can gain some experience with the tools and languages. Besides, find some good rated books on Amazon and read them. But remember, CODING is the way you learn, so start developing, besides reading ;) |
|||||||||
|
|
Funny you should phrase your question this way. Most books on basic javascript do not help you understand why and how certain aspects of JavaScript should be used in order to achieve great code. What really REALLY helped me understand the more advanced side of JavaScript as well as best coding practices were the writings of John Resig, the lead engineer of JQuery. http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=John+Resig Particularly: Pro JavaScript Techniques Secrets of the JavaScript Ninja These help you understand how advanced JavaScript features should be used and why. You may also want to read up on Patterns and Agile Principles, and in particular the writings of Martin Fowler for more generalized thoughts on best coding practices. |
|||
|
|
|
Ninja's are normally just farmers or peasants dressed up in simple but sneaky identity disguising garb. But what makes a simple person a true ninja is a meaningful objective, pulling it off and then not getting killed themselves. So with that in mind why don't you find a javascript samurai demon, sharpen you coding katana and see if you can take the badboy down without killing yourself. If you succeed you'll make the world a better place for the other code farmers and find that you've become a ninja in the process. That or you'll be dead. Good luck! |
|||
|
|
I wouldn't call me a master in javascript, but pretty good anyway. Read, understand and code from like these books: http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742/ref=pd_sim_b_1 That would cover the basics. Then explore the whole field. Try to learn as much as possible. Learn to debug code in Firebug. Learn a couple of javascript frameworks (somewhat decently) - Jquery being the easiest. Maybe Dojo toolkit, Mootools and Prototype. Try to read and understand the source code of javascript frameworks. Build a plugin in jQuery. Learn the Module pattern. There's a lot to learn.. But the most important rule of them all is: Code and try to better yourself every day! And don't just become a framework junkie who needs the latest plugin or framework to do anything good. Try to master the core language and do plugins or widgets from the ground up yourself. If you can't do that, then you ain't not great yet. |
|||
|
|
|
Definitely practice - but, IMHO, it's better not just to do busy work for practice; find a real problem to solve. Think of something cool to accomplish, and go write it. Find someone who want some javascript work done either for free (like for a charity or non profit) or for way cheap, and write code for them. In other words, your best pratice will occur doing something meaningful. Also - I think javascript is a really interesting and actually very powerful language - but I learned more about programming in general in the college C class I took years ago than from any one source before or since. Learning C came with learning about how computers think, about memory in bits an bytes, and I had a pretty decent teacher who emphasized some really solid foundational programming practices. The guy that said learn another language weren't completely wrong - learning another langauge changes your view of programming a bit and makes you appreciate the similarities and differences. |
|||
|
|
|
The javascript code you find in a typical web application is fairly easy, especially if you use a framework like jQuery. Writing custom plugins is a little more advanced, but still only requires a few basic concepts. This is enough for most purposes - in enterprise environments you can really impress clients with a few simple techniques from internet development because the existing UI is usually awful - but not really ninja level. If you want to really know javascript, you need something a bit more challenging where you will run into limitations of the system and be forced to apply more advanced techniques. You can find some of this sort of code in frameworks that have to deal with browser compatibility, but this is largely a solved problem, as well as being rather frustrating to work with. There are a lot of more interesting options around html5 apps - try to implement something that would not normally be done in a browser. My own example of this is a git client. Javascript doesn't handle binary data very well, and the naive implementation locks the UI for several minutes and allocates new objects fast enough to run out of memory before GC is triggered. Optimizing something like this leads to learning exactly what happens when the code is run, and since this understanding is impossible with poorly structured code you will learn to write javascript with a clear structure that is applicable to more typical applications as well. |
|||
|
|
|
Don't learn JavaScript as your first language, and don't try to emulate the programming style that you find in JavaScript libraries. Most JavaScript programmers are hacks who gave me up on real programming languages like C++, C, Java, etc. The result is that their JavaScript code is a jumble of uncommented, undecipherable spaghetti code. I know, because I worked as a C++/Java/C# software engineer and am coming into the JavaScript world now. So if you want to be a great JavaScript software programmer, go learn some other programming languages first and then come back to JavaScript. |
|||||||||||||||||||
|
