/lost-in-transation

An attempt at translating a simple task into various styles and languages.

Primary LanguageJavaMIT LicenseMIT

Lost in Translation

The project

The objective is to explore various programming styles.

Contributors are invited to re-implement an existing program in any language or style they wish.

This approach is slightly different from other projects such as Rosetta Stone, The Hello World Collection or 99 Bottles of Beer. In those, the specifications are given before hand and people provide implementations without consideration for the existing code.

In this project, I want to see how a piece of code is interpreted and re-imagined by other people.

The task

We are implementing a basic word counter. The exercise is to translate the existing code, so no specs are provided. Read the code and interpret it the way you see fit.

I have included a sample text file (Pride and Prejudice, by Jane Austen, from the Project Gutenberg) at the root of the repository. Feel free to use it to check out how your code behaves.

How to contribute

If you are interested in contributing a translation to the code, please fork the repository and introduce a new directory with a appropriate name, containing a single implementation. Feel free to provide multiple implementations in separate directories.

The implementation should be runnable with minimal effort. Please include instructions for executing the code, as well as any libraries or other additional files necessary to compile and run.

Once done, please drop me a note with a link to your repository. A Pull Request is also fine, although I probably won't merge it, as I'd like to refrain people from reading alternative implementations before they get to coding.

The why

Inspiration came from Le Ton beau de Marot: In Praise of the Music of Language, a book where Douglas Hofstadter compares various translations of a short French poem. There are many possible translations and Hofstadter himself comes with several of them.

Each translation of the poem has its own flavor. Some are more faithful than others. Some take liberties in the content to be closer to the spirit of the original poem.

I was wondering if the same effect might be seen when re-coding a task into other programming languages, or even in the same languages. This project is an attempt to gather material for this.

In his book, Hofstadter also talks about Exercices de style, written by Raymond Queneau, in which the same story is told in many different styles. It turns out that this book inspired Exercises in Programming Style where Cristina Videira Lopes implements the same task in the same programming language, Python, using different styles.

I think that using the same task for a variant on the same idea might turn out to be useful.

License

This project is released under the quite permissive MIT license, see the license file. By contributing to this project, you agree to release your code under the same license. Please ensure that any libraries and other files you include are compatible with this license.