The Pragmatic Craftsman :: Simplicity from complexity : by Stanley Kubasek ::

Your Code Sucks

Most likely, it does. Here is an article, Why Your Code Sucks by Dave Astels that will tell you why it does. Read the article as I think it’s great. After you read it, make sure you verify your code according to all of the points. Dave says that your code sucks if it meets the following criteria:

1. Your code sucks if it doesn’t work.2. Your code sucks if it isn’t testable.3. Your code sucks if it’s hard to read.4. Your code sucks if it’s not understandable.5. Your code sucks if it dogmatically conforms to a trendy framework at the cost of following good design/implementation practices.6. Your code sucks if it has duplication.

So, I ask you, does your code suck?

I think some of the code that I write sucks because it isn’t very easily testable. I think, though, that it is hard to test web applications and that’s the main reason behind it. I’m trying to find an easy way to do that so I can eliminate it. I agree with the author, your code should be easily testable. As far as the other points are concerned, I would say that my code is easy to read, easy to understand, and it does not have any duplication. I take extra care in those areas.

Related Posts

Favorite Quote

Topics

Tags

Archive

Currently Reading

Shelfari: Book reviews on your book blog

:: The Pragmatic Craftsman recommends

:: The Pragmatic Craftsman book reviews

Info

© 2001-2012 Stanley Kubasek About me :: Contact me

Me on Twitter

@leszekgruchala Good to hear it's fast. Looking to upgrade to IntelliJ 11 soon. - 2 days agoPutting related classes together is another way of looking at "structuring your code by feature." Makes your code more cohesive. Big + imho - 11 days agoplanetgeek.ch » Structure your code by feature - http://t.co/KcpMBKVg (via @sociablesite) #sociable - 11 days agoTell Congress: Don’t censor the web! http://t.co/ZEkgOAW7 - 18 days agoI must admit, I'm one of those developers that doesn't know too much about WeakReferences in Java. http://t.co/HjW7v9e0 Time to change that. - 19 days ago

»see more

Recent Entries