The Artima Developer Community
Sponsored Link

Python Buzz Forum
The UnZen of UnPython

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Ian Bicking

Posts: 900
Nickname: ianb
Registered: Apr, 2003

Ian Bicking is a freelance programmer
The UnZen of UnPython Posted: Dec 6, 2005 5:58 AM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Ian Bicking.
Original Post: The UnZen of UnPython
Feed Title: Ian Bicking
Feed URL: http://www.ianbicking.org/feeds/atom.xml
Feed Description: Thoughts on Python and Programming.
Latest Python Buzz Posts
Latest Python Buzz Posts by Ian Bicking
Latest Posts From Ian Bicking

Advertisement

Chris McDonough is thinking about what Unpythonic means, and he kind of concludes that it's just a stick to beat other people over the head with, that like "obscenity" it's just a vague term brought out to invoke a response without being very explicit about what really bothers you.

Probably true. But then, I think "Unpythonic" really does mean something. So I thought I'd invert the Zen of Python (import this).

The UnZen of UnPython

An inverted version of the original by Tim Peters

  • Ugly is better than beautiful because there's no time to make it beautiful, and beauty is just a matter of opinion.
  • Implicit is better than explicit because explicit violates DRY.
  • Complex is better than simple because no one needs a consultant to do simple things
  • Complicated is better than complex because you don't want to tie the developer to anything prematurely.
  • Nested is better than flat because hierarchy keeps things organized.
  • Dense is better than sparse because sparse wastes space and time.
  • Readability doesn't count because personal expressiveness is more important.
  • Special cases are special enough to break the rules specialized dialects let you better express your meaning.
  • Although purity beats practicality because you only go around once, you better do it right.
  • Errors should pass silently because status return codes are more explicit.
  • Unless explicitly raised because unhandled exceptions cause problems.
  • In the face of ambiguity, guess because at least you'll be matching someone's expectations, as opposed to no one.
  • There should be several obvious way to do it because people think in many different ways, and for each there should be a way that matches their thought process.
  • Never is better than now because we don't want to be rushed.
  • Although *right* now is often better than never because we can always change our minds.
  • If the implementation is easy to explain, it's a bad idea because then the programmer could have done it on their own, and we don't need to add yet another idea to the system.
  • If the implementation is hard to explain, it may be a good idea because clearly something neat and magical is going on there.
  • Namespaces honk let's not look like clowns!

It's the UnZen because I also destroy any Zenness when I explain each item. No elegant koans here. And I left out the Dutch one; I didn't feel like picking on some arbitrarily chosen nationality.

But for just about each idea, it seems like there's someone or some project that really does value the opposite idea. They seem to fall into two camps: the first several for cowboy coders and cowboy languages (*coughperlcough*), and the second half are ivory tower programmers and languages (*coughschemecough*). Inverting the error handling reminds me of this article. Complex syntax and special cases reminds me of people who defend Perl as a Huffman coding of programmer intent. Just to name a few.

Anyway, food for thought.

Read: The UnZen of UnPython

Topic: London Python meetup, January 2006 Previous Topic   Next Topic Topic: Plan for (domain name) spam

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use