naildrivin5.com

Website of David Bryant Copeland

Confirmation Dialog with BrutRB, Web Components, and no JS

I created a short (8 minute) screencast on adding a confirmation dialog to form submissions using BrutRB’s bundled Web Components. You don’t have to write any JavaScript, and you can completely control the look and feel with CSS.

There’s also a tutorial that does the same thing or, if you are super pressed for time:

<form>
  <brut-confirm-submit message="Are you sure?">
    <button>Save</button>
  </brut-confirm-submit>
</form>

<brut-confirmation-dialog>
  <dialog>
    <h1></h1>
    <button value="ok"></button>
    <button value="cancel">Nevermind</button>
  </dialog>
</brut-confirmation-dialog>

Progressive enhancement, and no magic attributes on existing elements.

Please Create Debuggable Systems

When a system isn’t working, it’s far easier to debug the problem when that system produces good error messages as well as useful diagnostics. Silent failures are sadly the norm, because they are just easier to implement. Systems based on conventions or automatic configuration exacerbate this problem, as they tend to just do nothing and produce no error message. Let’s see how to fix this.

Brut: A New Web Framework for Ruby

A brown rectangle with a large capital 'B'. Underneathe is 'brut'

Brut aims to be a simple, yet fully-featured web framework for Ruby. It's different than other Ruby web frameworks. Brut has no controllers, verbs, or resources. You build pages, forms, and single-action handlers. You write HTML, which is generated on the server. You can write all the JavaScript and CSS you want.

One Week With Desktop Linux After a 20 Year Absence

I bought a Framework laptop a couple weeks ago, set it up with stock Ubuntu, and used it for my primary computer for a week. It’s the first time I’ve used Linux in earnest in 20 years. It’s amazing how much has changed and how much hasn’t.