Smell of Code - problems

Get Started. It's Free
or sign up with your email address
Smell of Code - problems by Mind Map: Smell of Code - problems

1. Conditional Complexity ( złożoność warunków )

1.1. solutions

1.1.1. Introduce Null Object

1.1.2. Replace State-Altering Conditionals with State

1.1.3. Move Embellishment to Decorator

1.1.4. Replace Conditional Logic with Strategy

1.2. za bardzo rozbudowane i nieczytelne instrukcje warunkowe

2. Primitive Obsession (pierwotna obsesja)

2.1. solutions

2.1.1. Replace Conditional Logic with Strategy

2.1.2. Replace State-Altering Conditionals with State

2.1.3. Replace Type Code with Class

2.1.4. Replace Implicit Tree with Composite

2.1.5. Replace Implicit Language with Interpreter

2.1.6. Move Embellishment to Decorator

2.1.7. Encapsulate Composite with Builder

2.2. występuje gdy jeszcze nie zdecydowaliśmy się na użycie jakichś większych abstrakcji

3. Indecent Exposure (nieprzyzwoite obnażanie się)

3.1. Encapsulate Classes with Factory

4. Duplicate Code

4.1. solutions

4.1.1. Introduce Null Object

4.1.2. Unify Interfaces with Adapter

4.1.3. Extract Composite

4.1.4. Replace One/Many Distinctions with Composite

4.1.5. Chain Constructors

4.1.6. Introduce Polymorphic Creation with Factory Method

4.1.7. Form Template Method

4.2. rodzaje

4.2.1. ukryte

4.2.2. jawne

5. Long Method (długa metoda)

5.1. solutions

5.1.1. Replace Conditional Logic with Strategy

5.1.2. Move Accumulation to Visitor

5.1.3. Replace Conditional Dispatcher with Command

5.1.4. Move Accumulation to Collecting Parameter

5.1.5. Compose Method

5.1.6. Extract Method

5.2. metoda powina być max 10 lini...

5.2.1. a w większości przypadków 5

5.3. nie warto pisać dużych metod na początku

5.3.1. faktoryzacja jest na końcu

6. Speculative Generality (ogólność spekulatywna)

7. Solution Sprawl ( rozrzucanie rozwiązania )

7.1. solutions

7.1.1. Move Creation Knowledge to Factory

7.2. Shotgun surgery

7.2.1. brat biźniak

7.2.2. pokazuje się w trakcie pracy z kodem, w odróżnieniu od Solution Sprawl (które wyczuwa się przy analizie)

8. Alternative Class With Different Interfaces ( podobne klasy o innych interfejsach )

8.1. solutions

8.1.1. Unify Interfaces with Adapter

9. Large class (dużą klasa)

9.1. solutions

9.1.1. Replace Conditional Dispatcher with Command

9.1.2. Replace State-Altering Conditionals with State

9.1.3. Replace Implicit Language with Interpreter

9.1.4. extract class

9.1.5. extract sub-class

9.2. gdy zbyt wiele zmiennych egzemplarzy

10. Lazy class (leniwa klasa)

10.1. solutions

10.1.1. Inline Singleton

11. Switch Statment ( instrukcje switch )

11.1. solutions

11.1.1. Replace Conditional Dispatcher with Command

11.1.2. Move Accumulation to Visitor

12. Oddball Solution (osobliwe rozwiązanie)

12.1. solutions

12.1.1. Unify Interfaces with Adapter

13. Combinational Explosion (eksplozja kombinatoryczna)

13.1. solutions

13.1.1. Replace Implicit Language with Interpreter