Skip to main content
Question Protected by gnat

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.

I am creating a csv 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.

I am creating a CSV 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()?

added 133 characters in body
Source Link
NimChimpsky
  • 4.7k
  • 4
  • 28
  • 39

I am creating a csv 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.

I am creating a csv 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()?

I am creating a csv 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.

Became Hot Network Question
Question rewritten, better tags used
Source Link
Doc Brown
  • 214k
  • 34
  • 394
  • 603

I am creating a csv consumer with(with Java.

I am trying to decide the best way to implement the csv parser). I haveThere is one field or/ column that contains an action, this can be eithershould contain one of the values "Rename" or "Move" at the moment.

I implemented this by Java code allowsallowing mixed case of letters, and blank space at either end. ToTo be precise I do myString.trim().toUpperCase() onused myString.trim().toUpperCase() on the parsed string.

This makes my code less brittle and more robust, but its not "fail fast"seems to ignore the "fail fast" strategy.

OpinionsShould I leave the code as it is, or avoid .trim().toUpperCase()?

I am creating a csv consumer with Java.

I am trying to decide the best way to implement the csv parser. I have one field or column that contains an action, this can be either "Rename" or "Move" at the moment by Java code allows mixed case of letters, and blank space at either end. To be precise I do myString.trim().toUpperCase() on the parsed string.

This makes my code less brittle and more robust, but its not "fail fast".

Opinions ?

I am creating a csv 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()?

Source Link
NimChimpsky
  • 4.7k
  • 4
  • 28
  • 39
Loading