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
120
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
110
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
240
Scaling CANDDi
coldclimate
0
220
Other Decks in Technology
See All in Technology
ここがすごいよ! AWS Systems Manager!
saichan11
0
1.8k
LINE WORKSへ簡単通知!Incoming Webhookアプリの紹介
mmclsntr
0
110
LLMアプリケーションの評価の実践と課題 ~PharmaXにおける今後の展望~
pharma_x_tech
2
160
What is DRE? - Road to SRE NEXT@広島
chanyou0311
3
630
データ分析基盤を作ってみよう~設計編~
nrinetcom
PRO
1
110
フルリモートワークはエンジニアの夢を叶えたか? #cm_odyssey
mamohacy
2
600
サーバーレスAPI(API Gateway+Lambda)とNext.jsで 個人ブログを作ろう!
shuntaka
PRO
0
560
ABEMAにおけるLLMを用いたコンテンツベース推薦システム導入と効果検証
cyberagentdevelopers
PRO
1
720
RAGのサービスをリリースして1年3ヶ月が経ちました
segavvy
4
910
Azure AI ことはじめ
tsubakimoto_s
0
130
AWSサービスメニュー開発をしていてAWSを好きだ!と感じた瞬間
toru_kubota
0
130
データ分析を支える技術 生成AI再入門
ishikawa_satoru
0
380
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
689
190k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
24
1.8k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
17
8.7k
Designing on Purpose - Digital PM Summit 2013
jponch
113
6.6k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
277
13k
BBQ
matthewcrist
82
9k
Six Lessons from altMBA
skipperchong
24
3.2k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
26
1.6k
Docker and Python
trallard
37
2.9k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
13
430
The World Runs on Bad Software
bkeepers
PRO
63
11k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.3k
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