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
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.1k
Continuously deploying https served statically compiled sites to S3 with canonical domains
coldclimate
0
72
Scripting creating AWS based servers
coldclimate
0
290
Scaling CANDDi
coldclimate
0
270
Other Decks in Technology
See All in Technology
解析の定理証明実践@Lean 4
dec9ue
0
180
生まれ変わった AWS Security Hub (Preview) を紹介 #reInforce_osaka / reInforce New Security Hub
masahirokawahara
0
240
急成長を支える基盤作り〜地道な改善からコツコツと〜 #cre_meetup
stefafafan
0
130
PHPでWebブラウザのレンダリングエンジンを実装する
dip_tech
PRO
0
210
BrainPadプログラミングコンテスト記念LT会2025_社内イベント&問題解説
brainpadpr
1
170
JEDAI Databricks Free Editionもくもく会
taka_aki
1
100
フィンテック養成勉強会#54
finengine
0
180
Prox Industries株式会社 会社紹介資料
proxindustries
0
330
mrubyと micro-ROSが繋ぐロボットの世界
kishima
2
350
AWS Organizations 新機能!マルチパーティ承認の紹介
yhana
1
160
rubygem開発で鍛える設計力
joker1007
2
220
「Chatwork」の認証基盤の移行とログ活用によるプロダクト改善
kubell_hr
1
200
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
430
65k
Balancing Empowerment & Direction
lara
1
380
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
GitHub's CSS Performance
jonrohan
1031
460k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
Visualization
eitanlees
146
16k
Being A Developer After 40
akosma
90
590k
How to train your dragon (web standard)
notwaldorf
94
6.1k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
Practical Orchestrator
shlominoach
188
11k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
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