Hello monks...
Awhile back I
asked for some help with some code for an article I was writing for Better Software magazine (formerly Software Testing and Quality Engineering). I got some great comments and suggestions.
Some background on the theme here: many software testers today are in fact UI or domain experts. However, the software testing culture is shifting and is starting to value programming and sysadmin skills more than UI and domain expertise. Many testers are facing an uncertain future in the industry unless they can pick up some very basic programming skills.
My article was intended to outline a common testing problem that can not be solved manually, then demonstrate a solution to the problem with a script that was easy for a newbie to understand. My scripts, while not too technically excellent, are readable (I hope) and show some nice features of Perl that should be attractive to a newbie. (I was a bigger newbie when I wrote these, I probably would have written them slightly differently today.) Like the man said, there's nothing wrong with Baby Perl.
Anyway, they show some nifty things about Perl:
CPAN and modules: File::Find and List::Compare, both pretty intuitive
open.. or die()
for loops
lc()
unless () (very readable and nifty in this context)
simple regexes
print
The article isn't on the web yet, but
here's the TOC with a summary of the article (under "Departments" at the bottom of the page, page 14) and
here's the code for the two little scripts.
Thanks again to all the monks who commented. The comments I ignored were maybe even the most valuable, because I had to think very carefully about why I had written it that way.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.