[BangPypers] designing programs
steve
steve at lonetwin.net
Fri Jun 25 08:08:46 CEST 2010
On 06/25/2010 11:04 AM, Kenneth Gonsalves wrote:
> On Friday 25 June 2010 10:57:00 Elvis Joel D'Souza wrote:
>> > program
>> > has to do something one has to sketch out the data structures and
>> > functions that are needed to get the thing done with the least possible
>> > effort.
>>
>> I think you are referring to Design Patterns
>> Head First Design Patterns can help...
>> http://oreilly.com/catalog/9780596007126
>>
>
> I am not referring to Design Patterns - I think flow charting is the word I am
> looking for
Like Noufal said, nothing beats pen and paper. What I usually do is:
a. Draw boxes -- Start from the most high-level components that you can identify
and draw separate boxes for each one. Connect them up with lines to describe
relationships. Then start with each individual box on a new piece of paper and
break it down the same way.
b. Sometimes it helps to draw a mind map[1]. There are of course mind mapping
software too. Google for those.
c. Once i reach a point where drawing boxes and maps doesn't make things any
clearer and the only thing that will clarify it further is code, I make a
skeletal file+class+methods -- if possible, I also write test cases (with the
skeletal classes/functions returning dummy data so that tests pass).
d. I start coding :).
The problem with trying to create a complete and authoritative design using
formal tools is, the design just gets obsolete almost as soon as you start
coding, since updating the design to reflect changes introduced by reality (as
opposed to abstract ideas, which is what one works with during design) is
painful, nobody does it (at least not by the end when the product is almost ready).
Here is something I'll always remember because it changed my thoughts on the
matter of design completely:
http://www.developerdotstar.com/mag/articles/reeves_design_main.html
hth,
cheers,
- steve
[1] http://en.wikipedia.org/wiki/Mind_map
--
random spiel: http://lonetwin.net/
what i'm stumbling into: http://lonetwin.stumbleupon.com/
More information about the BangPypers
mailing list