SlideShare a Scribd company logo
Decompose Conditional
     Consolidate Conditional Expression
Consolidate Duplicate Conditional Fragments




                            charsyam@naver.com
Decompose Conditional


Complicated condition


              Simple Function

                     Extract Method
Decompose Conditional




                Same Level
Consolidate Conditional Expression


Conditions


              Return Same Result

                      Extract Method
Consolidate Conditional Expression
Consolidate Duplicate Conditional Fragments


Same Fragment of Code is in all Branch


                 Move it Outside
Consolidate Duplicate Conditional Fragments
Thank you!

More Related Content

PPS
South Africa II
PPTX
Count min sketch
PDF
PDF
Ansible
PDF
Why GUID is needed
PDF
How to use redis well
PPTX
The easiest consistent hashing
PDF
How to name a cache key
South Africa II
Count min sketch
Ansible
Why GUID is needed
How to use redis well
The easiest consistent hashing
How to name a cache key

More from DaeMyung Kang (20)

PDF
Integration between Filebeat and logstash
PDF
How to build massive service for advance
PDF
Massive service basic
PDF
Data Engineering 101
PDF
How To Become Better Engineer
PPTX
Kafka timestamp offset_final
PPTX
Kafka timestamp offset
PPTX
Data pipeline and data lake
PDF
Redis acl
PDF
Coffee store
PDF
Scalable webservice
PDF
Number system
PDF
webservice scaling for newbie
PDF
Internet Scale Service Arichitecture
PDF
Bloomfilter
PDF
Redis From 2.8 to 4.x(unstable)
PDF
Redis From 2.8 to 4.x
PDF
Soma search
PDF
Redis 2017
PDF
Using spark data frame for sql
Integration between Filebeat and logstash
How to build massive service for advance
Massive service basic
Data Engineering 101
How To Become Better Engineer
Kafka timestamp offset_final
Kafka timestamp offset
Data pipeline and data lake
Redis acl
Coffee store
Scalable webservice
Number system
webservice scaling for newbie
Internet Scale Service Arichitecture
Bloomfilter
Redis From 2.8 to 4.x(unstable)
Redis From 2.8 to 4.x
Soma search
Redis 2017
Using spark data frame for sql
Ad

Decompose conditional