Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
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
78
Scripting creating AWS based servers
coldclimate
0
340
Scaling CANDDi
coldclimate
0
320
Other Decks in Technology
See All in Technology
クラウドファンディング版StackChan 3体(4体)をインタラクティブな体験型作品にして展示もした話 / スタックチャンお誕生日会2026
you
PRO
0
220
Flow 不死:AI 時代 DevOps 的不變本質
cheng_wei_chen
2
550
Docker Desktop不要の時代が来る? WSL標準の「wslc」で Linuxコンテナを動かしてみた.
ueponx
0
110
Oracle Cloud Infrastructure:2026年6月度サービス・アップデート
oracle4engineer
PRO
1
370
Deep Data Security 機能解説
oracle4engineer
PRO
2
230
AWS Security Hub CSPMの成功・失敗体験
cmusudakeisuke
0
580
toB プロダクトから見たWAF
tokai235
0
250
「ビジネスがわかるエンジニア」とは何か?
ryooob
0
350
時期が悪い!それでもRaspberry Piを買って遊んで活用するには / 20260627-osc26do-rpi-jikigawarui
akkiesoft
1
890
OTel × Datadog で 「AI活用」を計測し、改善に繋げる
shihochan
2
1.1k
AI 不只幫你寫 Code: 當專案從 300 暴增到 1500, 我們如何撐住 DevOps
appleboy
0
280
AIエージェントとPhysical AIが拓く製造業の変革(ハノーバーメッセリキャップ)
iotcomjpadmin
0
160
Featured
See All Featured
Designing for humans not robots
tammielis
254
26k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
310
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
470
The untapped power of vector embeddings
frankvandijk
2
1.8k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
A Modern Web Designer's Workflow
chriscoyier
698
190k
The Pragmatic Product Professional
lauravandoore
37
7.3k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
380
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
340
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
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