This commandline tool transliterates names from Latin to Klingon alphabets
Install Golang 1.12 or higher.
Run go get github.com/TriAnMan/jexiatest/...
and go build github.com/TriAnMan/jexiatest/cmd/klingon-translit
./klingon-translit Leonard McCoy
- App exploits a fail-fast methodology.
- Simple DDD pattern is used to prevent circular dependencies (https://manuel.kiessling.net/2012/09/28/applying-the-clean-architecture-to-go-applications/).
- Non over-engineered architecture is implemented to reduce development time.
- Main transliteration routine can be imported in other apps and libraries.
- App logs to STDERR to facilitate log management (https://12factor.net/logs) and to separate logs from normal output.
- Transliteration algorithm has O(n) space and time complexity for string interface; O(1) space complexity can be achieved with buffered input and output without a BC break; O(1) space for algorithm is non essential for this task because command line arguments have limited length (~128KiB for linux).
- Algorithm uses better transliteration for strings containing "ngh". Output will be "n, gh" instead of "ng, H".
- Formalize specs to interpret stapi.co data.
- Implement a microservice or a STDIN parsing application if demand for transliteration increases.
- Implement a Swagger client for stapi.co (https://godoc.org/github.com/go-swagger/go-swagger) if more data from stapi.co be required.
- Move transliteration and stapi.co data mining into different apps or services because this tasks are very different in nature.