make-novice
make-novice copied to clipboard
wordcount.sh
In response to issue #48 , a word counting in bash.
Thanks for your PR. It's on my to-do list and I hope to look at it this week. Cheers
I've had a look at this now and have two initial comments:
- The output is close enough, but it's much slower than using wordcount.py
- It would need a corresponding plotcount.sh script too
If we can overcome these two issues I think it would be worth pursuing. Cheers Gerard
@gcapes , does the new version satisfy comment 1?
Hi @castelao The two scripts look good: they run much more quickly and look to produce the right results within rounding errors.
There are (at least) two outstanding issues:
- The plotcount script looks to be missing the functionality to save a figure to a file.
- A further script would be required: zipftest.sh to make the summary table.
The bash scripts would then be ready to replace the python scripts if we agree that ascii plots are good enough. They're obviously less realistic than the image files saved by python scripts, but this is a Make lesson rather than a plotting lesson.
Sorry for the delay @gcapes. Do you see any other issue?
The scripts look good. They'll be a good plan B. Some final touches are needed though.
I think some extra documentation - perhaps in instructor notes
as well as comments at the beginning of each script would be useful (given the lesson's commands refer to the python scripts). How does the user run the scripts? Are the scripts intended to be direct replacements for their equivalent python scripts ? Currently they're not quite.
Perhaps some extra thought on standardisation with the python scripts would be useful. For plotcount.sh, we currently have a save-to-file option, and a 'show' option which does the same thing as the python 'ascii' option.
Closing as stale, ahead of move to new workbench lesson format (#169)