Photo by Jordan Whitt on Unsplash

Some time ago in the Clojure subreddit, the question was asked, “Does anyone have any concrete examples of when mutability got them into trouble?”

The answer is yes, I have some.

A few years ago, I was using Foo in my front-end. I had my own custom credit card form whose state was stored in a nice, immutable Redux store. I passed the card info into the Foo library. Payments got processed. All was well with the world.

But then I noticed, if you entered a bad card (expired, say), my form’s date field would suddenly become blank. …

This looks maintainable…

Joel Spolsky once said that the single worst mistake a software company can make is rewriting the code from scratch.

Ever since then, this idea seems to have been enshrined as gospel. I’m not sure why. I’ve been involved in a successful rewrite or two, and still think that those rewrites were the best decisions we could have made. I’ll blog about those rewrites at some point. But right now, I want to start a fresh conversation about rewrites.

Survivorship bias

As mentioned, I’ve led some successful rewrites, but maybe I was just lucky. Maybe my thoughts are shaped mostly by survivorship…

(Or, haters, please go hate somewhere other than Reddit and Hacker News.)

All logos used with complete disregard for copyright and trademark law.

Let’s say you’ve written something amazing in JavaScript and you share it on Reddit or Hacker News. Guess what the first 97 comments are going to say? Some variation of:

  • Real engineers use Rust.
  • Why, oh why are people still building stuff with JavaScript?
  • I hope WebASM obsoletes this soon.
  • JavaScript ate my grandma.
  • Surprise, surprise, yet another front end web framework…

It’s that last comment that I want to address. I’ve got JS fatigue comment fatigue.

Yes. There are a lot of front end web frameworks. Why…

“Great game. The best game.” — Donald J. Trump

Growing up, I was poor. And my friend, Levi, was poor. This meant we had to be very selective about what video games we bought. And it meant that we played the snot out of those games. If I had to make a top 5 list of games, ranked by how often we played them, it would probably be this:

  • Secret of Mana
  • Tetris Attack
  • Chrono Trigger
  • Legend of Zelda (A Link to the Past)
  • Final Fantasy III (or VI, depending on how you measure)

We probably beat Secret of Mana a few gazillion times. Once, we decided to beat…

As someone who’s been around the software industry for a while, I frequently receive emails that go something like this:

“Hi Chris, I saw that you have N years of experience with technology X. I work for an awesome company in Expensiveville. We’d love to have you. We pay 100% of relocation costs…”

Instead of writing the same, “No thanks” email every time, I’ve decided to write this article (OK, it’s actually more like a rant) and point all future recruiters here.

Why I live in South Carolina

I’m intentional about where I live. I live in a small town. It’s basically Mayberry. My neighbors are…

Devops. No software engineer wants to do it, but we all need it.

I work on a tiny team (3 devs). None of us are dev-ops experts. None of us wants to be. We want to build products.

Unfortunately, our old monolithic Rails application currently requires us to do a fair bit of dev-ops, which means tinkering with a fragile amalgamation of deploy scripts + Chef. We fear to touch it. This makes us sad.

So, this past week, we began researching how we can minimize our dev-ops work. Our research led us to Nanobox.

The Box of Nano, shamelessly taken from the Nanobox blog


Nanobox is (possibly) the simplest…

It’s a question I see all the time on Hacker News forums. Whenever someone posts a Show HN site that is implemented in React/Angular/Vue, this question shows up near the top of the comments.

So, I thought I’d sit down and reflect on my own projects — current and past — and try to answer this question.

Let’s be clear. As a general rule, I don’t like JS-heavy sites.

As an example, the Hacker News UX is so much better than the Reddit UX — especially on mobile. Reddit takes forever to load. HN loads almost instantly. Clicking a link…

Recently, mostly as an exercise in learning the Clojure ecosystem, I decided to try publishing a library to Clojars. I’ve published a handful of hacky things in NPM, and was curious how to do the same in the Clojure ecosystem.

Assuming you’ve got Clojure and Leiningen installed, head to a terminal, and create your library:

lein new my-lib

My project.clj has the following plugins entry:

:plugins [[lein-cljsbuild “1.1.6”]
[lein-doo “0.1.7”]]

This gives us ClojureScript support and adds in a super handy testing utility called “lein doo” which allows us to re-run all of our ClojureScript tests anytime we make changes.

Recently, I sat down and compiled a list of programming features that really make a positive impact on my day-to-day work:

- Functional programming
- First-class immutability
- First-class REPL
- Data-oriented programming
- Static typing

That’s it. The end.

You can get all of those bullet points in TypeScript or JavaScript + Flow. But I lied about it being the end. There’s one more bullet point:

- Simplicity

Clojure is simple

Rich Hickey, the author of Clojure expressed it best in his talk “Simple Made Easy”. The talk is mostly about architectural simplicity, but the language itself is also fundamentally syntactically simple.

I’m going to describe my ideal language. What I want to know is: what language is this?

- Cultural proclivity to produce clear, obvious code (like Go)
- 1st class server-side web/api development experience
- Great REPL experience
- Great IDE experience w/ refactoring and intellisense support
- Great debugging experience
- Immutable first, first-class immutable types
- When needed, mutability is not like pulling teeth
- Monadic error handling
- Ability to say “what is this term?” like (source …) (doc …) in Clojure’s REPL
- Data-first development (like Clojure) but with statically enforced guarantees about data shape
- No private data*
- Good perf analysis tools
- No null
- Gofmt

Software Engineer, nerd, ‘n stuff

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store