Latest

Oct
04
Rightward Assignment in Ruby

Rightward Assignment in Ruby

Rightward assignment for deconstruction
2 min read
Sep
22
Memoization the Right Way

Memoization the Right Way

Dealing with nil values
1 min read
Aug
09
Ruby’s secret file

Ruby’s secret file

Ruby has a secret input stream hidden in every source file
1 min read
Jun
20
XOR Magic Trick

XOR Magic Trick

Swapping values with no intermediate variable
May
04
Method parameters and constructing defaults in Ruby

Method parameters and constructing defaults in Ruby

Under shoulda known but didn't
1 min read
Jan
19
TIL: Ruby string substitution with hashes

TIL: Ruby string substitution with hashes

gsub values from a hash
Dec
04
Catching and throwing in Ruby

Catching and throwing in Ruby

Nothing to do with exceptions, ruby's catch and throw
1 min read
Oct
01
Is it an Integer?

Is it an Integer?

Casting strings to integers without exceptions
1 min read
Aug
27
Parsing a Gemfile

Parsing a Gemfile

Parsing a Gemfile programmatically to find out what it contains
Jun
29
Open3

Open3

Ruby's has lots of ways of forking a process, the obsure one is the best
1 min read