All Projects → daviddenton → refactoring-golf

daviddenton / refactoring-golf

Licence: other
A Refactoring Golf exercise

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to refactoring-golf

baidu-college-exercise
📝2017百度前端技术学院
Stars: ✭ 30 (-25%)
Mutual labels:  exercise
OCA-Java-SE-7-Programmer-I
Exercises of the OCA Java SE 7 Programmer I Study Guide (Exam 1Z0-803)
Stars: ✭ 43 (+7.5%)
Mutual labels:  exercise
smuggler
🚣 Smuggle all imports
Stars: ✭ 72 (+80%)
Mutual labels:  refactoring
colisper
Check and transform Lisp code with Comby (beta)
Stars: ✭ 18 (-55%)
Mutual labels:  refactoring
RingfitAdventure-BotW-Mod
Using a Ring Fit Adventure mod for The Legend of Zelda: Breath of the Wild. This allows the user to control the game with exercises.
Stars: ✭ 66 (+65%)
Mutual labels:  exercise
deleft.vim
Delete a wrapping if-clause, try-catch block, etc. and shift left.
Stars: ✭ 68 (+70%)
Mutual labels:  refactoring
seamer
refactoring tool that aims at making it easy to create characterization tests
Stars: ✭ 16 (-60%)
Mutual labels:  refactoring
php-finder refactoring-kata
🐘🔍Incomprehensible Finder Refactoring Kata port for PHP
Stars: ✭ 22 (-45%)
Mutual labels:  refactoring
extreme-carpaccio
Slicing and coding game
Stars: ✭ 116 (+190%)
Mutual labels:  exercise
Python3 Basics Tutorial
Exercises for introductory Python 3 courses
Stars: ✭ 26 (-35%)
Mutual labels:  exercise
refactoring-for-testability-cpp
Hard-to-test patterns in C++ and how to refactor them
Stars: ✭ 40 (+0%)
Mutual labels:  refactoring
clang-tool
Simple and powerful standalone project for clang-based tools using libtooling (e.g. refactoring, auto-completion, etc.)
Stars: ✭ 35 (-12.5%)
Mutual labels:  refactoring
comby-rust
Rust refactoring templates for comby, the structural find-and-replace tool.
Stars: ✭ 23 (-42.5%)
Mutual labels:  refactoring
SmartSpin2k
Transform your spin bike into a Smart Trainer!
Stars: ✭ 88 (+120%)
Mutual labels:  exercise
Refactoring-Chapter-1
Worked example from Fowler's Chapter 1
Stars: ✭ 34 (-15%)
Mutual labels:  refactoring
kata
TDD, Refactoring kata in many languages
Stars: ✭ 14 (-65%)
Mutual labels:  refactoring
refactor-css
Helps you identify reoccurring CSS class name combinations in your markup
Stars: ✭ 28 (-30%)
Mutual labels:  refactoring
Unleash-Shiny
https://rinterface.com/shiny/talks/RPharma2020/
Stars: ✭ 25 (-37.5%)
Mutual labels:  exercise
FatMaxxer
Android Project to find FatMax in real time with a Polar H10
Stars: ✭ 32 (-20%)
Mutual labels:  exercise
liquigraph
Migrations for Neo4j
Stars: ✭ 122 (+205%)
Mutual labels:  refactoring

Refactoring Golf

Refactoring Golf is a game designed to stretch your refactoring muscles and get you to explore your IDE to see what's really possible using shortcuts and automation.

This repo contains several source trees, or numbered "Holes" based on a single exercise. Each hole carries on from the last for a single exercise - which is the application of a tax amount to a set of monatary amount.

Your goal is to safely and efficiently as possible refactor the Hole-X code to look like the Hole X+1 code. You must aim to do it in as few "strokes" as possible.

A "stroke" is essentially a change made to the code, and every stroke costs you points.

Your pairing partner should carefully score you as follows:

  • 1 point for every change made to the code using a shortcut or automated IDE feature (e.g., an automated refactoring, code template, or Find/Replace)
  • 2 points for every manual edit. Note that a single "edit" could cover multiple lines of code.
  • Double points for every change made while the code cannot pass the tests after the previous change.
  • Zero points for code formatting (e.g., deleting whitespace or optimizing imports).

Allow yourselves a maximum of 2 attempts at each round to determine your best score.

Hints:

  1. You may find that customising your IDE is useful (e.g. custom code templates, or even custom refactorings.)

  2. If possible, it would be a good idea to have the two versions (Hole X and Hole X+1) of each set of source files open on different machines, as you could easily tie yourself in knots editing the wrong files!

  3. Keep that second machine available as a tooling environment. Writing custom tools (scripts, templates etc) costs you zero points in refactoring golf.

Course records:

These are the best known scores, achieved using IntelliJ:

Hole Best score Notes
1 3
2 7
3 5
4 6
5 10
6 7

Course Record: 38

Acknowledgements:

This exercise was developed with Ivan (@s4nchez). :) Thanks to @ivanmoore and @rchatley for the inspiration. These instructions were mostly stolen from @jasongorman's Refactoring Golf repo

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].