humancode.us

Phase-detection autofocus is a bit sloppy

May 13, 2023

Today I learned that phase-detection autofocus is fast and accurate, but not precise—the resulting focus when you hit that AF button is a tiny bit sloppy. When that AF beep is heard, your focus will be ever so slightly front or back of the actual focus point. I’ve even seen evidence on my lenses that that where you left your focusing ring the last time affects whether the next autofocus is front- or back-focused.

This means that you should never simply take the first number that Automatic AF Fine Tune gives you. Instead, take a dozen or more readings and average them out to get a feel for your lens’s focus bias, then manually adjust the fine-tune setting. Take a few photos of a sharp, stationary target, and pixel-peep until you get the setting about right. If you’re like me, you’ll get three super sharp shots out of four, with the last one just a bit soft. Here are my takeaways when using phase-detect autofocus:

  1. When shooting with wide aperture, take a bunch of shots, and hit that AF button each time. Remember, phase-detect AF is probabilistic in nature.

  2. DoF is your friend. Stop down that aperture a bit more to give yourself the best chance of getting your subject in sharp focus.

  3. Don’t bother with AF Fine Tune unless you notice that your shots are consistently back- or front-focused. Most lenses hover around 0 bias out the door unless they’ve been abused.

  4. When shooting a still subject with a tripod, use Live View to focus using contrast-detection. It’s much slower, but it will never misfocus. Alternatively, use manual focus and Focus Peaking.

  5. Don’t pixel-peep too much. As long as your photo looks pretty good on a 2 MP screen, it’s probably good enough. With cameras pushing 48 MP+, even the most insignificant misfocus will look awful at 100% magnification.

On Conservatism and the Persecuted Class

April 15, 2023

Have you ever wondered why American conservatives always seem eager to make life hell for one group or another? Why are they so obsessed with persecuting trans folk today, who make up a tiny minority of the population and cause basically none of society’s problems? I offer a simple hypothesis: American conservatism requires some persecuted class to be defined to justify the ideology’s existence. Without someone to step on, conservatism simply ceases to be. Without something to expunge, there is, by definition, nothing to conserve.

American conservatism is strongly correlated with a hierarchical view of the world. A good way to feed a conservative’s need to feel like they’re on top, then, is to classify someone else as an inferior. A persecuted out-group can be agreed upon to take the blame for society’s ills, so that the in-group can declare themselves blameless. And because the very notion of a blameless class of superiors is ridiculous on its face, a new class of persecuted people must be found whenever a previous group is used up, lest the superior class is left with only themselves to blame.

Read more…

Streaks are bad for you

April 13, 2023

I’m convinced that streaks is an antipattern for healthy habits, and it is actually quite bad for you.

Streaks encourages perfectionism, and undervalues the progressive nature of growth. The goal of any good habit is not to do it every single day, but to do more of it over time.

Streaks punishes you for missing a day by throwing out all your accumulated progress so far—back to zero you go!—even when you have a perfectly wise reason to miss a day’s session. The loss of all your “progress” can be devastating, and people may do damage to themselves solely to keep a streak going.

Stop using streaks in your apps. Use a different metric that encourages growth, not perfection. Try a trailing tally with a target band instead (you did the activity 25 days out of the past 30! Good job!), or let your users view their progress on a calendar without any metric at all, and let them judge for themselves how well they did.

Dealing with Bad News

March 29, 2023

AI-generated image of smashed glass

DiffusionBee-generated image

I had to deal with some potentially awful news a couple of days ago, and I’d like to share with you how I deal with events that knock me off balance. Maybe it’ll help you too.

Read more…

Make Prototypes Entirely Out of Tracer Bullets

March 10, 2023

When creating a whole new functionality in your app (or a whole new app), prioritize validating your stack of abstractions over making each layer feature-complete. Think of the simplest use case that crosses all the abstraction layers (connecting a view to a model and syncing state to a server, for example) and implement it. Have it do one simple thing (refresh its content on demand, say), and ensure you can test it. Then, add functionality incrementally.

Having a fully-testable stack, even with only a tiny bit of functionality, opens up a world of experimentation and lets you prioritize your work. Every additional function you put into the stack incrementally adds to a demonstrable, shareable prototype, right from the start.

Practitioners of agile methodologies will recognize this as the Tracer Bullet technique. Your project bringup should be made entirely of Tracer Bullets. Others may recognize this as the Steel Threads method. In any case, it’s a great way to ensure you have a working prototype as early as possible in your project’s lifetime.