kotlin-hands-on/advent-of-code-kotlin-template

.txt extension should not be implicitly assumed for the input files

risboo6909 opened this issue · 0 comments

The template internally adds .txt extension to the input file names. This leads to confusion for me as a linux user because I used to use input files without any extension.

Here is my workflow:

  1. I add input files for new problems with no extension to my AoC project
  2. Then I'm adding up some code
  3. Running it to check whether it works or not
  4. Getting an error message that my input file doesn't actually exist
  5. I use refactor->rename to add the .txt extension and it fails again, because now the template is expecting my input file name to be filename.txt.txt :)
  6. Finally I go to my refactored code and remove the '.txt' extension and it finally starts to work :)

I propose to avoid adding the .txt extension to all input files and leave it to the user. This won't make code any worse but will help to avoid confusion for a plenty of users.