Here's some pointers transferred/adapted from my driving teacher, my programming teachers and... recommendations on taking <ugh!> Microsoft tests:

1. Know what you're doing. You should know quite clearly what you want this program for and what it should do. Otherwise, you shouldn't be writing this program...

2. Write the program logic down (use plain <your language here>, pseudocode, block diagrams etc., but on paper. Not everyone can do it nowadays, but if you can, it will help you...

3. If you can, write the code down (again, on paper). You can always scan and OCR it later... Often, you will see a design flaw or something that needs redoing, and often it is very hard to find it in code when it's on computer (or maybe, it's just me coming from that old generation of people who actually read paper-based books)

4. Code (on a computer). Include enough comments so that you won't get lost looking at this program three years later. If you feel like a technical writer and don't care about your job security, make extensive documentation...

5. Test. If everything goes well on the first try, re-check the program - something is definitely wrong ;) (remember Murfy's laws?)

6. Put into production. Don't forget to keep the source in case the company will want to fire you later and you will have to use threats and blackmail to get your severance package out of them...

--------------------------------
An idea is not responsible for the people who believe in it...


In reply to Re: How to write programs? by bofh_of_oz
in thread How to write programs? by artist

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.