Javascript or Python? beginner getting up to speed [closed] - javascript

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 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, visit the help center for guidance.
Closed 11 years ago.
Which language will allow a beginner to get up to speed quicker?
Basically which language of the two is easier to learn

Python is more regular, and has not needed to keep supporting every old, redundant feature forever, as Javascript has been forced to do (in order to keep supporting existing sites): these are issues that can make Python easier to learn.
However, Javascript's not too bad, especially if you can choose a reasonably rigid, modular, clean framework such as dojo (if you have to learn about every popular JS framework, or even most of them, it will, however, be a nightmare -- as it will if you have to learn the subtle bugs and incompatibilities of various browsers' implementations of JS and the DOM, rather than getting them covered up by such frameworks as dojo, jquery, or closure).
For learning Javascript, I recommend supplementing whatever tutorial you choose with Crockford's Javascript: the good parts -- it's a very thin book (which sounds like a joke, but it's true!-), fast and easy to read, and stops you from wasting your time on language features that are misconceived, too badly designed to use, or counterproductive. Crockford is a real JS guru and is well worth reading and paying attention to.

Depends what you want to do. If you're just interested in learning a programming language, I would recommend Python because:
The interactive prompt is great for learning a language
It's simple and well-designed, whereas JavaScript has a number of design flaws that can be confusing to newbies
There is a particularly high amount of introductory materials for Python.
It allows you to do all kinds of programming (server, client, games, etc.), whereas JS will limit you a bit more.

They're both pretty straightforward to learn. They more differ in terms of their typical project space - Javascript is usually utilized more for the client-side portion of web applications, while Python is often utilized for the server side of web applications and also standalone non-web apps.
What do you want to make?

The two languages are used for two completely different purposes. JavaScript does work in the browser,1 Python does work everywhere else. Pick the language based on which you want; it's useless to learn a language if you can't even use it for your project. If you want to make a website, for example, you'll have to learn both--JavaScript for the client and Python for the server.
Regardless, to answer your question, both languages are great but I'd say Python is easier to start with. JavaScript's basics are fine, but it features a lot of advanced concepts that you shouldn't have to deal with when learning your first language, IMO.
1. Yes, I'm aware that you can use JavaScript on the server-side, but those implementations are not mature and certainly not for a beginner. Python is much more suited for that kind of thing.

PHP is my thing, but I've played with Python and worked with JS. Being only somewhat skilled in both languages, Python feels nice and clean (although a little wierd) with the forced tabbing conventions and lack of semicolons. JS, on the other hand makes me feel like I need a shower. Especially after debugging in IE.
But the only real answer is the question - What do you want to do with it? Want to make websites do cool things in the browser? Go with JS. Something else? Maybe Python is better suited, as #Amber said.
Edit: As for getting up to speed, here's how it works. Your first language takes you a longer time to learn. Your second takes much less time, and after that it's not long at all since you're mostly just learning new syntax for similar things. So the solution for getting up to speed faster is to jump in right now.

I would say JavaScript is easy to learn. I had to learn it to program the Karotz. It only took about 2 months of Youtube tutorials to learn most of it.

Related

What can be the possible disadvantages & advantages of a Javascript Framework like Ember or Angular over using simple Javascript for projects? [closed]

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 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, visit the help center for guidance.
Closed 9 years ago.
I am thinking to use Javascript Framework for my project. But I am confused, should I use a Framework or use simple Javascript. Moreover, one more point I want to make I am not much experienced in Javascript. What would be your suggestions for one who is still at beginner level in Javascript?
Regarding beginner doubts:
I was at beginner level JavaScript when I started working with AngularJS last year. To learn the basics of it is really easy. What's even better is that it helps you do fairly complicated things with very few lines of code. Most of the code you write will be what AngularJS calls directives, which also turn out to be the most reusable pieces.
Some of the advanced concepts can be difficult to understand and will take some time though, but overall, I would say that progressing through AngularJS has given me a better understanding of JavaScript.
This was my experience at least, and this post does not aim to sell AngularJS. In my opinion, learning a programming language is, most of the time at least, better done by digging into the raw features of it on your own. But with JavaScript -- and all its quirks -- I found it very helpful to have something to guide me -- in this case, AngularJS.
Regarding frameworks for projects:
When you want to have a large application, with a lot of code and interactions, I've found that frameworks help you a lot. There's a boom of JavaScript frameworks right now, all of which are pretty good. If you want to extend HTML and do declarative programming, there's AngularJS. If you want to work at different levels of abstraction, there's Ember.js. If you want to write most of the implementation yourself, then use Backbone.js. If you're doing a lot of GUI stuff, ExtJS. Most of these frameworks will help you write cleaner, modular and more testable code which greatly improves maintainability in the long run.
The downsides could possibly be:
learning curve - but if you are at beginner level, then you shouldn't worry about this.
overkill - for some projects you really don't need to include 500KB of frameworks and libraries
mismatch - and this, I think, might be the most important factor. For example some frameworks are more suited visual stuff, like charts and animations, while others are good for something else.
Conclusion:
determine what you want to achieve,
find the right tool for the job,
the framework/library (or neither if not required) will be of great help then
and, lastly, more like a general rule:
don't be afraid of doing things right just because it seems too unknown to you
Libraries can be very good. They can help you segment your code, they can help you do a lot of things more easily. I have begun to find backbone particularly helpful for AJAXy web aps. With JQuery, $('#element').hide(); is far easier than document.getElementById('element').style.display = "none";, and JQuery .toggle(); is even better than that. In most cases, they deal with cross browser issues for you very easily as well.
From a design/architecture standpoint, the big disadvantage is the overhead. Once you start using libraries and plug-ins for said libraries, who knows how the code quality is.
From a personal development standpoint, the biggest risk is that you will begin to use libraries as a crutch, and never bother to learn why or how these libraries do what they do. I hate when I see a web page with 15,000 (exageration) <script> blocks in the header, and they leverage perhaps 1/10th of the power of all the plugins and frameworks that they are using. It would be far better to write 5-10 lines of code, than to have an extra HTTP request, and load an entire JS module just to use one function that it contains.
My personal recommendation is to use libraries, but always endeavor to understand what they are doing, and to challenge yourself to write at least part of the JavaScript yourself, until you're at a point where you know what's going on inside JS, and why it's going on. Once you get to that point, you will be much better able to evaluate if a library or plug-in is really what you need, or if you should just write something yourself.

Node.js/Express.j or Ruby on Rails for an ABSOLUTE beginner [closed]

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 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, visit the help center for guidance.
Closed 10 years ago.
I had asked a question previously regarding the use of Javascript or Ruby on Rails for the development of web apps and got some very good advice from maerics which basically boiled down to Javascript for Frontend/Smaller apps, RoR for service-side/larger apps (Groupon scope).
After a little digging however, I found out about Node.js and Express.js So my decision is basically back at square one.
I'm looking for a language I can use to take an idea to a functional stage (again, the scope is something like Groupon or Twitter). I am an absolute beginner. I know HTML/CSS and a little jquery, but that's about the extent of my knowledge on web technologies.
I've heard about RoR being very easy to learn, or at least pick up, and has a lot of community/support. But Javascript is everywhere, and can be useful for more than just large scale web apps (and I'd be using it anyway if I used RoR), though is far more complex. Seeing as I have no experience in either, I thought I should pick one now and stick to it for the next ~6 months and see how I go.
But can anyone recommend which one to go for?
When you asked about Javascript and RoR in your previous question, you effectively asked about Node.js and RoR.
If you are building a commercial/enterprise level application, stick with RoR. There are way more resources, bigger communities, relatively stable releases, and you can easily find good developers with RoR experience.
Express.js is like Sinatra for Ruby. Neither is as advanced as Rails, preferring to be more 'basic' and providing a minimal feature set rather than try to be an 'everything at once' framework that Rails is.
Right now, Node.js is rapidly changing its API, still has not hit version 1 and hard to find developers for(you often get people claiming they know node and have 1 year exp with it, when they actually mean they have 1 year exp with client side javascript). Besides, for 99% of the web's purposes, RoR will suffice. Most people only use Node for their pet projects, for testing out the next generation of super dynamic interfaces or websocket integration with Socket.io. If you just want to build an application for commercial purposes, use RoR.
As for difficulty, when you start out, Rails will be a bit magical, it does so many things under the hood, you'll have a little bit of difficulty doing something that doesn't already have a tutorial. But look through the source code of some popular gems or even rails itself, and you'll be up to speed in no time. Ruby is an amazingly simple and beautiful language, and you'll find it simpler and probably more fun than javascript.

