Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
refactoring
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
coldclimate
July 16, 2012
Technology
140
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
refactoring
a talk about making code more betterer. Contains invented words and a little swering
coldclimate
July 16, 2012
More Decks by coldclimate
See All by coldclimate
You don't scale like servers scale
coldclimate
0
150
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
80
Scripting creating AWS based servers
coldclimate
0
350
Scaling CANDDi
coldclimate
0
330
Other Decks in Technology
See All in Technology
Loop Engineering これくらいでいい
mikanichinose
0
230
Essential architectural thinking (revised edition)
ufried
0
110
遠藤な_めぐろLT #38 「社内のAI活用推進」@麻布台_20261009
endonanana
0
110
Classmethod Company Deck
satoshi7
0
130
メルペイ 会計システム概要と歴史
mewuto
0
210
大型犬好きによるPugの紹介
yamanoku
1
150
味覇で作るパスタが美味い - 20261001_yabaubuki.dev
livesense
PRO
0
120
分析の民主化を支えるメタデータ整備の実践
kakehashi
PRO
4
1.3k
組み立てて楽しむ AWS Blocks 入門
kmiya84377
0
230
自主式軟體工廠
philipz
0
260
無理せず続ける、子育てエンジニアの学び
codmoninc
PRO
0
700
子育てエンジニアの可処分時間が減っても成長を諦めない戦い方
sudoakiy
6
4.5k
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
400
Building AI with AI
inesmontani
PRO
1
1.3k
Designing Experiences People Love
moore
143
24k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Color Theory Basics | Prateek | Gurzu
gurzu
1
490
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
580
Joys of Absence: A Defence of Solitary Play
codingconduct
1
540
Scaling GitHub
holman
464
140k
Crafting Experiences
bethany
1
380
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
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