geekcomputers / geekcomputers/Python

Multiple issues with the CountMillionCharacters family of programs.

Open
#673 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
35.4k
Forks
12.9k
Avg merge
2h 37m
Merged PRs (30d)
1

Description

The README states:

CountMillionCharacter.py And CountMillionCharacter2.0.py - Gets character count of a text file.

Yet CountMillionCharacter2.0.py seems to be counting words, and says as much.

There is also a folder CountMillionCharacters-Variations which contains a third version of the program, named variation1.py. It would obviously be good to decide on what the CountMillionCharacters programs are meant to do, and the versions/variations to create.

For now, I think there are some changes to be made in at least two of the versions:

  • For one, dropping the use of .upper(), or at least replacing it with .casefold().
  • The use of .get() in variation1.py could be replaced with a defaultdict.
  • variation.py contains a camelCase variable name.
  • CountMillionCharacter.py uses exit() for seemingly no good reason.
  • CountMillionCharacter.py [calls main()] instead of exiting the program or using a loop.
  • ...and more.

I will try to tweak the code and create a pull request (or a few).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the README entries for CountMillionCharacter.py and CountMillionCharacter2.0.py, then compare those files with CountMillionCharacters-Variations/variation1.py. Decide and document the intended behavior and version structure before changing the listed case handling, defaultdict usage, variable naming, and program-exit flow; done means the programs and README agree.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.