Skip to content

Code Review#13

Open
Tiwi71 wants to merge 1 commit into
cfrantzidis:masterfrom
Tiwi71:master
Open

Code Review#13
Tiwi71 wants to merge 1 commit into
cfrantzidis:masterfrom
Tiwi71:master

Conversation

@Tiwi71

@Tiwi71 Tiwi71 commented Jul 30, 2025

Copy link
Copy Markdown

The code does the job it is supposed to, which is good.

It is very clear from the user's perspective, which I like. Readability is great! There is a space before 'Word occurrences', but that's the only issue I could find there.

From a developer perspective, the code is well commented and variables are named sensibly. Because it is a program that doesn't do much, of all it being inside Main can be excused. However, if you ever wish to expand on it, I'd recommend moving functions to their own classes, so that Main need only call upon them. This would prevent Program.cs from getting too bloated, and would help developers navigate it more easily.

Your error handling is great. Even when I type in an invalid input or solely press 'enter', the program doesn't crash. It would be better if it looped though, so the user doesn't have to open the program every time they want to retry. And even if it succeeds, perhaps the user has other files they wish to view the word frequencies of.

When you click 'Copy as Path' for the txt file in File Explorer, Windows automatically encases it with "", so having a few lines that remove those would be useful to reduce user difficulties. A polymorphic function for converting different text file contents into the same format for the program to use would be also be helpful, as the program only works for .txt files.

More options would be also be useful. Whilst it automatically reordering the words into alphabetical order is helpful, having options to order them by frequency, or just simply having them listed in file order, would be convenient.

Overall a great code and does the job! A few more user options and conveniences would be nice though, and it needs a quick reshuffle with abstraction/encapsulation if you ever want to expand the program's capabilities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant