Codeacademy

Message Bookmarked
Bookmark Removed
Not all messages are displayed: show all messages (254 of them)

yeah, tbh i felt like i was filling in blanks but couldn't write the same code from scratch or anything- i may go over the first lessons again.

modric conservative (darraghmac), Monday, 16 January 2012 14:31 (twelve years ago) link

finished for this week!

Mordy, Wednesday, 18 January 2012 04:17 (twelve years ago) link

it's def getting harder

Mordy, Wednesday, 18 January 2012 04:17 (twelve years ago) link

If I want to recommend this to people how exactly do I do it? Like, just point them to the courses page, or is there a separate week-by-week thing?

Gravel Puzzleworth, Sunday, 22 January 2012 13:52 (twelve years ago) link

Wait wait nevermind it's codeyear not codeacademy! Got it.

Gravel Puzzleworth, Sunday, 22 January 2012 13:57 (twelve years ago) link

Did first half today. Dice game this week?

Mordy, Wednesday, 25 January 2012 04:34 (twelve years ago) link

i am finding bits of this insanely confusing - in lesson 5 of "functions in javascript" there's this bit where you're supposed to look at the code and predict the answer and though i knew the likely answer i just couldn't work out what the code was doing to get it

i.e. how does

var result = 1;
for (var i = 0; i < exponent; i++) {
result = result * base; }
return result ;

even work?

like: if you have defined result as 1, what enables it to recognise that 'result' is capable of being a number that is not 1?
would it break if you changed the fourth line of the above to

result * base = result;
? and would that be because you're departing from conventional order or because that order screws the maths up?

what a difference delay makes (c sharp major), Wednesday, 25 January 2012 12:34 (twelve years ago) link

result is a variable (hence "var") which means its value can change.

it would break if you changed the fourth line, not because of maths but because of the syntax of assigning a value - you can't assign a value to an expression like that.

The Eyeball Of Hull (Colonel Poo), Wednesday, 25 January 2012 12:49 (twelve years ago) link

i.e. the interpreter will read the line left to right, syntax being variable = expression, not the other way round.

The Eyeball Of Hull (Colonel Poo), Wednesday, 25 January 2012 12:49 (twelve years ago) link

ok, that does help.

another reason the above flummoxed me utterly: it took me forever to remember what 'i' was (i kept thinking 'integer', which is not useful).

what a difference delay makes (c sharp major), Wednesday, 25 January 2012 12:55 (twelve years ago) link

tbh I don't much like this syntax

for (var i = 0; i < exponent; i++) {
because it's not very intuitive, but it crops up all over the place. You get used to it eventually I guess.

The Eyeball Of Hull (Colonel Poo), Wednesday, 25 January 2012 12:59 (twelve years ago) link

Legacy syntax derived from C.

tinker tailor soldier sb (silby), Wednesday, 25 January 2012 13:07 (twelve years ago) link

Loosely speaking, being on the left-hand side (LHS) of the "=" in an assignment and being on the right (RHS) mean very different things. The RHS is used to compute a value (e.g. the current value of result multiplied by the current value of base) and the variable on the LHS is updated to take that value. The value of the LHS before the assignment plays no role at all, and it doesn't make sense to put result * base on the LHS because that's not a variable you can assign a value to.

Angrrau Birds (seandalai), Wednesday, 25 January 2012 14:33 (twelve years ago) link

i did the functions lesson and new york, new york thing yesterday. trying to catch back up this week.

mostly it went well, i'm a little confused about using return within a function to check if a condition is true or not but that's ok.

call all destroyer, Wednesday, 25 January 2012 14:43 (twelve years ago) link

this week starts with a really great review of all topics. it helped clarify a bunch of things for me.

Mordy, Wednesday, 25 January 2012 15:00 (twelve years ago) link

So I'm doing this. I took poorly taught C++ classes in high school (and basically haven't used it since), so a lot of the stuff is pretty familiar so far. JavaScript does seem pretty loosey-goosey with variable types. Using + in console.log() to combine strings and numerical variables really bugs me.

circles, Thursday, 26 January 2012 05:17 (twelve years ago) link

whoa u guys hi

BIG HOOS aka the steendriver, Thursday, 26 January 2012 06:14 (twelve years ago) link

i am now in

BIG HOOS aka the steendriver, Thursday, 26 January 2012 06:14 (twelve years ago) link

man i've been scratching the surface of python the last couple of weeks and i just realized i was trying to solve the first question in python

lol

BIG HOOS aka the steendriver, Thursday, 26 January 2012 06:21 (twelve years ago) link

Do it in both and examine how your solutions differ!

I haven't looked at this really but I am following this thread and will try to answer questions ppl have.

tinker tailor soldier sb (silby), Thursday, 26 January 2012 06:26 (twelve years ago) link

My day job is Python, among other things. If you get stuck on anything I can probably help out.

The Eyeball Of Hull (Colonel Poo), Thursday, 26 January 2012 09:26 (twelve years ago) link

Woo. Finished the dice game. I think they're becoming much better at explaining concepts and teaching the material. Last week was a mess but this week was really intuitive and even fun.

Mordy, Thursday, 26 January 2012 18:33 (twelve years ago) link

Now, I did the dice game by using if/else statements (which is how they want you to do it). Can you do it using 'switch' cases tho?

Mordy, Thursday, 26 January 2012 18:36 (twelve years ago) link

err I'm getting on this tonight, I swear

iatee, Thursday, 26 January 2012 18:40 (twelve years ago) link

IM me if you need help... just did the Startup project too.

Mordy, Thursday, 26 January 2012 18:50 (twelve years ago) link

haha yeah I prob will, getting stuck on one thing killed my momentum

iatee, Thursday, 26 January 2012 18:51 (twelve years ago) link

I think I used switch for the dice game. Definitely used it for something this week that was expecting if/else. I like doing the tasks in a different way to the one asked for, to see what the checker does and doesn't find acceptable.

I'd be interested to see the back-end for the checker - it's clearly not just checking the output, but it's happy for things to be done in different ways. Dunno if each exercise has a list of automated test values or if it's doing something more clever that I might understand if I hadn't slept through compilers class. (end geeky side-note)

(I write Perl and, ahem, Excel VBA for a living, but dabble with more closely javascript-resembling languages occasionally in my spare time for graphical tinkering, though it will not be many more weeks before my knowledge of JS itself is exhausted)

Schleimpilz im Labyrinth (a passing spacecadet), Thursday, 26 January 2012 19:03 (twelve years ago) link

> Now, I did the dice game by using if/else statements (which is how they want you to do it). Can you do it using 'switch' cases tho?

you can't really use switch for comparing a variable against another variable (for checking the doubles) - the case values have to be known at compile time. ifs are better here.

(there might be more to the dice project that i missed - i only skimmed it)

koogs, Thursday, 26 January 2012 19:56 (twelve years ago) link

That's what I was thinking. I couldn't figure out how to get it to evaluate the relationship between the two dice rolls.

Mordy, Thursday, 26 January 2012 19:57 (twelve years ago) link

finished this weeks - building the blackjack game was fun, but some of the planning stuff was a little wonky. little bugs here and there...

Mordy, Wednesday, 1 February 2012 02:54 (twelve years ago) link

also, it seems like there are odds problems with the way they have it set up since you have an equal chance of getting a face card and getting, say, a '9' card, when getting a card that equals '10' should happen 4 times more often than getting one that equals '9'

Mordy, Wednesday, 1 February 2012 03:05 (twelve years ago) link

haha the thought of doing something like that intimidates me, is it pretty step by step?

iatee, Wednesday, 1 February 2012 03:07 (twelve years ago) link

yes, definitely

Mordy, Wednesday, 1 February 2012 03:11 (twelve years ago) link

i think there are positive and negative aspects w/ this as a learning style. individual things seem easier to learn, but it's hard to keep them together in your head. I think they could benefit from mixing up the lesson styles. maybe have one part that's just super repetitive to get stuff in your head like math problems, another part where you really have no guidance and it's a bigger puzzle, etc.

iatee, Wednesday, 1 February 2012 03:27 (twelve years ago) link

like, why not throw a video lecture in? etc.

iatee, Wednesday, 1 February 2012 03:28 (twelve years ago) link

nobody in the world has any idea how to teach programming. There is a big computer science education conference every year where CS profs get together and propose new and different ways of teaching programming. Software engineers complain that people graduate with CS degrees without knowing how to work on a big project. People who learned to program entirely on their own and never went to college assume that everybody should be able to do the same. It's just really hard to learn and really hard to teach if you're not predisposed to it.

tinker tailor soldier sb (silby), Wednesday, 1 February 2012 03:33 (twelve years ago) link

so presumably these folks just guessed a way of teaching it like everybody else and decided to see if it works

tinker tailor soldier sb (silby), Wednesday, 1 February 2012 03:36 (twelve years ago) link

iatee, have u started week 3 yet? the whole beginning is crunchy review stuff

Mordy, Wednesday, 1 February 2012 03:40 (twelve years ago) link

yeah I can see how it's a subject that would be particularly difficult to teach, as it's like midway between learning a language and learning a skill
xp
yeah I'm on that atm

iatee, Wednesday, 1 February 2012 03:41 (twelve years ago) link

