PDA

View Full Version : Anybody else doing Code Year?


Robo
2012-01-25, 11:58
http://codeyear.com/

I've always wanted to learn how to make stuff on computers, and have even purchased beefy tomes on how to program, but I've always got intimidated and scared of starting. :o But Code Year has been right up my alley so far.

Every Monday they put up a set of lessons and a related project. You learn by doing, and it really throws you right into it, but it's not overwhelming (though I've found I understand each lesson much better the second time through). And like Fitocracy, you can earn points and achievement badges for learning. (Unlike Fitocracy, there's no groups yet, but you can still view your friends' progress; I'm jack_.)

It's still a little rough around the edges. I've found a few of the lessons actually "pass" you even if you make a mistake. But hey, the fact that I even noticed that suggest that it works as a teaching tool, no? They seem keen on continually improving the lessons in response to feedback. And it's free, so there's nothing to lose.

It starts with Javascript, though Python and Ruby are apparently coming later in the year. (Question: is Javascript a good place to start? I feel like I grok it okay so far, but do, like, the skills transfer to other languages?).

Anyway, I've been having fun with it, so I thought I would recommend it here. :) I've always felt really intimidated when I looked at code; it always looked like just a bunch of weird symbols with gibberish sprinkled in between. I only know a few "words" but I feel like I actually understand the logic of at least my super simple exercises now. It makes me feel smart. :D

Are there any other free resources you would recommend for a total beginner? :) I've decided that this year I really need to acquire some form of marketable skill, besides being super adorable and a freak in the sack, but I'm totes broke right now. :\ I know Stanford (?) has those free iOS development lectures; I'll check them out when I'm a little more confident. :)

chucker
2012-01-25, 12:34
(Question: is Javascript a good place to start? I feel like I grok it okay so far, but do, like, the skills transfer to other languages?)

Depends.

Basic JavaScript: yes. Most of its syntax is C-style, which means it translates directly to C, C++, Objective-C, PHP, C#, and many others.

Advanced JavaScript, not so much. Constructs like anonymous functions and prototype-based object orientation either don't exist elsewhere, or aren't as commonly used. (For instance, most object-oriented languages like Objective-C and C#* are class-based, not prototype-based. And anonymous functions tend to have a very different syntax in, say, C#.)

JS's appeal as a beginner's language, I suppose, is that you can rather easily build a website and add functionality to it. But many of its constructs aren't exactly beginner-friendly.

*) LOL hidden dig at Bjarne.

Are there any other free resources you would recommend for a total beginner? :)

http://tryruby.org/ comes to mind. It's for Ruby (duh). Ruby's syntax isn't C-style, but many of its concepts can be easily transferred to other languages.

I know Stanford (?) has those free iOS development lectures; I'll check them out when I'm a little more confident. :)

Yes, but those assume not just knowledge in programming basics (algorithms, data types, etc.) but also a basic grasp of C as well as of object orientation.

Robo
2012-01-25, 12:51
Depends.

Basic JavaScript: yes. Most of its syntax is C-style, which means it translates directly to C, C++, Objective-C, PHP, C#, and many others.

Advanced JavaScript, not so much. Constructs like anonymous functions and prototype-based object orientation either don't exist elsewhere, or aren't as commonly used. (For instance, most object-oriented languages like Objective-C and C#* are class-based, not prototype-based. And anonymous functions tend to have a very different syntax in, say, C#.)

Thanks for the reply! :)

Needless to say, I'm starting with the absolute basics now. The first project is writing a program that can play FizzBuzz. (http://en.wikipedia.org/wiki/FizzBuzz) But I felt very accomplished when I did. :D

JS's appeal as a beginner's language, I suppose, is that you can rather easily build a website and add functionality to it. But many of its constructs aren't exactly beginner-friendly.

I like the idea of adding functionality to a webpage. I have a few ideas for cool websites. :)

http://tryruby.org/ comes to mind. It's for Ruby (duh). Ruby's syntax isn't C-style, but many of its concepts can be easily transferred to other languages.

Thanks, I'll check it out.

Yes, but those assume not just knowledge in programming basics (algorithms, data types, etc.) but also a basic grasp of C as well as of object orientation.

That's why I'm waiting — I kind of figured they'd be above my level, because, you know, Stanford. :lol: But Code Year might get into C by the end of the year, and even if it doesn't I do have that big scary book on Objective-C, which I might feel better about tackling. :D

I'm having fun so far. I like that I feel like I'm actually problem-solving. It feels much more like a puzzle or an intellectual game than math was in high school, which just felt like boring busywork. :\

torifile
2012-01-25, 13:01
I signed up for it but I have no interest in learning javascript. I know that it's about learning concepts but I'm stubborn. :lol: I am going through that big scary Obj C book on my own. I think I'm starting to get it. :) I hope to be able to write my own iPhone apps within a year. If that happens, the world will truly be worsened by my many app ideas. Right now, the only thing keeping that from happening is my lack of ability. :lol:

Robo
2012-01-25, 13:16
Right now, the only thing keeping that from happening is my lack of ability. :lol:

:lol:

I know you're sort of joking, but that's sort of how I feel, with regards to my silly app ideas. I guess that's a good way of looking at it, right? I mean, I have a Mac, I have an iDevice, and I could probably swing the $99. And I know I'm smart enough, if I apply myself and really try. The only thing that's keeping my silly little apps from the App Store is me not trying enough; it's not like Apple is going to say no.

Basically, I've always had a bit of an entrepreneurial bug, and the way I see it, if I ever want to make stuff I'm going to have enough things in my way (lack of confidence, lack of rich parents ;)) without my ignorance being one of them. So I'm learning. :)

I'd like to make physical things. But really I just want to make cool shit, and even with the Makerbots and Shapeways of the world, the barriers to making software and websites are lower than those to making physical things. You don't need a 3D printer or materials or a factory in Asia. You don't even need permission. You just need the know-how and the will. For someone who feels sort of trapped with regards to their current opportunities, that's tremendously liberating.

But anyway, I'll shut up now, because I always feel like a dope when I post things like this.


...

Dave
2012-01-25, 14:23
That's why I'm waiting — I kind of figured they'd be above my level, because, you know, Stanford.
Please don't. If you want to assume they're above your level because of the stuff that Chucker mentioned that's one thing, but do not let the name of the institution intimidate you.

(Nothing against Standford... I'd say the same thing regardless of the institution.)

chucker
2012-01-25, 14:31
Oh yeah. I wouldn't say the material itself is difficult, poorly-presented, presumptuous or anything. Just that it assumes (by Hagerty's own disclaimer) a lot of prior knowledge Robo lacks.

Mugge
2012-01-25, 14:44
Looks interesting enough to give a try. Thanks for the tip, Robo! :)

It seems to work fine in Chrome, but Safari doesn't seem to be able to display the lessons. Anyone else noticed this problem?

Robo
2012-01-25, 14:46
Thanks Dave and chucker. The Stanford thing was sort of a joke, I really wouldn't presume to be ready for any college-level coding course, since my high school lacked a computer program and I'm just catching up now. I just learned what "var" is :lol:

Although I suppose the Stanford thing is a little intimidating. :\ I mean, it's like, Stanford, and I'm like, the community-college-dropout whose chief talents are dicking around on the internet and getting hot biker guys to like me. It reminds me of when I won essay contests in high school and got invited to shindigs with all AP students from other schools. I always felt like it was some sort of smart people's club and I didn't belong there. :\

@Mugge I've been doing the lessons in Safari :confused: Works mostly fine for me...

