All pastes #739621 Raw Edit

gammy

public php v1 · immutable
·published 2007-10-17 10:29 UTC
rendered paste body
The following is a snipplet of code I am revamping at work..---------------------if($argv) { // this is to be able to start it from commandline  start_stars($argv[1],$argv[2]);}### Set working dir?function start_stars($lang){---------------------Problems==- The first comment is rather useless. It states the obvious without actually adding information.- $argv is checked but the number of arguments is never checked- It is not explained what the arguments should actually contain- The comment prior to the initialisation of the function is confusing. Is it a comment to the original programmer? Is it a suggestion? Who knows.- The function name start_stars does not explain what the function does. It could mean anything.- The function in itself only accepts one argument, so the second one is dropped!