10 private links
I’ve worked on a few Ruby apps in my career at varying scales (Homebrew, AllTrails, GitHub, Workbrew) and there’s been a consistent theme: Ruby is great for moving fast (and breaking things).
An interesting book by Thoughtbot
An intuitive 2D game engine. Fast, cross-platform, tiny, hot loaded.
I don't know if I ever will build a game, but if I do this is where I'd get started.
A good talk from Justin Searls on what it takes to make a great gem
This is pretty awesome and something to play with
Another presentation of RBS
TIL that Ruby 3 added a measure built-in tool
To learn more about Ruby newest feature: Ractor
Yet another day, another issue compiling software under macOS
gem install thin -v '1.6.4' -- --with-cflags="-Wno-error=implicit-function-declaration"
Credits: Mike Szyndel
how to fix the bundle install, quote:
It seems that the latest version of XCode tools (12 Beta 3) installs a version of Clang (the C compiler used by default on MacOS) that throws an error on implicit functions used on the native extension code of Puma.
Running the following:
bundle config build.puma --with-cflags="-Wno-error=implicit-function-declaration"
bundle install
Fixed the issue
A great article by the author of the PubGrub algorithm, discovered when reading more about the gel gem, an alternative to bundler
Some conventions on naming your gem.
Very well written article explaining everything that comes into a gem specification file. Doesn't take you for a fool, explain things one by one so you can get a better understanding of what you are doing.
Also, use a generator once you understand it!
Big-O notation, beyond the coding interview
As a rbenv user, you can install readline and ruby_build with Homebrew:
$ brew install readline ruby-build
now set the configure options when compile Ruby:
$ RUBY_CONFIGURE_OPTS=--with-readline-dir=`brew --prefix readline` rbenv install 2.3.1
and then don't forget to add:
IRB.conf[:SAVE_HISTORY] = 1_000
in your ~/.irbrc file
TIL about oneshot coverage. Which could be used in production to identify dead-end code.
Need to understand some implication of Ruby and the memory.
I should have shared no.1 when I did my presentation.
In Ruby, the bundle update command does something similar. You could incorporate these tools into your CI/CD process, and have a test outright fail if a dependency is outdated, thus forcing you to upgrade a package before your app can be deployed.
Amen!
How to fix LibSSL when install mysql2 gem driver
Also, whenever upgrading MySQL, always always always run:
mysql_upgrade
See https://www.hivelocity.net/kb/using-mysql_upgrade-command/
Interesting articles on avoiding 3 common mistakes when working with ActiveRecord.