Open Side Menu Go to the Top

07-16-2012 , 10:49 PM
Please post questions, resources, advice on javascript or related issues in this thread.

myBackground:
I'm trying to learn JS, and web languages in general plus more comp sci. I have some experience with html and CSS, less with the latter but am competent, and started learning JS about a month ago. I've read a couple tutorials and started to do courses on www.codecademy.com which im quite deep into now.

I'm mostly interested in learning for the purpose of dealing with data more than UI, but would like to be as well rounded as can be. Hopefully those learning can asks questions in this thread and or get practice examples, learning resources or general advice from others.

Questions on any libraries or other related topics are obviously welcome.

Last edited by Zygote; 07-16-2012 at 11:04 PM.
Learning Javascript Thread Quote
Learning Javascript Thread
$25m Guaranteed WPM on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
Learning Javascript Thread
07-17-2012 , 03:16 AM
My question is why go with a client side language instead of a server side language like php? I'll even speculate that a large portion of people disable javascript for their browsers for security reasons and might make your sites be not as functional as you would like for said audience...
Learning Javascript Thread Quote
07-17-2012 , 05:48 AM
Is there a goto book for JS these days? I wouldn't mind a good introduction because I'm pretty rusty.
Learning Javascript Thread Quote
07-17-2012 , 12:23 PM
I've been learning javascript and coffeescript simultaneously, and I love coffeescript. I'm also interested in clojurescript, but haven't done anything with it yet.

As for server vs client, I believe people are going end to end with javascript now. I think I'm going to use node.js + express.js + coffeescript for my current project. Of course, there are other frameworks out there.

As for books, http://eloquentjavascript.net/ is interesting, though I don't know that it's the go to book. Also, I remember some difficulty when jumping around as it's not alway clear which functions are built in and which are developed earlier in the book.
Learning Javascript Thread Quote
07-17-2012 , 05:29 PM
Quote:
Originally Posted by clowntable
Is there a goto book for JS these days? I wouldn't mind a good introduction because I'm pretty rusty.


http://shop.oreilly.com/product/9780...ript-activate#

It was awesome back in (omg) 1998! when I got my 3rd edition, will be much more awesome now imo in the current html5 6th edition
Learning Javascript Thread Quote
07-17-2012 , 06:10 PM
Quote:
Originally Posted by iosys
My question is why go with a client side language instead of a server side language like php? I'll even speculate that a large portion of people disable javascript for their browsers for security reasons and might make your sites be not as functional as you would like for said audience...
javascript is more widely enabled nowadays and i see it as a web language that will gain increasing traction overtime. I'm not sure which server-side language to tackle, will probably do python/django but thats for another day.

For me im also managing a process that utilizes a ton of javascript and dont like a huge discrepancy in knowledge between me and the developers for communication and oversight reasons.
Learning Javascript Thread Quote
07-17-2012 , 06:33 PM
JavaScript is evolving very quickly at the moment and has a big future. Currently JavaScript developers are in very high demand.

I would NOT recommend learning JavaScript from books. The core syntax of JavaScript is actually not very complicated and you dont need a book to teach you. The crux of what you will need to learn to become a desirable developer is the ability to work with libraries such as jQuery and web frameworks (too many to name).

These you will learn through practice, and any book you buy will be out of date by the time it arrives on your doorstep. Think up some small projects that you will find useful. A todo list, a reminder application, a mailing list, a system to start and stop AWS server instances by sending SMS messages via a JavaScript API to a NodeJS application. Whatever floats you boat. Implement these ideas using JavaScript and you fill find you learn very quickly.

A few resources to help you out

Last edited by MrWooster; 07-17-2012 at 06:42 PM.
Learning Javascript Thread Quote
07-17-2012 , 06:59 PM
Thanks for the response to my question, didn't know it was getting big!

Anyway I recommend these video tutorials for javascript:
http://www.youtube.com/watch?v=yQaAGmHNn9s

He has a lot of video tutorials for other languages that are very useful to get your feet wet.
Learning Javascript Thread Quote
07-17-2012 , 11:24 PM
Code Academy is a great start for JS imo

ahh Wooster said it already, lame!
Learning Javascript Thread Quote
07-18-2012 , 12:10 AM
Quote:
Originally Posted by PJo336
Code Academy is a great start for JS imo

ahh Wooster said it already, lame!
its in the OP too. I'm using it now and its great environment with quite a few draw backs. The lesson quality is still not great, and they need more content but its got a lot of potential for sure and i'm definitely learning from it. I'm hoping to find some more sites like this that have a bit more hands on learning on the go.
Learning Javascript Thread Quote
07-18-2012 , 12:23 AM
Quote:
Originally Posted by Zygote
its in the OP too. I'm using it now and its great environment with quite a few draw backs. The lesson quality is still not great, and they need more content but its got a lot of potential for sure and i'm definitely learning from it. I'm hoping to find some more sites like this that have a bit more hands on learning on the go.
Wow I dont read good apparently.

Just interested what you mean by lesson quality not great. I just tooled around with it for a bit once, but it seemed like a good starting point.
Learning Javascript Thread Quote
07-18-2012 , 12:58 AM
I can recommend two books about javascript

The first is Javascript 24-Hour Trainer
-The third chapter about functions was the most useful

The other is Javascript: The Good Parts by Douglas Crockford, the developer of JSON
-This is more a history, basic syntax, and logic of the language but on the whole a worthwhile read

It's also worth watching the video series from yahoo

I mostly use javascript for working with couchdb, writing mapreduce queries on JSON databases,developing vizualizations with libraries like d3.js, and google map scripting.

