Archive | Javascript RSS feed for this section

How To Learn Backbone.js

8 Oct

During the past weekend, it feels like I’ve tried almost every resource to learn Backbone.js. I learn brand new topics best by listening to someone explain it, so I started out by going to a Meetup on Thursday night where there was a Backbone.js expert who was supposed to teach us Backbone.js. Let’s just say it’s great that that guy is not a teacher…

Continue reading

How To Add A Form TextBox With JQuery

7 Aug

Last week, I was playing around with building a Polling app. I looked at how PollEverywhere does the poll adding part, and was really inspired by how a new poll box is created when the user starts typing in a question. I’m pretty new to JQuery, so I was really proud to replicate the functionality in my app, which you can play with right here (start typing a question and see a new question text box pop up!). Here is how I did it:

Continue reading

Draw Something Awesome: Playing With HTML5 Canvas, JavaScript, And JQuery

1 Jul

While the basic syntax of JavaScript is important to learn, I’ve found it frustrating that I don’t understand how to apply what I’ve learned so far to actually building something. So last week, I asked Hani Sharabash of Bloc.io to build something simple with me. We came up with a very simple drawing application that uses the new HTML5 canvas element, JavaScript, and JQuery. Here is how we built it:

Continue reading

Javascript: The Cool Parts

27 Jun

So far, as I’ve been learning JavaScript, many teachers and teaching resources really start off by focusing on the JavaScript syntax. I learned Java in the CS106A course before, so the JavaScript syntax is not really a big problem for me. Sure, JavaScript is different than Java, so I will continue learning about those differences, but I guess it was hard for me to enjoy learning JavaScript without much of a context.

Continue reading

Factorials In Javascript (With Recursion)

24 Jun

To learn JavaScipt, I’m redoing some problems I’ve done to learn Ruby. Previously, I wrote a Ruby method to find a factorial of a number both recursively and non-recursively. You can read the original post here.

This is how you solve the same problem with Javascript:

Continue reading

Working With JavaScript Hashes

13 Jun

Yesterday, I started learning JavaScript, since that is one of the most important languages any web developer needs to know. Coming from a Java and Ruby background, one of the first things I wanted to do in JavaScript was create a Hash. To my surprise I found out that there are no “Hashes” in JavaScript. Instead, JavaScript has Objects (that’s where the JSON format comes from).

I was very lucky to get help from Marcus Phillips, a JavaScript engineer at Twitter. So in case you’re confused about how to work with JavaScript Objects, here are some of the lessons I’d like to share:

Continue reading