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 trial
Paul Dunahoo
5,390 PointsWhy are Code Challenges slightly different than the real thing?
I don't really care, but why are code challenges slightly different (at least for the iOS courses)? Sometimes a few snippets of code are removed, and the "self." section of a line of code is almost always removed. I don't care at all, but is there a reason for this?
Thanks
1 Answer
Ben Jakuben
Treehouse TeacherOur Code Challenges use a custom built "Code Challenge Engine" that our team developed and maintains. The big plus of this approach is that it lets us take a look at your code and run tests against it to verify that things are written correctly. There are a few drawbacks, though. Sometimes we can't show all of the code for one reason or another, although most of the time I believe snippets are missing because the teacher is just focusing on the important lines for the challenge.
If you have any questions about specific challenges or specific lines of code, don't hesitate to post them in here! We're happy to discuss why they are or, if they do happen to be wrong, fix them! As for the "self" notation, I can't say much without knowing which challenge you're talking about, but "self" isn't always required depending on what you're doing and how you are sending messages in iOS/Objective C.