Why I enjoy coding Kata's

Created at 2020-08-05 Updated at 2020-10-05 Category Kata Tag PHP / PhpStan / Easy Coding Standard (ECS) / PhpUnit / Kata

One of the things that have helped me to learn software development using PHP is coding Katas. I especially enjoyed the Katas by Emily Bache on Github. They offer a safe sandbox environment to play with code and tools. They have good, or should that be not so good, starting code to self teach techniques for refactoring, testing and object orientated code.

In fact, I enjoyed them so much, I have contributed to them! I have helped standardised the PHP versions to PHP 7.2+, with consistent documentation on how to start. I would highly recommend them to anyone interested in improving their skills and knowledge.

PHP tooling has also been standardised for many of the PHP codebase:

  • Composer for PSR-4 autoloader and managing dependencies
  • PHPUnit for testing
  • Easy coding standard (ECS) for PSR-12 coding standard (plus other helpers)
  • PhpStan for static analysis.

These tools can be used to practice and learn too, they are all configured and ready to go. They can be used as much or as little as required. ECS and PhpStan are particularly useful for the Kata’s which need code to be refactored, these should be considered as tools which help the coder, keep a consistent standard and help identify bugs. These tools can be removed and replace with other coding standard and static analysis tools are preferred.

The Kata’s are to a high PHP7.2+ PSR-12 standard, except the code which needs refactoring, with namespaces, PSR-4 autoloader etc. They also have consistent documentation with how to download and start using composer.

Kata’s which are configured for PHP:

I hope others will find them useful, as I have.

Happy coding!

Table of Content

Site by Pen y Fan using Hexo & Random
Pen y Fan

Posts about my coding experiences, primarily for my learning path with PHP, good clean professional code.

Hide