Campbell Ritchie wrote:Also why are you using Strings? Those might mean something to users but they mean nothing to the machine. Why are you not using a Status class?
Winston Gutkowski wrote:
Better still, write Problem and Performance classes and put them in there. Indeed, you might even be able to use those classes to break up that nasty logic too.
Good programming (after getting things correct of course) is mostly about writing readable code; and the surest way to get your programs consigned to File 13 is to write ones that nobody understands.
Paul Clapham wrote:... a code review doesn't seem to be the OP's goal.
Liutauras Vilda wrote:2. parameter count. count of what?
Carey Brown wrote:My concern with your approach, while clean, may not handle all of the necessary cases. I can see that some of the values may not fire any of the IF's.
I'd prefer to see self explanatory name, rather than name + explanation of meaning for each poor variable name.
Adam Scheller wrote:This one could be fixed by simply adding documentation above
Sresh Rangi wrote:I'd start by replacing the if-else structures with early returns, and introduce some boolean variables for the conditions.