No video

From Legacy Code To STATE OF THE ART DEVELOPMENT

  Рет қаралды 23,047

Continuous Delivery

Continuous Delivery

Жыл бұрын

What is the reality of moving from stubborn legacy code to start of the art modern software engineering processes like Continuous Delivery? You can't always start from the ideal place, and shifting to something like CD may seem daunting and not worth the time.
So, how do you take the steps towards continuous delivery, from even the most difficult code bases?
-----------------------------------------------------------------------------------
⭐ PATREON:
Join the Continuous Delivery community and access extra perks & content!
JOIN HERE ➡️ bit.ly/Continu...
-------------------------------------------------------------------------------------
🔗 LINKS
📧 Join the CD Mail List here ➡️ www.subscribep...
FREE REFACTORING TUTORIAL: Learn Approval Testing, Refactoring and Decluttering FOR FREE and apply them to some very nasty code. You can work along with Dave to learn how to make the bad code testable. ➡️ courses.cd.tra...
-------------------------------------------------------------------------------------
👕 T-SHIRTS:
A fan of the T-shirts I wear in my videos? Grab your own, at reduced prices EXCLUSIVE TO CONTINUOUS DELIVERY FOLLOWERS! Get money off the already reasonably priced t-shirts!
🔗 Check out their collection HERE: bit.ly/3vTkWy3
🚨 DON'T FORGET TO USE THIS DISCOUNT CODE: ContinuousDelivery
-------------------------------------------------------------------------------------
📚 BOOKS:
📖 Dave’s NEW BOOK "Modern Software Engineering" is available as paperback, or kindle here ➡️ amzn.to/3DwdwT3
and NOW as an AUDIOBOOK available on iTunes, Amazon and Audible.
📖 The original, award-winning "Continuous Delivery" book by Dave Farley and Jez Humble ➡️ amzn.to/2WxRYmx
📖 "Continuous Delivery Pipelines" by Dave Farley
Paperback ➡️ amzn.to/3gIULlA
ebook version ➡️ leanpub.com/cd...
NOTE: If you click on one of the Amazon Affiliate links and buy the book, Continuous Delivery Ltd. will get a small fee for the recommendation with NO increase in cost to you.
-------------------------------------------------------------------------------------
CHANNEL SPONSORS:
Equal Experts is a product software development consultancy with a network of over 1,000 experienced technology consultants globally. They increase the pace of innovation by using modern software engineering practices that embrace Continuous Delivery, Security, and Operability from the outset ➡️ bit.ly/3ASy8n0
Roost, An Ephemeral DevOps Platform, automates your DevOps pipeline. It creates ephemeral DevOps environments on-demand or based on pull requests. Roost reduces DevOps complexities and shortens release cycles with fewer engineers. ➡️ bit.ly/CD2Roost
Tricentis is an AI-powered platform helping you to deliver digital innovation faster and with less risk by providing a fundamentally better approach to test automation. Discover the power of continuous testing with Tricentis. ➡️ bit.ly/Tricent...
TransFICC provides low-latency connectivity, automated trading workflows and e-trading systems for Fixed Income and Derivatives. TransFICC resolves the issue of market fragmentation by providing banks and asset managers with a unified low-latency, robust and scalable API, which provides connectivity to multiple trading venues while supporting numerous complex workflows across asset classes such as Rates and Credit Bonds, Repos, Mortgage-Backed Securities and Interest Rate Swaps ➡️ transficc.com

