September 21st, 2024

Sanding UI

Jim Nielsen compares software development to woodworking, highlighting iterative testing and user interaction. He resolved a UI issue caused by flexbox spacing by using padding, emphasizing continuous refinement for better user experience.

Read original articleLink Icon
FrustrationAppreciationInspiration
Sanding UI

Jim Nielsen's blog post discusses his approach to software development, likening it to woodworking. He emphasizes the importance of iterative testing through extensive clicking and interaction with the user interface (UI) to identify and resolve issues, which he refers to as "sanding." Nielsen describes a recent experience while working on a UI element involving radio buttons, where he discovered a "dead zone" in the interface that prevented users from toggling the control. This issue arose from using flexbox to create visual spacing, which inadvertently created an area that was not interactive. To resolve this, he replaced the gap with padding on the label, making the entire area clickable. He concludes by reiterating the value of continuous testing and refinement in development, comparing it to the process of sanding wood until it is smooth and free of splinters.

- Jim Nielsen compares software development to woodworking, focusing on iterative testing.

- He emphasizes the importance of extensive interaction with the UI to identify issues.

- A recent issue involved a "dead zone" in a UI element due to flexbox spacing.

- The problem was resolved by using padding instead of a gap, enhancing interactivity.

- Continuous refinement is crucial for a smooth user experience.

Related

Software Engineering Practices (2022)

Software Engineering Practices (2022)

Gergely Orosz sparked a Twitter discussion on software engineering practices. Simon Willison elaborated on key practices in a blog post, emphasizing documentation, test data creation, database migrations, templates, code formatting, environment setup automation, and preview environments. Willison highlights the productivity and quality benefits of investing in these practices and recommends tools like Docker, Gitpod, and Codespaces for implementation.

Lessons learned in 35 years of making software

Lessons learned in 35 years of making software

Jim Grey, with 35 years in software, stresses simplicity, frequent releases, relationships, visibility, challenges, social understanding, iterative improvements, and balancing perfectionism in software development for professional growth and success.

Htmx: Simplicity in an Age of Complicated Solutions

Htmx: Simplicity in an Age of Complicated Solutions

Erik Heemskerk discusses the pursuit of a 'silver bullet' technology in software development, emphasizing simplicity over complexity. He critiques over-engineering in front-end development, highlighting trade-offs in code solutions for better user experiences.

Fear of over-engineering has killed engineering altogether

Fear of over-engineering has killed engineering altogether

The article critiques the tech industry's focus on speed over engineering rigor, advocating for "Napkin Math" and Fermi problems to improve decision-making and project outcomes through basic calculations.

Algorithms We Develop Software By

Algorithms We Develop Software By

The article explores software development methodologies that improve coding efficiency, emphasizing daily feature work, code rewriting, the "gun to the head" heuristic, and effective navigation of problem spaces.

AI: What people are saying
The discussion around Jim Nielsen's article on UI refinement reveals several key themes and insights from the comments.
  • Many commenters emphasize the importance of attention to detail in UI design, likening small issues to "papercuts" that degrade user experience.
  • There is a consensus that developers should take ownership of the products they build, as being users themselves can help identify and fix minor issues before they reach customers.
  • Several users express frustration with the bureaucratic processes in larger companies that hinder the resolution of small UI bugs.
  • Many suggest that wrapping inputs in labels is a simple yet effective solution to common UI problems.
  • Commenters highlight the need for continuous testing and refinement, advocating for a culture of "sanding" to improve user experience.
Link Icon 69 comments
By @remus - 7 months
I think being a big user of whatever you're building is incredibly useful for finding these kinds of issues. If you're a big user as well as a dev then you will often stumble on these little things before a user does, and you are also perfectly placed to fix these issues before users can stumble on them.

I suspect this is why small teams with strong ownership can be so effective. If you feel ownership of a thing then you feel users' pain when they hit these little paper cuts, and it becomes a point of personal pride to fix these things and make the UX as smooth as possible.

By @xyst - 7 months
I wonder what’s the most polished or “sanded” UI out there?

You would think FAANG would have a half decent UI and UX with the amount of money they have. But anybody that has used Amazon.com or AWS, GCP, or even Azure would beg to differ.

