I am an OpenEdge (aka Progress) developer that loves clean code and good looking applications that are easy to use. My main pet project is the Progress DataDigger
With regard to point 2 (Give meaningful names) I found that the smaller your methods get, the less important it is to have real meaningful names. They can even distract from what the code is doing. If you have a piece of code of - say - 10 lines, then having a one-letter variable is not so bad, whereas that is a real problem if you are digesting a multi-hundred lines piece of code.
An example in the Progress 4GL (where I use to work in) to get the number of orders of a customer. Compare the below two functions:
FUNCTION getNumOrders RETURNS INTEGER (piCustNum AS INTEGER):
DEFINE VARIABLE iNumOrders AS INTEGER.
FOR EACH order WHERE order.custnum = piCustNum:
iNumOrders = iNumOrders + 1.
END.
RETURN iNumOrders.
END FUNCTION.
FUNCTION getNumOrders RETURNS INTEGER (piCustNum AS INTEGER):
DEFINE VARIABLE i AS INTEGER.
FOR EACH order WHERE order.custnum = piCustNum:
i = i + 1.
END.
RETURN i.
END FUNCTION.
To me, the latter is more clear than the first one, despite the less meaningful name.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
With regard to point 2 (Give meaningful names) I found that the smaller your methods get, the less important it is to have real meaningful names. They can even distract from what the code is doing. If you have a piece of code of - say - 10 lines, then having a one-letter variable is not so bad, whereas that is a real problem if you are digesting a multi-hundred lines piece of code.
An example in the Progress 4GL (where I use to work in) to get the number of orders of a customer. Compare the below two functions:
To me, the latter is more clear than the first one, despite the less meaningful name.