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.2k
Continuously deploying https served statically compiled sites to S3 with canonical domains
coldclimate
0
76
Scripting creating AWS based servers
coldclimate
0
320
Scaling CANDDi
coldclimate
0
310
Other Decks in Technology
See All in Technology
AWS CDK「読めるけど書けない」を脱却するファーストステップ
smt7174
3
210
生成AI活用でQAエンジニアにどのような仕事が生まれるか/Support Required of QA Engineers for Generative AI
goyoki
1
360
Bill One 開発エンジニア 紹介資料
sansan33
PRO
5
18k
生成AIで速度と品質を両立する、QAエンジニア・開発者連携のAI協調型テストプロセス
shota_kusaba
0
370
テストプロセスにおけるAI活用 :人間とAIの共存
hacomono
PRO
0
130
「お金で解決」が全てではない!大規模WebアプリのCI高速化 #phperkaigi
stefafafan
5
2.2k
SSoT(Single Source of Truth)で「壊して再生」する設計
kawauso
1
220
俺の/私の最強アーキテクチャ決定戦開催 ― チームで新しいアーキテクチャに適合していくために / 20260322 Naoki Takahashi
shift_evolve
PRO
1
390
Phase02_AI座学_応用
overflowinc
0
1.9k
SaaSに宿る21g
kanyamaguc
2
110
建設DXを支えるANDPAD: 2025年のセキュリティの取り組みと卒業したいセキュリティ
andpad
0
140
A Casual Introduction to RISC-V
omasanori
0
540
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Exploring anti-patterns in Rails
aemeredith
2
290
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.9k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
WENDY [Excerpt]
tessaabrams
9
37k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
160
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.8k
Accessibility Awareness
sabderemane
0
84
Designing Experiences People Love
moore
143
24k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
GraphQLの誤解/rethinking-graphql
sonatard
75
11k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
220
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