Monday, January 19, 2026

Do you have left-pad syndrome?

The npm left-pad incident

How to parse CLI args:

  1. Iterate over the array of CLI args.
  2. Inside the loop, switch on each item.

Just make sure, if any of your options take parameters, to use a for-loop instead of a foreach-loop so that you can just increment the counter in the switch case.

If you install a library to parse CLI args, you might have left-pad syndrome.

How to parse CSV:

  1. Call String.Split.
If you install a library to parse CSV, you definitely have left-pad syndrome.

No comments:

Post a Comment

Rethinking my past dislike of C#

In response to  my previous post . We don't use "goto", of course, because we want our iteration to be structured. But "f...