Bigbinary 14 March 2017
lstrip and rstrip methods have been optimized in ruby 2.4
Arkency 07 March 2017
Today I was working on a feature where I had to create a few similar Active Record objects. I was creating a read model for some financial data. Most of the attributes of created objects were the same but a few were different. In one refactoring step I removed the duplication in passing attributes by using a prototype. Although at that moment I haven't thought of the object in such way.
Bigbinary 07 March 2017
IO methods now have an optional chomp flag to remove newline return characters
Black Bytes 06 March 2017
How do you compare two things in Ruby? Using == as you already know… but did you know that == is a method & not just syntax? You can implement this method in your own classes to make them more powerful. And that’s what I want to talk about in this post. Equality Basics As […]
Honeybadger 06 March 2017
If you want Ruby's string methods to play nicely with Unicode, it's a good idea to normalize them. This article is a brief introduction to Unicode normalization for Rubyists.
Heroku 28 February 2017
Heroku bumped its Bundler version to 1.13.7 almost a month ago, and since then we've had a large number of support tickets opened, many a variant of the following:
Bigbinary 28 February 2017
No more platform specific code to check empty directories
zverok with ruby 23 February 2017
Once Rubyist see a new useful HTTP API, her/his first thought would be “does it have a Ruby wrapper?”, and if not, the next would be “once, I should do a Ruby wrapper for this!”
Bigbinary 23 February 2017
Ruby 2.4 implements Integer#digits for extracting digits in place-value notation which is useful in calculating checksum digits.
Codeship 22 February 2017
When it comes to software development, a majority of the tools available to us are command-line applications. It is also well worth noting that many of the tools used on the command line are quite powerful in what they can accomplish, from the trivial to the tedious. Taking this further, you can combine command-line applications […]
Honeybadger 21 February 2017
One often-overlooked feature of Ruby's hashes is that you can use any object as a hash key, not just strings and symbols. In this post we examine how Optcarrot, the Ruby NES emulator, uses this feature to optimize its mapped memory implementation.
Black Bytes 20 February 2017
15 Weird Things About Ruby That You Should KnowBy Jesus CastelloRuby is an amazing language with a lot of interesting details that you may not have seen before...…in this post I compiled some of those details for your own enjoyment in a nice-looking list :) 1 Heredoc + Method If you have some data that you […]
Development Thoughts 19 February 2017
I’ve only just got around to playing with ruby 2.4.0 which was released in late 2016. One of the new features of the language is introduced was
Arkency 17 February 2017
When we learn programming languages and techniques we go through certain phases: Curiosity Admiration Overdosage Rejection Approval etc. Similarly with other things we enjoy in our life such as ice cream, pizza and sunbathing :) We learn to enjoy them, we try too much of it and learn the consequences. Hopefully some time later we find a good balance. We know, how much of it, we can use without hurting ourselves. I think we can have a similar experience in programming for example when you find out about metaprogramming, immutability, unit testing, DDD. Basically anything. We often need to hit an invisible wall and realize that we overdosed. It's not easy at all to realize it and learn from it. After 8 years of using Ruby and Rails, there are certain constructs that I try not to use anymore because I believe they make maintaining large applications harder.
Honeybadger 14 February 2017
To see how far Ruby's Unicode support has come, I tested every string method to see which ones violate the principle of least surprise. The results are presented as a handy table that you can reference to see which string manipulation methods are Unicode-unfriendly.