While this is indeed the most measurable decision you can make, it is hardly the most important.
I agree, to a point.
We took a task-by-task look at how much code (and therefore how much time) it takes to do 10 common tasks in Java, .NET and Perl.
- Regex search-n-replace.
- Read in a file, line by line, storing only the lines that match a regex.
- Open a recordset and iterate through it.
- Make an HTTP request.
- Perform XSLT transformations on XML.
- Iterate through a hash or other deeply-nested data structure.
- Sort an array or hash, by keys or values, with your own sorting algorithm.
- Append variables and static strings.
- Run another program and collect its STDOUT.
- Execute part of your program within another thread, or fork off a separate process.
When writing a web-based application, these are arguably some of the most common tasks. If each one only takes 1-2 lines of code, or if each one takes 5-10 or 15-20 lines of code, it can make a serious difference in the amount of time it takes to write, and the amount of code you have to maintain.
Bugs are more easily identified in less code. That's a pretty important factor to take into account, IMHO.
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.