---
title: "A tour of Ruby's 'magic' comments"
publication: "Ruby Weekly"
issue: 463
published_at: "2019-08-15"
canonical_url: "https://rubyweekly.com/issues/463"
---

This week's Ruby news.       

#463 — August 15, 2019 

[Read on the Web](https://rubyweekly.com/issues/463)   

Ruby Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/tvgwouktg72fkwt8b4xk.jpg)](https://medium.com/swlh/how-to-correct-32-000-incorrect-csv-files-in-fewer-than-32-000-steps-a5f1ba25d951)   

[How to Correct 32,000 Incorrect CSV Files in Fewer Than 32,000 Steps](https://medium.com/swlh/how-to-correct-32-000-incorrect-csv-files-in-fewer-than-32-000-steps-a5f1ba25d951) — We’ve all faced a data processing task from hell and CSV loves to throw up complexities around escaping and stray commas. Here’s how one Rubyist dealt with it, and came up with the [comma_splice](https://github.com/jkeen/comma_splice) gem to help. 

Jeff Keen   

[Magic Comments in Ruby](https://medium.com/@farsi_mehdi/magic-comments-in-ruby-81d45ff92e34) — You’ve likely seen (and even used) ‘magic’ comments, but you probably don’t know all of them or understand things like precedence. 

Mehdi Farsi   [![\](https://copm.s3.amazonaws.com/0697d9e3.png)](https://lp.codacy.com/ruby-code-review?utm_source=CooperPress&utm_medium=cpm&utm_campaign=CooperPress-RubyP) 

[Automated Code Reviews for Ruby](https://lp.codacy.com/ruby-code-review?utm_source=CooperPress&utm_medium=cpm&utm_campaign=CooperPress-RubyP) — Take the hassle out of code reviews - Codacy flags errors automatically, directly from your Git workflow. Customize standards on coverage, duplication, complexity & style violations. Use in the cloud or on private servers. Get started free. 

Codacy sponsor   

▶[How Rails on Windows is Now an Excellent Experience](http://5by5.tv/rubyonrails/282) — Two weeks ago we linked to [a post](https://www.hanselman.com/blog/RubyOnRailsOnWindowsIsNotJustPossibleItsFabulousUsingWSL2AndVSCode.aspx) by esteemed Microsoftie Scott Hanselman where he proclaimed that developing with Ruby and Rails on Windows 10 is now _fabulous_. Now he’s on the Ruby on Rails Podcast discussing it in more depth with Brittany Martin. 

Ruby on Rails Podcast podcast   

[JRuby 9.2.8.0 Released](https://www.jruby.org/2019/08/12/jruby-9-2-8-0.html) — The JVM-based Ruby implementation boasts a substantial runtime memory reduction. 

JRuby Core Team  

💻 Jobs  

[Ruby on Rails Engineer](https://goldstar.workable.com/j/F9CD4C2593) — Goldstar is looking for experienced Ruby on Rails Engineers onsite in Portland, Oregon and Pasadena, California. 

Goldstar   

[Ruby Developers Are in Demand on Vettery](https://www.vettery.com/tech?utm_source=newsletter&utm_medium=cooper-rubyweekly&utm_term=tech&utm_content=grouped&utm_campaign=ad-77583) — Ready for a bold career move? Make a free profile, name your salary, and connect with hiring managers from top employers today. 

Vettery  

📘 Articles & Tutorials  

[Using `clamp` To Restrict Values to a Certain Range](https://andycroll.com/ruby/clamp-for-min-max-values/) — Add this to my _“I didn’t notice Ruby added this”_ pile. The `clamp` method was introduced in Ruby 2.4 and lets you do things like this: `500.clamp(1, 100) # => 100` 

Andy Croll   

[How Many Ways to Unaccent a Text String?](https://github.com/sportdb/sport.db/tree/master/alphabets/benchmark) — The answer is: Many. But, which one is fastest? The answer is: It depends. 

sport.db   

[Updating Rails: Where's Memcache Gone?](https://blog.klimenko.site/ruby/2019/07/26/updating-rails-cache-gone.html) — When there are issues after an upgrade, sometimes it’s your fault, sometimes it’s a gem’s fault, and sometimes it’s both. 

Michael Klimenko   

[How to Visualize the Age of Dependencies in Your Ruby Projects](https://dev.to/borama/how-old-are-dependencies-in-your-ruby-project-3jia) — A neat little script that spits out the age of your project’s various dependencies which will then make it easy to visualize them. 

Matouš Borák   

[Exorcise Poltergeist with Apparition](https://www.thegolfmentor.com/tech_blog/apparition) — Do you have flaky Capybara tests? Of course, you do. Let the power of the Apparition gem compel them. (_Editor: That’s the wrong classic horror movie!_ 😂) 

Dr. Chris Drane   

[Architecting a Roles and Permissions System Using Rails, GraphQL, and React](https://www.atrium.co/inside-atrium/architecting-roles-permissions/) — There’s plenty in here about authorization system design, alongside the tech bits. 

Atrium   

[Free eBook: How to Get a 3x Performance Improvement on Your Postgres Database](https://pganalyze.com/ebooks/optimizing-postgres-query-performance?utm_source=RubyWeeklySecondary) 

pganalyze sponsor   

[Advanced Multi-Database Techniques in Rails 6](https://prathamesh.tech/2019/08/13/rails-6-multi-database-part-two/) — Most of this is about handling writing vs reading to different databases or replicas, but there is a lot of configuration variations here. 

Prathamesh Sonpatki   

▶[A Chat with David Heinemeier Hansson](https://share.transistor.fm/s/fb1b8d7c) — Nothing particularly new here but a very well put together hour covering DHH’s background, the creation of Rails, and his thoughts on Ruby. 

Remote Ruby Podcast podcast   

[Breaking Apart Inheritable `mattr_accessors` in HTTParty](https://thesmartnik.com/breaking-apart-inheritable-mattr_accessors-in-httparty.html) — The subtitle of this post could be “How to Handle Inheritable Attributes”, which is one of those things for which there is no perfect answer. 

Nikita Misharin   

▶[How I Got a Job as a Product Manager](https://www.youtube.com/watch?v=AYlJuwPkwuI) — Tired of not getting any callbacks for her résumé, she rapped about Ruby at RubyConf in front of 300 people.. and it worked. 

Shelby Sir  

🛠 Code and Tools  

[Introducing Konfig: A Kubernetes Friendly Rails Configuration Gem](https://blog.cloud66.com/introducing-konfig-a-kubernetes-friendly-rails-configuration-gem/) — One gem to rule them all…for configuration values and secrets. 

Cloud66   

[Moat: A Small Authorization Library, Built for Scopes](https://github.com/polleverywhere/moat) — Inspired by Pundit, but focuses more on filtering collections than individual resources when defining policy. 

Poll Everywhere   

[Fully Managed Operations Solutions for Large & Small Teams](https://reinteractive.com/opscare) — Do you need 24/7 support, without the overhead of dedicated staff? 

reinteractive | OpsCare sponsor   

[TTY::Links: Hyperlinks in Your Terminal](https://github.com/piotrmurach/tty-link) — Test to see if a terminal supports hyperlinks and outputs them correctly if so. 

Piotr Murach   

[FIFA: The World's Football/Soccer Countries and Codes, in Ruby](https://github.com/sportdb/sport.db/tree/master/fifa) — Part of the broader [sport.db](https://github.com/sportdb/sport.db) sports database. 

Gerald Bauer   

[aws-dev-utils: Ruby Gem Providing Common AWS Utilities](https://github.com/kontera-technologies/aws-dev-utils) — A set of refinements for the AWS SDK that covers pagination and caching boilerplate. 

Kontera Technologies   

[Comma Splice: Fixes CSVs with Unquoted Commas in Values](https://github.com/jkeen/comma_splice) 

Jeff Keen         

Curated by [Glenn Goodrich](https://twitter.com/ruprict) and [Cooperpress](https://cooperpress.com/). 

[Change your email address](https://rubyweekly.com/edit_subscription/*|UID|*) or[Stop getting this newsletter](https://rubyweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
