YouTube home Comedy Week on YouTube
Upload

Stop Writing Classes

NextDayVideo NextDayVideo·533 videos
6,899
59,356
Like     Dislike 33

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to like NextDayVideo's video.

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to dislike NextDayVideo's video.

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to add NextDayVideo's video to your playlist.

Published on Mar 15, 2012

Jack Diederich
Classes are great but they are also overused. This talk will describe examples of class overuse taken from real world code and refactor the unnecessary classes, exceptions, and modules out of them.

  • Category

  • License

    Standard YouTube License

Loading icon Loading...

Loading icon Loading...

Loading icon Loading...

The interactive transcript could not be loaded.

Loading icon Loading...

Loading icon Loading...

Ratings have been disabled for this video.
Rating is available when the video has been rented.
This feature is not available right now. Please try again later.

Top Comments

  • Soshize

    WTF?!: "Seperation of Concerns, Decoupling, Encapsulation, Implementation Hiding - I haven't used these words in 15 years, anyone who uses these words is trying to pull a fast one on you, it just doesn't come up"

    · 44

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Soshize's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Soshize's comment.
  • James Schneider

    Just because abstract classes and formal interfaces aren't native to Python doesn't mean Python programers can't implement the good design principles they help enforce. We're talking about good design here. Replacing crappy classes with crappy functions doesn't really improve the design/code at all.

    · 30

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate James Schneider's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate James Schneider's comment.
    in reply to p34cekeeper (Show the comment)

All Comments (50)

Sign in now to post a comment!
  • John Doe

    He's giving a talk as if he was a real programmer.

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate John Doe's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate John Doe's comment.
  • gueneykerim

    I don't really get the Muffin API. If he could do it so easily, why get a third-party API in the first place?

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate gueneykerim's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate gueneykerim's comment.
  • ulogacms

    LOL!

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate ulogacms's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate ulogacms's comment.
  • Talaxy

    Interesting but a little subjective.

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Talaxy's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Talaxy's comment.
  • cranespud

    I advocate for good design and structure, but also I strongly agree with not over design, one should plan for the future but not invest too much effort on it. for example I'll model this as a class because it has a good chance to be overload or subclassed, but I'm not creating the whole inheritance structure.

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate cranespud's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate cranespud's comment.
  • zendakk

    Go troll elsewhere.

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate zendakk's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate zendakk's comment.
    in reply to ChesterDoraemon (Show the comment)
  • GathGealaich

    "1: Mostly no point in abstract base classes in duck-typed languages."

    Especially in those in which can have mixable traits. (Well, perhaps they could be used for documentation purposes, I don't know.)

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate GathGealaich's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate GathGealaich's comment.
    in reply to advance512 (Show the comment)
  • advance512

    But, this guy also has some silly points:

    1: His Web API is simple, but it doesn't tell the coder what verbs/nouns exist. This requires looking a documentation instead of using auto-completion lists.

    2. All of the "words he hasn't used in 15 years" allow for using 3rd party modules a lot simpler and quicker for most devs.

    3. His implementation of the Game of Life is very clever, but it will be a maintainence nightmare as it just seems obfuscated, and changing certain parts of it will suck.

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate advance512's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate advance512's comment.
  • advance512

    Hmm, this guy has some good points.

    1: Mostly no point in abstract base classes in duck-typed languages.

    2: No point in making function objects (functors) when there is no interface concept.

    3: Less code is mostly better, but only if it is simpler.

    4: Preparing the code for the future is ok, if it requires minimal effort. Otherwise it is pointless.

    5: Namespaces should not be abused. But they are helpful sometimes, for organization purposes. In auto-completion lists they are crucial.

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate advance512's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate advance512's comment.
  • Loading comment...
Loading...
Loading...
Working...
Sign in to add this to Watch Later