Tutorials

Railway Oriented Programming In Rails Using Dry-Monads
Error handling is a vital part of every program. It's important to be proactive about what errors might arise in the course of the implementation of a piece of code. These errors should be handled in a manner that ensures output is produced that p...

How to reduce the time complexity of nested loops
In this post I'll demonstrate a way to understand, analyse and reduce the time complexity on... Tagged with programming, ruby, algorithms.With regard to reducing the time complexity of O(n²) squared, we can work to reduce to O(n) linear or O(log(n...

Ruby wrapper for ‘espeak’ and ‘lame’ with sugar on top to create Text-To-Speech mp3 files.
Ruby wrapper for ‘espeak’ and ‘lame’ with sugar on top to create Text-To-Speech mp3 files. - dejan/espeak-ruby: Ruby wrapper for ‘espeak’ and ‘lame’ with sugar on top to create Text-To-Speech mp3.espeak-ruby is a small Ruby API for utilizing es...





Reading the uncompressed GZIP file size in Ruby without decompression - Closer to Code
There are cases where you have a compressed GZIP file for which you want to determine the uncompressed data size without having to extract it.For example, if you work with large text-based documents, you can either display their content directly i...

TIL: Queuing Sidekiq workers safely with the help of Isolator
Listening to a recent episode of the thoughtbot podcast, The Bike Shed, one of the hosts talked about a couple of gems that they'd come across that seemed pretty handy to me.The first is isolator, a gem by the folks over at Evil Martians that dete...