Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Of course, it depends on the size of the project, but I usually do something similar. I think of what my program needs to acomplish, but usually don't write it down for most tasks(but that's just my style; I have a good memory). I think of some options, well many admitingly, before I begin coding, but I don't implement them untill I have the basic code working.

I started in C/C++ studying OOP, so as a result, most of my code is well encapsulated, and easy to adjust and add features to. I like to design my programs by what is called a "bottom-up"(as opposed to a "top-down") approach. This means that I first design the functions, and make test drivers (simple code to "simulate" what the main program will do) which test the functions and make sure they do what they're supposed to.

From the drivers, it makes it easy to see what's going on at an early stage, and to adjust the algoritms and logic accordingly. Once I've got all the functions all working as they're supposed to, I combing them together and work on a more permanent main program(I guess I call it that since in C/C++ it is called main :)

That's just my personal approach, but for me it works best because it allows for easy and quick updates and it doesn't require a lot of debugging all at once(because that's what I did all along with the test drivers). It also, because I tend to encapsulate the data anyway, makes it easy to change the code into a module, if need be.


In reply to Re: Coming up with code design by dimmesdale
in thread Coming up with code design by zdog

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • 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> <u> <ul>
  • 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 intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-03-28 20:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found