× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I will tend to use the first form - I also do it the opposite of what Barbara listed - in my math days, operators were always at the end of the line, IIRC, so that's how I go. Maybe that has changed since a few weeks ago!!

Oh, yeah, in regular language, commas and other punctuation come at the end of lines, not at the start.

As to removing a parameter - I find that RDp has this nice stream-selection thing - I select from the position immediately after one parameter name, to the last character of the one being removed - hit Delete - ba da bing! I do that instead of deleting by line - 6 of one!

Personally I don't scan enough code for it to matter much to me about vertical vs. horizontal - same principle as we use to say, don't code for absolutely the best performing code, usually, these days - there are other places to find efficiencies.

OK, waiting for the tomatoes to be thrown my way!!

And I'll put my name here, so the target is easier to find!

Vern

On 4/6/2011 12:59 AM, Booth Martin wrote:
I believe what I am reading is that there is a group who prefers their
code to be, as much as possible, arranged so that commenting a line does
not require messing with adjacent lines. I see that as being a sort of
personal insurance that debugging and later code changes won't introduce
unexpected errors, either when commenting code or when uncommenting code.

Sounds good to me.

On 4/5/2011 9:39 PM, Rory Hewitt wrote:
Um...I'm not sure what you're getting at...

In your example of 'minddebugging' you gave these two examples:

promptPrintForms(
rbcnppfUSER :
rbcnppfSSN :
rbcnppfSTDCD :
rbcnppfPKG
rbcnppfID :
rbcnppfTXNO :
rbcnppfHCOR :
rbcnppfRESULT :
rbcnppfDO_ALL )
-or-
promptPrintForms
( rbcnppfUSER
: rbcnppfSSN
: rbcnppfSTDCD
rbcnppfPKG
: rbcnppfID
: rbcnppfTXNO
: rbcnppfHCOR
: rbcnppfRESULT
: rbcnppfDO_ALL
)

Obviously the second example here is easier to spot that you're missing a
colon between two parameters, but that's partly a formatting issue, so lets
reformat the text in Courier New and adjust the spacing like I'd do my code:

promptPrintForms(
rbcnppfUSER :
rbcnppfSSN :
rbcnppfSTDCD :
rbcnppfPKG
rbcnppfID :
rbcnppfTXNO :
rbcnppfHCOR :
rbcnppfRESULT :
rbcnppfDO_ALL );

-or-

promptPrintForms
( rbcnppfUSER
: rbcnppfSSN
: rbcnppfSTDCD
rbcnppfPKG
: rbcnppfID
: rbcnppfTXNO
: rbcnppfHCOR
: rbcnppfRESULT
: rbcnppfDO_ALL
)


I admit that yours is easier to spot, but honestly, not a lot (as far as *
I'm* concerned) - I look for missing 'right' colons, and you look for
missing 'left' colons. But as I said, it's about what you're used to - if I
had to read your style of code, I'd be forever 'uncomfortable' - it just
doesn't look right to me. Besides which, either your IDE of choice (unless
you're just using SEU) or the compiler would throw an error here anyway...

Rory

On Tue, Apr 5, 2011 at 4:48 PM, Henrik Rützou<hr@xxxxxxxxxxxx> wrote:

Rory,

the quich answer is how many lines in your mail started with a "t" and how
many
ended with a "t"? and how much braincapacity did you use to figure it out

On Wed, Apr 6, 2011 at 1:31 AM, Rory Hewitt<rory.hewitt@xxxxxxxxx> wrote:

Henrik,

Mihael, you may think I'm crazy bringing in LEAN psycologist into
programming, but just notise the "commas"
that is set in the front instead of the back in the above code - the
human
brain processes these commas in a
rate 3 times faster than if it was in the end of the statement if the
code
is hirachical structured - in 10 statements
you cannot hardly measure the diffence - but programmers during years
has to
read million of statements and suddenly
the time to mind- mapp code makes a difference.
Is there a peer-reviewed study which says that we process these commas 3
times faster? Because in the absence of one, I'd have to disagree with
Barbara (gasp!) and say that I *don't* see intellectually that they are
better. Except in Dennis's great example.

Obviously we all read millions of lines of code in our lifetime, but it's
also true that, as long as we're reading code which conforms to our
preference (whether because it's a 'shop standard' or whatever), then it
doesn't really make any difference - if I am used to e.g. colons at the
end
of a line, as in my original example, and all the code I read uses that
system, then there's really no problem. The problem only occurs if we
have
to swap between different coding styles - at which point, whether we
prefix
or suffix our commas is of minimal importance compared with e.g. whether
the
code is upper-, lower- or mixed-case, whether consistent indentation is
used, whether standardized variable names are used etc.....

Rory

On Tue, Apr 5, 2011 at 4:12 PM, Barbara Morris<bmorris@xxxxxxxxxx>
wrote:
I realize this is completely irrational, and that I should learn to
embrace leading commas. I see intellectually that they are better.
But
brrrrrr, make them go away.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



--
Regards,
Henrik Rützou
http://powerEXT.com<http://powerext.com/>
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.