Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

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

This weekend I indulged myself in a programming exercise with a difference. Usually, as I program, I keep on testing. So, for example, if I am making a web-based app, I will write a bit of code, load it in the browser and test it, fix it if needed, and then go forward. Call it my "training wheels."

Except, this weekend I worked without any training wheels. I wrote the entire app (was up till some horrendous hour) and didn't test it even once. Of course, when I finally tested it, I had many errors to fix. However, that got me thinking -- just like in a real foreign language class for English speakers, English is not allowed at all, will it make me more careful and better at programming if I don't use any training wheels?

I am a relative noob at Perl, so I seek advice and ministrations from wiser monks. How do you go about it?

  • Do you lock yourself in a room and code till you finish, or do you insure you have plenty of distractions in the way of cats and music and family, etc.?
  • Do you go at it in one shot without getting up, or do you break it up into small phases?
  • And, most important, do you test as you go, or have you become so good that you don't make silly little mistakes such as misplaces punctuation and the like?

How do you write a lot of code while making sure that each smaller component piece is bullet-proof?

Update: I realize that "no on-going testing" in the title goes against the spirit of my final question above. The only way to write a large body of error-free code is to write and test lots of constituent small bits of code. I guess, by testing I hint more at the constant "load in the browser and let Perl complain and tell you what is wrong instead of preemptively not writing what is wrong in the first place."

--

when small people start casting long shadows, it is time to go to bed

In reply to Programming strategy with no on-going testing by punkish

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 sharing their wisdom with the Monastery: (3)
As of 2024-04-16 20:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found