Alan Campin wrote:
...
They want something like tkn so they don't have to type the extra
characters.
If you can get them to write something in free format, you can't even
get them to indent their code. Too much work to hit the space bar twice.
My one programmer says that indenting code is a style issue and he
doesn't want to be bothered!!
This is where the WDSC editor really shines for me. For the long names,
you only have to type the first few characters and then content-assist
will help you fill in the rest. The editor will also help with the
indentation.
Sure, indenting is a style issue. So is naming variables something
other than A AA AAA AAA2 AAAA BBB2 BBB3 (those are really easy to type!).
Here's a little experiment - I reckon it will take 5 or 10 minutes.
Below is some real code that I modified to your colleagues' standard.
Below that is the original fragment exactly the way I coded it (I admit
it's a bit sloppy, with no comments, no blank lines, all lower case
variables).
1. Print the code fragments on separate sheets of paper.
2. Time yourself figuring out what the code is doing. (I don't think it
would take more than a couple of minutes, but I can't really judge since
I wrote it.)
3. Ask your colleagues to figure it out and explain what the code is
doing, and give them the same amount of time it took you. Offer them
both versions and watch them. If they stick to the unindented/
short-name version, I bow to the power of their intellects(*). If they
peek at the indented version as time runs out, you have some ammunition.
(*)Because really, indentation and descriptive names are just there for
us weak-minded folks who need visual aids to help us keep track.
--- Here is the modified version ---
tstf = %trim(lb) + '/' + fn;
open(e) testf;
if %error;
dsply (tstf + ' not found.');
return;
endif;
read testf;
dow not %eof;
if tcrs <> NOTRUN;
nmtst += 1;
if tcrs = SUCC;
nmsc += 1;
else;
except fail;
endif;
endif;
read testf;
enddo;
close testf;
--- Here is the original version ---
testfile = %trim(lib) + '/' + filename;
open(e) testf;
if %error;
dsply (testfile + ' not found.');
return;
endif;
read testf;
dow not %eof;
if tcresult <> TC_NOT_RUN;
numtests += 1;
if tcresult = TC_SUCC;
numsucc += 1;
else;
except failure;
endif;
endif;
read testf;
enddo;
close testf;
As an Amazon Associate we earn from qualifying purchases.