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
140
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
150
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
79
Scripting creating AWS based servers
coldclimate
0
340
Scaling CANDDi
coldclimate
0
320
Other Decks in Technology
See All in Technology
AIとハーネスで育てるトランスコンパイラ / 20260722 Yasushi Katayama
shift_evolve
PRO
3
770
複数プロダクトで進めるAI機能実装 ── 実践から得たリアルな学びとロードマップ実現への挑戦 / AICon2026_yanari
rakus_dev
1
270
生成 AI 時代にいま一度「問い合わせ」について考えてみる
kazzpapa3
1
130
それでも、技術なブログを書く理由 #kichijojipm / Why I Still Write Tech Blogs Even Now
shinkufencer
0
340
仕様駆動開発、導入半年。「本当に速くなってるの?」にデータで答える / AICon2026_hirakawa
rakus_dev
0
320
「顧客の声を聞かなければ何も始まらない」 ── 顧客の声から生まれた『AI返信補助機能』の開発プロセス / AICon2026_shikata_imai
rakus_dev
1
270
人とエージェントが高め合う協業設計
kintotechdev
0
750
事業成長とAI活用を止めないデータ基盤アーキテクチャの設計思想
hiracky16
0
500
そのドキュメント、自動化しませんか?
yuksew
1
410
穢れた技術選定について
watany
19
6.1k
生成AI×AWS CDK×AWS FISで"振り返れる"ミニGameDayをつくろう
yoshimi0227
2
530
「休む」重要さ
smt7174
6
1.6k
Featured
See All Featured
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
260
How STYLIGHT went responsive
nonsquared
100
6.2k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.7k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
220
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
270
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Designing Experiences People Love
moore
143
24k
Google's AI Overviews - The New Search
badams
0
1.1k
WCS-LA-2024
lcolladotor
0
750
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Rails Girls Zürich Keynote
gr2m
96
14k
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