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 trialAbirbhav Goswami
15,450 PointsWhy aren't we using camelCase?
In the code challenge, the instructions ask me to use a different naming convention. Is this how variables are usually named in Ruby? I'm used to other languages and they use camelCase. Why doesn't Ruby use this format? Is it just a preference?
1 Answer
Tobias Helmrich
31,603 PointsHey Abby,
yes, like you already mentioned this is absolutely preference and it's just a convention to write variable names in Ruby with underscores in between the words and in all lowercase (this is also referred to as snake_case). Take a look here to see the naming section of the Ruby style guide. I hope that helps! :)
Abirbhav Goswami
15,450 PointsAbirbhav Goswami
15,450 PointsThanks! Just needed to clarify that.