Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
two words: write tests.

  • test the current functionality of one script
  • once all tests pass, refactor the code. DO NOT add or change functionality.
  • make sure the code passes all tests
keep a copy of all this work. then...

  • modify/add tests to represent functionality you expect
  • modify your refactored code to pass the tests
show the team the old code, the tests, and the refactored code. presumably, the tests will show things that shouldn't be. then show them the new tests, and the new code that passes all tests.

buy a copy of The Pragmatic Programmer for the office, and encourage teammates to read it.

this is precisely what i've done at my current job, except i'm doing it in ksh. i wrote a test library, and have written test cases (in my spare time) for 1100 lines of ksh. i've successfully refactored the code and passed a full suite of regression tests. i've modified the tests to match expected functionality, and am in the process of modifying the code to pass all tests... all the while making the code more reliable and reusable. and i'm training the team on performing tests and using my test library, so when i leave, they'll continue what i've started.

if all that doesn't work... i'm out of suggestions.

~Particle *accelerates*


In reply to Re: OT: Job Advice by particle
in thread OT: Job Advice by abaxaba

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 having an uproarious good time at the Monastery: (7)
As of 2024-04-23 18:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found