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
120
Quick and dirty load testing with Vegeta
coldclimate
3
4k
Continuously deploying https served statically compiled sites to S3 with canonical domains
coldclimate
0
69
Scripting creating AWS based servers
coldclimate
0
250
Scaling CANDDi
coldclimate
0
230
Other Decks in Technology
See All in Technology
生成AIの強みと弱みを理解して、生成AIがもたらすパワーをプロダクトの価値へ繋げるために実践したこと / advance-ai-generating
cyberagentdevelopers
PRO
0
120
小規模に始めるデータメッシュとデータガバナンスの実践
kimujun
2
260
Tokyo dbt Meetup #10 dbt Cloudユーザー会 & パネルディスカッション
dbttokyo
1
180
GitHub Universe: Evaluating RAG apps in GitHub Actions
pamelafox
0
130
品質の高い機能を”早く”提供するために技術的な面でチームでやったこと、やりたいこと
sansantech
PRO
2
230
EKS初心者が早めに知っておきたかったこと
cuorain
0
140
Nix入門パラダイム編
asa1984
1
160
Data Migration on Rails
ohbarye
7
4.5k
失敗しないOpenJDKの非互換調査
tabatad
0
230
Jamstack でリニューアルするグリーグループのメディア
gree_tech
PRO
2
220
キーワードの再整理のススメ ~テストタイプ/テストレベルで最適化!~/20241025 Midori Inada
shift_evolve
0
120
最速最小からはじめるデータプロダクト / Data Product MVP
amaotone
1
370
Featured
See All Featured
Designing Experiences People Love
moore
138
23k
Six Lessons from altMBA
skipperchong
26
3.4k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Intergalactic Javascript Robots from Outer Space
tanoku
268
27k
Why You Should Never Use an ORM
jnunemaker
PRO
53
9k
Faster Mobile Websites
deanohume
304
30k
Writing Fast Ruby
sferik
626
60k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
504
140k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
43
6.6k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
280
Automating Front-end Workflow
addyosmani
1365
200k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
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