Tag: ruby
-
Beware of Tests et Fudicia Ferentes
· 5 min read
Post-mortem of one internal discussion on whether or not everything must be covered with tests
-
Stop Abusing Nihil
· 5 min read
nil / null is a perfectly valid useful first class citizen in many languages, and here is why
-
ActiveRecord Smell With Elixir/Ecto
· 7 min read
Quick how-to on bringing some ActiveRecord goodness into Elixir/Ecto
-
Better pry for Ruby REPL
· 4 min read
Ruby REPL “pry” is way more powerful than “irb” and might be even better tuned
-
Raise For The Rescue
· 4 min read
When in any incomprehensible situation—raise! Do not let the uncertainty propagate through.
-
SeeAsVee Library For Handy CSV Processing
· 3 min read
The most intelligent library to process CSV files
-
Ruby metaprogramming for beginners → Elixir-like specs
· 6 min read
Hacky implementation of Elixir-like specs in pure ruby with examples
-
Protocols in Ruby → Allow Implicit Inheritance
· 2 min read
Dry-behaviour ruby library implementing Elixir protocols for Ruby going towards 1.0 release
-
Hype Demythified or Pizza With Pineapple Topping
· 6 min read
Don’t blindly follow the paradigms. Here is why.
-
Parent Of My Child Is Not Exactly Me
· 2 min read
Ruby anti-pattern: cross references inside the same table must be avoided
-
Ruby Challenges as QotD
· 1 min read
The selected challenges from our company’s weekly Monday greeting
-
These Weird Accents
· 4 min read
The detailed how-to on dealing with strings having accents nowadays
-
To IF Or Not To IF—That’s The Conditional Statement
· 7 min read
Why do I consider using if operator to be a code smell
-
Iteraptor :: Iterating Nested Terms Like I’m Five
· 4 min read
The tiny library (200 LOC) to iterate/map/filter deeply nested structures in Ruby
-
Real applications of flip-flop in ruby
· 2 min read
A couple of examples of flip-flop real applications
-
Why immutability rules
· 2 min read
A list of some less evident advantages of immutability
-
Workflow as FSM: lost transitions
· 3 min read
building a robust FSM for a workflow
-
Open Graph Protocol …and Her Friends
· 2 min read
the how-to on making links to your site beautifully expanded in facebook, twitter and family
-
Dry Behaviour aka Protocol Pattern in Ruby
· 6 min read
Tiny library inspired by Elixir protocol pattern
-
Struct With Hash-like Default Proc
· 1 min read
How to implement default_proc functionality in ruby structs
-
Progress Bar in Console for Rake Tasks
· 2 min read
How to make long-running rake task execution fancy
-
Howto Read Stack Overflow Comments
· 1 min read
Cheatsheet for treating comments and phrases on SO
-
Thou shalt not make unto thee any graven image
· 2 min read
There are too many authoritative persons having opinions all around
-
Monkeypatch It!
· 2 min read
In Ruby, we love and hereby use monkeypatching
-
StackOverflow Achievements
· 2 min read
Why we post answers on StackOverflow and why we should keep doing it that way
-
New Hash Syntax for the Rescue
· 1 min read
Why using new hash syntax might significantly improve the code quality
-
Testing migrations
· 1 min read
How to test migrations with rspec, especially the migrations, that heavily change the data
-
Recursion Without Explicit Method
· 1 min read
Ruby way to organize recursion with infinite loop
-
Two ways to write ruby code
· 2 min read
Make you code to be appreciated by the offspring
-
Quotation Marks in XXI Century
· 1 min read
How to escape quotation marks safely, or typography is coming
-
Pry :: breakpoint or ARGF?
· 1 min read
How to make binding.pry work when $stdin is given
-
CASE-WHEN :: another trick for N+1 problem
· 1 min read
N+1 query problem might be solved in elegant way for mid-sized tables
-
YAML Parser Tuning
· 2 min read
An example on how to tune a JSON parser
-
Log With Pleasure
· 3 min read
A couple of tricks to make your logging experience pleasing
-
Don’t be a language slave
· 3 min read
Another matter why PHP is damaging brains
-
Using local sources in Gemfile
· 1 min read
Comfort development of several gems simultaneously
-
Ruby Memory Pitfalls
· 2 min read
Ruby Memory Operation :: Pitfalls
-
Command line application wrappers problem
· 1 min read
Problem with shell script wrappers in non-default I18N environment
-
Debug inplace
· 1 min read
Example of using PRY for inplace debugging in ruby
-
Sequentional execution: example of Reactor pattern impl
· 2 min read
Basic example of Reactor pattern implementation within two threads
-
Collage directory preview with RMagick
· 1 min read
Monkeypatch for RMagick to produce collages
-
Ruby 2.0 Refinements: Totally Useless Crap
· 1 min read
Are refinements in Ruby 2.0 totally useless?— Yes they are.
-
Ruby Shorthand to Yield Within Blocks
· 1 min read
Example of using shorthand to yield keyword
-
Ruby Predefined Globals
· 10 min read
List of predefined globals ($∀) in ruby with examples
-
Ruby Blocks: Do-end vs. Braces
· 1 min read
What to use for ruby blocks?
-
Match or Not Die
· 1 min read
Match string painless without superfluous if-then clauses
-
Delightful Logging
· 1 min read
Facilitation of dealing with Logger
-
Make Hash Element Access Painless
· 1 min read
Provide a common mechanism to access deeply nested hash elements w/o annoying exception handling
-
Ruby Logger :: Temporary Enable Debug for One Class
· 1 min read
How to enable debug for a couple of classes only
-
Shorthands in Ruby Code Blocks
· 1 min read
Syntactic sugar using ampersand notations
-
Multiple Match in Ruby
· 1 min read
Matching all the occurences of a pattern returning MatchData
-
EventMachine :: Nested Calls
· 3 min read
Yield ⇒ Choose one ⇒ Yield