Click here to Skip to main content
Click here to Skip to main content

Extreme Designing

By , 28 Jan 2005
 

Introduction

I had attended a session on design and architecture recently. One of the topics of discussion was on how design cannot be implemented strictly during the coding stage and so is it really worth spending too much effort on design. This got me thinking. I come from a civil engineering background where nothing gets done right including the estimate, contract terms and execution unless the design is thorough.

I mean you can’t build a new and complex machine/bridge/railway system without a design in place. Design is where the requirements become tangible. The real weakness is that we don't come out with clear design and the shortcomings usually show up while coding. It should be clear to the developers who have to churn out the code. Just drawing some UML diagrams to explain how issues are handled in generic terms is not enough. 'A picture says a thousand words'. But somebody has to now clearly understand it and write those words to recreate the picture in script, plus some.

So I decided to focus on how best to improve the design phase of software development rather than treat it as a necessary evil.

Background

It's true that, in many projects by the time of coding, there is usually a lot of disparity with the design. This happens mainly because we focus only on providing a high level design but never focus on what the developer needs to achieve the expected output. To solve this issue, what we need to do is put more details into the design and not less. The fine detailing (ask a building architect what this means) should be done.

To achieve a pukka design, the real need would be to find a way to test the design and prove that it implements the application requirements and the coding requirements. After all, we test our code so why not the design too. Perhaps the low level design could be compared against the test cases.

Designing extended

To ensure a more complete design, try some of the following in a suitable sequence:

  • Put in the pseudo code.

    By doing so, the designer is actually trying to implement the design. During this process, shortcomings in the design from the coding point of view could be realized. Even programming bits like class fields, properties, constants, enumerators, helper/private functions to do some specific tasks all could be identified while doing the pseudo code. In fact, during coding stage the developer would mostly write language specific code to implement the pseudo code.

    This means we now have a two stage design process. First, do a high level design to implement the general architecture. So design patterns, identifying domain entities, relationship between domain entities and all the normal design work is done first. Then an experienced developer would take the design further by trying to implement the pseudo code for it. This can be considered as a kind of unit testing.

  • Create a traceability matrix

    Map each requirement/specific rules to our design classes/methods. This will help ensure that most issues have been considered in the design. It will also help identify what was left out. Create flow charts and map each node in the chart to your design elements. Again this could be a two stage process. First, the high level business related flow charts are created and the high level design (abstract classes or interfaces) is mapped to it. Then the lower level flow charts are created and specific concrete classes/methods are mapped to it. This can be thought of as a kind of integration testing.

  • Documentation.

    Yes, this is a cumbersome process but it does clear lot of confusion when writing the code for them. So every class, variable, property, method and event's existence/usage is explained so that the coder knows exactly what to do with it. In this way even developers new to the project could get going without having to know in detail the business process and project specific nuances involved.

  • White box testing

    Explain the classes support the workflow/process to your peers and developers involved in the project. This way the designer gets a better understanding of the developer's expectations.

  • Black box testing

    Have people who haven’t got much information about the project to read your design, explain what they have understood from it and how they would implement it.

  • And last but not least, make sure that the coding does not include anything significant that isn’t reflected in the design.

    The design document should be the only reference for coding. Even usage of other coding components, DLLs that are part of the project must be mentioned in the design by referring to the specific design document.

Bottom line

Of course, to ensure that the code does what it was required to do can only be proved during testing. A test driven development process would ensure that your output is right (it doesn’t ensure that you developed it the right way). To take that further, if test driven code was the best way to do things then why not code driven design, design driven requirements and requirements driven customers.

Changes to requirements and design do happen all the time and have to be accepted (within limits). Use UML to explain the design and put in the pseudo code. And pair designing would give greater value than pair coding.

Email me.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

RedSunBeer
Web Developer
India India
achievements: underpaid-underrated-confused
status: Comfortably_Numb

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
Question???memberTutu31-Jan-05 13:38 
Hi,
Do I see more and more article coming out from specific parts of the world where standards are now implemented and they think they just discovered the middle of the universe?
I really don't understand why you always take the approach that "we need a great/perfect design that 1000 dumb programmers can implement".
And "document till you drop, ‘cose programmers are to dumb to understand anything anyway".
"They are just machines, they are not allowed to create, come up with ideas, and their opinion is limited to their cubicle."
But it's a nice try to explain in a 1 page article what others explain in 1000 pages books.
Corneliu.
PS>> Please refrain from using "shortcuts" that only you know to decipher and makes reading of the text harder but they look cool. (gr8,u...)

