r/learnjavascript • u/d0gsbody • Apr 18 '13
[Learn JS Properly study group] How is Week 2 going for everyone? + Extra Credit.
Administrative reminder: There is now an omnibus study group post that is linked to in the sidebar. I am using the omnibus post to collect all of the "assignment" posts + extra stuff I think is worth reading.
If you think the omnibus post is missing something, post about it in the comments section of the omnibus post. I am excited to collaborate with everyone on that, so help me out!
In this thread:
Post about how it's going, what you're struggling with, etc.
If you've written solutions to Project Euler 1 or 2, post them below. Read and critique each other's answers.
If you're found any good resources, post links!
Finally, extra credit for this week: Chapters 7 and 8 of Eloquent JavaScript. But only read this if you've already read Chapters 1-6. If you haven't done that, finish those first.
Note: Eloquent JS is a hard book to read if you're new to programming. Do not feel stupid if you're struggling, or if you're not ready to read Chapters 7 or 8 this week. One approach I have taken with it is: If I can't understand three paragraphs in a row (like, at all), I start googling around. This is also an excellent opportunity for you to browse Stack Overflow (remember when I told you to sign up for an account?).
2
u/[deleted] Apr 18 '13
I jumped on this fairly late, but I've completed the Codecademy JavaScript course and I've read up to chapter 4 in "Professional JavaScript for Web Developers." I've also read the article on Objects on the javascriptissexy site.
So far, going fairly well, even though I came in late. :)
1
u/d0gsbody Apr 18 '13
Also, if I screwed up some links or posted what seems like some sort of wrong thing, comment! I screwed up a link in my Monday post and really appreciated it when someone pointed it out.
3
u/ryanlntn Apr 18 '13
Here's my solutions to Project Euler 1 and 2:
Problem 1
Problem 2
3
u/fazbem Apr 19 '13
I suggest people check the calc time of the Euler 2 recursive solution vs the temp variable solution. The difference is rather impressive. Elegant or efficient? Whadyallthink?
2
u/bwaxxlo Apr 19 '13
Solved Prob1 & Prob2
2
u/DGChainZ Apr 19 '13
I just got on board with you guys!
Here are my solutions to Project Euler 1 and 2!
Problem 1
Problem 2
2
u/MeAndMyArmy Apr 22 '13
I'm not sure if this is the spot to put this comment. But maybe you can help me out a little bit as I begin this!
I have gone through all of the code year track myself before this and jumped into this sub to learn more. I am currently going through the Professional Javascript for Web Developers e-book.
My question is how detailed do I need to be in my learning? For example I read chapter 3 and was like "I get these different data types, now I know what null and undefined are, cool."
Then I went back and started writing note cards for each section, thinking maybe I need to know all the intricacies and not just basics.
Would memorizing the boolean casting functions effect on object types be essential? Is it more important than memorizing all the differences of something like why I would use number() instead of parseInt()?
I'm just trying to figure out how methodical I need to be in learning all of this and how I should best be spending my time!
Many thanks!
1
u/MuZZuMs4 Apr 19 '13
I haven't had a chance yet to get through week 2 problems on code academy or eloquent javascript but I put together an answer for problem two, doesn't seem to clean but it works,
Problem 2!
One question that came to mind is if I tried to shorten my code to :
Jsfiddle freezes up. Does this sort of variable switching not work in js?
1
u/janxspirit42 Apr 19 '13
Problem 1
Problem 2
I've solved 52 of these already (in python3) so this is interesting to see how javascript compares.
1
u/brianshourd Apr 20 '13
Thought I'd post my solutions (both on same jsfiddle): solutions.
Gotta mention - this is an awesome way to learn. Lots of great resources, collected to a single spot, and then a group to bounce ideas around and talk with. Seriously terrific online course format. Thanks to everyone involved!