Live data from Hacker News

The Rule of Three

codinghorror.com

11–20 of 31 posts

Re: The Rule of Three

#12
I have a problem with the word reusable. A reusable software should be a component in a larger solution. Not a complete solution itself.

If I accept that Stack Overflow or Discourse are reusable, because you can run them on different urls with different graphics, topic, moderators and users, then every application, for example Photoshop, is reusable in the same way, because multiple people use it to perform multiple tasks with images.

What you do with Discourse is good engineering, but there is nothing special about it. Every serious CMS, like WordPress or Drupal must inevitably be usable more than once.

Re: The Rule of Three

#15
post #7
post #4

At first I thought this might have been a repost of some refactoring advice I heard of long ago. A quick google finds a reference on wikipedia [0]. Essentially it goes like this: The first time you implement something, just do it. The second time you implement the same thing, copy it. The third time, refactor. The OP seems like an interesting variation on the same theme. [0] http://en.wikipedia.org/wiki/Rule_of_three…

This is similar to Jeff's rule "b". The only difference is cause and effect ordering. Jeff suggests you build it, reuse it, and when you reused it thrice in different applications, than call it a general purpose library. It seems to me that Jeff misunderstood what rule of three means, or he's just trying to re-tell the Wikipedia article in his own words. The "Rule of three" you quoted is how it should be done. Create…

> It seems to me that Jeff misunderstood what rule of three means, or he's just trying to re-tell the Wikipedia article in his own words.

Not at all - he's actually making a much deeper point: that something cannot really claim to be reusable until it has actually been used in three different places.

Because if you writer a reusable component for just one product, chances are very high that even if it's technically reusable, it will end up conceptually coupled to that one product too much to actually be useful elsewhere.

Re: The Rule of Three

#17
post #16
post #9

Wow what a horrible way to advertise your products. Disguise your advertisements into some substanceless article seemingly useful.

[deleted]

He's talking about accepting people's money to run Discourse for them.

The software is open-source, so obviously anybody can set it up and use it themselves.

Re: The Rule of Three

#18
post #16
post #9

Wow what a horrible way to advertise your products. Disguise your advertisements into some substanceless article seemingly useful.

[deleted]

It's not an obvious position. They need users for feedback, but don't want to claim their software is fully production-ready.

On http://www.discourse.org/faq/ you get both what just quoted, at the top, and below:

  Should I switch to Discourse right now?

  Probably not.

Re: The Rule of Three

#19
post #9

Wow what a horrible way to advertise your products. Disguise your advertisements into some substanceless article seemingly useful.

Codinghorror is the personal blog of the founder of Stack Exchange. He left that company and later founded Discourse. Why wouldn't he talk about the things he's built and working on on his blog?

Re: The Rule of Three

#20
This is even more true in game development. So many developers making games want to try and make reusable components across games but almost every game is "special" and will require some kind of tweaking to make the component truly reusable.

And then, you've just bloated your component to support different use cases and made it slower, harder to understand, and potentially buggy; all in the name of "reusability". And it takes you 3 times longer to implement this shared component vs just making copy & paste single use solution.

Game development is truly an art. Knowing when to just "get it done" vs "write a more reusable component" is something that I've seen very few people in game development be able to get right.

Post reply on HN