Live data from Hacker News

Show HN: Codecademy.com, the easiest way to learn to code

codecademy.com

201–210 of 239 posts

Re: Show HN: Codecademy.com, the easiest way to learn to code

#201

Lesson 6, exercise "Otherwise..." is wrong. Here's the code: var number = prompt("Guess what number I'm thinking of between 1 and 10!"); if(number === 7) { print("You got it!"); // Change the following line. } else if () { print("Close! Try guessing a little higher."); } else { print("You were way off! Sorry..."); } prompt returns a string, but then attempts to compare it with === with an int, which clearly doesn't w…

It also seems a bit too eager to accept solutions as correct. For example, you can pass Lesson 6, exercise "Dot your I's and cross your T's" without fixing the = vs == confusion. I put this in to test, and it passed:

  var response = prompt("Do you like me?");
  if (response = "yes") {
    print("i like you too!");
  }
It passes because assignments return the value of the variable assigned, but it should fail the exercise, since it's conceptually wrong.

Re: Show HN: Codecademy.com, the easiest way to learn to code

#203
post #191

Earlier quoted context omitted.

I am no one's girlfriend, and I am stuck on lesson five :P I think that if this is aimed at beginners it needs to be dumbed down more--I am a reasonably intelligent absolute beginner curious about coding and whether I'm interested in learning some, and in this lesson you have completely lost me; I no longer understand what I am doing or why, and I don't know how to proceed: Everything we've talked about so far has on…

Judging by the text of the hint you gave us, I believe it's trying to make you type: var six = numbers[2] I am not sure where the hangup is, considering I just copy-pasted that from two parts of the hint. Have they described arrays to you yet? Perhaps the problem is that they insufficiently described what an array was and what it did? I have not tried to use the site, so I'm not sure.

Yes. This is the problem for me. The only description of arrays is what I've pasted above from the lesson. I'd never heard of them before and all I currently know about them is that I will use them when I "need to store an ordered list of values."

I'm not sure how much I need to know or understand about them at this point, either--I speak some human languages that are not my native tongue and I was very lost when I first began learning them and relied heavily on memorization. What I need is just to be able to follow along well enough to produce an answer and for there to be enough repetition and regurgitation that things start to gel if I keep it up.

This wasn't clear enough for me to be able to continue with the lesson; I was literally stuck since there weren't any more hints or resources (though I have since downloaded an e-book ;). Perhaps it would be good for there to be a cheat revealing the answer and additional problems that appear whether or not you fail the first time.

This format is excellent and the site looks great. More coddling, please!

Re: Show HN: Codecademy.com, the easiest way to learn to code

#204
post #95

Earlier quoted context omitted.

Awesome, thanks! I've always thought the use of books to teach programming was a bit ironic, especially for interpreted languages. Back in the early '90s I had a book called Master C, which came with a floppy that ran a similar type of tutorial. http://www.amazon.com/Waite-Groups-Master-Book-Disks/dp/1878... Seems like a long gap between then and now. Also, please let me request a course on Clojure. That would rule!

http://www.try-clojure.org/

Thanks - I don't think they had the tutorial when last I saw it.

Re: Show HN: Codecademy.com, the easiest way to learn to code

#205
I disagree with this approach. Making things so dumbed down only accentuates the depth of the learning curve. By the time I can write code to do something worthwhile, I'll have gray hair. Just show me a python project that can help me play WOW better and show me what to tweak. By the time I get into it, I'll have learned a lot just by reading the comments in the code - and maybe some hyperlinks to web pages that explain what is going on-e.g. pointers, linked lists,etc)

Re: Show HN: Codecademy.com, the easiest way to learn to code

#206

Lesson 6, exercise "Otherwise..." is wrong. Here's the code: var number = prompt("Guess what number I'm thinking of between 1 and 10!"); if(number === 7) { print("You got it!"); // Change the following line. } else if () { print("Close! Try guessing a little higher."); } else { print("You were way off! Sorry..."); } prompt returns a string, but then attempts to compare it with === with an int, which clearly doesn't w…

Lesson 6, exercise "Inequality" is wrong for the same reason. It tries to compare the string entered with the integer 5, which again does not work. If you "complete" the exercise as instructed, run the code and enter 5, nothing happens.

Re: Show HN: Codecademy.com, the easiest way to learn to code

#207
Somewhat newbie programmer here. On lesson 6, "Otherwise", the default code seems to be wrong to me. It takes input from prompt() & assesses it as if it were an int/float, not a string. The lesson progresses with an incorrect solution (answer is "not even close" for 6 and 7"). Works if u look for "6" or "7".

Re: Show HN: Codecademy.com, the easiest way to learn to code

#208
post #192

Well done. One suggestion is to use the Socratic Method ( http://en.wikipedia.org/wiki/Socratic_method ) like "The Little Schemer". I would love to see "The Little Schemer" implemented on your site.

I just completed the course and it is very well done. If you want to teach to young children (especially boys), then a Khan Academy approach could be used where you narrate the course. Most of Khan Academy's success comes from Sal himself, his personality. It is hard to find natural teachers who show heartfealt enthusiasm for their subjects. Ryan Bates of Railscasts also achieves this. Just my C$0.02. Again, thank you for your work. This is a wonderful direction for education.

Re: Show HN: Codecademy.com, the easiest way to learn to code

#209
Too much social networking clutter on that homepage. All I see is "Email Facebook like 3K Send Tweet +1 715", then on the right another Facebook logo and another Twitter logo.

Imagine a customer that is really happy with what you provide. Do you really believe that this person is unable to recommend it to others without your help?

What these logos tell me is this: You believe your site isn't good enough that people will take the 2 minutes to talk about it, but you hope that if you make it easy enough to just click a button, masses of these low-involment-recommendations would somehow make up for it. Which they never do.

Great concept otherwise, congrats.

Re: Show HN: Codecademy.com, the easiest way to learn to code

#210

Interesting feedback: I had my gf do it, and she got stuck in the .length portion, because she kept typing: "name".length. This is because the prompt said: Well done! How long is your name? Find out by typing your name in quotes and ending it with .length. For me, that'd be "Ryan".length. Apparently its not clear enough what is code and what isn't. While you and I can tell that the last period belongs to the sentence…

I am no one's girlfriend, and I am stuck on lesson five :P I think that if this is aimed at beginners it needs to be dumbed down more--I am a reasonably intelligent absolute beginner curious about coding and whether I'm interested in learning some, and in this lesson you have completely lost me; I no longer understand what I am doing or why, and I don't know how to proceed: Everything we've talked about so far has on…

The way I would describe an array to a novice is that it's a more complex and potentially useful type of variable, similar to the ones you've been making so far, only instead of having a single "slot" for data, they are organized in a way that allows for multiple slots for information, and you can reference each slot by their position in the array, starting with position 0 (0, 1, 2, etc. describing the first, second and third. etc. positions in the array).

An array is a variable declared with square brackets around all the data, with a comma in between (delimiting) each positioned slot of data.

Example:

    var array = ["data1", "data2", "data3"]
In this case, we've created an array containing text strings. It could just as easily contain integers, or as you will see demonstrated a little later in the course, other variables, including other arrays.

Then, in order to retrieve or modify a piece of information from the array, you reference the array variable with the array position you want in square brackets.

Example: To get the "data1" string from the above array, use the variable like this:

    array[0]
To get an alert dialog with the "data2" string, the code would look like:

    alert(array[1])
You can easily modify a piece of data in the array using this technique. For example, to change the string "data3" in the array to "third", the code would be:

    array[2] = "third"
If you would like to add a new piece of data to the array, you could do the following:

    array[3] = "fourth"
Note that this would require that you know the size of the array and that the position [3] is an available slot. A simpler method of adding data to an array is to use the .push function as such:

    array.push("fourth")
Post reply on HN