Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Inspired by this question, I started wondering - is there or has there ever been such a thing as a "well designed application"? One where the architecture would be perfect and no refactoring would ever be needed; code would be easy to read and understand even for someone new to the project; changes could be done with a 100% certainty that they won't break anything; etc?

I must admit that whatever codebases I've worked with, they've all been more or less a mess. Even code that I start myself only stays organized at the start, and then slowly deteriorates as the time passes. I'm even starting to accept this as part of life and can't figure out whether I should be worried about that or not.

So... is there such a thing as a "well designed application"? Or is all our code so shitty that there isn't even a point in trying to make it better, because it will never be good anyway?

share|improve this question

closed as primarily opinion-based by gnat, MichaelT, GlenH7, Dan Pichelman, Bart van Ingen Schenau Oct 13 '13 at 10:37

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

5 Answers 5

up vote 6 down vote accepted

Always fix broken windows

That way your code will continuously improve and reach that nirvana we dream of.

It can be done - I have experienced it myself.

share|improve this answer
1  
Or at least, get very close to the pearly gates. –  Sergio Mar 3 '11 at 16:07

Well, I've ceirtanly never seen anything like this:

One where the architecture would be perfect and no refactoring would ever be needed; code would be easy to read and understand even for someone new to the project; changes could be done with a 100% certainty that they won't break anything; etc?

Having said that, I did work on a couple of very well designed projects. Both were very modular and imposed the principle of a single responsibility. The one I liked better was somewhat simpler - no home-built component system, less implementation inheritance, more compile-time checks.

But yeah, other than these two projects, everything else I have ever seen is a mess.

share|improve this answer

I have a couple of times. In fact, in my current project we just had to change the way we connect to the database, and I was able to make the (fairly significant) change in only a couple of days. The database code was modular, well-factored (we used the Strategy pattern to isolate DB-specific sections) and we were careful to always call it through interfaces. Abstraction and design patterns FTW!

share|improve this answer

There are some basic elements of good design, but many are subjective and relative to the current use of the application, the team that built it, those who have to maintain it, and the future implementation (Good luck knowing that.).

Polymorphism is great until it becomes too complicated. Your 45 character function is clear, but it's a pain to type.

I saw an app written in Basic for MSDOS. Elegant code for it's time. Sold it to hundreds of customers and in 8 years never changed the main data structures. Someone decided it needed a GUI and completely rewrote it in VB. This steaming pile of mess took almost a year just to get the major bugs worked out.

Just think, no matter how good your code is, it will eventually get thrown away. 99% of all iPhones will end up in a landfill.

share|improve this answer
    
And on the other hand - I'm currently working on a 15 years old app that has survived several platform upgrades (currently stuck on Delphi 5, but trying to migrate to Delphi 2010), and is selling strong. Ehh... sometimes world sucks. :P –  Vilx- Mar 3 '11 at 14:18

I've never run into a perfectly designed application, but I have come across blocks of code that seem immaculately produced. Because most applications involve many developers and "perfect" is such a matter of opinion when it comes to code that it's impossible to build an application perfectly.

Although, I can't think of a single improvement that could be made to the "Hello World!" application. That one seems to meet all of its requirements perfectly.

share|improve this answer
1  
Well, obviously trivial apps like "Hello World!" are outside of the scope of this question. –  Vilx- Mar 3 '11 at 12:11
    
@Vilx - Well, obviously it was a joke. –  Joel Etherton Mar 3 '11 at 12:18
    
Well, obviously, I fail @ recognizing a joke. :P –  Vilx- Mar 3 '11 at 12:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.