Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/crista/exercises-in-programming-style
Comprehensive collection of programming styles using a simple computational task, term frequency
https://github.com/crista/exercises-in-programming-style
Last synced: 30 days ago
JSON representation
Comprehensive collection of programming styles using a simple computational task, term frequency
- Host: GitHub
- URL: https://github.com/crista/exercises-in-programming-style
- Owner: crista
- License: mit
- Created: 2013-09-22T14:50:27.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2023-04-30T21:24:17.000Z (over 1 year ago)
- Last Synced: 2024-10-01T20:23:00.681Z (about 1 month ago)
- Language: Python
- Homepage:
- Size: 624 KB
- Stars: 2,017
- Watchers: 88
- Forks: 553
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Exercises in Programming Style
==============================Comprehensive collection of well-known, and not so well-known, programming
styles using a simple computational task, term frequency. All programs run
with the following command line:```bash
python tf-NN.py ../pride-and-prejudice.txt
```NOTE: the code in the master branch is written for Python 3. If you are looking
for a version for Python 2.7, check out the 2.7 branch or the v1.0 release.Explanations and historical context for all these styles can be found in the
companion book [Exercises in Programming Style](http://www.amazon.com/Exercises-Programming-Style-Cristina-Videira/dp/1482227371/).Additions are welcome!
You can contribute:
- new exercises related to the existing styles
- an entirely new programming style
- new names for the existing styles
- discussion of names, pros and cons of each styleBecause this project and the companion book are used in courses, at the
suggestion of several students I am no longer accepting contributions
of the existing styles written in different programming languages.
That is the first exercise that the students do. Having the solutions
easily available here will rob future students of the learning experience!Please follow the conventions suggested by the existing code base,
specifically, if you are contributing a new style, make a new folder called
nn-funname and add an example program in that folder called
tf-nn.ext. (nn is the next avalaible number in the collection)
Additionally, add a README.md file that clearly describes the
contraints for writing programs in that style. I will only consider
new styles corresponding to constraints that are clearly different
from the ones that already exist in the collection. (different
programs written in existing styles are exercises for students, and
should not be here)Contributions of new names and discussion should be done under Issues
or on the Wiki part of this repo.To test your work, make sure your script is executable and then run:
```
./test/test.sh NN
```Where `NN` is the number prefix of the directory you're adding.
Never stop exercising!
Love,
CristaP.S. Inspiration for this collection: http://en.wikipedia.org/wiki/Exercises_in_Style