Dave
2012-01-25, 15:01
It seems to work fine in Chrome, but Safari doesn't seem to be able to display the lessons. Anyone else noticed this problem?
@Mugge I've been doing the lessons in Safari :confused: Works mostly fine for me...
On my laptop (10.6, 32-bit), I had to use Opera because Safari was a no-go. It works fine on my desktop, though (10.7, 64-bit).

billybobsky
2012-01-25, 15:58
My favorite method of learning a new programming language/aspects of an already known language is having a problem I need to solve programmatically. The focused efforts towards a desired effort are significantly better than focused efforts along a predesignated course by someone else. You are less likely to drop the effort and more likely to fully engage with the language.

Mugge
2012-01-25, 16:08
On my laptop (10.6, 32-bit), I had to use Opera because Safari was a no-go. It works fine on my desktop, though (10.7, 64-bit).

2010 27" iMac i5 running 10.7.2. Yet it still doesn't work with Safari.

My favorite method of learning a new programming language/aspects of an already known language is having a problem I need to solve programmatically. The focused efforts towards a desired effort are significantly better than focused efforts along a predesignated course by someone else. You are less likely to drop the effort and more likely to fully engage with the language.

My apologies, but I'm having some reading comprehension troubles here. Are you saying Codeacademy is good or bad, in your opinion?

I'm at lesson 1.6.6 now and so far I like it. But then again, I'm just a blank slate with no preferences or opinions.

chucker
2012-01-25, 18:09
My apologies, but I'm having some reading comprehension troubles here. Are you saying Codeacademy is good or bad, in your opinion?

He's saying learning-by-doing is a far better approach. In my experience, that holds true. My pace of learning at my job where I've had to solve a variety of problems under tight deadlines and yet achieved acceptable results far exceeds that of trying to learn something, anything, without a concrete goal.

billybobsky
2012-01-25, 18:23
Exactly.

torifile
2012-01-25, 20:52
Thirded. Learning by doing something important and that I care about is the only way I can make myself learn these days.

bassplayinMacFiend
2012-01-27, 13:29
Just signed up because I could use some JS learning myself. Thanks for starting this thread, Robo.

I will again take a moment to pimp the iOS tutorials at www.raywenderlich.com . Sign up for the free monthly email, the tutorial is more than worth it if you are even remotely interested in iOS programming. Starts from "Go here to download/install Xcode" and moves on from there.

Currently in tutorial 2 (which does cost $$ but is more than worth it to me) and it's covered Storyboard, UITableViews, protocols, data delegates, loading / saving data to plists and more, and I've just started the second half of this tutorial.

Robo
2012-01-28, 12:44
Just finished the second "week" of lessons, which is all about functions. This exercise made me chuckle:


var lost = [4, 8, 15, 16, 23, 42];
var count = lost.length;

var isLost = function (n) {
for ( i = 0; i < 6; i++ ) {
if ( n === lost[i]) {
return true;
}
}
return false;
};

if ( isLost(12) ) {
console.log('12 is a lost number');
}

if ( isLost(16) ) {
console.log('16 is a lost number');
}

chucker
2012-01-28, 18:53
Heh.

I'm confused about the 'count' variable, though; why store that, then hardcode '6' in the for loop?

Robo
2012-01-28, 19:33
Heh.

I'm confused about the 'count' variable, though; why store that, then hardcode '6' in the for loop?

The count variable was already provided; I just filled in parts of the for loop. I guess I was probably supposed to write ( i = 0; i < lost.length; i++), but the directions didn't mention anything about that and I didn't think of it. It's not like the number of Lost numbers will change, so I'm good right? :D

chucker
2012-01-29, 05:23
Sure, but hardcoding is bad, and "that's never gonna change!" are famous last words…

Robo
2012-01-29, 11:51
Noted.

I went back and looked at that exercise, and I blame the hint box for leading me astray:

The for loop has

a) initializer - here, it should be i = 0;

b) condition - the key thing to remember is that i is iterating over the positions of the numbers in the array, and that arrays are 0 based indexed.