To learn to program you have to learn the syntax of some made-up language designed to be interpreted by robots as well as how to use an assortment of tools that can be aggressively unfriendly just to be able to do the part where you make the computer do things. To really deeply learn how to program you have to internalize a somewhat daunting set of abstract concepts and how they fit together, along with even more details of the made-up robot language so that when the time comes to turn the structure in your head into code you do it in a way that makes sense and isn't tortured.

Here I"ll say something encouraging though: it is totally possible to learn to program; my best guess is that to learn, it is necessary (but perhaps not sufficient) to do a whole lot of it, and you have to start trying to work on things you actually want to make as soon as possible. The next time you are about to do some inane repetitive task on your computer, consider whether you know enough about programming to automate that task. Or just try to automate it. The first time you spend ten minutes writing a script to save yourself thirty minutes of changing filenames one at a time, you're a programmer. The first time you spend two hours writing a script to save yourself thirty minutes doing something, you're a guru.

tinker tailor soldier sb (silby), Wednesday, 1 February 2012 04:04 (twelve years ago) link

employment-wise it seems like it would be a good idea to learn vba, tho programmers seem to hate that for some reason?

iatee, Wednesday, 1 February 2012 04:10 (twelve years ago) link

It's sort of one of those things where like a lot of small businesses used to (or still, ye gods) run on the back of an Excel spreadsheet or Access database with a bunch of VBA spaghetti logic inside it that someone wrote in the misty past. This person also usually failed to document what was happening and then died. At least such is the folklore. So it's not exactly a "growth technology" I shouldn't think, but if you find yourself in a place where everything depends on keeping an ancient Windows 98 machine with the critical business app on it alive, you might save the day with VBA. But you could save the day better in most of these cases by, like, signing up for Salesforce or something.

tinker tailor soldier sb (silby), Wednesday, 1 February 2012 04:17 (twelve years ago) link

ah that makes sense

iatee, Wednesday, 1 February 2012 04:19 (twelve years ago) link

so the real answer is, learn whatever tool is best-suited for something you need or want to do *right now*. JavaScript is built in to every web browser, so Code Year doesn't have to do any weird server-side trickery to let you program in it. And as a beginner, JavaScript is really well-suited for creating neat little interactive things using a web page as your canvas. If what you want to do right now is just start programming, go with whatever seems sufficiently easy, fun, well-guided, gamified, whatever.

tinker tailor soldier sb (silby), Wednesday, 1 February 2012 04:23 (twelve years ago) link

also, it seems like there are odds problems with the way they have it set up since you have an equal chance of getting a face card and getting, say, a '9' card, when getting a card that equals '10' should happen 4 times more often than getting one that equals '9'

i thought what they did seemed okay. you're getting a random 1-52 number moldulo 13, and then 0, 11, and 12 are all face cards and 10 is a 10 card. You end up with 16 "cards" that can give you a value of 10 and 4 that can give you a value of 9.

they did still have the program dealing both cards from a full deck instead of the first from a full deck and the second from a deck with the 1st card taken out. but then it'd be more complicated and they're probably saving that for another week.

circles, Wednesday, 1 February 2012 04:57 (twelve years ago) link

> they did still have the program dealing both cards from a full deck

but that's ok - think of the shoes in vegas that hold multiple decks...

koogs, Wednesday, 1 February 2012 09:46 (twelve years ago) link

I completely forgot this was still on this week.

I do some VBA at work and I'd say there isn't much of a job market for just doing VBA, but in a general office IT job you can get people to look at you like you have magical powers if you can roll a macro to stick 30 spreadsheets together, or just know your way round worksheet formulae (not even VBA!) to any extent.

There used to be Access SQL+VBA jobs around but I think a lot of people are now going with e.g. MySQL and a simple web framework for the minor database tasks they would once have used Access for. The only Excel VBA jobs I see are for financial work in city jobs, but financial number-wrangling I know v. little about and it has 0 interest to me, plus I suspect city finance firms are shitty to work for in a non-financial role, so I've never really looked into those.

I hearrrd MS is talking about completely replacing VBA with something else anyway but I forget which grapevine that came from.

Schleimpilz im Labyrinth (a passing spacecadet), Wednesday, 1 February 2012 13:12 (twelve years ago) link

it is totally possible to learn to program

I am living testament -- got my BA in English, now working as a programmer (though not yet a software engineer).

omar leeettle (Leee), Wednesday, 1 February 2012 19:06 (twelve years ago) link

it's still really early in the year, but so far codecademy is making me feel like i made a mistake not doing comp sci in college.

Mordy, Wednesday, 1 February 2012 19:52 (twelve years ago) link

The first time you spend two hours writing a script to save yourself thirty minutes doing something, you're a guru.

<3 this

≧^◡^≦ moon dayo (diamonddave85), Wednesday, 1 February 2012 20:38 (twelve years ago) link


You must be logged in to post. Please either login here, or if you are not registered, you may register here.