Skip to content

Replace code smell with code weeds #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added slides/noun_milk_thistle_flower_3505525.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 24 additions & 20 deletions slides/presentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@

## Today's Agenda

1. I'll talk a bit about refactoring and its relationship to
code smells (15 minutes)
1. Refactoring and its relationship to
code weeds (15 minutes)
1. Mob programming lab (2 hours, with a break in the middle)
1. Debrief (30 minutes)

???

First, I'll talk a bit about refactoring in general and how refactoring relates
to the concept of code smells.
to the concept of code weeds (or code smells).

Then we'll spend a couple hours mob-programming to refactor some Ruby code. I'll
be at the keyboard, taking dictation from you all.
Expand All @@ -137,11 +137,11 @@

class: center, middle, emphasis

# Refactoring + Code Smells
# Refactoring + Code Weeds

???

This workshop is about two concepts: refactoring and code smells.
This workshop is about two concepts: refactoring and code weeds.

When I say "refactoring" I mean something very specific.

Expand Down Expand Up @@ -301,25 +301,28 @@

class: center, middle, emphasis

# Code Smells
# Code Weeds
<div style="background: url('noun_milk_thistle_flower_3505525.png') no-repeat center; height: 40%; background-size: contain;" class="fullscreen-image">

???

And that brings us to the topic of Code Smells. Code smells help us answer the
And that brings us to the topic of Code Weeds or Code Smells. Code weeds help us answer the
question of which refactoring to apply.

---
“Milk Thistle Flower” icon by kobieta from the Noun Project licensed to Todd Sedano

## What's a Code Smell?
---

## What's a Code Weed?
- A feature of a program's **structure**, which...
- usually indicates a **problem**
- is **easy to spot**
- has an agreed-on **name**


???

What is a code cmell?
What is a code weed?

- It's a feature of a program's **structure**, which...
- usually indicates a **problem**
Expand All @@ -328,7 +331,8 @@

---

## What's a Code Smell?
## What's a Code Weed?
Code Weeds were originally called Code Smells

> A code smell is a surface indication that usually corresponds to a deeper
> problem in the system.
Expand All @@ -345,28 +349,28 @@

class: center, middle, emphasis

# What code smells do you all know already?
# What code weeds do you all know already?

???

I want to get a sense of what code smells people know already. Can anyone name
a code smell?
I want to get a sense of what code weeds people know already. Can anyone name
a code weed?

(Collect code smells from the room. Ask anyone who names a code smell to
(Collect code weeds from the room. Ask anyone who names a code weed to
define/explain it to the group.)

---

class: center, middle

# Code smells give us a language to talk about .highlight[what's worth fixing].
# Code weeds give us a language to talk about .highlight[what's worth fixing].

???

Code smells are important because they give us a language to talk about which
Code weeds are important because they give us a language to talk about which
structural problems in our code are worth fixing with refactorings.

By using the language of code smells, we can align on exactly what problem we're
By using the language of code weeds, we can align on exactly what problem we're
fixing at each refactoring step. That helps us avoid low-value refactorings or
thrashing back and forth between alternatives.

Expand Down Expand Up @@ -404,7 +408,7 @@
with no consistent architecture or design strategy. New
features are becoming harder and harder to add.

Can you clean up the code smells?
Can you clean up the code weeds?

???

Expand All @@ -424,7 +428,7 @@
Please take 15 minutes to read through this code and write down specific
structural problems you see. Post the problems to [communication mechanism]
along with the line number. Don't worry about matching the problems to code
smells. We'll do that afterwards, as a group.
weeds. We'll do that afterwards, as a group.

</textarea>
<script src="./remark.js" type="text/javascript">
Expand Down