Modular design does help. But how do you go about deciding how to begin with your coding. How do you begin the design process? Do you just jump in and start coding? Or do you first think about all the requirements the software is supposed to meet and then sketch out a model? That is kind of what I am getting at. How do you approach the software design process and what tools do you use to do it. Do you like to use UML to model you Obect oriented classes and program flow? What do you and the others here do?
Personaly, In the past I have just thought about the problem briefly and the requirements that the program is to meet. Then I start coding. I begin with usually a main loop or such and that consists of subroutines that have not been created yet. In this way I begin to develop the stucture of the program. Then as I create the subroutines or packages that program uses, I tend to start by handling the error casses. I make sure that the subroutines handle all the error cases first. I dont actually put logic into the subroutines. I just have them die if they do not get called properly or with the incorrect type/kind of parameters and then return with valid or required response. This way I get all the needless design error handled before messing with the more dificult code. Once all the possible error situations are handled and the main loop/section of the program is working properly I begin to code the logic for the subroutines. Up to know, this has worked quite well but is obviously lacking proper time spent on requirements, and design.
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.