-
Don't Rescue RuntimeError
I came across some code recently that attempted a long series of steps, and on failure issued a notification. Something functionally similar to:
-
The REPL: Issue 53 - December 2018
Scaling engineering organizations
Raylene Yung at Stripe writes a detailed post about how to scale engineering organizations. Although in my current role I am not a hiring manager, I find these types of posts very useful for future reference and to see what hiring looks like from the other side. Understanding the system allows you to use it for your benefit.
PostgresSQL: Implicit vs. explicit joins
Hans-Jürgen Schönig writes an excellent technical explanation of implicit vs. explicit joins in Postgres. It mostly jives with my experience: For the most part, the query planner will ensure that the performance is the same. When writing SQL directly, I prefer to use explicit joins. I believe they are more readable.
-
The REPL: Issue 52 - November 2018
Datomic: Event Sourcing without the hassle
I’ve never used datomic, but I’ve seen many references to it, especially when reading about event sourcing. In this article, Val Waeselynck explains at length why Datomic is better suited to fix the pain of doing event sourcing with traditional databases. I found it very interesting, even if I am not doing any event sourcing or considering Datomic.
Post-REST
In this post, Tim Bray expands on what he thinks that industry is moving to, to address REST shortcopmings (e.g. latency, coupling, short life).
- Winners: Messaging and Eventing, Orchestration, and Perssisten Connections.
- Losers: GraphQL, and RPC.
Building SQL expressions with Sequel
Janko Marohnic compares the ruby libraries
ActiveRecord
toSequel
. They are not strictly equivalent, but I believe the comparison is fair because they both provide a way to interact with a database. I foundSequel
s syntax very appealing. Duly noted for future use. -
Let's Encrypt and NearlyFreeSpeech.NET
At the time of this writing, this blog is hosed on NearlyFreeSpeech.NET, and delivered securely over TLS with a certificate from Let’s Encrypt. I previously wrote about how I obtained the first certificate and how to renew it. The process is now even easier, because NearlyFreeSpeech.NET automates the setup and renewal for it’s members.
-
The REPL: Issue 51 - October 2018
The Architecture No One Needs
Greg Navis discusses why he thinks single-page applications (SPAs) are almost always worse than traditional, multi-page web application. I tend to agree: Most of the time, it adds engineering complexity for not much benefit. I think this is particularly the case when using Elixir and Phoenix, since their performance is spectacular. Phoenix Channels already provide a way for updating content on a page without reloading, and the upcoming Live View promises to make it even better.
Elapsed time with Ruby, the right way
This post by Luca Guidi explains with great detail how calculating elapsed time in Ruby can have it’s pitfalls. The TLDR:
## Don't do this: starting = Time.now # time consuming operation ending = Time.now elapsed = ending - starting elapsed # => 10.822178 ## Do this: starting = Process.clock_gettime(Process::CLOCK_MONOTONIC) # time consuming operation ending = Process.clock_gettime(Process::CLOCK_MONOTONIC) elapsed = ending - starting elapsed # => 9.183449000120163
Automate Repetitive Tasks with Composed Commands
In this post, the [[Atom]] team explains how you can create composed commands from existing commands already available in your editor. This feature seems great for automating tasks. I haven’t composed any commands of my own just yet, but I think this is a great addition.