Share
Embed
Beauty and programming
Beauty is a recurring theme when talking about programming and system design in general
And a lot of our references for how things should be designed talk about beauty. Why is that?
Björn Andersson
June 15, 2013
Transcript
20 slides
-
What is beauty? Beauty is a characteristic of a
person, animal, place, object, or idea that provides a perceptual experience of pleasure or satisfaction. Saturday 15 June 13 @gaqzi -
"Beauty is more important in computing than anywhere else in
technology because software is so complicated. Beauty is the ultimate defense against complexity." -- David Gelernter, Machine Beauty: Elegance and the Heart of Technology Saturday 15 June 13 @gaqzi -
The UNIX Philosophy Rule of modularity – build small simple
programs that work together Rule of clarity – build with other people in mind, not computers Rule of Least Surprise – programs should behave the way expected by an experienced user Rule of Generation – programmers should avoid writing low-level code, write in high-level languages that generates code. This to avoid human error. Saturday 15 June 13 @gaqzi -
The UNIX Philosophy Rule of modularity – build small simple
programs that work together Rule of clarity – build with other people in mind, not computers Rule of Least Surprise – programs should behave the way expected by an experienced user Rule of Generation – programmers should avoid writing low-level code, write in high-level languages that generates code. This to avoid human error. Saturday 15 June 13 @gaqzi -
The UNIX Philosophy Rule of modularity – build small simple
programs that work together Rule of clarity – build with other people in mind, not computers Rule of Least Surprise – programs should behave the way expected by an experienced user Rule of Generation – programmers should avoid writing low-level code, write in high-level languages that generates code. This to avoid human error. Saturday 15 June 13 @gaqzi -
The UNIX Philosophy Rule of modularity – build small simple
programs that work together Rule of clarity – build with other people in mind, not computers Rule of Least Surprise – programs should behave the way expected by an experienced user Rule of Generation – programmers should avoid writing low-level code, write in high-level languages that generates code. This to avoid human error. Saturday 15 June 13 @gaqzi -
The UNIX Philosophy Rule of modularity – build small simple
programs that work together Rule of clarity – build with other people in mind, not computers Rule of Least Surprise – programs should behave the way expected by an experienced user Rule of Generation – programmers should avoid writing low-level code, write in high-level languages that generates code. This to avoid human error. Saturday 15 June 13 @gaqzi -
Saturday 15 June 13 The Zen of Python,
by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those! @gaqzi -
Saturday 15 June 13 The Zen of Python,
by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those! @gaqzi -
Saturday 15 June 13 The Zen of Python,
by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those! @gaqzi -
Saturday 15 June 13 The Zen of Python,
by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those! @gaqzi -
Saturday 15 June 13 The Zen of Python,
by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those! @gaqzi -
Saturday 15 June 13 The Zen of Python,
by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those! @gaqzi -
Python programmers eschews complexity We spend our days
finding the most beautiful way of expressing our ideas in code And this is what allows us to perform amazing things Saturday 15 June 13 @gaqzi -
Machine learning Saturday 15 June 13 Natural Language Processing
Robotics @gaqzi -
Do androids dream of electric sheep? but… Saturday 15
June 13 @gaqzi -
Do hackers dream of beau=ful code? I think so.
Saturday 15 June 13 @gaqzi -
REFERENCES Beauty: https://en.wikipedia.org/wiki/Beauty The UNIX Philosophy: http://en.wikipedia.org/wiki/Unix_philosophy The Zen
of Python: http://www.python.org/dev/peps/pep-0020/ Saturday 15 June 13 @gaqzi