Personally, off the top of my head. The most polished UI/UX has to be “mcmaster.com”. I can find anything I need in what seems like a couple minutes.

Compare this to big box stores like “Home Depot”, “Lowe’s”. I can spend 10-15 minutes just trying to find the right size of screw, board, or whatever using their bloated sites. On mobile it’s even worse.

By @ddtaylor - 7 months
The goto tactic for this specific `<label>` problem is:

    <label>
        Foo
        <input>
    </label>
By @aetherspawn - 7 months
This is so lost in Agile.

Engineers should get the time to “sand” their products, but we just don’t. If QA doesn’t make a ticket for the space between, it’ll never get fixed.

The customer probably notices this kind of a thing but it’s a miracle if the customer bothers to report it, and another miracle if it eventually turns into a ticket, and another miracle if someone prioritises it enough to spend time fixing it.

[In fact most companies have such opaque issue boards that as a customer I get so frustrated when I find a small issue or bug and have to spend like 50 hours back and forth to prove it’s a bug and actually get a ticket put in the tracker.]

By @pentagrama - 7 months
Is so important have people with that spark to see and fix those little UX issues, a good analogy used on UX design is papercuts for the user, not critical but it degrades user satisfaction.

To the author I will add that that radio button is not following the convension of a dot for the selected state instead of a check. Users may think at first sight that multiple/no selection is possible.

By @aaronkaplan - 7 months
This post demonstrates why I hate UI programming. The number of unpredictable, niggling little things that can go wrong exceeds my patience for dealing with them. I kind of enjoy thinking through the ways something might fail and writing tests to catch them, but aimlessly clicking around to see if anything breaks feels haphazard and annoying.

Is UI construction inherently that complex, or have we just not found the right programming model yet? Is it unreasonable to wish that sometimes things would just look and work the way I intended on the first try?

By @two_handfuls - 7 months
Meanwhile, some other UI uses square boxes for radio buttons.

Or have a highlighted button but the enter key doesn't activate it.

Or there are three different menus all behind a different symbol (ellipsis, hamburger, kebab).

There is a lot of variance in quality. Those of you who polish your UI: you are appreciated. Truly.

By @wmil - 7 months
I don't understand why putting the <input> inside the <label> is so unpopular. It completely avoids these problems and you don't need to come up with a unique id to use with 'for'.
By @dexwiz - 7 months
This is my strategy in bug bashes, and it generates way more tickets than anyone who has a multidimensional Cartesian matrix of test case combinations.

It’s good to know those tests cases to start, but random testing quickly outpaces planned testing when trying to find small issues. Also planned testing is often happy path or expected errors. Sanding like this finds edge bugs much faster.

By @DustinBrett - 7 months
I've been "sanding" my personal website (https://dustinbrett.com) for nearly 4 years now, and it feels like it could go on forever. Luckily I enjoy working on it.
By @bbor - 7 months

  It’s kind of a QA tactic in a sense
It's not kind of a QA tactic, this is literally the definition of QA. Specifically, this post is about ad-hoc functional testing. Kinda funny how this kind of testing used to dominate, but in the era of CI/CD, dedicated QA departments, and fancy webdriver suites, we've flipped too far the other way, and developers need to be reminded to QA their own stuff!

I think we've all learned the hard way that nothing works until it's been fixed, no exceptions... no code comes off the dome flawless.

By @webprofusion - 7 months
This is (potential) an advantage of small teams and individual developers. In more formal teams developers are often handed a UI and that's what they have to build, no variation permitted.

However, not every developer will craft a great UI just given time, I've seen some truly inspired monstrosities.

By @efitz - 7 months
Before I started in infosec I was a software tester for a year in the mid-90s. We called this kind of testing “monkey testing” and usually spent some time on it because it turned up lots of bugs, both code bugs and design/usability bugs. One time I delayed our product’s launch by a day because I found a crashing bug in the “about” dialog (missing handler for keyboard shortcut).

I also usually spent a few minutes in each UI page doing a test I called “spaz clicking” which, just like it sounds, consisted of just randomly clicking as fast as I could and moving the mouse around. Surprising how many bugs you’d find that way.

