Things I Learnt The Hard Way - Command Line Options Are Weird, But Helpful

In this day and age, when everything has a graphical interface, does it still makes sense to add command line options to your application? In fact, it does.

When I mentioned the configuration file, you may have thought about using adding a default path for it and using the same file over and over.

Well, that's not wrong, but what if you want to use a different configuration? Would you keep moving the original configuration file to another place, moving your configuration back and keep this back and forth? Keep both versions and just use a symbolic link with the configuration filename pointing to the one you want?

Why not add a command line option in which the user can select which configuration file should be loaded?

This would make their life and yours easy.

Also, be aware that, today, there may be libraries to handle command line in every language, which will help you build a good command line interface, along with standardizing it to have the same interface as other applications.

<< The Config File Is Friend
Not Just Function Composition, But Application Composition >>