It improved one aspect of it. Theyre the twisted ones not mepytrin wrote:Does this improve their design by default? to me that's a somewhat twisted view to look at things.
What is the essence of good software design
Moderator: General Moderators
Re: What is the essence of good software design
Re: What is the essence of good software design
I found this very insightful. From my vantage point, wordpress and phpBB were the first (or amongst the first) open-source packages to offer the kind of full featured solution that they do, and people used them cause were free and available. With time the surrounding plug-in support (ie, community) grew to such a scale that competing products (better designed?) stood little chance without some serious marketing push, which is not something an OS package usually has.Open source software is notorious for focusing on the developer or tech savvy and yet it is somehow remarmably successful in the end user arena, how? Maybe because it's free and people will put up with a lot more when something is free, such as poor support, bad performance, buggy software, insecurities, etc.
But I wasn't talking about software success or the importance of design to the user, was I? I was talking about the characteristics of design that make it beneficial for the development efforts, since that is its intended customers. Software design is meant to serve developers, not end users. For the same reason graphical designers use grids, typographic rules etc, we use design to improve the development process so we could more easily deliver to our users what they want.It further reinforces my point that the perceived quality of the source code is much less important user, domain, and now market factors. It starts to look more and more like relentless pursuit of the user is key to success.
I don't understand how it keeps going back to the users - users affect requirements which in turn affect design. But the design is there to ease the implementation of the requirements - it is not aware of the users per-se. Many superficially different features can be solved with the same design, and one feature can be solved using many designs. Suppose a project comes to completion and the requirements are met. The quality of design can be measured not by the success of the product - but by how easily were the requirements met, how easy it to change it now or extend it, how easy is it to optimize it and so forth. I think we all agreed that the success of a software product is not related at all to the code that drives it, so there is no reason to keep going back to that.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: What is the essence of good software design
I found it the opposite of insightful. And honestly I think there is little point in responding because we look at software development from completely different contexts. The result is just frustration...pytrin wrote:I found this very insightful. ... I don't understand how it keeps going back to the users ...
(#10850)
Re: What is the essence of good software design
Imagine my frustration - when I started this thread I thought I could discuss the principles of PHP design with some talented and experienced developers. It seemed to be the right place, under "Theory and design" - but it seems here you can only discuss the effects of design on users and on the success of software products.
Thanks again for your input. I meant no offense in any of my posts, hope you took it at face value.
Thanks again for your input. I meant no offense in any of my posts, hope you took it at face value.
Re: What is the essence of good software design
While I agree with this paragraph somewhat, for instance yes: you can meet the same set of requirements with many designs. However, my argument is simply that the whichever design more closely resembles the reality context of it's users has the better design. For instance the requirement might be that you need to be able to assign people to houses in a publicing housing management system. One design could be that you assign the people to the chimney. Your customer would probably call you a smartass when you told him that you met all requirements because anything that belongs to the chimney also belongs to the house.pytrin wrote:Many superficially different features can be solved with the same design, and one feature can be solved using many designs. Suppose a project comes to completion and the requirements are met. The quality of design can be measured not by the success of the product - but by how easily were the requirements met, how easy it to change it now or extend it, how easy is it to optimize it and so forth. I think we all agreed that the success of a software product is not related at all to the code that drives it, so there is no reason to keep going back to that.
Then let's say your competitor modeled the house tenants reality from a different perspective. Since he understood the problem, his software assigns people to the rooms of the house instead of the first part of the house that popped into his head [the chimeny]. Now lets say this software takes 5 seconds longer to run and and the light switches of the house emit sparks
Likewise the materials the chimney, walls, etc.. was made out of would be a part of the design ( as a metaphor of your coding metrics ), but if my house designer put the toilet next to the fridge, I couldn't give 2 craps about the chimney, frankly I'd be pretty ticked off at the house designer.
So I guess what I'm saying is don't stuff your user's into their chimney
( I'm using you / the competitor just to make it easier to follow, not saying you make that big of design mistakes, but we all make some and they add up over time to irritate users )
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: What is the essence of good software design
Agreed. I think it's funny how each of us are disscussing different phases of the SDLC and trying to come to a common agreement.Imagine my frustration - when I started this thread I thought I could discuss the principles of PHP design with some talented and experienced developers. It seemed to be the right place, under "Theory and design" - but it seems here you can only discuss the effects of design on users and on the success of software products.
I'm like you, I'm not disputing the fact that user experience is everything in the success of a project, but it does depend on you define success.
If you develop for educational purposes, then the cleanest design is probably what dictates "success" - not pleasing your end users. However, in thie case, you as the developer are the end user, so "in essence" that project would be successful too.
What I find most interesting is arborint's insistence that user experience is everything, when he is typically the first to judge anyone's "design" when it's proposed on this forum. Either he has experienced a traumatic fall and forgot, what it is we do here, or he has had a change of heart and wants to see crappy software like WordPress propagate the Internet. LOL
Useful or not is subjective and highly debatable. I use WordPress for my own blog and all I have experienced is problem after problem but like I said, it's free and I can't really complain so I deal with it. If I were paying, absolutely they'd hear from me.
You keep stressing "reality" and yet counter argue with that?One design could be that you assign the people to the chimney. Your customer would probably call you a smartass when you told him that you met all requirements because anything that belongs to the chimeny also belongs to the house
How stupid do you think I am? (don't answer that)
What makes you think I'm going to "design" software in such a way it's useless to my users? And MOST importantly...why can't I satisfy *all* of my user requirements/specifications AND develop rock solid software? With less bugs, more secure, better performance, more standardization, etc, etc???
Cheers,
Alex
Re: What is the essence of good software design
What I find most interesting is how personal this has come. We must take these issues pretty seriouslyPCSpectra wrote:What I find most interesting is arborint's insistence that user experience is everything, when he is typically the first to judge anyone's "design" when it's proposed on this forum.
Re: What is the essence of good software design
I understand what you are saying. Misinterpretation of requirements is something that happens in every project, and certainly you could say the requirements were not met. However in the examples you suggested, it seems more like an implementation issue - with the right design it should be easy to correct, and with a bad design it would mean rewriting significant portions of the code. Those kind of issues test the quality of the design in my opinion.While I agree with this paragraph somewhat, for instance yes: you can meet the same set of requirements with many designs. However, my argument is simply that the whichever design more closely resembles the reality context of it's users has the better design. For instance the requirement might be that you need to be able to assign people to houses in a publicing housing management system. One design could be that you assign the people to the chimney. Your customer would probably call you a smartass when you told him that you met all requirements because anything that belongs to the chimney also belongs to the house.
It was actually Spectra who suggested metrics as validation of a good design. I suggested less measurable qualities, such as code maintainability, extendability, readability etc. Those are obviously subjective, but I think there are several practices and solutions than have been shown to increase those qualities.
Continuing with your house metaphor (doesn't everybody loves metaphors?
By the way, I used to live in an apartment where the toilets were next to the kitchen.. and I had no chimney, so go figure
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: What is the essence of good software design
There are some houses with toilets by the fridge...their called low rental bachelour pads...I've lived in one.Likewise the materials the chimney, walls, etc.. was made out of would be a part of the design ( as a metaphor of your coding metrics ), but if my house designer put the toilet next to the fridge, I couldn't give 2 craps about the chimney, frankly I'd be pretty ticked off at the house designer.
Again, subjective. You'd be terribly <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> if the designer or contractors installed insulation with absestos or they failed to install fire alarms or they use termite infested wood.
The point is...some design choices are not that cheap and easy to fix and some are critical mistakes.
Let me now draw on the analogy I often use (because I'm a huge aviation nutt and wannbe pilot). If the designer of the MD-80 had anticipated the failure of a single jack screw in the horizontal stablizer would result in catastrophic events and *corrected* the problem at design time as opposed to later having to retro-fit all MD-80's, some 88 lives would have been spared:
http://www.aviationweek.com/aw/generic/ ... w%20Issues
I know failure in my software will not likely result in anyone's untimely death but I take what I do very seriously. While no one will lose a life, they might certainly lose some data (which can be extremely valuable and hard to replace). In fact I would wager most computer users would value their data more important then their software.
So while you might be able to go back and retrofit your apartment and fix those blinking light switches, if the house burns down and everything is lost, your user would probably prefer a safer, more fire resistent apartment with effective ergonomic design.
I don't take it personally...but I do take it seriouslyWhat I find most interesting is how personal this has come. We must take these issues pretty seriously
Cheers,
Alex
Re: What is the essence of good software design
Something you don't hear everydaythe failure of a single jack screw in the horizontal stablizer would result in catastrophic events
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: What is the essence of good software design
I'm always interested in hearing/learning about these but to avoid unnessecary argument I will not argue I will only ask, like what?I suggested less measurable qualities, such as code maintainability, extendability, readability etc. Those are obviously subjective, but I think there are several practices and solutions than have been shown to increase those qualities.
Can you give some examples of your own best practices, or personal experiences?
Re: What is the essence of good software design
This is true, I'm just saying you can spend all your effort considering wind directions and overlook something as obvious as the toilet/fridge issue. In this sense they all contribute to the design.pytrin wrote: I consider the blueprint of the house, the laying of foundations, the considerations of what land to build on, wind directions etc, as the "design" of the house as it correlates with code design. Suppose the chimney was modular and could be moved around, you could say the design is good for allowing the chimney to be replaced on a whim.
What if you were building a training house for the fire dept. and a requirement was for it to burn down. In this sense the different context takes the whole design direction and flips it around. That's all I'm sayingpytrin wrote:So while you might be able to go back and retrofit your apartment and fix those blinking light switches, if the house burns down and everything is lost, your user would probably prefer a safer, more fire resistent apartment with effective ergonomic design.
Me too, you ever flown? The new G1000 all glass cockpits are great ( great designI'm a huge aviation nutt and wannbe pilot.
Re: What is the essence of good software design
When I design, I'm concerned with A. Maintainability and B. Development speed. I want to be able to develop more features in less time, while writing code that is easy to maintain / change / extend / optimize (all of those I consider maintainability), not only for me but for other developers that might be working on the same source code. In order to achieve this I employ the following practices (some of those might sound very basic, but I'm not making any assumptions):Can you give some examples of your own best practices, or personal experiences?
1. Coding standards - I think it's very important to pick standards you are comfortable with and stick with them almost religiously. Coding standards help normalize the structure of code, increase readability and maintain consistency throughout. I use the PEAR/ZF coding standards - http://framework.zend.com/manual/en/cod ... style.html. Commenting is a part of that, and I use the phpDoc block comment style.
2. Scoping and modularization - Separating different parts of the application into separate "modules" and making sure each runs in a separate, clean scope is very important for maintainability. For this purpose I model everything in classes (I consider OO to be the best scoping mechanism PHP has to offer), separate functionality as much as possible to different methods, and make sure the absolute minimum runs in the root application scope.
3. Code reuse - as much as possible, reusable code should be encapsulated and de-coupled. I use inheritance where needed, composition where possible in order to put together functionality from reusable building blocks. This affects both maintainability and development speed - if you can control repeating logic from one place you can make changes much easier, if you can reuse logic - you save development efforts.
4. Framework(s) - A natural lead off from code reuse. When the most generic, repeatable logic can be separated from domain implementation, it should be put together in a framework. When those reusable logic blocks can be reused in other projects, they save a ton of time in development. I'm not promoting any particular framework (I use ZF by the way
5. Tests - (Unit) Tests help raise the quality of code by validating certain aspects of it repeatedly and quickly. Testable code usually exudes other desirable qualities - such as high decoupling and better interface. Tests help protect against change and help the refactoring process (which is another important part of development).
6. Design patterns - Using widely accepted good (best?) solutions when appropriate instead of trying to roll your own each time in my experience is very beneficial. Design patterns are reusable (hence I should probably have this solution in my framework
7. Domain modeling - I usually start by modeling the structure of the storage system (if one is present). In most projects, this means I start with my database modeling and later model my domain classes after that structure. I find this usually helps flesh out the relationships inherent in the domain and most often some refactoring as those relationships reveal themselves.
8. Refactoring - I refactor my code constantly to help it increase in the qualities I mentioned - readability, reusability, maintainability etc.
There are probably some things I forgot, but those are my main practices as I design and implement my code.
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: What is the essence of good software design
Not in a developer forum, nope.Something you don't hear everyday
I'm torn to which industry I appreciate more...software or aviation. I love flying I think the engineering is nothing short of amazing. Watching the wing of an aircraft begin generating lift and taking flight...hearing the sound of an turbine engine spool up....the feeling of power as you get kicked back into your seat as you accelerate from zero to 200kts in less than a few seconds...
It literally brings tears to my eyes...as does beautiful software or an injured kitten...haha
That was me that said that BTW. Obviously requirements are taken into consideration.What if you were building a training house for the fire dept. and a requirement was for it to burn down. In this sense the different context takes the whole design direction and flips it around. That's all I'm saying
Houses designed for fire fighters...are rarely "designed" to burn to the ground...only the contents are...usually when firefighters burn a building to nothing it's a dilapidated house condemmed by the city and donated to the fire department as a training excersize.
Standardized fire fighter training facilities are actually quite fire retardant -- I live about 5 kilometers from one so I see it go up in flames all the time and it's been standing for well over 20 years.
My Dad works for Air Canada so I've flown many times in my life. I was in Air Cadets as a kid as well so I've been in planes of all sizes, piloted a few, etc. I went for a familirization flight a while back...it was a very moving experience for me.Me too, you ever flown? The new G1000 all glass cockpits are great ( great design )This is true, I'm just saying you can spend all your effort considering wind directions and overlook something as obvious as the toilet/fridge issue. In this sense they all contribute to the design.pytrin wrote: I consider the blueprint of the house, the laying of foundations, the considerations of what land to build on, wind directions etc, as the "design" of the house as it correlates with code design. Suppose the chimney was modular and could be moved around, you could say the design is good for allowing the chimney to be replaced on a whim.
What if you were building a training house for the fire dept. and a requirement was for it to burn down. In this sense the different context takes the whole design direction and flips it around. That's all I'm sayingpytrin wrote:So while you might be able to go back and retrofit your apartment and fix those blinking light switches, if the house burns down and everything is lost, your user would probably prefer a safer, more fire resistent apartment with effective ergonomic design.
Me too, you ever flown? The new G1000 all glass cockpits are great ( great designI'm a huge aviation nutt and wannbe pilot.)
Now pilots share a camaraderie...in WWII it was not uncommon for Pilots to let the enemy off the hook when it was clear they were out of ammunition (between the Germans and Allies anyways) or having trouble maintaining flight. I watch DogFights on History all the time...it's crazy some of the stories I've heard of the guys waving to each other depiste being mortal enemies...
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: What is the essence of good software design
While I agree with everything...it's hard to disagree with anything as the statements are to general. I know I said I wouldn't argue but without debating, how does one learn from others?There are probably some things I forgot, but those are my main practices as I design and implement my code.
I could say I keep my code clean...but what that means exactly is debatable.
However if I say, I keep my code clean and on average my files are less than 100 lines and classes never exceed 10 methods. While it's not a gaurantee, it does give some idea as to the amount of atomicity of my classes and modules.
Do you keep more than one class per file? How many comments/line of SLOC does your codebase have?
These are tangible metrics which while not perfect, certainly are more indicative of "clean" design if we all agree that "clean" means:
1. Easy to read code
2. Modular code
3. Atomic classes
4. Simplicity
And so on and so forth.
Cheers,
Alex