7 полезных Ruby-гемов о которых большинство не знают
https://www.rubyguides.com/2019/09/best-ruby-gems/
https://www.rubyguides.com/2019/09/best-ruby-gems/
RubyGuides
7 Great Ruby Gems Most People Haven’t Heard About
What are the best Ruby gems that you can use in your Rails projects? That's what you'll discover in this article! I'm going to give you 7 gems, but not the same old gems that you've seen
Как работает Zeitwerk (движок для автозагрузки файлов проекта) в шестых рельсах.
https://medium.com/cedarcode/understanding-zeitwerk-in-rails-6-f168a9f09a1f
https://medium.com/cedarcode/understanding-zeitwerk-in-rails-6-f168a9f09a1f
Medium
Understanding Zeitwerk in Rails 6
Zeitwerk is the new code loader engine used in Rails 6. Let’s explore how it compares with the previous classic loader.
Статья об опыте использования эксперименатльных фич Ruby 2.7 в продакшене.
Pattern matching и нумерованные аргументы блока.
https://monolist.co/blog/2019/10/ruby-2-7/
Pattern matching и нумерованные аргументы блока.
https://monolist.co/blog/2019/10/ruby-2-7/
Ruby 2.7 отменит автоматическую конвертацию хешей в именованные аргументы методов
Подробнее
Подробнее
Saeloun Blog
Ruby 2.7 deprecates automatic conversion from a hash to keyword arguments
Ruby 2.7 deprecates automatic conversion from a hash to keyword arguments in preparation for real keyword arguments in Ruby 3.0
Итак, вернется nil. Поскольку в случае с case два и более условий перечисляются через запятую. В случае || будет учитываться первое условие. Коварно.
Статья не про руби, но в целом про чистоту кода.
https://overreacted.io/goodbye-clean-code/
https://overreacted.io/goodbye-clean-code/
overreacted.io
Goodbye, Clean Code — overreacted
Let clean code guide you. Then let it go.
Сравнение паттерн-матчинга в Ruby 2.7 с Elixir'овским
http://nts.strzibny.name/ruby-2-7-pattern-matching-after-10-months-of-professional-elixir/
http://nts.strzibny.name/ruby-2-7-pattern-matching-after-10-months-of-professional-elixir/
Написание скрипта-полиглота - кода, который будет валиден при выполнении в интерпретаторах ruby и python
https://nkanaev.github.io/posts/polyglot/
https://nkanaev.github.io/posts/polyglot/
Работа с временными файлами в Ruby
https://remimercier.com/working-with-tempfiles/
https://remimercier.com/working-with-tempfiles/
Rémi Mercier - Software Developer
Working with tempfiles in Ruby - Remi Mercier - Software Developer
A while back, I needed to create XML files, send them to a distant server and delete them once the transfer completed. This is when I discovered Tempfiles and rejoiced in using Ruby.
Пара статей с объяснениями про Big O нотацию. Что это такое и как ее считать.
https://habr.com/ru/post/444594/
https://www.honeybadger.io/blog/big-o-notation-ruby/
https://habr.com/ru/post/444594/
https://www.honeybadger.io/blog/big-o-notation-ruby/
Хабр
Big O
Примечание. Сокращенный перевод, скорее пересказ своими словами. UPD: как отметили в комментариях, примеры не идеальны. Автор не ищет лучшее решение задачи, его цель объяснить сложность алгоритмов «на...
class Foo
def initialize(number)
@number = number
end
private
attr_reader :number
end
foo = Foo.new(1)
foo.number
Итак, вернется NoMethodError. Потому как
attr_reader
тоже метод и private
делает недоступными его методы снаружи класса.“Ты не пишешь код, ты решаешь проблемы”
https://lanraccoon.com/2020/youre-not-writing-code-youre-solving-problems/
https://lanraccoon.com/2020/youre-not-writing-code-youre-solving-problems/
LanRaccoon
You’re not writing code, you’re solving problems - LanRaccoon
If you go beyond software, and frameworks, beyond test suites and sprints and Jira tickets, you will always find a problem that needs to be solved.
"Однако, в реализации FULL JOIN в PostgreSQL есть дефект. Например, если в условии соединения не будет условий на равенство столбцов таблиц (=), или встретится OR, то во время выполнения запроса возникнет ошибка:
FULL JOIN is only supported with merge-joinable or hash-joinable join conditions
" 🤔