Lunch & learn code monkey

37
A brief introduction to a "code monkey's" brain

description

As a programmer to often I have felt that my passion for code is similar to what an artist feel about their art work.

Transcript of Lunch & learn code monkey

Page 1: Lunch & learn code monkey

A brief introductionto a "code monkey's" brain

Page 2: Lunch & learn code monkey

Programmer definitionProgrammer is who, through language, has the capability and the knowledge to write code for any kind of computer.

Page 3: Lunch & learn code monkey

Some programmer thinks there artist

Page 4: Lunch & learn code monkey

Programmers often describe code as being more beautiful or elegant than other code. Talk to enough programmers and you'll hear some piece of code described as beautiful, sooner or later.

They see what makes it tick, appreciating the beauty of its construction.

Seems that they think that code can have form, pattern and a special elegance and grace.

Page 5: Lunch & learn code monkey

You maybe not believe that writing code is a creative process, let see

Creating a code project requires: an idea and skills.

A code project require skills like programming language, using of algorithms and design patterns.

Creating a piece of art requires: an idea and skills.

A piece of art could require skills like representational drawing, perspective, shading, or color theory.

Programming requires creative thinking. You have a problem, form a hypothesis about a solution, and then figure out how to test that hypothesis and implement its findings. That all requires creative thinking.

Page 6: Lunch & learn code monkey

But, what is art?

Page 7: Lunch & learn code monkey

The art of cooking.The art of negotiation.The art of conversation.The art of war. The art of crochet.

But, what is art?

Page 8: Lunch & learn code monkey

If we go back to Latin roots, we find ars, artis meaning "skill." It is perhaps significant that the corresponding Greek word was τεχνη, the root of both "technology" and "technique."

Wikipedia definition said "Art can also simply refer to the developed and efficient use of a language to convey meaning with immediacy and or depth."

But, what is art?

Definition

Page 9: Lunch & learn code monkey

But, what is art?

"After a certain level of technological skill is achieved, science and art tend to coalesce in aesthetic plasticity and form. The greater scientists are artists as well."Albert Einstein 1923 from Alice Calaprice, The New Quotable Einstein.+ quotes

Art and Science

Page 10: Lunch & learn code monkey

. Skill and techniques.

. And efficient use of a language to convey meaning .

. A level of technological skill achieved.

But, what is art?

Then art is...

Then programming can be art!!

Page 11: Lunch & learn code monkey

Opinions on Art and Programming

"The programmer, like the poet, works only slightly removed from pure thought-stuff. He builds his castles in the air, from air, creating by exertion of the imagination. Few media of creation are so flexible, so easy to polish and rework, so readily capable of realizing grand conceptual structures." Frederick P. Brooks, Jr., The Mythical Man Month

Page 12: Lunch & learn code monkey

Opinions on Art and Programming

"What hackers (hobbyist programmers) and painters have in common is that they're both makers. Along with composers, architects, and writers, what they are trying to do is make good things."Paul Graham, Hackers and Painters

Page 13: Lunch & learn code monkey

"We have seen that computer programming is an art, because it applies accumulated knowledge to the world, because it requires skill and ingenuity, and especially because it produces objects of beauty. A programmer who subconsciously views himself as an artist will enjoy what he does and will do it better."Donald Knuth's author The Art of Computer Programming

Opinions on Art and Programming

Page 14: Lunch & learn code monkey

Opinions on Art and Programming"I would describe programming as a craft, which is a kind of art, but not a fine art. Craft means making useful objects with perhaps decorative touches. Fine art means making things purely for their beauty.Richard Stallman, founder of the GNU Project and the Free Software Foundation.

Page 15: Lunch & learn code monkey

What is art in code?

Page 16: Lunch & learn code monkey

What is art in code?Elegant code adopts aesthetics to achieve high maintainability.

Code must be short, simple, easy to read, easy to match to its business purpose, and doesn't unpleasantly surprise your teammates.

There are many ways to write a sentence (as a piece of code) to a machine but not all are art.

Page 17: Lunch & learn code monkey

Same sentence may be considered a master peace by one programmer

What is art in code?

Page 18: Lunch & learn code monkey

What is art in code?... and bullshit by another.

Page 19: Lunch & learn code monkey

What is not art in code?

Page 20: Lunch & learn code monkey

What is not art in code?For some reason, many programmers seem to think their role is to write code that makes things work. It’s not.

Just like “the grass is green and the sky blue” is not literature, although it might perfectly describe the environment, coding something that "just works" is not programming.

Determining what is and is not bad code is often a subjective judgment, and will often vary by language, developer and development methodology.

Page 21: Lunch & learn code monkey

What is not art in code?We've all heard about the term "spaghetti code" or "code smells"

Page 22: Lunch & learn code monkey

I want to make art!

Page 24: Lunch & learn code monkey

I want to make art!

Follow blogs, web and interesting peopleCoding Horror

Improve your skillsLearn, code, code, code and have fun.

Page 25: Lunch & learn code monkey

All that glitters is not gold

Page 26: Lunch & learn code monkey

All that glitters is not gold

80% of the lifetime cost of a piece of software goes to maintenance.

Hardly any software is maintained for its whole life by the original author.

We have predefined specs, with fixed deadlines impossible to modify because that will cause a disturbance in the Force.

Page 27: Lunch & learn code monkey

All that glitters is not gold"When programmers work with other programmers we are bound strongly by convention, coding standards, documentation standards and so on. Programming is definitely a craft requiring high levels of skill, but IMO it is not art."Erik de Castro Lopo, coauthor of C for Linux Programming in 21 Days and developer of Linux audio library libsndfile

Page 28: Lunch & learn code monkey

All that glitters is not goldThe existence of process in the actual practice of code writing makes it tempting to dismiss programming as art, but if we broadly take the process as consisting of idea, design, and implementation, then we can see that these process are more like artistic currents for artists.

Like artistic currents programmers have code standards, coding style, process that over time have changed.

Page 29: Lunch & learn code monkey

I want to make art at work too!

Page 31: Lunch & learn code monkey

Is not Ithaca, is the road.

Page 32: Lunch & learn code monkey

What's for sure, is we all need to work with flair, passion and imagination.

Page 33: Lunch & learn code monkey

Why do I need to do it?

Page 34: Lunch & learn code monkey

Why do I need to do it?Code is read much more often than it is written.

"Always code as if the person who ends up maintaining your code is a violent psychopath who knows where you live."

Page 35: Lunch & learn code monkey

Anyway, go make some art. Why not?!

Page 37: Lunch & learn code monkey

Art and code resources

Code artRaven Kwok’s workhttp://abandonedart.org/Poem code cryptographic method.#songsincodeProgramming-Poetry deviantartcode {poems}Beautiful Motion Graphics Created With Programming: Showcase, Tools and TutorialsHacker Art

LearnCoding HorrorThe Pragmatic Programmer: From Journeyman to MasterCode Complete: A Practical Handbook of Software ConstructionClean Code: A Handbook of Agile Software CraftsmanshipThe Art of Computer Programming