By @youssefarizk - 7 months
I'm always torn whether this is a good use of time or not. If you're an early stage startup, it feels like shipping features (that work) quickly is your biggest differentiator, not how nice your UI is.

I guess this is true if you're doing something in a not so saturated field, but understand that if you're in a saturated space, you probably do need the design to be natural os as to set yourself apart.

By @mdavid626 - 7 months
Put the input >into< the label. Then gap doesn’t matter, it’ll work. Of course, don’t allow such mistakes. It’s quality work when such small details are noticed and cared about.
By @smokel - 7 months
This is a great example of where unit testing does not apply.

I see many developers get caught up in rituals, and polishing (and monkey testing for that matter) seem to go against a reproducible approach, and are therefore frowned upon and even ignored. Still, it is a much more powerful technique to get something both working and user friendly.

Investing in developers to spot that something is 3 pixels off, or the basic idea that different users have different tastes, can be very productive.

By @perfunctory - 7 months
Alan Kay was right classifying most software engineering as pop culture. It's 2024 and we are still fiddling with spaces around radio buttons, a problem that should have been solved decades ago.
By @socialentp - 7 months
This is totally what I’ve been doing all day. I call it “digital puttering”.

It’s where much of the beauty and craft of something is developed. It requires a craftsperson to not just “call it done and move on”, but instead to be intrinsically motivated to spend time with the creation intimately, rolling it around in your hands/brain. Guiding a vine here and there, plucking a leaf or two… until it ‘feels’ right.

By @d_burfoot - 7 months
Someone should do a YouTube channel where they "sand" popular software products and point out these kinds of subtle UI bugs.
By @ChrisMarshallNY - 7 months
That's pretty much what I do.

TestFlight records how many sessions I run, on the release-ready app. I use TestFlight from very early on.

It always shows thousands of sessions for me. The next-highest tester is often only tens or hundreds.

But that number is dwarfed by how many sessions I run in the simulator.

It tends to result in apps that folks like using.

The biggest danger is that I get so familiar with the UI, that I don't understand its [lack of] discoverability for those unfamiliar with it. I can easily design inscrutable UI.

By @bhy - 7 months
Shouldn’t these all be smoothed out by UI frameworks, design guidelines and best practices? It doesn’t look like the industry should spend so much productivity on these sanding works?
By @ivanjermakov - 7 months
I miss this attention to detail in popular websites' UI. Often even clicking on the label won't update the form.
By @pennomi - 7 months
I think more projects need some form of the One Hundred Papercuts project in Ubuntu, where the goal was to fix little bugs that were annoyances but not critical.
By @jamamp - 7 months
I think the article has good sentiments about it. Actually using your application a lot helps polish it down a ton.

However, wouldn't putting the input inside of the label (before the label text) be a better solution than fiddling too much with CSS and flexbox? It's more foolproof to ensure clicks within the label activate the input, and eliminates the need for the "for" reference.

By @dcre - 7 months
It’s an important insight that the state space for UI is very large and that is why intuition is especially useful — it’s rarely feasible to account for all possibilities analytically. This is true to some extent in all areas of software development, but I think for UI dev moreso than most.
By @tracker1 - 7 months
On the inputs.. for radio/checkbox, I prefer to wrap inside the label element.

    <label>
      <input ... />
      <span>Some text...</span>
    </label>
When you do it this way, the label doesn't need to be mapped to the id for the input, it's implicit. Also, it allows easier adjustments to the characteristics of the checkbox/radio input via CSS.

You do want an inner <span> if you want to stylize the input control as an inline-block depending on your needs. For general use, with the native controls, the inner span isn't necessary, I still prefer it by convention.

By @thex10 - 7 months
This attention to detail is what separates the mediocre frontend devs from the rest. How the heck do I improve our hiring process so we get more of you!!!
By @christophilus - 7 months
I generally wrap my radios inside of the label for this reason. Is there a reason not to do that?
By @wruza - 7 months
The lesson here is don’t split a control into two parts because developers will screw it up. Who prevented control designers from doing

  <radio>foobar</radio>
  <radio mark=end>foobar</radio>
and allowing a mark pseudoelement to participate in alignment? Or at least forcing everyone to use the input-in-label variant? Nobody.