AnswerRe: ???memberTutu31-Jan-05 13:41 
And BTW what does that "pukka" mean?
I've never seen it in any software related design book .. and a search on Google returned me this as the very first result:
Large Natural Breasts and Nipples - SNOTSYKIMSSNOTSYKIMS. Superior perverts can talk to each other and me at yahoo snotsykim. Note: Pictures on this page should look crystal clear - if not See Here. ...
www.pukka.net/snotsykims/ - 29k - Cached - Similar pages

D'Oh! | :doh:
GeneralRe: ???memberColin Angus Mackay31-Jan-05 14:00 
I always thought pukka was some sort of mockney (mock-cockney, i.e. From Essex but pretending to be from the east end of London) thing.
 

Do you want to know more?
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and Forums

GeneralhinglishmemberRedSunBeer31-Jan-05 19:11 
http://www.bartleby.com/61/19/P0651900.html[^]
 
Rose | [Rose]
AnswerRe: ??? :confused:memberRedSunBeer31-Jan-05 19:09 
There was no implication article that developers do not possess the required abilities to do things on their own. Low level design would most likely be done by developers who would coordinate with the architect(s). The theme of the article was to extend the design so that there would not be much deviation from it in the coding stage.
 
Another advantage of doing the low level design is that it would be easier for a new team member to understand what is to be done and what is being done.
 
Hey, guess who is on some remote desert island in the middle of nowhere Big Grin | :-D .
 
Rose | [Rose]
GeneralExperiences with XPmemberWillemM30-Jan-05 4:03 
What you explain is a variation on Extreme programming. I used this software engineering method in my last project. And well, I have to say it works pretty well. You get a more agile way of working then with other methods.
 
There are a few things I would like to point out on this way of working. Experience is a must in this way of working. People that work with this method have to know what they are doing, otherwise this method won't work very well.
Next, designing in pairs is indeed better than coding in pairs. As long as everybody sticks to the design the program will work, even if you don't work in pairs. And if you don't work in pairs during programming, you get double man-power for creating the code. Designing alone is not doable, you never know everything on your own. So a second mind on the case is always nice Smile | :)
 
WM.

What about weapons of mass-construction?
GeneralRe: Experiences with XPmemberRedSunBeer30-Jan-05 18:14 
Its gr8 to know that used this approach already. It would be worth it if you could publish your experience as a case study for the developer community.
 
Rose | [Rose]
GeneralRe: Experiences with XPmemberWillemM30-Jan-05 20:18 
I will have to discuss that with my fellow developers. But I think they will let me do that Smile | :) .
 
WM.

What about weapons of mass-construction?
GeneralRe: Experiences with XPmemberWillemM31-Jan-05 2:51 
I discussed the subject in the development team, and I got permission to share our experiences on this website. They thought it was a great idea to share it, because they think that other people can learn from the mistakes we made (and the good things of course)
 
WM.

What about weapons of mass-construction?
GeneralCommentsmemberpeterchen29-Jan-05 3:49 
What I like:
- breaking the gap between designer and coder
- The "Design/Entity Matrix"
 
What I disklike:
- to much formalism
 
A good designer must be able to implement what he designs, he must have an eye on "his" coders and their skills.
Complete specification down to each method contract is IMO necessary only if you have the Designers from Ivory Tower, or your coders are better typists, or your team is fluctuating to much.
 
Suggestions - I try to avoid formalizing a process, if it can be "fixed" with some insight and a few simple policies / guidelines.
Rather than skeletoning every method, declare some standard patterns (e.g. RAII vs. Open/IsOpen/Close, Exceptions, etc.), emphasizing design and interface consistency, and understanding the design.
 
Documenting rationales for design decisions is another one - IMO the best investment into a flexible design.
 

