Showing posts with label Joel Spolsky. Show all posts
Showing posts with label Joel Spolsky. Show all posts

Thursday, March 26, 2009

Why I Don't Like SOLID Principles

SOLID princples:
  • Single responsibility principle
  • Open-closed principle
  • Liskov substitution principle
  • Interface segregation principle
  • Dependency inversion principle
This topic has been discussed to death in the tech circles, thanks to the whole tiff started by Jeff Atwood and Joel Spolsky. I'm just throwing my piece in the ring:


SOLID is good.
SOLID is not gospel.

The first rule of programming should be "use your brain." The first answer should always be "it depends." SOLID is not a silver bullet (because, as we know, there is no such bullet). There are going to be times where you need to write some code that is not pretty. Sometimes we acrue technical debt for valid reasons. Usually the reason is we need to implement some feature or bug fix fast, possibly because we're losing customers.

It really comes down to what Jeff said: "Quality really doesn't matter that much, in the big scheme of things." What matters is what we deliver to the customer. Of course, good code quality helps you deliver more and better apps to the customer. But the customer does not care that you followed the SOLID principles to the letter as long as the product is right.

Monday, January 12, 2009

Just Let Me Buy the Thing Already!

Most technically people I know hate talking to sales guys, preferring to instead do all their own research and buy from a website. I'm going to share a short story with you all about sales people.

A small web business decided to move from rented servers to owned servers, so the owner bought several server machines and rack space. He decided to save money by buying the hard drives and memory separately from the servers. However, when the server arrived, it did not come with the necessary drive rails for the hard drives. The company did not sell the drive rails, only the hard drives themselves with rails attached... for hundreds of dollars each!

If you follow the Stack Overflow podcast or blog, then you know that this owner was Jeff Atwood, writer behind codinghorror.com and cofounder of Stack Overflow. He ended up buying the drive rails on EBay for the right price, so the story ended well. But when I read his story, it reminded me of an exchange on the SO podcast I heard earlier. Jeff and Joel discussed that Dell sales guys give you a better deal than the website, and that "Dell is paying me [Jeff] to talk to a sales guy, and they are paying the sales guy a commission" (paraphrased).

I think they misunderstand why Dell wants businesses to talk to sales guys, and the story at the top of this post illustrates Dell's thinking. Companies want you to be happy with your purchase. They want you to buy from them again and to tell all your friends/coworkers/everyone how awesome your company is. The sales guys want you to be happy with your purchase so you don't return it and cost them their commission. So everyone at the company wants you to be happy with your purchase.

And they know things! They know how many drive rails come with each server unit and if replacements are available. They know if the laptop you want comes with a replaceable motherboard. They know the answers to the questions you didn't know to ask. And they know that happy customers are worth 5-10% off the bottom line.

The moral of the story is twofold. One, Dell knows what it's doing. It didn't rise to be the #1 seller of computers because of their pretty colors. Two, that people should consider talking to sales guys before making a purchase, no matter how much research they did. [UPDATE: Joel actually mentions this to Jeff in podcast 35, so he's still cool.]

Important caveat: this only goes for legitimate companies concerned with their reputation. Vince from ShamWOW doesn't care if you're happy because he got his $19.99 plus S/H.
All rights reserved. Take that!