Since we’ve decided our digest to come out monthly, a lot of awesome news have been kept on the back burner. But, nonetheless, we didn’t miss anything - the new Rails and Ruby update overviews, sharp guides, astonishing tutorials, and announcements - everything is here, in the latest Roobykon Ruby Issue! Let’s make sure you did not miss something worthwhile!
Rails team have made a tremendous work again! With the help of the community, they’ve polished the Rails 5.1 release with more than 380 commits. Now, meet Rails 5.1.0.rc1 version with Action Cable; Action Mailer; Active Record; Active Support and more - all the changes are in the CHANGELOG, as always. Just follow the link to see the full list of changes.
Peter Cooper, creative editor, and programmer have made a great review of Ruby 2.4.1 main new features. All the changes compared to the previous version are in a rough order of priority, so it will be much easier to make a decision to follow the update (or not).
Garbage collection in dynamic languages like Ruby is usually pretty complex, so Ruby developers prefer just to focus on writing code that really matters. But, suddenly, GC can become a problem - either it’s running too often or not enough, or the process is using tons of memory. Let's see how Ruby's GC works & what we can learn by reading some of the statistics.
In this insightful article Thiago Silva, the senior software engineer from Brazil, tries to embrace a particular way of working with code: it should be minimal, idiomatic, and performant by default. If you are not already into this mindset, just dive into reading and consider getting into it.
Micro-optimizations matter a lot, but the grade to which they matter is, of course, application specific. In this blog post, you will find a notable case where a micro-optimization (like removing a system call in a hot path) had a rough effect on software performance.
The next time you’ll feel the need to have classes & modules for better code organization - think about ES6! Here you’ll explore a great guide on how to configure a Rails app to write complex JS features with ECMAScript 6 code, and include it in applications without any effort.
In this blog post, you’ll explore how the container method works and more generally the Container class. There's always a lot of things to be gained from code reading, on every skill level! The more seasoned developer will find here tons of interesting architectural patterns, and the beginners - get an idea about the usage of nested fetch to achieve auto-loading.
In case you are using a class as a namespace - it can produce a bug that doesn’t always show up on the surface. Be sure that you have different names for your model class and your namespace in Rails apps. All the details are under the link!