Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use user input filename for analysis #85

Merged

Conversation

Kit-p
Copy link
Contributor

@Kit-p Kit-p commented Sep 30, 2022

Asks user to input the path to file for analysis.

@Verisimilitude11
The reason it didn't work before is that you closed the Scanner. When you close a Scanner, it also closes the underlying stream, which in this case is System.in, thus any other Scanner wrapping System.in will fail to read subsequent inputs.
Out of the 2 approaches (suppress the warning and not close / use a global Scanner and pass it around), I chose the latter as it is clear that System.in won't be needed after the main() function, so we can safely close it.

Feedback is welcome!

Closes #29.

@VerisimilitudeX
Copy link
Owner

This is great! Thanks for explaining it so thoroughly to me - I really appreciate it! Since it is October 1st in your time zone, this would be eligible for Hacktoberfest, correct?

Copy link
Owner

@VerisimilitudeX VerisimilitudeX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@VerisimilitudeX VerisimilitudeX merged commit 237c0b4 into VerisimilitudeX:main Sep 30, 2022
@Kit-p
Copy link
Contributor Author

Kit-p commented Sep 30, 2022

This is great! Thanks for explaining it so thoroughly to me - I really appreciate it! Since it is October 1st in your time zone, this would be eligible for Hacktoberfest, correct?

I suppose it does count, cheers!

@Kit-p Kit-p deleted the feat/user-input-filename branch September 30, 2022 17:19
@VerisimilitudeX
Copy link
Owner

@Kit-p I noticed that you write very high-quality code. Do you have any other suggestions/ideas on what can be done to improve the code base? Anything from major to minor changes would be much appreciated!

@Kit-p
Copy link
Contributor Author

Kit-p commented Oct 1, 2022

@Verisimilitude11 Thank you, you keep the project very maintainable. I think your current refactoring strategy should work well for the long run, I would say just keep it up!

One thing about user experience though, keep the program running and ask the user to retry may be more user-friendly than quitting with an exception. At some point in the future, a TUI or even GUI should be implemented to really take the project to the next level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get User Input for the DNA File
2 participants