I am creating a csvCSV consumer (with Java). There is one field / column that should contain one of the values "Rename" or "Move".
I implemented this by allowing mixed case of letters, and blank space at either end. To be precise I used myString.trim().toUpperCase()
on the parsed string.
This makes my code less brittle and more robust, but seems to ignore the "fail fast" strategy.
Should I leave the code as it is, or avoid .trim().toUpperCase()
?
edit : why are people downvoting and voting to close ? Isn't this the exact type of engineering question that this place is here for.