Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
refactoring
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
coldclimate
July 16, 2012
Technology
140
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
refactoring
a talk about making code more betterer. Contains invented words and a little swering
coldclimate
July 16, 2012
More Decks by coldclimate
See All by coldclimate
You don't scale like servers scale
coldclimate
0
150
Quick and dirty load testing with Vegeta
coldclimate
3
4.3k
Continuously deploying https served statically compiled sites to S3 with canonical domains
coldclimate
0
81
Scripting creating AWS based servers
coldclimate
0
360
Scaling CANDDi
coldclimate
0
330
Other Decks in Technology
See All in Technology
The Author Pays
hiccupps
0
150
Cloudflareの向き先
chimame
1
170
Kiro を使うコツ (頼み方、覚えさせ方、任せ方) | 目指せ Kiro マスター 09
inariku
PRO
3
130
PostgreSQL オプティマイザ統計の秘密
nori_shinoda
1
460
JAWSコミュニティに 参加して1年経った結果
ssakita
0
120
81天的 AI Agent 軟體開發團隊治理實務分享
regionbbs
0
150
SREのためのFinOps入門
muziyoshiz
2
1.1k
仕様と現実の間で落とし所を探るリモートMCPの認証・認可 — Sansanの認証基盤における課題と実践
sansantech
PRO
2
230
Gifu WordPress Meetup #200 に向けて、私たちには何ができるだろうか?/ 2026-11-07 Gifu WordPress Meetup
torounit
0
250
AI時代に求められる優秀なTechLeadの振る舞い
pospome
11
16k
公共システムAdventCalendar2026
toru_kubota
0
290
DBTS2026 盛り上がってますか!?Databricksが実現するAI時代のデータ基盤
akuwano
1
200
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.3k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.9k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
350
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.8k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
For a Future-Friendly Web
brad_frost
184
11k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
570
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
How STYLIGHT went responsive
nonsquared
100
6.4k
Transcript
Refactoring Oli Wood @coldclimate
What How Tools When
2,300 lines single file no classes 2 years old
"too important to risk breaking it"
"make it do this..."
what
replacing what is there with something new
that does exactly the same thing
same functionality
...faster
...securer
...extendable
...maintainabler
...more better
how
work out what it actually does (you think)
...high level
fits into a couple of paragraphs
...low level
function by function docblock it
find out what it actually does
including the bits everybody forgot
document its API/interface/what ever
unit tests*
Redesign it
high level logical grouping
Class structure
...think design patterns (maybe)
work out where you are going
...and get there step at a time
...nail the bit you're working on
...don't have too many balls in the air
...#TODO this thing you will forget
...#SHOULDDO ace thing you might do later
...keep running the tests
...and stop at 80%
tools
sublime text
redacted
grep -Rin
phpunit
Selenium
ghetto tests (curl > Apache logs > *nix > diff)
code formatters
php codesniffer
php coding standards fixer
when
Refactoring is a good sign you're thinking about the code
...constant refactoring is geek circle jerk
...man up and live with it
...when it stops you doing something more important
...when you know what you're doing
...once the cost of not doing it out weighs that
of doing it
...when can't stand it any more
16 files object orientated does exactly the same thing
2 new modules Several £k income Multi-developer
A confession
FIN