Justin Duke

Forcing functions in everything

Kelly Sutton wrote a great article about how TDD impacts software design:

Design Pressure is the little voice in the back of your head made manifest by a crappy test with too much setup. It’s a force that says when your tests become hard to write, you need to refactor your code.

I think this is absolutely correct, and touches on a larger concept that I’ve been internalizing over the past few months – that the best methods for evaluating the soundness of a codebase come from activities adjacent to the codebase. (Or, to use fewer syllables, if it sucks to do something with the code, then the code probably sucks.)

Read more →

Be a better employee, not a better programmer

André Staltz wrote an article making the rounds, entitled The single tip that made me a better programmer:

As a programmer, you must become one with the machine, thinking how the machine thinks, to a level that you will no longer be surprised by any behavior or corner case. There should be no dissonance between your mind and the computer’s activities. To become fully conscious of the runtime realm in the computer is, basically, programming utopia.

This is a good article, and has merit. But I don’t agree with it.

Read more →

Developer experience is the ball game

I’ve read two bad takes recently on how “faux native” technologies are considered harmful.

The first is alarmingly titled Electron is flash for the desktop:

Also all you web devs: Go learn C or Rust or something. Your program runs on a computer. Until you know how that computer works, you’re doomed. And until then get off my lawn shakes fist.

The second, a little less insufferable, is about an iOS developer’s experience with React Native:

Chances are that your finished RN app is going to feel like a not-quite-native iOS app and a not-quite-native Android app. Some people will have a bigger problem with this than others and most users of the general population won’t notice. But you do risk losing platform specific niceties that users will notice.

Both of these articles make some fair points, even if they’re not cogent overall.

Read more →

Shooting the Messenger

When Facebook launched Messenger for iOS in 2011, I was a little skeptical – this was before the brief and mighty wave of unbundling – but grew to be cautiously optimistic, because Messenger was a good and simple app that removed most of the cruft from Facebook and focused on what I cared (and care) about most: talking with people.

Here’s Messenger in 2011:

Here’s Messenger in 2017:

Read more →

Update: March 2017

Victories Spoonbill continues to grow at a steady clip, purely due to organic growth. It’s still not yielding any revenue, which is lame, but I’ve had a bunch of talks with folks about monetization models so if this continues it’s not far off. Setbacks Didn’t launch anything :(. I shipped a bunch of stuff for Spoonbill, but a cocktail of fatigue + sickness + massive underestimation meant that I missed both Floradora and Barback’s minor version bumps.
Read more →

A bigger pan

Here’s an old joke (or story, or fable, or whatever you want to call it) that I’ve heard some variation of a dozen times.

The new Jewish bride is making her first big dinner for her husband and tries her hand at her mother’s brisket recipe, cutting off the ends of the roast the way her mother always did. Hubby thinks the meat is delicious, but says, “Why do you cut off the ends — that’s the best part!” She answers, “That’s the way my mother always made it.”

The next week, they go to the old bubbie’s house, and she prepares the famous brisket recipe, again cutting off the ends. The young bride is sure she must be missing some vital information, so she askes her grandma why she cut off the ends. Grandma says, “Dahlink, that’s the only way it will fit in the pan!”

Read more →

Getting the admin link for an object in Django

You’re probably familiar with Django’s get_absolute_url method (docs here) that lets you hook up a Model instance to a specific URL. This is really nice because instead of having to do something like this: <a href="/people/{{ object.id }}/">{{ object.name }}</a> You can do something like this: <a href="{{ object.get_absolute_url }}">{{ object.name }}</a> This lets you have a single source of truth tying an instance to its detail URL, meaning that if the URL configuration ever changes you only have to change it in one place.
Read more →

Update: February 2017

Wow, February legitimately just flew by. That was a quick four weeks. Let’s dive into things, shall we? Victories Spoonbill has momentum! My goal last month was to hit 200 users and that goal got crushed (in a good way) thanks to an unexpected Product Hunt launch and a bunch of word of mouth marketing after that. It’s now growing fairly steadily, though the increased attention means I’m focusing more time and effort towards it (which is still non-profit) than I’d like.
Read more →

Adding comments to package.json

Comments are good. Comments in dense, labrynthine files like package.json are especially good. But comments in JSON are… if not bad, then hard. When I was adding Jest as a front-end test suite for work, I wanted a way to explain the weird regex we use for finding test files efficiently. Unfortunately, JSON (and NPM’s parsing of package.json) is persnickety, and doing something like this fails: { "name": "packageName", "version": "0.
Read more →

Time is money, friend

Cushion, a SaaS for freelancers, has a transparent log of its running costs and expenses that recently got posted to HN and spun up a lot of positive discussion.

(This page has been around for at least a year, and I think it’s awesome – it’s what inspired me to similarly start tracking expenses for Village Blacksmith.)

One of the fairly common discussion points on the post was about how the accumulation of so many ‘small’ costs – in the $10-$50 a month range – can add up to such a substantial amount.

Read more →
© 2017 Justin Duke • All rights reserved • I hope you have a nice day.