Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I hope this doesn't sound too rude, but the way you've described reeks of having no forward planning or idea of where you want your code to get to. Code shouldn't have to be 'turned into' a module; it should have been planned to be a module or modules in the first place.

Even for apparently trivial projects, you should spend some time thinking about how it breaks down into packages/objects before you start to code. You should look on CPAN, PerlMonks, StackOverflow etc to see if anything similar has been done before. With a little luck you may not have to write a line of code yourself. I think the mark of a good developer is not how many lines of code he/she produces, but how much of the problem he solves using existing solutions.

Also you should have some method of verifying your code does the job it is supposed to. Look at Test Driven Design as a methodology, and Test::Simple and/or Test::More as potential packages to ensure you have Unit tests to verify your package does the job it is supposed to.

Also have someone else look at the problem or code. A second pair of eyes often confirms that you are a Programming God, or points out a better way, from which you can learn. Both results are good. :-)

If you spot any bugs in my solutions, it's because I've deliberately left them in as an exercise for the reader! :-)

In reply to Re: Developing code to be a module by space_monk
in thread Developing code to be a module by rpnoble419

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 lurking in the Monastery: (3)
As of 2024-04-19 20:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found