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
290
Other Decks in Technology
See All in Technology
歴史から学ぶ、Goのメモリ管理基礎
logica0419
14
2.7k
Everything As Code
yosuke_ai
0
510
サラリーマンソフトウェアエンジニアのキャリア
yuheinakasaka
38
18k
会社紹介資料 / Sansan Company Profile
sansan33
PRO
11
390k
AIと融ける人間の冒険
pujisi
0
120
スクラムマスターが スクラムチームに入って取り組む5つのこと - スクラムガイドには書いてないけど入った当初から取り組んでおきたい大切なこと -
scrummasudar
3
1.9k
#22 CA × atmaCup 3rd 1st Place Solution
yumizu
1
150
kintone開発のプラットフォームエンジニアの紹介
cybozuinsideout
PRO
0
500
チームで安全にClaude Codeを利用するためのプラクティス / team-claude-code-practices
tomoki10
7
3.2k
戰略轉變:從建構 AI 代理人到發展可擴展的技能生態系統
appleboy
0
190
テストセンター受験、オンライン受験、どっちなんだい?
yama3133
0
210
_第4回__AIxIoTビジネス共創ラボ紹介資料_20251203.pdf
iotcomjpadmin
0
190
Featured
See All Featured
30 Presentation Tips
portentint
PRO
1
180
Context Engineering - Making Every Token Count
addyosmani
9
590
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.3k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.1k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
120
Un-Boring Meetings
codingconduct
0
170
Game over? The fight for quality and originality in the time of robots
wayneb77
1
77
We Have a Design System, Now What?
morganepeng
54
8k
AI: The stuff that nobody shows you
jnunemaker
PRO
2
160
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
600
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