In this lesson, our instructor talks about ruby specifics. He discusses comments, multi-line comment, rdoc comments, common code conventions, identifiers, and identifiers with different scoping. Then he talks about reserved keywords, parentheses as optional, newlines, statement terminators, continuation with a period, multiple statements on a single line, and code blocks.
This lesson will go through ruby syntax and common code conventions that are often asked by a new Ruby developer.
Comments are creating using '#'
Camel Case should be reserved only for classes
Parentheses are optional for functions
Newlines are statement terminators
You can continue method calling using a period
Multiple statements are allowed on a single line if separated using a semi-colon ";"
Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.
The next one I want to go over, the second part, is common code conventions.0387
What we want to do here is to go over some of the most popular conventions that you need to know for Ruby, and a lot of things you will notice that are very questionable, that we hope to answer here.0392
What that would display is...when you call up this summary method, it will show Educator, LLC and your description here.0705
Now, you have different reserved keywords in Ruby.0738
You want to make sure you are not using them in your code.0742
There is alias, and, begin, breakcase, class...def is a method, break is if you are in a loop, begin...and I'm sure you have used those--they are big caps, but more commonly you might use any of these words for a name.0744
Those are reserved, so if you can't find--your code is making a hiccup, or you have some kind of issue, it could be because it's one of these words in your code.0766