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
72
Scripting creating AWS based servers
coldclimate
0
310
Scaling CANDDi
coldclimate
0
290
Other Decks in Technology
See All in Technology
Claude Code 10連ガチャ
uhyo
3
670
それでは聞いてください「Impeller導入に失敗しました」 #FlutterKaigi #skia
tacck
PRO
0
110
AIエージェントによるエンタープライズ向けスライド検索!
shibuiwilliam
1
170
お試しで oxlint を導入してみる #vuefes_aftertalk
bengo4com
2
1.5k
マイクロリブート ~ACEマインドセットで実現するアジャイル~
sony
1
330
エンジニアに定年なし! AI時代にキャリアをReboot — 学び続けて未来を創る
junjikoide
0
180
大規模プロダクトで実践するAI活用の仕組みづくり
k1tikurisu
1
480
データとAIで未来を創るDatabricks - 君の可能性を加速させるプラットフォーム
taka_aki
0
100
ソフトウェア開発現代史: 55%が変化に備えていない現実 ─ AI支援型開発時代のReboot Japan #agilejapan
takabow
2
2.6k
us-east-1 の障害が 起きると なぜ ソワソワするのか
miu_crescent
PRO
2
840
クレジットカードの不正を防止する技術
yutadayo
16
7.2k
Flutterで実装する実践的な攻撃対策とセキュリティ向上
fujikinaga
2
380
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
140
7.2k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
How to Think Like a Performance Engineer
csswizardry
28
2.3k
How to Ace a Technical Interview
jacobian
280
24k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
34
2.3k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
2.9k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.7k
Navigating Team Friction
lara
190
15k
KATA
mclloyd
PRO
32
15k
Building an army of robots
kneath
306
46k
GraphQLとの向き合い方2022年版
quramy
49
14k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
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