All Projects → CodelyTV → php-finder_refactoring-kata

CodelyTV / php-finder_refactoring-kata

Licence: other
🐘🔍Incomprehensible Finder Refactoring Kata port for PHP

Programming Languages

PHP
23972 projects - #3 most used programming language
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to php-finder refactoring-kata

java-basic-skeleton
☕🚀 Java Bootstrap: Skeleton for your new projects
Stars: ✭ 37 (+68.18%)
Mutual labels:  kata, example, codelytv
Arkit2.0 Prototype
After Apple’s introduction of ARKit 2, we have been consistently working behind to create shared-AR experiences. Our goal is to improve the utility of mobile using AR experiences.
Stars: ✭ 236 (+972.73%)
Mutual labels:  sample, example
Play Scala Websocket Example
Example Play Scala application showing WebSocket use with Akka actors
Stars: ✭ 194 (+781.82%)
Mutual labels:  sample, example
functional-structures-refactoring-kata
Starting code and proposed solution for Functional Structures Refactoring Kata
Stars: ✭ 31 (+40.91%)
Mutual labels:  kata, refactor
Play Scala Isolated Slick Example
Example Play Slick Project
Stars: ✭ 155 (+604.55%)
Mutual labels:  sample, example
Play Java Starter Example
Play starter project in Java (ideal for new users!)
Stars: ✭ 164 (+645.45%)
Mutual labels:  sample, example
Escape From Callback Mountain
Example Project & Guide for mastering Promises in Node/JavaScript. Feat. proposed 'Functional River' pattern
Stars: ✭ 249 (+1031.82%)
Mutual labels:  refactoring, example
Play Java Websocket Example
Example Play Java application showing Websocket usage with Akka actors
Stars: ✭ 86 (+290.91%)
Mutual labels:  sample, example
kata
TDD, Refactoring kata in many languages
Stars: ✭ 14 (-36.36%)
Mutual labels:  refactoring, kata
generator-composer
🐘 Yeoman (http://yeoman.io) generator for a PHP Composer project
Stars: ✭ 16 (-27.27%)
Mutual labels:  composer, phpunit
laravel-survey
Laravel 6 survey app.
Stars: ✭ 39 (+77.27%)
Mutual labels:  composer, phpunit
Android Clean Architecture Mvvm Dagger Rx
Implemented by Clean Architecture, Dagger2, MVVM, LiveData, RX, Retrofit2, Room, Anko
Stars: ✭ 138 (+527.27%)
Mutual labels:  sample, example
Golang Gin Realworld Example App
Exemplary real world application built with Golang + Gin
Stars: ✭ 1,780 (+7990.91%)
Mutual labels:  sample, example
Unitymathreference
Math reference for games and more. All visualized in Unity3D.
Stars: ✭ 166 (+654.55%)
Mutual labels:  sample, example
Ios11 Pdfkit Example
Sample code for PDFKit on iOS 11.
Stars: ✭ 105 (+377.27%)
Mutual labels:  sample, example
Play Scala Starter Example
Play Scala Starter Template (ideal for new users!)
Stars: ✭ 238 (+981.82%)
Mutual labels:  sample, example
play-scala-seed.g8
Play Scala Seed Template: run "sbt new playframework/play-scala-seed.g8"
Stars: ✭ 66 (+200%)
Mutual labels:  sample, example
Play Scala Slick Example
Example Play Scala project with Slick
Stars: ✭ 59 (+168.18%)
Mutual labels:  sample, example
Simple Mvp Retrofit Example
A simple example of a project using MVP architecture and Retrofit 2.0 library for Android for beginners.
Stars: ✭ 70 (+218.18%)
Mutual labels:  sample, example
refactoringtopatterns
A place to practice Refactoring To Patterns that Kerievsky wrote about in his book
Stars: ✭ 46 (+109.09%)
Mutual labels:  refactoring, kata

Introduction

Here is the bad news: the new developer you hired has written some terrible, atrocious code. No one can understand what it does.

The good news: at least there are unit tests to prove the code is working.

You job is to refactor the code and make it readable, while keeping the code in working order (pass all tests).

How To Start

  1. Clone this repository git clone https://github.com/CodelyTV/finder-refactoring-kata-php
  2. Build the docker container which contains all the required dependencies with make build
  3. Run the tests with make test
  4. Start refactoring!

The primary goal is to refactor the code in src/Algorithm/Finder.php - as it stands the code is incomprehensible.

Tips

  • Start with simple rename refactors so you can better understand the abstractions you are working with. Rename any class or any variable.
  • Move on to extract methods and making the code more modular.
  • See if you can also eliminate switch statements and multiple exit points from methods.

Anything is fair game, create new classes, new methods, and rename tests. The only restriction is that the existing tests have to keep working. Lean on the tests and run them after every small change to make sure you are on the right path.

How to End

You can stop when you feel the code is good enough, something you can come back to in 6 months and understand.

Helpful resources

PHP 7

I've decided to port the kata directly to PHP 7 instead of 5.6. This will allow you to practice also with the new PHP features. By the way, if you're not used to it yet, here you have some useful resources:

PHPUnit 5.5

Refactoring

Credits and other programming languages

You can also find the kata in different programming languages in isolated repositories just ready to clone and enjoy:

This kata is a Scala port of the original Incomprehensible Finder Refactoring Kata created by K. Scott Allen.

Port developed by CodelyTV and contributors 😊

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].