Martin Fowler @ OOP2014 "Workflows of Refactoring"

  Рет қаралды 106,909

SIGS DATACOM

SIGS DATACOM

Күн бұрын

Пікірлер: 53
@yunli1333
@yunli1333 4 жыл бұрын
Did some note of Martin's talk as take away. "Workflow of Refactoring" by Martin Fowler @OOP2014 Two modes of code development 1) adding functions and 2) refactoring (including performance improvements). Rule of thumb: Separating refactoring keeps work focused Mindset of refactoring: when you see something yuck you do something to fight against it. Scenarios of refactoring: 1) Litter-pickup Refactoring (Something yuck but easy to address): Refactoring it to a green state then start your feature work. 2) Comprehension Refactoring (Complex logic you spend time to understand): Refactoring if possible or adding comments on how you understand that piece of logic and queuing tasks with enough context. 3) Preparatory Refactoring (Refactoring is benefiting your feature work) Then refactoring first. 4) Planned refactoring. Try to avoid such unless it has economic purpose and become necessary evil. a) First break it into small pieces. b) Then developers to tackle those piece by piece whenever touch that scope of code. Refactoring is not unwanted wasteful rework if it has economics purpose - improving agility / not slowing developers down.
@温旭阳
@温旭阳 3 жыл бұрын
thanks a lot,it saves me time to take a note!
@trihadiahmuliawati6556
@trihadiahmuliawati6556 3 жыл бұрын
Even though I find this gem 7 years late, it is still a big help. Thank you for the superb explanation
@marklavin
@marklavin 7 жыл бұрын
Growing up in an environment where people shamed my quest for elegance with the attitude "It ain't broke, why are you pissing me off and wasting my time and money fixing it," the case for elegance and intuition are quite refreshing.
@lepidoptera9337
@lepidoptera9337 3 жыл бұрын
Also completely unprofessional. If it ain't broke, you don't "fix" it. Not for the reasons mentioned but for the obvious risk that the fix will have side effects that are neither elegant nor easily predictable. Your desire to fix working systems for beauty is basically just the amateurish hubris that you can predict exactly what your solution will do and that it's actually better than the solution of somebody else that you just don't like.
@csbnikhil
@csbnikhil 5 жыл бұрын
He refactored his older talk.
@steveroger4570
@steveroger4570 3 жыл бұрын
Nice one.
@PhilipStarritt
@PhilipStarritt 8 жыл бұрын
Great talk . "Clean code allows you to go faster"
@tejaskumthekar4155
@tejaskumthekar4155 7 жыл бұрын
This is super amazing. Strangely, it has a pretty low view count. I wish more devs watch this stuff.
@erikecoologic
@erikecoologic 5 жыл бұрын
This is a great talk on how to approach your day-to-day work. It was needed for a long time.
@jeandersonbc
@jeandersonbc 10 жыл бұрын
Very wisely thoughts about why refactoring matters and how it makes difference.
@TristanBailey
@TristanBailey 5 жыл бұрын
This talk was very focused and clear. Like the audience or managers already know the idea but this hammers it out with the reasons that sometimes get lost in longer talks. Made some points make more sense to me to convince others.
@kris1227
@kris1227 8 жыл бұрын
Thank you Mr Fowler for the education.
@sasukesarutobi3862
@sasukesarutobi3862 4 жыл бұрын
Great talk by one of the titans of software engineering. Who better to discuss refactoring than the guy who originated it.
@Rick-ng3lr
@Rick-ng3lr 2 жыл бұрын
So this video confirmed that my workflow isn’t that messy after all. I usually start with a rough sketch of a requirement by writing/drawing them down. Then i try to build the feature asap. I more or less ignore all the rules that are in my code, which mostly results in a big class with everything in it. After everything works i than clean up my new code by refactoring it. 🙏🏻🙂
@lepidoptera9337
@lepidoptera9337 3 жыл бұрын
Refactoring is usually the admission that you got it all wrong on your first try. I had projects where I gave up refactoring in the middle of it and I just wrote the entire thing from scratch by reusing just the bits that actually worked great. The final result was always much better than what the refactored code could have been under the best of circumstances. I am not even bothering with refactoring anymore. When I see an architectural flaw I go in and fix it completely.
@AmericaIsFed
@AmericaIsFed 8 жыл бұрын
when i was adding an icon to a list of things i found very overly complex code, but had no time to fix it. How should one deliberately schedule this work, when the management would never justify the extra time.?
@sasukesarutobi3862
@sasukesarutobi3862 4 жыл бұрын
It's difficult if you have metrics based on number of features added, but possibly the best way is to do it in small chunks as part of your day-to-day work, and discuss it in terms of keeping the code in a state where it's easy to add features. As long as managers can see that what you're doing is supporting the goals they have, and not competing with those goals, it's easier to justify time spent refactoring.
@AmericaIsFed
@AmericaIsFed 8 жыл бұрын
what about legacy code, where there are large swaths of bad code that warrant deliberate refactoring with no new features directly being added immediately, but would definitely prepare for easier addition of new features later.
@BryonLape
@BryonLape 8 жыл бұрын
I'd start by writing tests from the outside in. Get all tests written, then start refactoring as required, writing new tests if necessary.
@JamesSmith-cm7sg
@JamesSmith-cm7sg 5 жыл бұрын
As he said, you don't have to refactor everything but at least do something. Extract out some logic or even just create a test
@steveroger4570
@steveroger4570 3 жыл бұрын
All these refactoring and TDD talks are great, but they are missing out one thing. Not everyone in team agree on what and how clean code is, or even agree on test is a thing to do in software dev. Some people just prefer long, long, Long messy procedural code in 1 method, (people see their own mess as fine) while other think refactored code is too complicated and hard to read as they scroll. (like private helper method is unnecessary) Some senior lead even punish you if you refactor even one small section of code under the belief on _"if it ain't broke, don't fix it"_ and _"we got to deliver the feature by Tuesday."_
@BangsarRia
@BangsarRia 3 ай бұрын
Mentor those folks to help them see themselves as professionals who take pride in their work (this will only work if there are unit tests you can trust for every piece of code you touch - which means you have to write them, making this approach infeasible). If they insist on being IT hacks only there for a paycheck, get another job where your superior skills are valued; if you stay you will soon be buried under their technical debt and "next Tuesday" will become "next year".
@mkgungor
@mkgungor 6 жыл бұрын
Very well expressed! Great examples
@ashokguduru3870
@ashokguduru3870 10 жыл бұрын
I liked the last slide: When you talk about Refactoring, Don't talk about the Quality, Clean-Code, Professionalism, Right-Thing etc. Just think and talk about Economics.
@kenkrebs8358
@kenkrebs8358 6 жыл бұрын
you can still think of them, only as effects/benefits of a job well done
@bipintube2009
@bipintube2009 3 жыл бұрын
Great examples
@stevenvolckaert8419
@stevenvolckaert8419 7 жыл бұрын
Great talk.
@jakobjensen8228
@jakobjensen8228 Жыл бұрын
Tfw this is part of my curriculum.
@PeterCooperUK
@PeterCooperUK 10 жыл бұрын
How are there comments 3 months old on this when it says Published on 14 Jul 2014? :-D
@Don-jt7ch
@Don-jt7ch 2 жыл бұрын
Very engaging
@BryonLape
@BryonLape 6 жыл бұрын
I would like to see the likes of Martin debate the ideals of Harlan Mills directly.
@BangsarRia
@BangsarRia 3 ай бұрын
Harlan Mills' editor - himself a CS Professor at NYU who taught me data structures - told me that Mills' approach was terrible. For example, he hardcoded everything. In the NY Times project, the resolution of the 5" screen on the terminals appeared throughout the System, which affected screen layout, records, field sizes, etc. Shortly thereafter, the Times moved to larger monitors and the entire System had to be rewritten.
@billysardar
@billysardar 10 жыл бұрын
Bravo
@xximo
@xximo 8 жыл бұрын
3 dislikes? that's interesting!
@T0m1s
@T0m1s 3 жыл бұрын
The idea of evolutionary design is cancerous because that it gets people to believe it's better to focus on the immediate task at hand and stubbornly ignore the obvious issue that will hit you one year down the road. Many times I heard developers saying "oh don't worry about the data layout too much, you can always change things later if you need to". Turns out, some things are much harder to change than others, especially when you're working on data-intensive applications.
@BangsarRia
@BangsarRia 3 ай бұрын
Watch Fowler's talk on Agile Architecture, which is designed to specifically address this characteristic of Waterfall. Uncle Bob's talks on the subject give more details
@T0m1s
@T0m1s 3 ай бұрын
@@BangsarRia what characters of Waterfall?
@MaryMcGloinActor
@MaryMcGloinActor 9 жыл бұрын
why not just do it right the first time? why rush out crap and then go back and redo it? customers don't care about your process, they care that they get a quality product
@MarkLiversedge
@MarkLiversedge 9 жыл бұрын
Mary McGloin because new ideas come along that don't fit into the old way the code was written. e.g. statistics charting application becomes interactive with animated transitions. The original chart app may well have worried about preparing data sets and putting them on a chart. The new app needs to correlate datapoints from one state to another and animate on a chart. Probably need to introduce some new objects and then refactor across them.
@MaryMcGloinActor
@MaryMcGloinActor 9 жыл бұрын
But then it's just a new feature.
@MarkLiversedge
@MarkLiversedge 9 жыл бұрын
Mary McGloin Exactly. Add the new feature; lots of new code and gain an understanding of how it interacts with the existing code till you get it to work (warts and all). Then, refactor the code to update the patterns/interactions to meet the new need. I have found that mixing refactoring and new functionality takes a very long time and you have long periods where everything is up in the air and mistakes are made.
@92aardvark
@92aardvark 9 жыл бұрын
+Mary McGloin There are lots of reasons why code needs to be changed. First, customers will choose a product they can use--even if it has some bugs--over a product that hasn't been released because it isn't perfect yet. And sometimes the code works perfectly well, except it can't easily be modified to add new features. It's not that it wasn't "right" the first time, it's that the definition of "right" has changed.
@MaryMcGloinActor
@MaryMcGloinActor 9 жыл бұрын
I'm aware of that. I'm speaking of when code is shoved out quickly into production with hacks and known issues to adhere to a very inflexible "agile" process, the idea being one can "iterate" fixes quickly. Reality is, you end up with an unstable, unreliable product (lose customers) and driving your dev and QA team nuts because you're always in fire mode
Martin Fowler @ OOP2014 "Not Just Code Monkeys"
24:12
SIGS DATACOM
Рет қаралды 51 М.
The REAL SECRET To Refactoring!
16:15
Continuous Delivery
Рет қаралды 22 М.
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 15 МЛН
Lazy days…
00:24
Anwar Jibawi
Рет қаралды 7 МЛН
УДИВИЛ ВСЕХ СВОИМ УХОДОМ!😳 #shorts
00:49
HARD_MMA
Рет қаралды 4,8 МЛН
Увеличили моцареллу для @Lorenzo.bagnati
00:48
Кушать Хочу
Рет қаралды 8 МЛН
Martin Fowler  -  Microservices
24:56
Thoughtworks
Рет қаралды 213 М.
How Senior Programmers ACTUALLY Write Code
13:37
Thriving Technologist
Рет қаралды 1,6 МЛН
Not Just Code Monkeys • Martin Fowler • GOTO 2014
21:29
GOTO Conferences
Рет қаралды 68 М.
Making Architecture Matter - Martin Fowler Keynote
14:04
O'Reilly
Рет қаралды 340 М.
Jonathan Blow on Refactoring
7:10
Anton Swifton
Рет қаралды 136 М.
Microservices • Martin Fowler • YOW! 2016
28:45
GOTO Conferences
Рет қаралды 22 М.
Robert C Martin - Clean Architecture and Design
58:39
gnbitcom
Рет қаралды 275 М.
[XConf Brasil 2019] Martin Fowler - Introdução à Refatoração
59:58
Thoughtworks Brasil
Рет қаралды 4,3 М.
Clean Code - Uncle Bob / Lesson 1
1:48:42
UnityCoin
Рет қаралды 1,9 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 15 МЛН