Is Backbone better choice for beginners than AngularJS? [closed]

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 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, visit the help center for guidance.
Closed 10 years ago.
The last couple of years I've spent working in Flex. Before that I've been building web applications in vanilla JavaScript.
Today I'm switching back to JavaScript but now I'm having trouble in choosing the right JS framework/library for a new medium-size project.
Although all the comments on AngularJS have been positive, I found that getting started with it is not an easy task. The problem is of course the documentation. Although there are tutorials which show you how to do the basic stuff, none explain the concepts or show you how one might structure larger projects.
Before discovering AngularJS I had my mind set at Backbone. The positive side is that there are loads of documentation, tutorials, screencasts, books on the subject. In addition the source code is small and can be used as a reference itself (unlike AngularJS).
So now I'm thinking that Backbone might a better choice for someone who's getting stared with using frameworks in JS programming than AngularJS. Later on, when I manage to train my brain to think in JS, AngularJS might be easier to understand + there will be more documentation available.
I'm now in doubt if that's the right path to choose...
First of all, I'm pretty sure that switching to JavaScript was the right choice.
Selecting a JavaScript MVC framework is indeed a difficult choice, especially because they're popping like popcorns everywhere!
This project might be very helpful regarding this decision: http://addyosmani.github.com/todomvc/
Here is my point of view. Backbone is liberal. It does not impose a rigid structure. It is more a set of conventions than actual code. You will certainly be using something more than just the Backbone framework. This can be challenging, but may result in a better tuned result. Backbone is very extensible by nature, which is a great advantage.
AngularJS augments HTML semantics. Just by saying this you can imagine that it is something much more complex than just "pure" Backbone. Perhaps we may find AngularJS a bit more magical (not magical of course, but things happening with less code, "under the hood", I mean).
They have very different approaches to the problem.
I'm not going to state here every advantage and disadvantage of each one. The link I posted should help you on that.
I too was confused like you, but in short, investigate both, make some spike implementations with both, and check the todoMVC project. Choose wichever suits better your requirements and even personality. :)
A much more fairer comparison could be "Backbone and friends" vs "AngularJS". Don't forget Backbone's friends (plugins and modules).
You can do great things with both.
I've been there past few days. I've implemented a simple CRUD over REST api in both frameworks. Here are my thoughs:
Angular is harder, because it's convention over configuration, new concepts like directives and such, you need to think with extending HTML instead of javascript hacking (which can be not that difficult for flex practitioners).
But in the end I prefer it because it does more than backbone out of the box. You don't need to write jquery stuff. The templating is way more readable than using Backbone and underscore templating. There is less code (easier to maintain), and I like the way I can have a component approach for structuring my clientside code.