But they split it, and now people without clear understanding how ui should work do it wrong by design and invent Monte Carlo methods to check if it works.

And it seems some crappy screenreaders don’t even recognize the proper form of it, adding salt to the cut.

By @kmoser - 7 months
My beliefs in the same vein:

  - If you think you've found all the bugs, look again.
  - If you think you've just fixed a bug, test again.
  - If you think your program is done, you're wrong.
By @razodactyl - 7 months
You know what.... this was an amazing post. There was a lesson, analogy, and a very to-the-point example.
By @dclowd9901 - 7 months
Bike shedding kind of: I think the real failure here is not using a “cursor: pointer” directive. Easy to tell what’s clickable when your cursor changes based on what’s clickable.
By @Sardtok - 7 months
I was on a site the other day, a hotel or flight website. I think it was a review form. There were checkboxes, where the checkbox wasn't clickable, only the labels. I was sure the whole thing was frozen, but happened to find some other UI controls were responding. So I tried the labels.

I've come across the reverse scenario quite a few times, where the label isn't clickable, but this variant was new to me.

By @dmd - 7 months
A broken pattern I see constantly related to author’s example is large buttons where only the button label - and not the rest of the button - is clickable.
By @AlienRobot - 7 months
You can also do <label><input> label</input>
By @invaliduser - 7 months
Anecdata, but I found the very same issue (the bermuda triangle gap between radioboxes, but also checkboxes, and their labels) in a project a few months ago.

