Skip to content

Repository files navigation

IBM Bluemix Garage Method Bootcamp

javascript topic trials

trials and tribulations of TDD and Merciless Refactoring

####Change your node version, clone the repo, install and run the tests:

nvm use v7.5.0
git clone git@github.com:wpannell/javascript-topic-trials.git app
cd app
npm install
npm run lint
npm run spec

###The Four Rules of Simple Design:

  • Passes the tests
  • Reveals intention
  • No duplication
  • Fewest elements

###The Transformation Priority Premise:

({}–>nil) no code at all->code that employs nil
(nil->constant)
(constant->constant+) a simple constant to a more complex constant
(constant->scalar) replacing a constant with a variable or an argument
(statement->statements) adding more unconditional statements.
(unconditional->if) splitting the execution path
(scalar->array)
(array->container)
(statement->recursion)
(if->while)
(expression->function) replacing an expression with a function or algorithm
(variable->assignment) replacing the value of a variable.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

5 watching

Forks

Releases

Packages

Contributors

Languages