Пікірлер: 93
@ContinuousDelivery
@ContinuousDelivery Жыл бұрын
FREE REFACTORING TUTORIAL: Learn Approval Testing, Refactoring and Decluttering FOR FREE and apply them to some very nasty code. You can work along with Dave to learn how to make the bad code testable ➡ courses.cd.training/courses/refactoring-tutorial
@LuisMuniz
@LuisMuniz Жыл бұрын
Just a quick rectification. Galileo was not executed. He was placed under house arrest. Giordano Bruno was executed.
@pepineros4681
@pepineros4681 Жыл бұрын
Yes, but… We don’t talk about Bru-no-no-no-no
@ContinuousDelivery
@ContinuousDelivery Жыл бұрын
Yes, sorry for the mistake
@NickDanger3
@NickDanger3 Жыл бұрын
And his arrest was not for challenging people’s worldview: it was for violating a direct order from the church to teach heliocentrism as a theory, not as a fact
@jonathansaindon788
@jonathansaindon788 Жыл бұрын
@@pepineros4681 You definitely have A Disney+ subscription 😂
@tongobong1
@tongobong1 10 ай бұрын
If I were Pope I would make Giordano Bruno a saint.
@Immudzen
@Immudzen Жыл бұрын
I would love seeing an episode on approval testing. I have been working on a system that was in a pretty bad state and we used a combination of approval testing and testing for some of the modules we could easily isolate as a first pass of tests. We then started refactoring the code but all the new code had tests written to specifically cover it. As we cleaned up the system the test coverage go better and the defect rates dropped. We also follow a boy scout type principle of leaving the code in a better state any time you touch it. So if you are working in a module and you see some bad code clean up a function or two, add some tests, etc. as part of your normal work. We went from merging about once per year into the master branch with numerous bugs to being able to do it several times per day and no failures in many months. Most branches now are very short lived before they merge back in. The situation is still not ideal with a CI/CD standpoint but it sure is a LOT better. I used many things I have learned from your channel in guiding this process.
@law1213
@law1213 Жыл бұрын
Can I second the request for a video on approval testing! Excellent work thanks.
@nickbarton3191
@nickbarton3191 Жыл бұрын
Never heard the term but that is exactly what we've been doing on our legacy ball of mud. I always felt a bit guilty doing it as it's not unit testing. I'm reassured that it's a recognised approach. Yes, a video about this would be helpful.
@shilohaendler6360
@shilohaendler6360 Жыл бұрын
Would be very happy to watch a video on approval tests. We have started to adopt that technique and it is very interesting me how on or off track we are 🙂
@jimhumelsine9187
@jimhumelsine9187 Жыл бұрын
I deleted my original reply, because I realized I was confusing approval with acceptance tests. I have always used the term characterization tests, from Michael Feathers' book. I posted my first reply, before I got to Dave's portion of this video where he said that approval tests are the same as characterization tests. Most of my tests are characterization tests, since I work in a legacy code base. These tests are a bit nasty because legacy code is obdurate to being tested. My characterization tests are more implementation dependent than behavior dependent, because I don't know what the behavior should be. I view BDD/TDD based unit tests as specification tests. They declare behavior first and then the code implements it. Characterization tests help reveal and define existing behavior. They provide a safe scaffolding for refactoring, from which we may be able to write true BDD/TDD tests. I think of BDD/TDD based tests as being mostly permanent tests. Whereas, I view characterization tests as being temporary until the legacy code can be properly refactored. However, their lifecycle can still be months or years until they can be completely dismantled.
@ContinuousDelivery
@ContinuousDelivery Жыл бұрын
Jim, yes I agree with your characterisation of both - Exactly! Acceptance Tests are the real long-term value, they defend against functional regression, as well as guide the development of new features. Characterisation/Approval tests are a more tactical tool, and are more coupled to implementation detail, which means that they don't work as long-term defence when you need to change the outputs from the system. But they are a great tool to support genuine refactoring, when you are in the state that you describe, where you don't really know all that the system does. I missed this nuance for a while, but now I see them as a fantastic tool, particularly at the start of the process of making your code more tractable.
@DagarCoH
@DagarCoH Жыл бұрын
Very much yes to an episode about approval tests! ❤
@esra_erimez
@esra_erimez Жыл бұрын
"stuck in a rut and not realizing what's possible with different thinking" never have truer words been spoken. There are *some other* KZfaqrs that should take notice.
@esra_erimez
@esra_erimez Жыл бұрын
This is one of your most significantly important videos to date. Well done and thank you.
@shashank.c
@shashank.c Жыл бұрын
I remember watching your video on Approval testing, and definitely would like to see more on this topic. Please do make a video on that. Thanks for sharing your valuable pieces of wisdom.
@MarkUKInsects
@MarkUKInsects Жыл бұрын
I just love that t-shirt!
@travisneal61
@travisneal61 Жыл бұрын
Great topic! Looking forward to a more extensive approval testing video.
@jaimeduncan6167
@jaimeduncan6167 11 ай бұрын
This channel is highly relevant and useful.
@sirskaro3581
@sirskaro3581 Жыл бұрын
I would like to see a video on approval tests! I'd also love to see a video on your take of consumer-driven vs provider-driven contract tests. Particularly with how it pertains to CD.
@Personal-M.I.S.
@Personal-M.I.S. Жыл бұрын
Wow! A lot of folks caught the Galileo error. Nice to know people out there are keen on historical fact =)
@ChadEdge
@ChadEdge Жыл бұрын
Yes please on "Approval Testing" deeper dive. I've felt that approval testing is a _great_ way to get green (not comfortable with writing unit/functional tests on their own) developers moving on test plans that feel more familiar.
@dimitrisservis365
@dimitrisservis365 Жыл бұрын
I understand your point about retrofitting unit testing, however my experience is that you should not take it out of the equation for two reasons. One is that it complements well approval testing and can be applied to isolated areas. Approval tests eventually get more refined into unit tests. The process is important as legacy code tends to have layers over layers of highly specialized and sophisticated functionality. Unit testing helps to reverse engineer especially some fundamental concepts like underlying math and geometry libraries. The second reason is that legacy code more often than not comes with legacy teams. It is very hard to introduce TDD due to resistance ("our software cannot be tested automatically", "it's a waste of time and an overhead"). Having them introduce some level of unit testing helps the team's understanding and appreciation of the concept making it much easier to later on introduce TDD. There is always one or two that resist, and it takes serious amounts of time to overcome this resistance.
@SolidCollegeTry
@SolidCollegeTry Жыл бұрын
I often use the Broken Windows theory to describe the mistreatment of legacy systems and systems under development. One neglect seems to beget another. Love the shirt by the way!
@SteenLarsen
@SteenLarsen Жыл бұрын
Thanks for another great video! I would like to hear more about approval testing. I guess this must involve how the behaviour of the existing and the changed system is recorded and compared. Thanks in advance!!
@kevinthoriya691
@kevinthoriya691 Жыл бұрын
yes please, I Would be very happy to watch a video on approval tests.
@thezar79
@thezar79 Жыл бұрын
As always, valuable information. I'm interested in the approval testing, would be great to cover this topic in a separate episode.
@danielcilli9124
@danielcilli9124 Жыл бұрын
Love this video! Would definitely also love to see an Approval Testing video!
@remc0r3mc05
@remc0r3mc05 Жыл бұрын
Looking forward to an episode on approval testing! :)
@ZeDlinG67
@ZeDlinG67 Жыл бұрын
Yes, please do the approval test video too :)
@ralftaraschewski6094
@ralftaraschewski6094 Жыл бұрын
Thank you for another great summary. I really like the way you simplify a complex topic. It would bei great, if you speak the next time about how to transform a company to use CI/CD.
@YonoZekenZoid
@YonoZekenZoid Жыл бұрын
letting you know in the comments would like to see video on approval tests :D
@nicopostigo123
@nicopostigo123 Жыл бұрын
Thanks for the video, great info!
Жыл бұрын
Approval testing looks interesting, but hard to achieve reliably. A video on that would be great. 😉
@adamkimberley2575
@adamkimberley2575 Жыл бұрын
Would love to see a video on approval testing. Thanks!
@vanteole9427
@vanteole9427 Жыл бұрын
Do an introduction on approval testing please! Love you!
@MaximilianSchafzahl
@MaximilianSchafzahl Жыл бұрын
thanks, best summary of this topic I've ever seen :)
@Kevinf63
@Kevinf63 Жыл бұрын
Didn't know these donations left comments, woops! Nothing to comment on just yet for this video, but I just wanted to say thanks for all the content, between your book and videos I've been slowly trickling in better practices across our teams. Although its hard finding the time between the management, admin, engineering, development and deadlines to fit in time for optimizing for CD and the culture shift that needs to happen, I can see the change taking effect in small ways, and I'd like to think the small things add up over time :)
@ContinuousDelivery
@ContinuousDelivery 11 ай бұрын
Thank you, and good luck on your journey.
@scvnthorpe__
@scvnthorpe__ Жыл бұрын
10/10 shirt
@edgeeffect
@edgeeffect Жыл бұрын
10X rockstar ninja shirt. ;)
@bastianbaggins8700
@bastianbaggins8700 Жыл бұрын
+1 for the episode on approval testing
@human_devops
@human_devops Жыл бұрын
Of course legacy is of value! You just have to give it some love!
@Raaampage
@Raaampage Жыл бұрын
Yes please do a topic on approval testing :)
@dcstingray04
@dcstingray04 Жыл бұрын
Would like to see a video with your views on approval testing
@DavidCanatsey
@DavidCanatsey Жыл бұрын
Yes, please on Approval Testing!
@jhonasttan
@jhonasttan Жыл бұрын
Ty Dave! Please show us more on approval testing
@DavidMcGill2015
@DavidMcGill2015 Жыл бұрын
Thanks!
@malteplath
@malteplath Жыл бұрын
Love the T-shirt!
@cchinaka
@cchinaka Жыл бұрын
I'll very much like to see approval tests. Thank you!
@rosshoyt2030
@rosshoyt2030 Жыл бұрын
Video on approval testing would be great!
@thekavh
@thekavh Жыл бұрын
Does anyone know the name of the FAA program mentioned ?
@attilamolnar3791
@attilamolnar3791 Жыл бұрын
In the forth an important thing is to make deployment automated. Even if you have to write the automation yourself! I have seen many systems having problems because lot of people implemented stuff on their own way. I don't say that it's always a problem but I think it is very important to try to do it using some off the self (trustworthy) solution! The problem of having lot of self written automative tools is that it can quickly become similar to legacy code. But I would love to hear David's opinion on this! :D
@ContinuousDelivery
@ContinuousDelivery Жыл бұрын
I don't see that as much of a problem. I guess it depends on scale, if you are talking about lots of web-scale environments, where you want economies of scale/reuse for you infra definitions, then sure better tools help with this. But that isn't usually the case when we are talking about automating the deployment of a Legacy System. It is more likely to be a one-off, so custom is less of an issue I think. Having said that, sure, I'd start with an off the shelf tool, as I said in the video. In most cases I'd see if I could sensibly containerise things, then look to Chef, Puppet, et al, and only if none of those options make sense would I do my own thing.
@lorddidger
@lorddidger Жыл бұрын
What does it mean "to record interactions with the system"? Syscalls? It sounds like a desperate idea. However, desparate times call for desperate measures. If it was a viable solution without any hidden assumptions, I would pay to learn how to do approval/characterisation tests.
@uome2k7
@uome2k7 Жыл бұрын
its sort of like virtualization testing. You can record the input/output of normal operations and then use that to verify for the same input you get the same output after making a change. by doing so you are also building something close to a virtual implementation of your service that can be used when your real service is not available to test with. By giving it known input you get known output...allowing the consuming process to continue being testable too.
@adamkimberley2575
@adamkimberley2575 Жыл бұрын
We've just inherited a legacy system (a huge impenetrable financial model) which has thousands of 'regression' tests. The problem is that these regressions take an overnight run to execute (so not a great feedback cycle) and also nobody really knows what they're supposed to be testing (they are not categorised and have very unhelpful names), so if a set of them break, it's very difficult to say why. Do you have any advice on how to deal with this? My gut feeling is to essentially just follow the advice you give in this video of slowly building up characterisation tests for the parts of the code we're refactoring (as well as more typical TDD tests for new parts of the code) and slowly remove the reliance on these regressions over time. The cultural/organizational problem we have is that these regressions give the QAs and wider business a comfort blanket that they really do not want to let go of, which would make it really difficult to move towards a continuous delivery model given the full pipeline takes ~8 hours.
@uome2k7
@uome2k7 Жыл бұрын
you can treat the legacy tests as legacy code as well in terms of directing your refactoring effort. If the tests arent helpful, replace them with ones that are.
@ruslanfadeev3113
@ruslanfadeev3113 Жыл бұрын
A bit of criticism: the first four minutes basically said "CD is hard to switch to from a legacy process", it was way too repetitive.
@joeypencil5368
@joeypencil5368 Жыл бұрын
How do approval tests differ from pre-existing tests?
@ContinuousDelivery
@ContinuousDelivery Жыл бұрын
'Approval testing' is a technical term, it has a specific meaning, and they are there to verify that the code is unchanged in behaviour. Approval tests are great to support refactoring, I have a video coming out soon on Approval testing. Pre-existing tests may or may not be focused on that, it isn't really a definitive term in the same way.
@lucaslossmusic
@lucaslossmusic Жыл бұрын
I would like an episode on approval testing.
@Flamechr
@Flamechr Жыл бұрын
Look at 7 k lines c and cpp files from work 😢. With no unittest
@sasukesarutobi3862
@sasukesarutobi3862 Жыл бұрын
Michael Feathers' book is definitely a good place to start if you're looking to make it more unit testable. It has a number of practical strategies to isolate the untestable parts, instrument the testable parts, and then refactor and amend what's left. The most important thing to remember: you don't need to fix or refactor everything all at once. Look first at what's most likely to change in the normal course of business. If it's working as it should and doesn't need to change for a business reason, then move on to what isn't working and/or does need to change.
@Flamechr
@Flamechr Жыл бұрын
@@sasukesarutobi3862 thanks for the advice I will take a look at it :)
@TonyWhitley
@TonyWhitley Жыл бұрын
Pfft! I worked with *functions* that had 7k lines (and more!) with no unit test. Well of course there were no unit tests, you can’t unit test stuff like that.
@SeamusMcMichael
@SeamusMcMichael Жыл бұрын
I love the t-shirt
@dichaos
@dichaos Жыл бұрын
What I am curious to find out is, if the system you created in LMAX is stateless and if it is horizontally scalable. Generally trading contracts for example EUR/USD currency exchanges is not something you can horizontally scale and the latency for storing and restoring the state of a market in a stateless system takes time.
@ContinuousDelivery
@ContinuousDelivery Жыл бұрын
It’s not stateless, it is VERY Stateful, but it is horizontally scalable through sharding.
@dichaos
@dichaos Жыл бұрын
@@ContinuousDelivery so that I don't keep bothering you, can you point me to a document as to how sharding worked?
@dichaos
@dichaos Жыл бұрын
@@ContinuousDelivery and thank you :)
@rdean150
@rdean150 Жыл бұрын
I've always heard what you call Approval Tests referred to as Regression Tests.
@ContinuousDelivery
@ContinuousDelivery Жыл бұрын
Not really the same thing, though they are used as regression tests. I'd say that "Approval tests are one type of regression test, there are others".
@TristanBailey
@TristanBailey 2 ай бұрын
“Can we fix it”. No its legacy, we don’t even want to look at it on a bad day. But yay it’s one of our core tools. … taxi!
@BryonLape
@BryonLape Жыл бұрын
I wonder if I can convince my PM that we need to talk to QA about Approval Testing.....hmm...
@xybersurfer
@xybersurfer Жыл бұрын
with automating acceptance tests, do you mean a high level test? otherwise i don't see how you would automate user tests. i love the shirt by the way
@ContinuousDelivery
@ContinuousDelivery Жыл бұрын
Yes, Acceptance Tests are high-level, BDD-style, functional tests that validate that the system does what your users want it to do, without, explicitly, saying how the system works.
@adrianojordao4634
@adrianojordao4634 Жыл бұрын
Galileu was not executed by the inquesition. Died an old man. Almost... this was a clever man.
@ContinuousDelivery
@ContinuousDelivery Жыл бұрын
Quite correct, sorry for my mistake.
@petropzqi
@petropzqi Жыл бұрын
Request(DaveShouldShowHowToWriteAnAprovalTest);
@christopherbooty5049
@christopherbooty5049 Жыл бұрын
Topical!
@romanhimmes171
@romanhimmes171 Жыл бұрын
Hmm. As far as I know, Gallileo did discuss his ideas with the Inquisition and with the pope and he got along with them fine. Years later after he called the pope an idiot and he lost many friends by being just an asshole, he published a book by saying there is proof that the sun is in the center even though he did not have any. (The first proof came much later, when the instruments were precise enough). Then the church treated him the way they did. Just out of pure spite The moral of this story is, do not behave like Gallileo. To be right is not enough to make a change. It takes a lot of work and effort to persuade the ones around you.
@kayakMike1000
@kayakMike1000 Жыл бұрын
Gallileo wasn't executed, just put under house arrest. He was condemned by the church for heresy for the support for the Copernicus science.
@ContinuousDelivery
@ContinuousDelivery Жыл бұрын
Oops, quite right, sorry!
@jaimeduncan6167
@jaimeduncan6167 11 ай бұрын
1. Galileo was not executed. 2. Galileo did not have problems because he believed in the Heliocentric model, after all, there is a reason is not attributed to him, but because he was a smart jerk with almost no social skills. Galileo decided to publicly and in writing humiliate a dude because he was of a different opinion about the heliocentric model calling him an idiot. This time the dude had a lot of power and was used to have kings's reverence, Yes the dude was the pope. The reason he was not killed is that he had a friend, so "tower" was his punishment and tower for life.
@werneryc
@werneryc Жыл бұрын
Was that Rider or Intellij ?
@ContinuousDelivery
@ContinuousDelivery Жыл бұрын
IntelliJ
@niksatan
@niksatan Жыл бұрын
No, it's Forked
@mateusz_strzalkowski
@mateusz_strzalkowski Жыл бұрын
Galileo was not executed... (Died of natural causes nine years after his trial.)
@aronlilland7638
@aronlilland7638 Жыл бұрын
very very unprofessional shirt. disappointed.
@cloojure
@cloojure Жыл бұрын
Dave! It was Copernicus who came up with the idea of a sun-centered solar system. Galileo also believed Copernicus' theory, but was much later. See en.wikipedia.org/wiki/Nicolaus_Copernicus
Types Of Technical Debt And How To Manage Them
17:58
Continuous Delivery
Рет қаралды 52 М.
Don't Mock 3rd Party Code
19:56
Continuous Delivery
Рет қаралды 39 М.
SCHOOLBOY. Последняя часть🤓
00:15
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 9 МЛН
Harley Quinn's plan for revenge!!!#Harley Quinn #joker
00:49
Harley Quinn with the Joker
Рет қаралды 26 МЛН
Does this sound illusion fool you?
24:55
Veritasium
Рет қаралды 525 М.
Tips for Dealing with Legacy Code
25:21
ChangeNode
Рет қаралды 622
Migrating 3.7 Million Lines Of Code
23:06
ThePrimeTime
Рет қаралды 144 М.
Software Architecture Tips I WISH I Knew Sooner
18:04
Continuous Delivery
Рет қаралды 44 М.
Tidy First? Kent Beck on Refactoring
46:20
InfoQ
Рет қаралды 8 М.
Test Driven DESIGN - Step by Step
25:46
Continuous Delivery
Рет қаралды 19 М.
PHP doesn't suck (anymore)
10:48
Aaron Francis
Рет қаралды 203 М.
I Bet You’re Overengineering Your Software
19:58
Continuous Delivery
Рет қаралды 23 М.