but without a folding editor, it can get ugly

I'm curious... Do you have a folding printer? A folding 'grep'? Folding revision control diff/log/pickaxe tools? A folding merge tool? Do you never do anything with code other than "edit" it?

Even the old argument of "nobody updates the documentation unless it is within a few lines of the code that it documents" doesn't make sense for tests... unless you rarely run your tests.

I think I'll stick with keeping my test code in a separate directory tree and running the tests at least before any release / deploy. I like to be able to pickaxe for any changes to calls to the fooBiff() method either excluding test code, or including test code, or only in test code. I like being able to tell that nobody touched the Foo::Biff implementation in this release. I like to be able to see how much work is being spent on fixing unit tests, especially when the immediate implementation wasn't touched.

Do you just hardly ever do such things? Or do you not find having your test code jumbled around with your implementation code makes such things much harder? Or do you find it harder but find the juxtaposition of test and code outweighs such hurdles?

I think somebody should write a "merging" editor feature so you can keep your different types of text in separate files for all of your tools that aren't your editor and then teach your editor how to shuffle the appropriate parts of the disparate files together on the screen when editing. :)

- tye        


In reply to Re^2: How to get started in test first programming without writing modules? package ? (folding) by tye
in thread How to get started in test first programming without writing modules? package ? by Gulliver

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.