× 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 am also not a fan of your short naming on these procedures.

Sure, at least for the developer that initially uses your tool, they will learn what the short names mean. That developer is not who I am concerned about. I'm more concerned about the developer that comes back to maintain the code 4 years from now after the original developer has left. There is nothing about these names that would tell me at a glance what they do or even hint at the fact that it is a tool called RPGMap. When I am maintaining code, I likely don't need the details of what something like this does, I just need to be able to read it and understand the intention so I can either flag it for review or quickly move on if it is not important to me. I don't want to have to figure out what this is, find the documentation, and then read the docs just to know if it is pertinent to my current task.

As for typing in longer names, just use RDi. Ctrl+Space is your friend.

All that being said, the tool is interesting, and I will take a closer look as time allows.

Brian May
Director
Pre-Sales and Customer Solutions
Profound Logic Software
http://www.profoundlogic.com
937-439-7925 Phone
877-224-7768 Toll Free
  

The IBM i Modernization Experts
www.profoundlogic.com
      


Profound.js: Agile, Connected, Secure
Bring the benefits of Node.js and Agile Modernization to your IBM i Enterprise
Click here to learn more


-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of jacobus erps
Sent: Saturday, July 22, 2017 6:12 PM
To: RPG programming on the IBM i (AS/400 and iSeries) <rpg400-l@xxxxxxxxxxxx>
Subject: Re: RpgMap: a versatile key/value store for ile rpg

I've heard the critique before, but i chose the short names deliberately to get compact code that is good readable. It takes a little bit of getting used to, but the short names make the code a lot clearer (and less typing).

It also doesn't help, i think, that - maybe - we still have some trauma left from RPGII, max six uppercase character names everywhere. That was really bad, but not because you needed to write "EXSR", but "CUZC@".

John already explained it very well. There is a limited number of keywords, which you use repeatedly. Writing "set-lower-limit" everytime gets boring quite fast. As long as the application specific variable names have sensible names, the keywords should be short. Also because in RpgMap you would more than usual use nested procedure calls. The short procedure names also have some logic in them, such as rdn (read-next), and rdp (read-previous). They're easy to memorize. If you know that "sll" is set-lower-limit then "sgt" does not need explaining anymore.

I much prefer:
cur = rm_sll(rm_cur(map):rm_a('a'));

Instead of:
cur = rpgmap_setLowerLimit(rpgmap_NewCursor(map):rpgmap_NewChar('a'));

The second example is only somewhat clearer in what it does if you're just trying to guess what the code does.

The 'a' and "map" are the important parts, which are easier readable in the first example. They get more buried within the rest of all the text in the second example (low signal-to-noise ratio). The first example is easier to read, but only if you know what "sll" and "a" do, of course. But you have to read the docs anyway.

Long descriptive identifier names are good, but not always.


On Sat, Jul 22, 2017 at 11:48 PM, John Yeung <gallium.arsenide@xxxxxxxxx>
wrote:

Mihael also preferred longer and more descriptive names. I am less
opposed to the shorter names. I don't think I would have chosen
*these* names, but I probably would have chosen shorter than what you
and Mihael seem to prefer, and I don't have a particularly strong
negative reaction to these names.

There is a school of thought that goes: You have to learn keywords
anyway. They have special meaning in the language, just like you would
learn mathematical symbols. If there aren't too many of them to learn,
and they will be showing up all over the place, it is nice to have
them short. Variables and functions you write yourself can have names
as descriptive (and as verbose) as you want.

But by no means are you alone. Agreeing with Mihael already puts you
in good stead. I think there are lots of programmers and language
designers on both (or all?) sides of the issue of how to choose
keywords.

John Y.
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(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.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (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.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: http://amzn.to/2dEadiD

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.