Show more
Holm :ruby: boosted

I *love* reinventing the wheel.

Some of my articles explain how to build your own GenServer in Elixir or how to compare images in plain Ruby, and I’ve built minimal clones of libraries like RSpec and Spring in the past to understand and teach how they work.

While you shouldn’t rely on a hand-rolled HTTP server or a naïve reimplementation of an ancient OTP construct in production, taking software apart and rebuilding it is the best way I know to understand what’s happening under the hood.

Holm :ruby: boosted

Hi, everyone!
Does anyone know of any company that is hiring remote junior developers? I have more than one year of experience in backend and I am looking for new opportunities.

I will appreciate all your RT! 🙌 :mastodon:

Holm :ruby: boosted

Random Ruby performance tip: if you are using anything more complicated than strings/symbols for hash keys, you may want to consider caching their hash values (override the Object#hash method to do so).

I even went to the library to find a good book on Simula67 since there’s so little information online

Show thread

so far I've been using Brainfuck, Whitespace, and Simula67

Show thread

in this year's Advent of Code I'm using a new language every day: github.com/judofyr/aoc2018

Holm :ruby: boosted

At some point, the NPM community will have to reckon with the fact that they've painted themselves into a corner with a design which makes long-term maintenance really expensive.

Holm :ruby: boosted

@judofyr we're using graphql-ruby on our backend, and while I quite like my experience so far, getting started has often been confusing. The library recently transitioned to a class-based API instead of a DSL, but much of the documentation is in an in-between state. It's quite easy to build a confusing mess, but as with all things ruby---that's probably our own fault ;). Once you get the hang of things, it's quite nice. There are definitely tradeoffs with GraphQL, but I do think it's worthwhile.

I've been having a lot of fun with a HTML DSL in Ruby recently: github.com/judofyr/tubby

it feels very React/component-like

Holm :ruby: boosted
Holm :ruby: boosted

Did you know that

User.where(id: [])

actually performs a useless ActiveRecord query?

For more nice tidbits, I recommend watching "Cache is King: Get the Most Bang for Your Buck From Ruby" when it gets processed in confreaks.tv/events/rubyconf20

Holm :ruby: boosted
Holm :ruby: boosted

Proc#<< might get merged into ruby-trunk. Functional style closure composition! Shweet!
bugs.ruby-lang.org/issues/6284

@janko do you have any Roda best-practices for how to structure apps btw?

Holm :ruby: boosted

Now I am convinced that Roda is simpler than Sinatra.

But I need to sleep now since it is 1am now.

Holm :ruby: boosted
Holm :ruby: boosted

On ever big codebase flaky tests are part of the deal, and usually don't have enough attention or even workflow/tools to deal with them.

I wonder why I haven't found any automated test services (CircleCI/Travis/BuildKite/SemaphoreCI/etc...) with some kind of feature/help to deal with those 🤔

The trickiest part seems to be how to identify/reference them as lines/files/names change across time & branches.

Holm :ruby: boosted

Convert a string to ASCII and remove any resulting awkward spaces:

s.encode('ASCII', invalid: :replace, undef: :replace, replace: '').squeeze(' ').strip

Show more
Ruby.social

A Mastodon instance for Rubyists & friends