Stop Writing Classes

Posted: May 29, 2012 in External Link, Python
Tags: , , , , ,

I’d like to share a video with all of you. it comes from the 2012 US PyCon by Jack Diedrich.

Although talking about Python, there are some hints and terms that can be applied to every other language. He starts saying:

Products are not made by code, are made by features… We don’t have customers because we have lots of code; we have customers because we have lots of features… try to reduce the number of code lines.

I hope you like it:

if you want a subtitled video in any other language, go here.

In summary:

  • A class with 2 methods and one of them is an __init__ is not a class. Convert it to a function.
  • Don’t create new exceptions if you don’t need it (and you won’t).
  • Refactor
About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s