Coding prototypes

We do quite a bit of prototyping at Clearleft. There’s no better way to reduce risk than to get something in front of users as quickly as possible to test whether you’re on the right track or not.

As Benjamin said in the podcast episode on prototyping:

It’s something to look at, something to prod. And ideally you’re trying to work out what works and what doesn’t.

Sometimes the prototype is mocked up in Figma. Preferably it’s built in code—HTML, CSS, and JavaScript. Having a prototype built in the materials of the medium helps establish a plausible suspension of disbelief during testing.

Also, as Trys said in that same podcast episode:

Prototypical code isn’t production code. It’s quick and it’s often a little bit dirty and it’s not really fit for purpose in that final deliverable. But it’s also there to be inspiring and to gather a team and show that something is possible.

I can’t reiterate that enough: prototype code isn’t production code.

I’ve written about the two different mindsets before:

So these two kinds of work require very different attitudes. For production work, quality is key. For prototyping, making something quickly is what matters.

Addy recently wrote an excellent blog post on the topic of prototyping. The value of a prototype is in the insight it imparts, not the code.

It’s crucial to remember that in a prototype, the code serves merely as a medium—a way to facilitate understanding. It’s a means to an end, not the end itself. The code of a prototype is disposable and mutable. In contrast, the lessons learned from a prototype, the insights gained from user interaction and feedback, are far more durable and impactful.

This!

It can be tempting to re-use code from a prototype. I get it. It seems like a waste to throw away code and build something from scratch. But trust me—and I speak from experience here—it will take more time to wrangle prototype code into something that’s production-ready.

The problem is that quality is often invisible. Think about semantics, performance, security, privacy, and accessibility. Those matter—for production code—but they’re under the surface. For someone who doesn’t understand the importance of those hidden qualities a prototype that looks like it works seems ready to ship. It’s understandable that they’d balk at the idea of just throwing that code away and writing new code. Sometimes the suspension of disbelief that a prototype is aiming for works too well.

As is so often the case, this isn’t a technical problem. It’s a communication issue.

Responses

Shaun (he/ him)

@adactio Love love love this! So many great lessons learned on prototyping with code!

This has got the gears turning on ideas. Thanks for sharing!

(Also, thanks @sawyer for raising this article to my ever-distracted attention)

4 Shares

# Shared by Dave Rupert on Wednesday, August 9th, 2023 at 12:22pm

# Shared by depone on Wednesday, August 9th, 2023 at 12:47pm

# Shared by Shaun (he/ him) on Wednesday, August 9th, 2023 at 5:07pm

# Shared by Apocraphilia on Wednesday, August 9th, 2023 at 10:16pm

7 Likes

# Liked by Dave Rupert on Wednesday, August 9th, 2023 at 12:22pm

# Liked by Werther Azevedo on Wednesday, August 9th, 2023 at 12:22pm

# Liked by depone on Wednesday, August 9th, 2023 at 12:47pm

# Liked by Simon Foster on Wednesday, August 9th, 2023 at 1:39pm

# Liked by Wesley Soares on Wednesday, August 9th, 2023 at 1:39pm

# Liked by Apocraphilia on Wednesday, August 9th, 2023 at 10:16pm

# Thursday, August 10th, 2023 at 2:57am

Related posts

Codebar Brighton

Celebrating ten years of the wonderful community event.

Pattern sharing

The front-end style guide for Code for America.

Prototypes and production

Don’t build prototypes with a production mindset. Don’t release prototype code into production.

Related links

Paper Prototype CSS

A stylesheet to imitate paper—perfect for low-fidelity prototypes that you want to test.

Tagged with

Notes on prototyping – Ben Frain

Good tips on prototyping using the very materials that the final product will be built in—HTML, CSS, and JavaScript.

The only thing I would add is that, in my experience, it’s vital that the prototype does not morph into the final product …no matter how tempting it sometimes seems.

Prototypes are made to be discarded (having validated or invalidated an idea). Making a prototype and making something for production require very different mindsets: with prototyping it’s all about speed of creation; with production work, it’s all about quality of execution.

Tagged with

Introducing Opportunities & Experiments: Taking the Guesswork out of Performance - WebPageTest Blog

WebPageTest just got even better! Now you can mimic the results of what would’ve previously required actually shipping, like adding third-party scripts, switching from a client-rendered to a server-rendered architecture and other changes that could potentially have a big effect on performance. Now you can run an experiment to get the results before actual implementation.

Tagged with

S01E04: Cassie Evans - Behind the Source

This is a lovely little interview with Cassie—it really is an honour and a privilege to work with her!

Tagged with

How Readable? | Clearleft

Cassie and I went to a great Async talk last night all about code readability, which was well-timed because it’s been on our minds all week. Cassie explains more in this post.

Tagged with

Previously on this day

4 years ago I wrote Dream speak

My subconscious is an asshole.

4 years ago I wrote Connections

A book recommendation via conspiracies, games, pattern-matching, hypertext and apophenia.

5 years ago I wrote Register for Indie Web Camp Brighton 2019

Don’t miss it!

7 years ago I wrote Intolerable

I dislike your manifestbro, let’s put it to the test-o.

11 years ago I wrote August in America, day six

Philadelphia, Pennsylvania.

17 years ago I wrote Apple doesn’t get the Web

The double meaning is deliberate.

17 years ago I wrote Portability

Brian Oberkirch is working overtime.

22 years ago I wrote Never mind the terrorists, the morons have already won.

Here are a couple of examples of the great job being done by airport security officials in the States.