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
4.1k
Continuously deploying https served statically compiled sites to S3 with canonical domains
coldclimate
0
70
Scripting creating AWS based servers
coldclimate
0
270
Scaling CANDDi
coldclimate
0
250
Other Decks in Technology
See All in Technology
20240522 - 躍遷創作理念 @ PicCollage Workshop
dpys
0
310
SpiderPlus & Co. エンジニア向け会社紹介資料
spiderplus_cb
0
490
AIエージェントに脈アリかどうかを分析させてみた
sonoda_mj
2
130
20241218_マルチアカウント環境におけるIAM_Access_Analyzerによる権限管理.pdf
nrinetcom
PRO
3
150
Amazon Q Developerで.NET Frameworkプロジェクトをモダナイズしてみた
kenichirokimura
1
140
20241125 - AI 繪圖實戰魔法工作坊 @ 實踐大學
dpys
1
440
TypeScript開発にモジュラーモノリスを持ち込む
sansantech
PRO
3
880
最近のSfM手法まとめ - COLMAP / GLOMAPを中心に -
kwchrk
8
1.8k
普通のエンジニアがLaravelコアチームメンバーになるまで
avosalmon
0
670
「完全に理解したTalk」完全に理解した
segavvy
1
270
2025年のARグラスの潮流
kotauchisunsun
0
180
ヤプリQA課題の見える化
gu3
0
150
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
A designer walks into a library…
pauljervisheath
205
24k
Bash Introduction
62gerente
609
210k
Navigating Team Friction
lara
183
15k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
RailsConf 2023
tenderlove
29
960
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.3k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.1k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.5k
Unsuck your backbone
ammeep
669
57k
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