2017 © Pedro Peláez
 

project anagram-finder

A tool for finding anagrams from a list of words (as an exercise of test-driven development).

image

oliverklee/anagram-finder

A tool for finding anagrams from a list of words (as an exercise of test-driven development).

  • Saturday, January 27, 2018
  • by oliverklee
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Anagram finder

This tool is the result of an exercise (code kata, coding dojo) for test-driven development (TDD) for PHP using PHPUnit at Oliver Klee's workshops., (*1)

An anagram is pair of two words that consist of exactly the same letters, but in different order., (*2)

Example: anthologise, theologians, (*3)

The dictionaries have been copied from the most-common-words-by-language project., (*4)

Installation

Run composer install to install the required Composer packages., (*5)

How to run it

bin/find-anagrams

You can also specify a dictionary to use from resources/dictionaries/:, (*6)

bin/find-anagrams german.txt

The exercises

The big picture is this: "Find and output all anagrams from a text file with a list of words.", (*7)

  1. Create a class that reads a list of words from a file and returns it as an array.
  2. Create a class that takes a word and sorts the characters.
  3. Create a class that finds and returns the anagram from an array of words.
  4. Deal with duplicates and empty lines in the file gracefully.
  5. Find the anagrams in a case-insensitive way.
  6. Sort the anagrams alphabetically during output.

About me (Oliver Klee)

I am the maintainer of the PHPUnit TYPO3 extension, which is available in the TYPO3 extension repository (TER)., (*8)

You can book me for workshops at your company., (*9)

I also frequently give workshops at the TYPO3 Developer Days., (*10)

More Documentation

Other example projects

The Versions

27/01 2018

dev-master

9999999-dev https://github.com/oliverklee/tdd-reader

A tool for finding anagrams from a list of words (as an exercise of test-driven development).

  Sources   Download

GPL-3.0-or-later

The Requires

  • php ~7.0.0 || ~7.1.0 || ~7.2.0

 

The Development Requires

tdd example kata exercise anagrams

27/01 2018

dev-task/run-tests

dev-task/run-tests https://github.com/oliverklee/tdd-reader

A tool for finding anagrams from a list of words (as an exercise of test-driven development).

  Sources   Download

GPL-3.0-or-later

The Requires

  • php ~7.0.0 || ~7.1.0 || ~7.2.0

 

The Development Requires

tdd example kata exercise anagrams