Of Sound Mind and Love

Thoughts and experiences on software and perspective.


Dissecting Code Readability

"This code isn't readable".

Have you heard this before? What does it mean? Is "readability" merely a subjective tool for dismissal? Or are there useful, objective aspects around the concept?

To write readable code, you must first understand what the term actually means. Therefore, we will dissect what programmers intend to say when they talk about code readability.

Discuss this post on HN

Breaking it Down

When someone says "I like readable code," ultimately what they mean is they like code that they can understand. Naturally, that makes it subjective. But is it entirely subjective? Let's break it down and find out.

There are three primary factors that impact readability:



Mithril.js: A Tutorial Introduction (Part 2)

Welcome to part 2 of this tutorial series! In part 1 we implemented the EntryList and EntryForm components. In part 2 we will first refactor the EntryForm component to take advantage of Mithril's stellar support for nested components. Then we will implement the Total component and the Coupon component, all of which will be managed by Mithril Virtual DOM algorithm under one parent component.

You can see the demo here!

Project User Stories

Before we dive back in, let's review our user stories:

  • As a volunteer, I want to sign up for an event. (Covered

Mithril.js: A Tutorial Introduction (Part 1)

This is part 1 of a tutorial series. You can view part 2 here.

Mithril.js is a small (~8kb) and fast frontend JavaScript framework. It's a simpler, yet more capable version of React, replacing the need for libraries like jQuery. Mithril's small size and API makes it ideal for embedded JavaScript widgets, or user interfaces that have high performance requirements.

My personal favorite part about Mithril is that it's just JavaScript. If you know how JavaScript-the-language works, you can fully apply that knowledge when using Mithril, including any of