Adam Fanello
Adam.Fanello<Building Apps in the Cloud>

Adam.Fanello<Building Apps in the Cloud>

Be a Code Artist

Adam Fanello's photo
Adam Fanello
·Jul 18, 2022·

4 min read

Featured on Hashnode
Be a Code Artist

Photo by Marty O’Neill on Unsplash

Play this article

Inspiration

I ran across this blog post some time ago:

Four reasons why everyone except for Computer Scientists writes sloppy code by Ari Joury

It’s a really good write up, except that it starts right off in the title insulting a whole lot of developers. Joury doesn’t define who a Computer Scientist is. It is only someone like me with a degree that says “Bachelors of Computer Science”, or is it anyone who thinks like a computer scientist? I believe it is the latter: how someone thinks. However, in that case the very label makes no sense. This is exemplified in Joury’s Reason #1, which hits the nail on the head:

“Reason 1: For Computer Scientists, coding is an art. For everyone else, it’s a tool.”

  • Ari Joury

I read this line and my head popped. 🤯 I’ve seen this sentiment before, but never so succinctly. But there’s a problem with it. If you study physics, chemistry, biology… you would be studying science. You would be pursuing knowledge of what is. As software developers though, we might study the problem space of what we are trying to solve with our solution, but then we go and create something new.

So I’ll modify this reason:

“Reason 1: For passionate software developers, coding is an art. For everyone else, it’s a tool”

  • me

Passion = Art!

How does a passionate software developer differ from everyone else?

Everyone else will look at the requirements, perhaps with a user story, and dive in writing code. Tweak it. Stack Overflow it. In the end, the output is something that “works.” That’s the end for these “users of a tools” people.

“It works for that user story, therefore it is done.”

  • those people

This code is usually easy to spot, because it will be a jumbled mess of spaghetti. That’s evolution. Does it work? Yes, at least for that one use case. Can it be maintained? Probably not.

A passionate software developer would be embarrassed by that. How can you be passionate about your work and deliver a mess? A code artist might go through the same evolution but then it will be refactored into a testable succinct piece of art.

More often though, a code artist won’t have just blindly started typing code. Writing is a form of art. Like any novelist, the artist will outline the overall plot first. The characters and interactions are identified and the story obtains some structure before a single sentence, a line of code, is written.

If you have a code artist doing your code reviews for a while, you will experience this passion for the art of programming. I hope you will come out of the experience as a matured artist yourself. We will challenge you. Either we will convince you that our artistic style is best, or you will rise to the challenge of standing up for your own artistic approaches. Or, you will remain a “it works therefore it is good” user of tools and hate all artists.

“You will get better every day. It is an art, not a science. It is a mixture of your creativity, your personality, your heart, your mind, your ethics and your values. It is you.”

  • James Stanier

Stanier was talking about being a manager, but this is true of anything you care about.

Audience

Reason 2: Developers don’t always write with the reader in mind

  • Ari Joury

This calls back to the point that a code artist is a writer, and we’re writing to two completely different readers of the same manuscript: the computer and our fellow developers. The computer doesn’t care one bit about English and is perfectly happy with this program:

static int e,n,j,o,y;int main(){for(++o;(n=-~getchar());e+=11==n,y++)o=n>0xe^012>n&&'`'^n^65?!n:!o?++j:o;printf("%8d%8d%8d\n",e^n,j+=!o&&y,y);}

Source: International Obfuscated C Code Contest

Our fellow developers care only a little about the programming language syntax; really it’s English that we read. What we name things is most important here, as well as how we organize things. This is what makes code readable, and not just functional.

Conclusion

So what’s my point? Have passion for your work! Go forth and create art!

 
Share this