What's up with all that JS frameworks? [closed]

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 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, visit the help center for guidance.
Closed 10 years ago.
I am .NET (do most of my work in ASP.NET WebForms) developer. But I am not limiting myself to that framework only and read and try to learn new stuff from time to time.
Lately I noticed a lot is happening in Javascript world. I'm familiar with jquery/UI and calling web services from client side. But lately I see a lot of new frameworks written in Javascript. I really don't know why so many are created lately. Can anyone enlighten me why is that happening? What are the differences between different frameworks. When should I use/not use them? For example node.js is something totally weird for me. Writing server side code in JS? Writing HTTP servers in JS (or maybe no one really does it?). Creating client side UI on JS only? I really don't get it. Add to this at least 5 templating frameworks and my head is about to explode :)
Atwood's law:
Any application that can be written in JavaScript, will eventually be written in JavaScript.
The real story is: nodejs (or v8) allows developers to write applications in Javascript that can be executed outside a browser. This makes Javascript as powerful as Python or Ruby. Nodejs was adopted faster than any language in history, because many developers already know Javascript. Suddenly it's possible to write applications in Javascript, so we are in a gold rush of development. Many from the Ruby community (who are early adopters) tried nodejs, so it inherited a culture of sharing libraries under permissive licences.
I don't use the client-side/server-side language because it's confusing and a false dichotomy.
I think all the javascript server side libraries are now coming out because of Google's V8; The highly efficient JS engine that Google made for Chrome. It compiles the JS codes and therefore runs its pretty fast.
It was not too long ago that V8 was released.
It makes it easy to run js without a browser efficiently.
The biggest downside of node.js is probably that a fatal error will crash the entire http daemon. So one visitor can bring the entire site down unless a lot of care has been taken.
I think the biggest advantage of js-server-side like node.js is that you can run the same code on server and on browser. This is particularly useful for form validations, for example.
As compared to PHP, node.js also provides the advantage of being able to make non-blocking calls. In fact with node.js its really hard to make any blocking calls.
I wouldn't call node.js a framework though, I see it more like an essential library for which a framework still has to be made (or does one exist already?).
Linkedin is built on node.js and they seem to be very pleased with it. However their site seems to be quite backward to me.
All the fuss about JS is because of the great UI experience the user can get. Instead of the user waiting for the page to refresh every single time they do something, the results are almost instantaneous. I agree with #Karoly Horvath's comment. JQuery may seem weird at first, but its because of the unknown, it's great to work with once you are used to the syntax. Getting back to the user experience, if your page takes forever to load/reload, the users will rather use another site. Your question is not really fit for Stack Overflow, but im sure you will find some additional answers and opinions in the chat sites available on SO. Good luck.

