Plurrrr

Sat 28 Aug 2021

jsc: My New Best Friend

A friend of mine recently pointed me at a well hidden command line tool. In the JavaScript framework used by Safari and other parts of Apple’s products, there is a tool called jsc. It’s a command line interface for JavaScript that uses the same code as the rest of the system.

Source: jsc: My New Best Friend, an article by Craig Hockenberry.

Plugins in Go

Several years ago I started writing a series of posts on plugins: how they are designed and implemented in various systems and programming languages. In this, I'll extend the series by providing some examples of plugins in Go.

As a reminder, the original post in this series identifies four fundamental plugin concepts, and claims that nearly all plugin systems can be characterized and understood by mapping their design to these concepts:

  • Discovery
  • Registration
  • Application hooks to which plugins attach (aka. "mount points")
  • Exposing application capabilities back to plugins (aka. extension API)

Source: Plugins in Go, an article by Eli Bendersky.

Away from exceptions: errors as values

Programming with exceptions is difficult and inelegant. Learn how to handle errors better by representing them as values.

In Smelly Exceptions, I laid out 3 practices to avoid when programming with exceptions. My goal there was to help you write more maintainable code. We saw that misuse of exceptions make programs brittle, tightly coupled, and difficult to reason about. The common factor in all three anti-patterns we discussed was exceptions. They are hard to use correctly. Even when used correctly, they don't compose, so the program flow is unnatural. In short, they are exceptions.

Source: Away from exceptions: errors as values, an article by Barisere Jonathan.