Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
refactoring
Search
coldclimate
July 16, 2012
Technology
1
130
refactoring
a talk about making code more betterer. Contains invented words and a little swering
coldclimate
July 16, 2012
Tweet
Share
More Decks by coldclimate
See All by coldclimate
You don't scale like servers scale
coldclimate
0
140
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
74
Scripting creating AWS based servers
coldclimate
0
310
Scaling CANDDi
coldclimate
0
290
Other Decks in Technology
See All in Technology
mairuでつくるクレデンシャルレス開発環境 / Credential-less development environment using Mailru
mirakui
5
550
今年のデータ・ML系アップデートと気になるアプデのご紹介
nayuts
1
540
Databricks向けJupyter Kernelでデータサイエンティストの開発環境をAI-Readyにする / Data+AI World Tour Tokyo After Party
genda
1
580
AWS運用を効率化する!AWS Organizationsを軸にした一元管理の実践/nikkei-tech-talk-202512
nikkei_engineer_recruiting
0
110
SQLだけでマイグレーションしたい!
makki_d
0
1.1k
AI駆動開発における設計思想 認知負荷を下げるフロントエンドアーキテクチャ/ 20251211 Teppei Hanai
shift_evolve
PRO
2
430
初めてのDatabricks AI/BI Genie
taka_aki
0
210
JEDAI認定プログラム JEDAI Order 2026 エントリーのご案内 / JEDAI Order 2026 Entry
databricksjapan
0
140
1人1サービス開発しているチームでのClaudeCodeの使い方
noayaoshiro
2
440
AWS CLIの新しい認証情報設定方法aws loginコマンドの実態
wkm2
7
760
S3を正しく理解するための内部構造の読解
nrinetcom
PRO
3
180
Strands AgentsとNova 2 SonicでS2Sを実践してみた
yama3133
0
550
Featured
See All Featured
The SEO Collaboration Effect
kristinabergwall1
0
300
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.1k
Believing is Seeing
oripsolob
0
9
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
39
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.2k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
Color Theory Basics | Prateek | Gurzu
gurzu
0
140
How GitHub (no longer) Works
holman
316
140k
The SEO identity crisis: Don't let AI make you average
varn
0
32
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.1k
Statistics for Hackers
jakevdp
799
230k
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