Any chance that ruby could be used on client side? [closed]

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 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, visit the help center for guidance.
Closed 12 years ago.
For scripting on web browsers, the only option now is using javascript.
I wonder if Ruby ever could make it to the web browsers?
It's highly unlikely cause MS doesn't have any reasons for letting Ruby to become first class citizen, wouldn't that be bad for their current platform? I don't know how Apple sees it.
If Ruby can't be first class citizen in the browsers, how likely is it that a add-on could be installed on the browser, letting the browser execute Ruby also. In that way, we programmers could just use Ruby instead.
Your best bet is probably a "language converter" like:
http://rb2js.rubyforge.org
Honestly though I would just bite the bullet and learn Javascript. A plug-in could be created, but it would never catch on: businesses won't inconvenience their customers just so that their programmers can use the language of their choice.
I don't like JS that much. For a scripting language its way too much verbose, it suffers from bad design decisions that got into the ECMA standard... It has however some nice features which make it unique and powerful.
I wish the web was more agnostic with client-side languages, but its very unlikely, sadly.
If you want something that feels like Ruby you may try CoffeeScript. You write your code in CoffeeScript which then gets turned into JavaScript. It borrows a lot of ideas from Ruby and Python which makes a great mix.
http://jashkenas.github.com/coffee-script/
I am personally enjoying it very much.
It may not be in the near future or it may never be implemented as the browser scripting language. But people are playing around with that idea. Check out rubyinside.com, they seem to have a working demo. The last time I checked the demo page crashed the browser :(
But don't loose hope yet ;)
It's not exactly using Ruby as a replacement for Javascript, but you can run Ruby on Silverlight (and Moonlight, the Linux implementation of Silverlight).
No one can tell the future, but I'd say it's incredibly unlikely. Browser vendors aren't likely going to want to support multiple client side scripting languages (see the death of VBScript in the browser). Javascript fills the client side niche already so there's no reason to vendors to introduce a new language just so that there is an alternative syntax. 3rd party plugins aren't really a good solution either because users get no benefit from installing it (unlike something like Flash which can offer functionality that HTML/Javascript can't).
There are some Javascript libraries that try to emulate a Ruby style of coding -- for instance, JS.Class.

Categories