It seemed a pretty big deal to me, specially because I always clicked on the gap, and got frustrated and angry at this. So I reported it to the UX team managing the design system, and to the developers implementing the design system, and nobody really cared. Some people even tried to convince me this behaviour was OK (because other design systems worked that way too, or because they were planning to refactor this on the far future so they didn't want to spend time on this).

I think the industry is now filled with people that just don't care, specially on big companies where, if it's not in a ticket, and if the ticket is not prioritized as critical, nobody cares. All they care about are metrics (test coverage, line count of a function, whatever). Pretty sad actually.

By @dewey - 7 months
Something for the sanding list: Navigating between https://blog.jim-nielsen.com/about/ and https://blog.jim-nielsen.com makes the layout shift a bit in Safari on macOS. The reason is that Safari only shows the scrollbar when it's needed but without "reserving" the space.

I once spent hours debugging this before I realized what was happening, my confusion coming from the fact that with the inspector open that wasn't the case (As there the scrollbar was always visible...).

By @sdflhasjd - 7 months
This applies to mobile apps a lot. If you're not careful (especially when using the iOS/Android simulators too much) you can create tiny awkward hit boxes for buttons that are difficult to tap with fingers
By @babyshake - 7 months
It has also become quite easy when sanding a UI to provide code to an LLM and describe something like a click deadzone and it can usually fix it immediately without you needing to investigate it. The missing piece is really just the glue between the browser, coding environment and LLM. I know a bunch of YC startups are working on this but nothing has really worked well for me. Please recommend anything you are using that does in fact provide this type of glue...
By @djsamseng - 7 months
> So I click around, using the UI over and over, until I finally cannot give myself any more splinters.

I’d take this with a grain of salt (pun intended). There’s a lot of bugs that you cannot reproduce without certain permissions or a particular environment. Let alone the race conditions or user setup. In my experience, most bugs would not have been uncovered using this brute force approach. A few tests using your understanding of the code and critical thinking goes a lot further in my opinion.

By @defanor - 7 months
Not directly related to the article's message (though may count as collaborative "sanding"), but related to its UI: the page has texts centered (margin-left: auto, margin-right: auto, short lines), but paragraphs with embedded images lack that, and the images are aligned to the left. I thought it may be due to JS disabled (if it relies on JS for the layout somehow), but enabling it did not change that. Observed in Firefox 115; it is not the intended layout, is it?
By @throwaway14356 - 7 months
i always wrap the labels around the radio buttons and checkboxes. the animation also shows nicely that the label should not be selectable text. if one wants to further polish it a hover highlight might look nice at times.

Drawing a box around the radio buttons is perhaps not modern but it may make the form more usable.

The title or description of the element should not be the same as the options.

The 4 times might belong in two or more groups. This is something to dwell on, make a few mockups then most likely it shouldn't be used. If it doesn't jump out as amazingly useful restore normality.

consider lining up the time so that the :'s sit in a line. Try put the PM in a collum too. Maybe there should be AM as well.

Keep doing useless experiments until you strike gold. It should be really hard to beat default form elements (unless it is iphone)

Your truly fantastic 1000 line text input should most likely be deleted.

the example animation probably has insufficient line height. The user shouldn't have to aim that much.

By @ehnto - 7 months
I have found the same to be true in game development once all the pieces start coming together. There is no substitute to just using the thing. Maybe you don't find bugs/splinters, maybe you realise that it just doesn't feel right once you've glued the components together.
By @raminf - 7 months
Built an app when the iPhone first came out. Spent 2 months building the core app and another 3 months working to reduce the number of taps and remove road-bumps in the UI/UX flow.

Totally paid off.

Working on another app now. Sweating the details on the 'watercourse way.' That first experience is critical.

By @someoneontenet - 7 months
Sounds like op is manually fuzz testing.
By @donatj - 7 months
As a fellow old, I'm inclined to say labels should just wrap the control unless there's a very good reason for it not to. Would have completely prevented the issue, wouldn't need a global ID nor the "for". Just generally more semantic and cleaner.
By @MBS680 - 7 months
Anyone discussing theporndude.com? It's a simple porn directory site, but I think the interface design shows a very clear information !
By @Retr0id - 7 months
oof ouch I just got stabbed by a giant checkmarks-in-radio-buttons splinter
By @jbverschoor - 7 months
Just put the input inside the label. Problem solved, no need for for=
By @wheresmycraisin - 7 months
I prefer a well tuned smoothing plane or a card scraper, personally.
By @tikkun - 7 months
Is this Jim Neilsen related to Jakob Neilsen (famous UI guy)?
By @jwr - 7 months
Meanwhile in Apple Photos, if you meticulously select 17 images and then accidentally click between photos, your selection disappears…
By @gaborme - 7 months
I really like the sticky face menu on the bottom right. Never seen this before. Gave me some inspiration for one of my sites.
By @4b11b4 - 7 months
I like this idea of sanding your UI...

Just recently have done quite naturally the same thing... Expand the clickable surface area of a region

By @wordofx - 7 months
If you’re not putting the input inside the label then you’re doing it wrong.

Bootstrap changing this in v4 is no excuse to not do it.

By @timzaman - 7 months
Decent analogy. I wonder how many techies have ever used a belt sander. Or have one. I think very, very few.
By @jeffreygoesto - 7 months
The computer always exactly does what you told it to do. You almost never know what exactly you told it.
By @anybodyhome - 7 months
Hard to believe this hasn't been abstracted and solved at the browser level in 2024.
By @ants_everywhere - 7 months
The algorithm of clicking around trying to break things heavily optimizes for workflows the designer finds natural. The more you do it, the more you reinforce your existing patterns because, you know, brains.

This tends to produce experiences that are very smooth for a large group of people but fail really badly for anyone who is slightly different. Most Apple stuff feels like this to me, for example. It's like carving a polished stone path where any direction you step off the path is raw and jagged.

By @psadri - 7 months
Just checked SkyMass's radio + labels and they are fine.
By @quirino - 7 months
On Safari (iPad), type something in the search bar. If you accidentally click outside of your keyboard it will deselect the bar and delete everything you typed.

On Spotify the three little dots to do some action to a song have too small of a hitbox. Press even the slightest bit under the button and it will start playing the song. You'd never click there to play the song.

When you consider the scale of these apps, there must be so much combined annoyance.

By @whalesalad - 7 months
op figured out iteration and incremental improvement
By @snegrus - 7 months
Sir, this is Ikea.
By @ImHereToVote - 7 months
Seems like a multimodal LLM unit test could do the sanding.
By @fitsumbelay - 7 months
this is the way
By @paxcoder - 7 months
Might be a good idea to record clicks that have no associated action. If you could display all of such clicks visually, the problem might become obvious.
By @VeejayRampay - 7 months
we need to stop pretending that CSS is awesome though, it's been in use for about twenty five years now, keeps reinventing itself and still fails at simple things (as exhibited in this example)