What a painter would tell a developer
Klimt's negative space, the tree behind Ginevra de' Benci, forgiving oil paint, and Monet's whole picture: four lessons from art for everyday code.
We’ve seen that painting and programming share a lot: composition, rules, layers, even movements. So, with all these similarities, what can we actually learn from art?
Painters lean on principles to get the best out of their work. Let’s borrow four of them for our gallery app.
1. leave negative space
The Kiss. Gustav Klimt, 1908.
In The Kiss, Klimt puts the couple in the centre and lets the space around them stay quiet. All the attention goes exactly where he wants it.
Negative space works the same way in software: clear interfaces and fewer distractions leave room for the user. And it starts at the edges of your system. Our create endpoint accepted whatever it was given, which leaves room for chaos, like an artwork pointing to an artist that doesn’t exist.
So I gave the endpoint a clear shape of what it accepts:
ArtworkParams = Struct.new(:title, :artist_id, :movement_id, :year, keyword_init: true) do
def self.from(params)
new(
title: params.require(:title).to_s,
artist_id: Integer(params.require(:artist_id)),
movement_id: Integer(params.require(:movement_id)),
year: Integer(params.require(:year))
)
end
end
def create
attrs = ArtworkParams.from(params.require(:artwork))
@artwork = Artwork.create!(attrs.to_h)
endIf parsing succeeds, I stop worrying about creation failing for silly reasons. The space around the subject is clean.
2. care about the details nobody asked for
Ginevra de’ Benci. Leonardo da Vinci, c. 1474.
The subject of this portrait is Ginevra de’ Benci. But look behind her: the juniper tree. Leonardo painted it with the same care as her face. It’s the detail you only notice on a second look, and it’s what makes the painting a showstopper.
Great software should reward a second look too. When I built the recommendation service, I started with the happy path. Looking closer revealed everything around it: an invalid recommendation type, huge result sets that need limiting, an artwork with no match for its artist, movement or period. Nobody writes those in the ticket. They’re the juniper tree.
3. keep the canvas easy to rework
Oil paint is forgiving. You can layer, scrape and adjust, as long as the canvas was prepared well. Code is the same: short, clean code is easier to rework.
Our period filter is a small example. It lived inside one strategy, defined as “within ten years”. Now imagine using it in ten other places and then deciding a period means twenty years. Instead of updating it everywhere, I moved it into the model:
class Artwork < ApplicationRecord
PERIOD_SPAN = 10
scope :same_period_as, ->(artwork) {
where(year: (artwork.year - PERIOD_SPAN)..(artwork.year + PERIOD_SPAN))
.where.not(id: artwork.id)
}
endOne definition, one place to change it. A well-prepped canvas.
4. paint for the person looking at it
Art is about perception. Without someone looking at it, a painting is just pigment. The best artists think about how their work will be felt.
We do that through empathy for the user. In practice, that means things like:
- gathering real feedback
- prioritising accessibility
- designing for every screen size
- keeping the structure clear
- making it fast
- testing it with real people
Water Lilies. Claude Monet, 1906.
Think about a Monet. You don’t fall for one brushstroke. It’s the whole picture that leaves you calm and happy. Users experience software the same way. They won’t notice each line of your code, but they’ll feel the sum of it. A pile of small errors and slow pages leaves them frustrated. Smooth, thoughtful details leave them attached.
in the end
The loop is still there. Plan, build, deliver, measure, repeat.
But I see it differently now. Inside that loop there’s room for beauty, for craft, for care. We don’t have to escape the process to find meaning. We can build it into the process itself.
Every line of code you write is more than a technical task. It’s a small act of creation. So the next time you feel uninspired or overwhelmed, take a step back and look at the whole canvas. You’re making something people will feel.
When we bring art into our logic, the loop isn’t just bearable. It’s inspiring.