Ylan Segal

The REPL: Issue 19 - February 2016

Is Your Postgres Query Starved for Memory?

In his usual thorough way, Pat Shoughnessy once again explores the internals of PostgreSQL. In this post, he explores how tweaking the configuration has dramatic effects on specific query performance, but doesn’t come for free.

I am a puts debuggerer

Aaron Patterson, aka tenderlove, knows ruby. He is both a ruby-core and a rails-core member and works on multiple other gems, like Nokogiri. In this post, he explores in depth several techniques he uses for debugging. Getting insight into a running program is a great skill to have. This article will surely teach you more than one trick.

The Zen Of Erlang

A great introduction to the Erlang (and by extension Elixir) philosophy on how to construct fault-tolerant, highly available systems. If you have never seen a line of Erlang, fear not: After reading this comprehensive article, you still won’t have.

This Blog Is Now Delivered Over TLS

For many months, I’ve been wanting to add TLS support for this blog, mainly because I believe that the web needs better security. As a content publisher and website owner it is in my best interest to make my content available over a secure connection.

I recently read a post from the Electronic Frontier Foundation, on how site-wide encryption helps fight censorship in other countries. The article is about Medium, a popular blogging platform, and how the use of TLS prevented the Malaysian government from completely blocking the site, in an attempt to suppress speech.

I decided that it was worth my time to finally use TLS.

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.