diff --git a/README.md b/README.md index 953f4eb..d3841b1 100644 --- a/README.md +++ b/README.md @@ -1,47 +1,40 @@ # Kata: Sing a song (refactoring) -You can find a [Node.js](https://nodejs.org/en/) and JavaScript ES6 implementation of the kata in the [javascript](javascript) folder; produce the song with: +https://github.com/sleepyfox/code-dojo-39 - node song.js - -Similarly a [Ruby](https://www.ruby-lang.org/en/) version can be found in the [ruby](ruby) folder; produce the song with: +## Objective - ruby song.rb +Here, you will find the code to produce a popular children's nursary rhyme, produced by a web agency for the customer last year. -A [Python](https://www.python.org/) version can be found in the [python](python) folder; produce the song with: +The customer now desires to produce multiple different versions of the song using the same structure but based on different themes, for example a current popular children's movie featuring a cast of animals. - python song.py +The customer asks that you make the song configurable for different lists of animals. They cannot guarantee that there will be the same number of animals in each different version. -A [Java](https://www.java.com/) version can be found in the [java](java) folder; produce the song with: +Refactor the code to allow for the customer's needs. - javac Song.java && java Song - -A [PHP](https://php.net/) version can be found in the [PHP](PHP) folder; produce the song with: +No documentation or tests were provided by the previous developer. - php song.php +_Remember: refactoring can only be done in the presence of tests that are passing, and after refactoring the tests still pass!_ -A .NET Core version implementation of the kata in the `csharp\dotnetcore` folder; produce the song with: +# Provided Languages -```bash -cd song -dotnet run -``` +You will find versions of the code in the following languages: -A [Go](https://golang.org/) version can be found in the [golang](golang) folder; produce the song with: +* C++ +* C# +* Elixir +* Go (aka Golang) +* Java +* Javascript +* PHP +* Python +* Ruby - go run main.go +In case you don't see your favourite programming language here, please feel free to open a PR to add it. +## About You can find out more about the London Code Dojo at our [homepage](http://www.meetup.com/London-Code-Dojo/). -## Objective - -Code to produce a popular children's nursary rhyme was produced by a web agency for the customer last year. The customer now desires to produce multiple different versions of the song using the same structure but based on different themes, for example a current popular children's movie featuring a cast of animals. The customer asks that you make the song configurable for different lists of animals. The customer cannot guarentee that there will be the same number of animals in each different version. - -No documentation or tests were provided by the previous developer. - -Refactor the code to allow for the customer's needs. -_Remember: refactoring can only be done in the presence of tests that are passing, and after refactoring the tests still pass!_ - -# License +## License The code samples are licensed under the CC-SA-NC-4.0 license, as shown in the [LICENSE](/LICENSE) file. diff --git a/csharp/dotnetcore/README.md b/csharp/dotnetcore/README.md new file mode 100644 index 0000000..9c5931a --- /dev/null +++ b/csharp/dotnetcore/README.md @@ -0,0 +1,8 @@ +# Sing a Song - .NET Core version + +Produce the song with: + +```bash +cd song +dotnet run +``` diff --git a/csharp/dotnetcore/readme.md b/csharp/dotnetcore/readme.md deleted file mode 100644 index 0857932..0000000 --- a/csharp/dotnetcore/readme.md +++ /dev/null @@ -1,8 +0,0 @@ -# .NET Core song - -You can find a [.NET Core](https://github.com/dotnet/core) implementation of the kata in the `csharp\dotnetcore` folder; produce the song with: - -```bash -cd song -dotnet run -``` diff --git a/golang/README.md b/golang/README.md new file mode 100644 index 0000000..964e0b5 --- /dev/null +++ b/golang/README.md @@ -0,0 +1,5 @@ +# Sing a Song - Go (aka Golang) version + +Produce the song with: + + go run main.gcast diff --git a/java/README.md b/java/README.md new file mode 100644 index 0000000..f077eeb --- /dev/null +++ b/java/README.md @@ -0,0 +1,5 @@ +# Sing a Song - Java version + +Produce the song with: + + javac Song.java && java Song diff --git a/javascript/README.md b/javascript/README.md new file mode 100644 index 0000000..5db8ef1 --- /dev/null +++ b/javascript/README.md @@ -0,0 +1,5 @@ +# Sing a Song - Javascript version + +Produce the song with: + + node song.js diff --git a/php/README.md b/php/README.md new file mode 100644 index 0000000..e9abcb7 --- /dev/null +++ b/php/README.md @@ -0,0 +1,5 @@ +# Sing a Song - PHP version + +Produce the song with: + + php song.php diff --git a/PHP/song.php b/php/song.php similarity index 100% rename from PHP/song.php rename to php/song.php diff --git a/python/README.md b/python/README.md new file mode 100644 index 0000000..06e5e5a --- /dev/null +++ b/python/README.md @@ -0,0 +1,5 @@ +# Sing a Song - Python version + +Produce the song with: + + python song.py diff --git a/ruby/README.md b/ruby/README.md new file mode 100644 index 0000000..5ed93df --- /dev/null +++ b/ruby/README.md @@ -0,0 +1,5 @@ +# Sing a Song - Ruby version + +Produce the song with: + + ruby song.rb