In this sample code, I noticed that function parameters were not clearly distinguished from other parts of functions, causing some confusion:
To check if person is online on Skype:
Skype.checkStatus(person) //Is 'Skype' a parameter of this function?
if result is "online": return yes
else return no
End
This code would be easier to read if the parameters were explicitly specified, like this:
To check if 'person' is online on Skype:
Skype.checkStatus(person)
if result is "online": return yes
else return no
End
This describes the program's intention much more clearly, ensuring that no parameters are created accidentally.
In this sample code, I noticed that function parameters were not clearly distinguished from other parts of functions, causing some confusion:
This code would be easier to read if the parameters were explicitly specified, like this:
This describes the program's intention much more clearly, ensuring that no parameters are created accidentally.