Last edited by LA_Price; 07-18-2012 at 01:04 AM.
Learning Javascript Thread Quote
07-18-2012 , 01:25 AM
Quote:
Originally Posted by PJo336
Wow I dont read good apparently.

Just interested what you mean by lesson quality not great. I just tooled around with it for a bit once, but it seemed like a good starting point.
one big criticism is its a little too hands with very little theory integrated well. Though, you start figuring things out naturally and unexpectedly over time. The other problem with quality is the lesson checkers are sometimes broken/poorly designed and interferes with a track. Some of the lessons teach bad habits and recommend illegal javascript techniques.

The lessons are also easy to trick in the sense that its not designed enough to ensure you really get it before you move on so quickly.

All this said its still great, these are just a few of the drawbacks. Some of them aren't so bad either cuz its good to not just trust everything and it sort of forces you to do some research and investigaiton.
Learning Javascript Thread Quote
07-18-2012 , 01:44 AM
Well that all makes it sound rather crummy lol. Maybe Ill stop recommending it for people
Learning Javascript Thread Quote
07-18-2012 , 02:28 PM
Thx _dave_ I used an old version of that one as well so I'll just get the latest if I ever want to improve my JS. And/or I guess I'll do the codeacademy.
Learning Javascript Thread Quote
07-19-2012 , 03:22 PM
If anyone here is at a proficient level it would be great if they'd volunteer to maybe post a project or task for some of to try and tackle as a learning experience.
Learning Javascript Thread Quote
07-19-2012 , 07:07 PM
Quote:
Originally Posted by Zygote
If anyone here is at a proficient level it would be great if they'd volunteer to maybe post a project or task for some of to try and tackle as a learning experience.
i think a blackjack game would be great for learning.
Learning Javascript Thread Quote
07-20-2012 , 11:04 AM
Quote:
Originally Posted by Loc
i think a blackjack game would be great for learning.
I think a blackjack game might be a bit complex. Granted there is no AI, but its still quite a big project.
Learning Javascript Thread Quote
07-20-2012 , 12:32 PM
Quote:
Originally Posted by Loc
i think a blackjack game would be great for learning.
I'll give it a shot. I've covered quite a few topics in Javascript already that should have the tools to build it, though I have very little experience using what i've learned and am still in need of heavy review. As a project this may help. It may be too advanced for me though so if no one is here to help if i get stuck it may be an utter failure.

In all likelihood it will be a very limited version of blackback, but i'll take a stab nonetheless, and post progress in case anyone wants to join in.
Learning Javascript Thread Quote
07-20-2012 , 01:20 PM
imo a text-based version can be done on a single page of code. the completeness of the app depends on how far you want to go with it, which is why i think it's an excellent project suggestion.

for example, a poor man's deck:
Code:
var deck = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10].sort(function(a, b) { return 0.5 - Math.random(); });
draw 4 from this for dealer and player1. check blackjacks (sum == 11). implement hit/stand. implement house rules for dealer drawing. evaluate hands.

if you want to go beyond one page, you could improve on this with better shuffling, distinct cards, betting, splitting, multiple players, graphics, etc.

Last edited by Loc; 07-20-2012 at 01:50 PM.
Learning Javascript Thread Quote
07-20-2012 , 01:55 PM
oops, change the 1's to 11's - i meant sum == 21 obv.
Learning Javascript Thread Quote
07-20-2012 , 05:41 PM
I think a blackjack game is a great idea. I wrote a very limited version in Monkey (a proprietary language that target javascript) a couple of months ago as a demo. I had the card graphics laying around already and it only has hit/stand options, but then, it only took a week, so I think it's a good size for a practice project. It was about 350 lines in Monkey. I don't have it up anywhere at the moment, but I've been meaning to put it up.

I'm be tempted to rewrite it in Coffeescript to see how much faster I could get it done.
Learning Javascript Thread Quote
07-20-2012 , 06:00 PM
If you're not going to be programming games is there any reason to get into javascript beyond playing around with jquery for various design purposes? The whole anonymous function thing and language in general seemed very odd to me coming from python, php and a bit of C.
Learning Javascript Thread Quote
07-20-2012 , 07:26 PM
Quote:
Originally Posted by e i pi
If you're not going to be programming games is there any reason to get into javascript beyond playing around with jquery for various design purposes? The whole anonymous function thing and language in general seemed very odd to me coming from python, php and a bit of C.
i suppose learning javascript isn't necessary if you mostly work on apps without a lot of dynamic content, but it is a very forward-thinking endeavor if you plan on developing for the web for some time. javascript isn't just for game interfaces/physics - there are plenty of non-game uses of javascript on the server (node.js/vert.x), like chat apps or any kind of server io e.g. polled from an ajax-like call. even in "traditional" web apps, once you start developing ui's with serious production value the code is going to be so much easier to manage with javascript-powered libraries that enable a structured design paradigm/pattern (e.g. backbone.js, knockout.js, etc.).

phones aren't getting any less powerful and esp with firefox os coming, learning javascript as any kind of web developer seems like a no-brainer to me.
Learning Javascript Thread Quote
07-21-2012 , 06:19 PM

[CODE] tags for code [/CODE]
[QUOTE] tags for quotes [/QUOTE]



Last edited by _dave_; 07-21-2012 at 06:22 PM. Reason: and now it's deleted!
Learning Javascript Thread Quote
Learning Javascript Thread
$25m Guaranteed WPM on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
Learning Javascript Thread

      
m