Ylan Segal

The REPL: Issue 18 - January 2016

Getting to Zero Exceptions

The folks at Yeller, propose a simple but powerful idea: Don’t tolerate any exceptions in production applications. Having a constant stream of exceptions that don’t really expose something that needs to be fixed causes intolerable noise that erodes confidence in the applications and obscures actual problems. I’ve had projects in the past where this was the rule and loved it. Constant discipline is the key to success.

When to choose Elixir over Ruby for 2016 projects?

Elixir seems to be picking up speed and in this post Hubert Łępicki @ AmbertBit explains when he thinks Elixir is a better option than Rails. And no, the answer is not “always”.

The Rails Doctrine

David Heinemeier Hansson, Rails' BDFL, has written a post on what the philosophy behind Rails is. The content of the post is really interesting and elaborates on his vision of Rails and why it has been successful. It is a clear statement of the values that are important to him. For example, he clearly states that he doesn’t really care about being a purist of any paradigm, like object orientation or MVC, but instead is guided by pragmatism. I recommend Rails and Ruby developers read the post. It’s possible that you don’t agree with all the stated values, but I think it’s a good thing for them to be stated so plainly and clearly. Expectations on all sides are more likely to be met.

Regarding the delivery: DHH at times has been a polarizing person in the community. His manner can be very grating to some. This post also has some of that, starting with the title. Even though the dictionary definition of doctrine is used correctly, in common speech it is usually reserved for religious teachings or tenets of political movements. Used for the principles behind a web-framework (even one that I love and use every day) seems self-aggrandizing. It is easy for me to see past that and take it for a grain of salt, but I know that for some, it can be extremely off-putting.

Scratching an Itch With a Gem

I love to read. I enjoy novels, science fiction, non-fiction, science and history. I also read a few technical books per year, which I review on this very blog. I was a bit late to the ebook party and preferred physical books. I received a Kindle as a gift for my birthday 3 years ago. From then on, I have been a convert: I love my Kindle and bring it everywhere.

I am also a patron of my local public library, and soon after I became an e-reader I discovered that they have an ebook selection as well!

The Itch

In California, membership to public libraries is open to any California resident, regardless of the actual city or county that they actually reside in. Usually, one can get a library card, and the benefits that come with it, by walking in to a branch and showing your driver’s license. I have done this procedure with a few libraries: San Diego Public Library (city), San Diego County Library, Los Angeles County Library and the San Francisco Public Library.

It turns out, that all of those libraries use the same ebook catalog: A service called Overdrive. Each library has a separate URL, with different authentication mechanism, but that is visibly the same website, branded for each library and containing a different catalog of books (and audiobooks, too). Each library carries a different selection of books, with different number of “copies”, according to each libraries budget, I assume.

Review: Effective Ruby LiveLessons

Effective Ruby LiveLessons is a video training course by Sam Phippen, based on the excellent Effective Ruby book written by Peter Jones (see my review of that book).

The lessons are split into 5 different videos of great quality covering more than 4 hours of training in total. The video lessons, much like the book covers practical advice that can make Ruby code more readable, less verbose, while at the same time being more expressive.

My favorite parts was the lessons on testing, which stresses ordering your test in Arrange - Act - Assert order (which is usually not possible while using spies, stubs or mocks) and the primer on using the Enumerable module and it’s many functions.

The videos also illustrate common uses for the Ruby Standard Library, like SimpleDelegator or Forwardable that are often overlooked by Ruby programmers.

I enjoyed the videos, even though I generally prefer books to videos: It’s easy for videos to either be too fast or too slow, whereas reading is always at a comfortable pace. In addition, when going back to already consumed material, it’s much easier to find a particular section in a book than it is in a video.

I would recommend the video to those how prefer that format over a book.


The REPL: Issue 17 - December 2015

How To Test Multithreaded Code

Mike Perham, author of Sidekiq, the popular Ruby queueing library, writes a great post on how to test multithreaded code. The first portion, deals with separating the threading portion from other logic, so that it can be tested with regular means. In addition, he details how using a callback and the native Ruby Mutex and ConditionalVariable one can test threading code, without using any sleep calls. Very informative post.

Is Rest Best In A Microservices Architecture?

Craig Williams discusses why REST over HTTP is not necessarily the best option for communicating between microservices. He illustrates two other options: Pipelines and messaging and talks about the pros and cons of each. It’s a topic that I have personally though about much and at work, we have started using messaging as opposed to REST for the reasons outlined in the article.

Learn to Code: It’s Harder Than You Think

As Mike Hadlow, the author states in the TL;DR:

All the evidence shows that programming requires a high level of aptitude that only a small percentage of the population possess. The current fad for short learn-to-code courses is selling people a lie and will do nothing to help the skills shortage for professional programmers.

The perspective and numbers in the article are particular for the UK, but I believe they apply equally well to the US.

The REPL: Issue 16 - November 2015

Phoenix Is Not Rails

I have been following the Elixir community and the Phoenix framework in particular. I feel a certain familiarity between Ruby and Elixir, and Rails and Phoenix. Chris McCord, the creator of Phoenix writes, a thoughtful post on the differences, and more importantly why they matter. Sometimes, differences in Software Engineering can be esthetic only (e.g. plural vs singular database table names); Not so with these. He makes compelling arguments on the technical choices made in Phoenix.

How To Charge For Open Source

Mike Perham, the creator and maintainer of Sidekiq, explains how to go about making a business out of Open Source Software. Uncharacteristically for the internet, the comments for this post are actually very interesting, as are the links. For a more in-depth conversation into the same topic, hear (or read the transcript) of Mike’s guest appearance at the Ruby Rogues Podcast

What Is SemVer

SemVer, short for Semantic Versioning, is a convention for software version numbering. I have been using it very successfully at work with for internal gems and bundler pessimistic locking (~> operator). In this post Richard Schneeman, explains the practical aspects of choosing a release number, including security releases.