The first number in the lost array is lost[0]. The sixth number in the array is lost[5]. So we want the for loop to keep checking whether our parameter n equals lost[0], lost[1],...up to lost[5]. So the condition must stop at i < 6.

c) Need to increment! Use i++

(emphasis added)

That said, I went back and changed it to i < count; so I'm ready for any shocking plot twists in the future. :D

•••

I'm all caught up on Code Year now! In addition to making an automated FizzBuzz player, I also made a taxi fare calculator, a startup cost calculator, and a very simple dice game.

I can't wait for tomorrow's lesson! I'm not really a maths person but so far this is funner than I thought it would be. It makes me appreciate computers and games and programs a lot more, realizing that somebody somewhere had to actually code everything. Like, I knew that before, but I never really thought about it, I guess.

It all feels sort of wondrous, like magic, only with more rules. Like alchemy, I guess? It's like, whoa, I can make the computer do something without me doing it. I can make the computer do it itself, like a robot! I'm sure eventually this novelty will fade and it will become a drag and I'll become jaded, but I hope that never happens. Because right now, computers seem like the coolest things ever. :)

chucker
2012-01-29, 12:00
I didn't mean to be pedantic, and I'm glad you're having fun!

Robo
2012-01-29, 12:06
I didn't mean to be pedantic, and I'm glad you're having fun!

Oh no, it's appreciated. I want to make good habits. :)

Robo
2012-01-30, 19:08
I have a simple JavaScript question. Here is a snippet of my code:


var deal = function() {
var card = Math.floor(Math.random() * 52 + 1);
return card;
};


But in the next exercise, their equivalent code (which is already provided) looks like this:


function deal() {
card = Math.floor(Math.random()*52+1);
return card;
}


The variables deal and card aren't declared using var. But I pasted it into the scratchpad and calling the function works just fine. Is their way better? When do I have to specifically declare a variable using var, and when do I not?

chucker
2012-01-31, 01:42
I lack the context of the rest of the code, but judging just from this snippet, their way is worse. It's a bit weird in JavaScript — by default, variables have global scope; the 'var' keyword gives them local scope instead.

What's that mean?

Well, in your version, "card" doesn't exist elsewhere. That may sound like a downside at first, but it avoids accidents. In the latter example, "card" exists everywhere. You can both read it and change it in totally different places, all the while perhaps not recognizing the original intent of it. This may not ever be a problem in this particular instance, but it sure can cause confusion and unexpected bugs as your code grows in complexity. Limiting scope avoids that, as it makes intent clearer to you.

Moogs
2012-01-31, 10:03
Interesting. I started using Steve Kochan's book / series "Programming in Objective C 2.0" last year and to the extent I got through the first 2-3 chapters it was the best programming book I'd used to that point (all others having resulted in failure)... does this Code Year thing cost anything?

I see some of the proponent quotes. I think Rushkoff is little more than a guy who says far-fetched things to get attention / create the illusion that he's some kind of visionary. His take on programming is bordering on absurd IMO but all the same it looks like an interesting idea.

Robo
2012-01-31, 12:46
does this Code Year thing cost anything?

Nope! :D

chucker
2012-01-31, 12:54
It costs $5/hr, to be wired to an offshore account registered a guy whose name just happens to be an anagram of mine.

Moogs
2012-01-31, 13:39
Hey do you bank with Romney? Tell him I detected there was a hair out of place yesterday. His image could take a real hit.

;)

chucker
2012-01-31, 14:15
Romney? Psh. Kerry's wife is where it's at.

Moogs
2012-02-01, 05:19
Hey Code-Year-Monkies.... halp.

Check "Google Analytics" thread in this forum (about Js implementation on a blog, ironically... pretty basic question).

Robo
2012-02-29, 18:17
Here is another free programming tutorial! This blog (http://java-4-you.blogspot.com/) is having daily Java programming lessons.