GithubHelp home page GithubHelp logo

xpmatteo / birthday-greetings-kata Goto Github PK

View Code? Open in Web Editor NEW
75.0 75.0 74.0 7.59 MB

Sources and docs for a simple refactoring and OO design exercise

Home Page: http://matteo.vaccari.name/blog/archives/154

Shell 2.88% Java 97.12%

birthday-greetings-kata's People

Contributors

estebp avatar paucls avatar xpmatteo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

birthday-greetings-kata's Issues

Refactoring

Soy de la universidad Espol del Ecuador y como tarea nos mandaron a buscar repositorios a los cuales identificar los code smells y hacer refactoring. Me parece haber encontrados unos en su codigo.

1.-Long Method

Este code smell se da cuando un método es muy largo, hace mas difícil comprender el código y lo que hace el método. En este caso se encuentra en BirthdayService en sendGreetings.
Refactoring: Utilizaremos Extract Method lo cual nos ayudara a extraer líneas de este método para que sea mas corto, mas fácil de leer y entender.

Picture1

2.-Long parameter list

Este code smell se encuentra en BirthdayService en el método sendMessage ya que tiene 6 parametros. Ocurre porque muchas cosas están metidas en el mismo método, es algo complicado entender el método con tantos parámetros por lo que aplicaremos un método de refactorización que hará que se vea mejor.
Refactoring: Usaremos Introduce Parameter Object que nos permitirá unir algunos de los parámetros y hacerlos un objeto con dichos parámetros. Así podemos enviar el objeto en vez de enviar tantos parámetros al método. Esto hará que el código sea mas legible.

Picture2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.