Anyway The design/entity matrix sounds interesting. You can quickly see how far certain decisions would reach, detect conflicts, etc. Creating and maintaining it seems to be a pain however.

 

I never really know a killer from a savior
boost your code || Fold With Us! || sighist | doxygen

GeneralRe: CommentsmemberRedSunBeer30-Jan-05 17:28 
Thanks for your feedback. Glad you liked the traceability matrix. If by formalism you mean too strict a process then I agree. It is better for each one to figure what suits them best. "Formalism" may suit the CMM-5, ISO 9002 companies which have a formal/generally accepted process with all the corresponding artifacts.
 
Also could you tell me what IMO stands for. It sounds familiar. Where can I get more information on it?
 
Rose | [Rose]
GeneralRe: Commentsmemberpeterchen30-Jan-05 23:53 
IMO - In My Opinion
 

 

I never really know a killer from a savior
boost your code || Fold With Us! || sighist | doxygen

GeneralRe: CommentsmemberRedSunBeer31-Jan-05 1:59 
Blush | :O Laugh | :laugh:
 
Rose | [Rose]
GeneralOn design...sussAnonymous16-Dec-04 5:39 
A lot of software methodologies are simply wrong because they try to draw analogies from the construction industry with software design mapping to building design and "coding" mapping to construction.
 
This is simply wrong because both "design" and "coding" are equally design stages, just at a different level. The "construction" part of software is what happens when you compile your software and is instant.
 
Any methodology which treats coding as being the construction phase of software development is simply wrong from the start. Coding == design. Just a different level of design to the "design" part.
GeneralRe: On design... give the devil his duememberRedSunBeer16-Dec-04 17:01 
maybe i'm wrong but your suggestion looks like you are taking a dig at construction rather than saying anything of worth. what are your credentials in comparing the two fields.
 
if coding == design let us just dump design permanently. we can just have requirements and coding. IT saves a lot of worthless effort too.
 
if coding == design please fire all the software architects and designers. design patterns now becomes the book for idiots and OOP is what we say when the application crashes. also salaries-- == profits++
 
if coding == design is like going to war without a battle plan. or flying into space without a flight plan. just point your soldiers and pilots in the general direction and figure things out along the way.
 
so what if we end up in hell. i'm sure we can fix that evil too. just rework the contract so that it goes into maintenance and charge it to the customers. i'm sure they understand that money isn't everything.
 
anyway i'll give the (anonymous) devil his due. u may have figured out something brand new and when i get round to thinking (i sometimes do that Smile | :) ) i may start to understand it.
 
Rose | [Rose]
GeneralFrom my experience...protectorMarc Clifton9-Dec-04 0:27 
To solve this issue what we need to do is put even more effort on the design and not less.
 
isn't necessarily true. The design is driven by requirements, and I've found, especially in the engineering field, that:
 
1. requirements are almost constantly changing--different people have different views on the requirements
 
2. the technologies that the engineers use keeps changing which affects requirements
 
3. the engineers themselves can't really explain how they do things or they want things done, so when you show them something they say "oh, that's not what I meant".
 
The design effort has to be well-placed. I've found that the best designs for this kind of an environment are the ones that are very flexible, abstraction is used to the point of almost eliminating OOP, data structures are abstracted so they can be easily modified without breaking other parts of the application, workflows are scripted instead of hard coded, and the application code itself consists of simple, compartmentalized processes with zero entanglement with regards to other processes, data structures, and objects.
 
Marc
 
MyXaml
Advanced Unit Testing

GeneralRe: From my experience...memberRedSunBeer9-Dec-04 1:06 
this concept of design is flexible, gives the structure of the application but gives limited help the coders. so they end up do their own thing and the final 'design' is obtained from reverse engineering.
 
Your concept justifies not putting too much effort into the design but how practical is it from the development point of view. Even specifics need to be explained so that the developers do exactly what is stated in the design.
 
Rose | [Rose]
GeneralRe: From my experience...memberJudd15-Dec-04 0:41 
Even specifics need to be explained so that the developers do exactly what is stated in the design.

 
I'm an engineer who works in Software, so I can see your point. However, I agree with Mark. Having the 'developers do exactly what is stated in the design' means the users end up with what they asked for. In my experience this is rarely what they want, and even less frequently what they need.
 
