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
75
Scripting creating AWS based servers
coldclimate
0
320
Scaling CANDDi
coldclimate
0
300
Other Decks in Technology
See All in Technology
Introduction to Bill One Development Engineer
sansan33
PRO
0
360
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
5
1.5k
SREのプラクティスを用いた3領域同時 マネジメントへの挑戦 〜SRE・情シス・セキュリティを統合した チーム運営術〜
coconala_engineer
2
590
インフラエンジニア必見!Kubernetesを用いたクラウドネイティブ設計ポイント大全
daitak
0
320
Bill One急成長の舞台裏 開発組織が直面した失敗と教訓
sansantech
PRO
1
290
制約が導く迷わない設計 〜 信頼性と運用性を両立するマイナンバー管理システムの実践 〜
bwkw
3
860
入社1ヶ月でデータパイプライン講座を作った話
waiwai2111
1
230
Deno・Bunの標準機能やElysiaJSを使ったWebSocketサーバー実装 / ラーメン屋を貸し切ってLT会! IoTLT 2026新年会
you
PRO
0
290
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
10k
Meshy Proプラン課金した
henjin0
0
240
レガシー共有バッチ基盤への挑戦 - SREドリブンなリアーキテクチャリングの取り組み
tatsukoni
0
200
学生・新卒・ジュニアから目指すSRE
hiroyaonoe
2
550
Featured
See All Featured
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.3k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
Testing 201, or: Great Expectations
jmmastey
46
8k
Claude Code のすすめ
schroneko
67
210k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
420
The Mindset for Success: Future Career Progression
greggifford
PRO
0
230
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
0
3.4k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
100
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
Discover your Explorer Soul
emna__ayadi
2
1.1k
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