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
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.2k
Continuously deploying https served statically compiled sites to S3 with canonical domains
coldclimate
0
80
Scripting creating AWS based servers
coldclimate
0
350
Scaling CANDDi
coldclimate
0
330
Other Decks in Technology
See All in Technology
事業活動を AI Ready にする攻めと守りのデータエンジニアリング / data-engineering-for-ai-ready-business
pei0804
7
2.5k
LLM機能を自作して分かるSnowflake Cortex AIの強み
nayuts
0
360
12 個 Tool と、 4,096 Token
hlum
0
130
FactoryBotアンチパターン / factory_bot anti-patterns
toshimaru
0
150
実体験から学ぶ分析エージェントの開発と運⽤
recruitengineers
PRO
8
2.1k
Execution in the Kingdom of Agents: Reflections on Abstraction and Complexity
bcantrill
0
940
並行性の問題を防げ!実践トランザクション入門
occhi
0
280
UniFi(ユニファイ)AIカメラの現場活用
ludicmind
1
410
3つのアプローチで目指す チームを強くするAI駆動開発
thkt
0
150
AIは爆速なのに、私が詰まっていた話 ― 音声入力と鳴くマスコットでボトルネックを削る
yama3133
0
600
Getting Started with Google Antigravity
glaforge
0
180
実践!Cloud Run ハンズオン!! / Cloud Run handson
y0hgi
0
200
Featured
See All Featured
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
540
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
300
Color Theory Basics | Prateek | Gurzu
gurzu
1
480
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
400
Building Adaptive Systems
keathley
44
3.2k
For a Future-Friendly Web
brad_frost
184
10k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
450
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
840
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
Designing for humans not robots
tammielis
254
26k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
530
How STYLIGHT went responsive
nonsquared
100
6.3k
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