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 trialChristopher Mlalazi
Front End Web Development Techdegree Graduate 17,305 PointsWhy call the file Treet?
Now I am confused and lost. Is there any special reason the file has been called Treet? What is Treet?
2 Answers
Alexander Davison
65,469 Points"Treet" is Treehouse's way of saying "Treehouse Tweet". It's a little funny since it sounds like "Treat" Lol.
~Alex
Michael Stedman
Full Stack JavaScript Techdegree Student 13,838 PointsI completely get why the actual file name is "Treet", and where that made up word came from. As Craig Dennis explained in the prior video, a "Treet" is a "portmanteau". Meaning, you take parts of one word, and combine them with parts of another word to form a new word. Here, and with this, the instructor used part of "Tweet" (from Twitter) and part of "Treehouse" to form this new word.
However, this prompted me to ask another question that I have been picking up on lately, and I wonder if the instructor is just using the method he is for possible ease of learning, or if it is some sort of "accepted" standard of doing something. Take a look at the code following:
Treet treet = new Treet();
I have noticed in multiple projects on here that I see those things like that being repetitive. I understand that statement to be constructing a new Treet object. In all the other courses, I would see that repetition of the same word and just thought it was syntax, but reading the Constructor documentation on Oracle, the second (and all lower cased) "treet" is actually a variable name for the new Treet object that is being constructed. Basically, that you could say "myTreetIsCooler" and it would still work fine. It is just a name.
I don't know if it was explained or not that that was basically a variable name for the object that is being constructed, but I had no idea until I saw it in the Oracle documentation. Am I tracking this, and understanding what the Oracle documentation is saying correctly, and/or is there some sort of industry accepted way of doing things like this to keep things repetitive?
Atefe Mosayebi
6,868 PointsHey, Michael. You understand it correctly! treat is the name for the new instance of the Class Treet. each instance of a class is an object. I remember Craig mentioned this in Java Object course!
Christopher Mlalazi
Front End Web Development Techdegree Graduate 17,305 PointsChristopher Mlalazi
Front End Web Development Techdegree Graduate 17,305 PointsLol, and my mind was so far off! Thanks Alex!
Alexander Davison
65,469 PointsAlexander Davison
65,469 PointsNo problem.