Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Our Fight Against Super Bad Patterns in Legacy ...

Our Fight Against Super Bad Patterns in Legacy Apps

Slides for the talk in RedDotRubyConf 2016.

Yasuko Ohba

June 24, 2016
Tweet

More Decks by Yasuko Ohba

Other Decks in Programming

Transcript

  1. "QQ BENJO "QQ GPSFOEVTFST "QQ GPSFOEVTFST .FSHF 3BJMT 0VS1SPKFDU(PBM 3BJMT3VCZ

    6QHSBEJOH 3BJMT3VCZ 3FGBDUPSJOH %SBXJUBXBZ GSPN 3BEJBOU$.4
  2. "QQ BENJO "QQ GPSFOEVTFST "QQ GPSFOEVTFST .FSHF 3BJMT 0VS1SPKFDU(PBM 3BJMT3VCZ

    6QHSBEJOH 3BJMT3VCZ 3FGBDUPSJOH %SBXJUBXBZ GSPN 3BEJBOU$.4 "/$*&/5$0%&
  3. "QQ BENJO "QQ GPSFOEVTFST "QQ GPSFOEVTFST .FSHF 3BJMT 0VS1SPKFDU(PBM 3BJMT3VCZ

    6QHSBEJOH 3BJMT3VCZ 3FGBDUPSJOH "EE 'FBUVSFT %SBXJUBXBZ GSPN 3BEJBOU$.4 "/$*&/5$0%&
  4. 5PUBM4DIFEVMF "VHVTU.BZ NPOUIT QFPQMF      

         .JHSBUJPO 3FGBDUPSJOH /FX 'FBUVSFT" /FX 'FBUVSFT# QMBOOJOHEFTJHOJOH CZPVSDMJFOU PVSEFTJHOJOHBOE JNQMFNFOUBUJPO JOUFHSBUJPOUFTUJOH CZBQBSUOFSDPNQBOZ
  5. .BQPG3BJMT.JHSBUJPO 3BJMT 5IF3JWFSPG5FBST 3BJMT  3BJMT  3BJMT 4BZ(PPECZF UP3VCZ

    3BJMT  5IF4USPOH1BSBNFUFST'BMMT 5IF.PVOUBJOT PG.PEFSO3BJMT
  6. .BQPG3BJMT.JHSBUJPO 3BJMT 5IF3JWFSPG5FBST 3BJMT  3BJMT  3BJMT 4BZ(PPECZF UP3VCZ

    4BGF 3BJMT  5IF4USPOH1BSBNFUFST'BMMT 5IF.PVOUBJOT PG.PEFSO3BJMT
  7. .JHSBUJPO4DIFEVMF       "QQ UP3BJMT UP3VCZ

    UP3BJMT UP3BJMT "QQ UP3BJMT UP3VCZ UP3BJMT UP3BJMT 'JMF6QMPBEJOH 1BHJOBUJPO &NBJM4FOEJOH #BDLHSPVOE1SPHSBNT 'SPN3BJMT3VCZ
  8. 3BJMT 3BJMT 3BJMT  3BJMT  3BJMT 4BZ(PPECZF UP3VCZ 4BGF

    3BJMT  5IF3JWFSPG5FBST 5IF4USPOH1BSBNFUFST'BMMT 5IF.PVOUBJOT PG.PEFSO3BJMT
  9. 3BJMT   (PPEQPJOUT CFGPSF BGUFS DSFBUF BOFXBQQ SBJMTNZBQQ SBJMTOFXNZBQQ

    DPOTPMF SVCZTDSJQUDPOTPMF SBJMTD TFSWFS SVCZTDSJQUTFSWFS SBJMTT
  10. (PUPUIFOFYUTUFQ 3BJMT 3BJMT  3BJMT  3BJMT 4BZ(PPECZF UP3VCZ 4BGF

    3BJMT  5IF3JWFSPG5FBST 5IF.PVOUBJOT PG.PEFSO3BJMT 5IF4USPOH1BSBNFUFST'BMMT
  11.  3BJMT 3BJMT  3BJMT  3BJMT 4BZ(PPECZF UP3VCZ 4BGF

    3BJMT  5IF3JWFSPG5FBST 5IF.PVOUBJOT PG.PEFSO3BJMT 5IF4USPOH1BSBNFUFST'BMMT
  12. "MNPTU%POF 3BJMT 3BJMT  3BJMT  3BJMT 4BZ(PPECZF UP3VCZ 4BGF

    3BJMT  5IF3JWFSPG5FBST 5IF4USPOH1BSBNFUFST'BMMT 5IF.PVOUBJOT PG.PEFSO3BJMT
  13. ,OPXXFMMBCPVU:063"11 ,OPX8IBU 'PS BMMBDUJPOT SFNPWJOHEFGBVMUSPVUJOH SFGBDUPSJOH63-TBOE)551NFUIPET BMMQBSBNFUFSTPG FBDIBDUJPOT BQQMZJOHTUSPOHQBSBNFUFSTTUSJDUMZ SJHIUMPPLTPGBMM

    QBHFT pYJOHIF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