Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Comprehensive collection of programming styles using a simple computational task, term frequency
Python Java C++ Scala Shell Clojure Other
Branch: master

Update README.md

No longer accepting programs in different programming languages because students!
latest commit aac9f9899c
@crista authored
Failed to load latest commit information.
01-good-old-times Typo (dyslexia)
02-go-forth Typo in comment
03-monolith Update README.md
04-cookbook Minor cleanups
05-pipeline Moved the shell script again to the pipeline style, where it belongs …
06-code-golf A first try at a Ruby golf
07-infinite-mirror Fixed typo with wordfreqs variable
08-kick-forward removed an extraneous whitespace
09-the-one Make the main code more readable
10-things Merge pull request #14 from davidfstr/things-in-java
11-letterbox Renumbered again so that the messaging OO style comes immediately aft…
12-closed-maps Minor
13-abstract-things Update README.md
14-hollywood Update README.md
15-bulletin-board Update README.md
16-introspective Update README.md
17-reflective Update README.md
18-aspects Changed this one too
19-plugins And this one too
20-constructivist Update README.md
21-tantrum Update README.md
22-passive-aggressive Update tf-23-monadic.py. We can eliminate the extra parameter in the …
23-declared-intentions Update README.md
24-quarantine Made the main block clearer
25-persistent-tables Update README.md
26-spreadsheet Massive renumbering!!!
27-lazy-rivers Update README.md
28-actors Renamed this style to actors, because that's what it is
29-dataspaces Update README.md
30-map-reduce Changed the names of these two styles to what they really are: map re…
31-double-map-reduce Changed the names of these two styles to what they really are: map re…
32-trinity Read stopwords.txt when initialize, to avoid reading it in every update.
33-restful Formatting to fit 2 pages
34-the-c-flow Marking executable
test More test suite tweaks
.gitignore Add .gitignore
LICENSE Initial commit
README.md Update README.md
input.txt Added input files
pride-and-prejudice.txt Added input files
stop_words.txt Added input files
test.txt Added input files

README.md

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:

$ python tf-NN.py ../pride-and-prejudice.txt

Explanations and historical context for all these styles can be found in the companion book Exercises in Programming Style.

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 style

Because 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, Crista

P.S. Inspiration for this collection: http://en.wikipedia.org/wiki/Exercises_in_Style

Something went wrong with that request. Please try again.