DEV Community

Discussion on: Which contentious opinions in programming actually matter?

Collapse
 
kspeakman profile image
Kasey Speakman

Also a response to "the less code, the better".

I believe the original purpose of this statement was to point out that often the solution to a given problem is not a technical one. But our careers are generally focused on solving the technical problems. So sometimes we write (a lot of) code for things that don't need to be solved entirely with code.

When all you have is a hammer, every problem looks like a nail.

Great example recently: a client talked with me a few times about changing how an ID card was printed so that there was room to punch a hole for a lanyard. The first couple of times, my instinct was that I would need to make it a setting that clients could adjust. That entails a decent amount of work (UI, storage, integrating with printing code, testing, and future costs of reconciling the feature with other features / printers / etc).

But it finally occurred to me to ask: "Is there room above the hole? Can the hole punch machine be adjusted instead?" They were able to solve the problem that way. And now that is code I never had to write.

And it is not an either/or proposition. Sometimes the best solution includes some code plus some company processes. Versus a pure code solution that would be very complicated for both devs and users.

Collapse
 
charliedevelops profile image
charliedeveloper

Great answer, this is a really interesting point to make. Being able to think about the bigger picture is a real hallmark of a good developer.