Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialBerkay YEMEN
2,271 PointsWhy are we still using old codes?
Why are we still using old codes?
I do not like it when we use the same code from previous videos and subjects. I think It would be better if the teacher write the code from scratch.
4 Answers
Dino Paškvan
Courses Plus Student 44,108 PointsMany of the lessons here (and even on other sites) build upon your old code because the lessons is basically one big project.
This is usually done for several reasons:
- keeps it interesting (it's more fun if you're building something instead of just writing code snippets)
- keeps the lessons shorter (imagine how long it would take if everything was re-written in every video)
- it's similar to real-world problems
I'd like to expand upon the last reason: in most situations, when you're building something, even with the most careful planning, there will be deviations from the plan, so you'll build a simplified version of your project and then start expanding it. This allows you to test your projects, as you work, instead of having to wait until the whole thing is built.
And finally, you'll be re-using a lot of code when you make things. Even code from your old projects that are seemingly unrelated to the current one.
Lessons that are organized this way are actually preparing you for real-world programming where such things happen very often.
Alexander Davison
65,469 PointsYou aren't supposed to skip videos.
Developers UA
Courses Plus Student 39,426 PointsYou could just download the project files if you don't want to write all the code...
Berkay YEMEN
2,271 PointsIf you ever miss, don't understand or prefer to skip something; It's going to keep showing up in the further videos which I find very unpleasant.
Rashad Madison
Full Stack JavaScript Techdegree Graduate 26,370 PointsI think the point is for you to understand all of it at some point. If you get lost you may need to go back, which is what I do. But building on the same code keeps me on task I would probably get lost if every section of this project was totally different. It seems that we are building a music player...I get that.
Michal Janek
Front End Web Development Techdegree Graduate 30,654 PointsIf you ever miss, dont understand or prefer to skip something do this:
Go back to it.
You really should not skip or continue without grasping the idea fully. It is like building a house where while doing the foundations you have no idea how it is standing but it is (for now). When you get to first floor the foundations will either collapse or break at later point. You need to build on solidified knowledge not on "I will get to this later". It will backfire on you many times.
sibal gesekki
3,484 Pointssibal gesekki
3,484 Pointsi beg to differ. it gets confusing easily and boring. big thumbs down