Sunday, March 6, 2016
Code School Ruby Programming Metaprogramming Scope Notes and Course Tutorial Review
This is the note for Code School CodeTV Series - Metaprogramming Scope online learn-to-code tutorial. It's a great, short 5 minute class, which explains computer science fundamental concept - Scope in the context of Ruby programming.
Free weekend March 2016
Length: 5:17 min
Rating: 5 stars. Concise, useful, professional
Programming fundamentals - Metaprogramming Scopes
Agenda: 1. What are Scopes? 2. Meet your 'self' 3. Changing Scope 4. Instances and Local Variables 5. Conclusion
Background: in Ruby context
- In Ruby Scope, scope is what's visible such as variables, methods, and objects. Scope can change constantly. It's important to know the current object, 'self' and what it can see constantly.
- Need to understand 'self' first. Self is the current object.
- When ask Ruby for self, you will get main, and the class of self is object. Main is what self uses to refer to itself. You are at the top level scope!
 pry(main)> self
- self can only see things at the same level
- the above code, first self outputs main, the second is MyClass, MyClass.new.my_method will return an instance of MyClass. Self is constantly changing as the program executes.
- The self can change time there's a class or module definition, or within methods.
- Instance and local variables : .other_method method can access instance variables but not local variables. Local variables are truly private.
Note: not all content included in the class is noted here.
React UI MATERIAL Install yarn add @material-ui/icons Reactstrap FORMS. Controlled Forms. Uncontrolled Forms. Columns, grid
This review is updated continuously throughout the program. Yay I just joined the Udacity Nanodegree for Digital Marketing! I am such an Uda...
All you need to know about Snap IPO. Tech startup news explained for Youtubers in minutes.
Codecademy AngularJS tutorial solution Part 3 Workflow .1 Adding a new product to $scope $scope helps the controller passes data to t...