This article presents some cool features that are hidden in the large documentation of Ruby on Rails. It covers features on
ActiveModel and the
Time complexity is one of the most interesting concepts you can learn from computer science, and you don’t need a degree to understand it!
It’s interesting because it helps you see why a particular algorithm or program may be slow & what can you do to make it faster.
Writing a C extension allows you to interact with Ruby from C.
You may want to this if there is a particular important method you would like to optimize with the speed of C, or if you would like to create an interface between a C library and Ruby.
nil mean in Ruby? Almost anything. When a method returns
nil, it could mean:
- The method has no return value
- There's usually a return value but not this time
- It returns a value from the database, which is
- Something unexpected happened
This makes code hard to read and is the main cause of the most common Ruby exception in Ruby: