Ylan Segal

The REPL: Issue 5 - December 2014

Seven Reasons I Love Minitest

I am partial to RSpec, but this is a well-reasoned argument for using Minitest.

Hashie Considered Harmful - An Ode to Hash and OpenStruct

Great post on using Hashes, OpenStruct, value objects and Hashie and the performance implications. Schneems is clearly opinionated and find fault with a very popular library. In his style, though he actually does something about it. He has a pull-request to change the underlying implementation and started a discussion with the library mantainers.

Speeding Up PostgreSQL With Partial Indexes

The title says it all. Well written and explained. Definetly a worthy tool to have availbale when optimizing performance.

Book Review: Effective Ruby - Peter J. Jones

Peter J. Jones, the creator of Vagrant, brings us “Effective Ruby : 48 Specific Ways To Write Better Ruby”. A book geared towards ruby programmers that are already familiar with the structure and syntax, but are looking to get more out of the language. The books covers a wide range of topics, with surprising amount of depth. The chapters are divided into small ‘items’ that can be consumed individually and stand (mostly) on their own. Each offers practical tidbits that can be applied to your own code immediately. I read the book cover-to-cover, but I it would also be suited to jumping around from item to item.

I found the chapter on Classes, Objects and Modules to be very useful in understanding how Ruby treats inheritance and method dispatching and the implications of which the reader should be aware of. Also of note, the chapter on meta-programming sheds some light on very useful techniques to avoid shooting yourself in the foot, a pretty common occurrence when meta-programming in Ruby.

I have been programming Ruby for years and I enjoyed reading the book a great deal. I learned some new tricks and re-acquainted myself with some forgotten ones as well.

Links:

The REPL: Issue 4 - November 2014

Lagom is not Just for Swedes

Great article on DHH’s RailsConf 2014 keynote. Even though you can have a badly designed system with tests, let’s not throw out the baby with the bath water.

Collaboration is Other People

Jon Yurek writes a thoughful opinion about the use of style-guides. It’s not about the pendantry of the use of curly braces or spaces, but about working as a team, better communications and focus on the important things in the code.

36% smaller Rails memory footprint through Benchmarking

Great tale about finding a great win by running benchmarks, the power of open-source collaboration. One small pull request will benefit thousands of rails apps in the future :)

In defense of fat tools

The Unix philosophy is to build small things and connect them together. How small? That is the crux of the matter. In this post, Avdi shows why sometimes using slightly larger tools, correctly abstracted away can yield better results than roll-your-own simpler alternatives.

The REPL: Issue 3 - October 2014

The definitive guide to Arel, the SQL manager for Ruby

Recently I found myself doing pretty interesting things with relational databases that are way, way above what ActiveRecord allows you to do (even if I where to condone the use of SQL fragments like Person.order('YOUR_FIELD DESC'), which I don’t). Arel, which powers ActiveRecord is very powerful for that sort of thing, if a little under-documented. The post by Jiří Pospíšil helped out a lot.

Move Fast, Break Nothing

In the post (also a talk), Zach Holman describes how Github continues to innovate and add features to their product, without breaking existing functionality. This post is interesting at the technical level, but also covers how the do team and company structure and communication in a way that doesn’t weight them down. Highly recommended.

Refactoring From Model to View Helper to Null Object

Short post on using the Null Object Pattern. Polymorphism for the win!

Book Review: Being Agile - Ekas & Will

Leslie Ekas and Scott Will present a practical approach to Agile that balances the philosophy of the Agile Manifesto with the tools and techniques needed to navigate the roadblocks that those wishing to implement Agile encounter on a daily basis.

The authors are not shy about sharing their extensive experience building enterprise software. I found myself nodding along on more to one occasion while reading the many anecdotes from the field sprinkled throughout.

The book is well-organized. Each chapter is devoted to one of eleven techniques, which in turn is divided into principles, practices metrics and breakthroughs expected. Of course the authors save the bet for last: Continuous Improvement, wich is rightly presented as the bedrock of the Agile methodology. The constant drive for individuals, teams and organizations to constantly improve on their past performance is the essence of successful software development (and more broadly, I would argue, of any human endevour).

This work is a great addition to the bookshelf of team members or leaders just starting out or well on their way in their Agile adventure.

Links: