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
130
1
Share
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
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
77
Scripting creating AWS based servers
coldclimate
0
330
Scaling CANDDi
coldclimate
0
310
Other Decks in Technology
See All in Technology
Oracle Cloud Infrastructure(OCI):Onboarding Session(はじめてのOCI/Oracle Supportご利⽤ガイド)
oracle4engineer
PRO
2
17k
「決め方」の渡し方 / How to hand over the "decision-making process"
pauli
8
1.3k
NgRx SignalStore: The Power of Extensibility
rainerhahnekamp
0
160
Babylon.js Japan Activities (2026/4)
limes2018
0
200
Bluesky Meetup in Tokyo vol.4 - 2023to2026
shinoharata
0
130
今年60歳のおっさんCBになる
kentapapa
1
340
ストライクウィッチーズ2期6話のエイラの行動が許せないのでPjMの観点から何をすべきだったのかを考える
ichimichi
1
310
さくらのクラウドでつくるCloudNative Daysのオブザーバビリティ基盤
b1gb4by
0
140
CC Workflow Studio
seiyakobayashi
0
190
レガシーシステムをどう次世代に受け継ぐか
tachiiri
0
330
Autonomous Database - Dedicated 技術詳細 / adb-d_technical_detail_jp
oracle4engineer
PRO
5
13k
DIPS2.0データに基づく森林管理における無人航空機の利用状況
naokimuroki
0
170
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Designing for humans not robots
tammielis
254
26k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
The Curious Case for Waylosing
cassininazir
0
290
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
110
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
96
Paper Plane
katiecoart
PRO
1
49k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
140
Done Done
chrislema
186
16k
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