A generic design methodology is much better - specifying what something should actually do being more improtant than saying exactly how it should be done.
GeneralRe: From my experience...memberRedSunBeer15-Dec-04 2:09 
The issue in the session I had mentioned claimed that since change happens so often the best way to handle it is to continuosly test the new code instead of spending time improving the design.
 
I personally believe that design should be flexible enough to accept change while at the same time give clear inputs to the programmer so that they dont create any class or method on their own.
 
This is why I believe a 2 level design process would help satisfy both flexibility while preventing the programmer from extending the design unnecessarily. Any change should be implemented in the design first. My main concern is to ensure that the design doesnt end up a being meaningless to the developers.
 
Rose | [Rose]
GeneralRe: From my experience...memberColin Angus Mackay31-Jan-05 14:10 
RedSunBeer wrote:
I personally believe that design should be flexible enough to accept change while at the same time give clear inputs to the programmer so that they dont create any class or method on their own.
 
I've worked on a project like this and it is most frustrating. The developer begins to feel that anything that is not perfectly described in the design has to be approved. You begin to wonder why the extra man power was put in place to create a mountain of documentation that is almost at the level of the source code and why not just create the source code in the first place.
 

RedSunBeer wrote:
This is why I believe a 2 level design process would help satisfy both flexibility while preventing the programmer from extending the design unnecessarily.
 
Jeez, you must work on some very very relaxed projects if you (or your developers) have time to extend the design unnecessarily.
 

RedSunBeer wrote:
My main concern is to ensure that the design doesnt end up a being meaningless to the developers
 
From what I see, the rate of change means that most documentation is useless in a matter of months, and is usually going out of date in a matter of weeks. I'm going with Marc on this one and his idea of a more generic design where the detail can be filled in later.
 

Do you want to know more?
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and Forums

GeneralRe: From my experience...memberWillemM30-Jan-05 4:06 
What I do when I am working with a couple of my customers on the requirements is: Make a document in which the requirements are "hard coded". This way everybody knows what to expect from the software. Also this will help when testing the software against requirements. You can make a checklist from the list of the requirements and check off all the items that are done.
 
Everything that's not in the requirements list won't be implemented is my motto, when working with several customers.
 
WM.

What about weapons of mass-construction?
GeneralReinventing the wheelmembermav.northwind8-Dec-04 22:30 
Hi!
 
I couldn't help noticing that the session you've attended must have been a very strange one: A session on design telling you not to use it?
 
The problem you're describing here is as old as software development: The user/customer wants something and the developer has to build it. Without the user telling exactly what he wants the developer can only guess and usually the result is not what the user expected.
 
The steps in between are writing specifications and developing a design of how to fulfil the requirements.
 
There are many ways to do this, for example UP for the process and UML for the notation or structured modelling methods (SA/SD, (S)ERM), which are usually easier to understand for the user.
One of the main problems is that you'll have to find means of communication all stakeholders can understand. With just pseudo-code I guess you'll have problems describing the solution to the user and having the user verify that your solution is what he wants.
 
There are lots of modelling techniques out there, each containing a way to design systems. Why not use on of them?
 
Greetings,
Mav
GeneralRe: Reinventing the wheelmemberRedSunBeer9-Dec-04 1:15 
quality uml diagrams with lots of explanatory notes would be a big plus from development point of view. designers must ensure that the uml diagrams clearly explain the implementation to the developer.
 
Rose | [Rose]
GeneralI Strongly agree With the ArticlememberAshi8-Dec-04 21:48 
what to do when the design changes -> do generate the pseudo code again and test the design or make respective changes to the Code. Confused | :confused:
 
Yes, TDD helps a lot to test the design and code whether it is meeting the requirements
 
Ashith Raj
GeneralRe: I Strongly agree With the ArticlememberRedSunBeer9-Dec-04 1:09 
thanks, better inputs in design reduce poor output in development.
 
Rose | [Rose]

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web01 | 2.6.130617.1 | Last Updated 29 Jan 2005
Article Copyright 2004 by RedSunBeer
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid