Summarized using AI

Sustainable Architecture

Alex Topalov • October 12, 2017 • Selangor, Malaysia • Talk

In the video titled 'Sustainable Architecture,' Alex Topalov discusses the intricacies of software engineering, emphasizing the need for sustainable architecture in application development.

Key points from the talk include:
- Introduction to Sustainable Architecture: Topalov begins by explaining what sustainable architecture means in the context of software development and the challenges engineers face.
- Growth of Applications and Complexity: As applications grow, they often become complex, leading to various problems. Developers usually aim for longevity in their projects but rarely account for the complications that arise later.
- Custom Solutions for Unique Problems: Many developers build systems with custom solutions tailored to their unique challenges. This often leads to increased complexity and technical debt.
- Dependency Management: As applications evolve, managing internal and external dependencies becomes crucial. Problems tend to accumulate, complicating the overall architecture.
- The Importance of Business Logic: Topalov stresses that it’s essential to separate business logic from persistence (database interactions). This separation allows for better maintenance and scalability of applications.
- Design Principles: He introduces key design principles, such as low coupling and high cohesion, which help simplify systems by ensuring modules are independently developed.
- Refactoring and Legacy Systems: Topalov discusses the difficulties involved in refactoring legacy systems and emphasizes starting with highly problematic areas, particularly those that frequently change and are complex.
- Conclusion: Ultimately, sustainable architecture requires ongoing attention to simplicity and clarity, allowing developers to identify core business processes and improve existing applications without over-engineering.

In summary, sustainable software architecture hinges on clear separation of concerns, dependency management, and attention to the growing complexity of applications. Developers should regularly assess and refactor their systems to maintain efficiency and adapt to changing requirements.

Sustainable Architecture
Alex Topalov • October 12, 2017 • Selangor, Malaysia • Talk

Speaker: Alex Topalov

Website: http://rubyconf.my

Produced by Engineers.SG

RubyConf MY 2017

00:00:09.720 hey everyone how are you it's a early morning for me or for you
00:00:16.420 but late night for me if I drop dad's asleep here on a stage don't bother me I
00:00:22.000 will just sleep just carry me somewhere and I will sleep there okay today I want
00:00:27.369 to talk about sustainable architecture it's a really biggest topic what is
00:00:33.130 sustainable and what is architecture I will start with the introduction about Who am I and that question that everyone
00:00:40.750 probably asks themselves often I started
00:00:46.000 to work in raised rails later than akhira unfortunately for me I started with rails one something and I drew in
00:00:54.699 three years I accumulated lots of books a little bit of experience so don't judge me for that I like to speak on a
00:01:01.690 stage and I like to speak with people I really like hearing problems that people can face in their everyday life or is
00:01:08.800 there everyday software engineering so you have some problem that you're struggling right now find me I would like to talk with you and maybe help
00:01:15.790 maybe make your problem problem in move even worse so not and I can't promise you anything right now should be fine I
00:01:24.610 was working on various companies before so if you want to embrace the winter and
00:01:30.130 really feel what snow looks like and feels talk to me lots of snow really a
00:01:37.659 lot of snow we have a special road for snow today I won't talk today we won't
00:01:47.289 talk about what's what's driving application farther how we can grow our
00:01:52.840 application which time and what is them what is the main problems that we may encounter during the application
00:01:58.960 development this is talking fortune not about how you can do the perfect plane
00:02:04.479 even though I would like to talk about a perfect planes this talk not even about
00:02:09.789 their flying chair you can put a fan to your share and pretend it's fine but this talk not about it and it's not
00:02:17.950 about micro services and not about distributed monolith
00:02:23.070 however it's all about that and things it between about it and I will explain
00:02:30.190 why usually when you when someone have an idea an idea is to build something and
00:02:37.990 to make a project you will feel from outsiders as idea came to success we
00:02:44.080 know only successful stories but we rarely know about stories that end up badly unlike a Oh get down however were
00:02:51.880 lots of us work on a project that not not in a production anymore like at least me I work and feel them
00:02:58.770 because the ideas and success usually looks like this you have lots of
00:03:04.060 problems on anyway and you're trying to take this problems as you undertake undertake those problems and you face
00:03:09.280 the problems you're trying to build the solution those solutions they are not general they're usually custom because
00:03:14.590 your problem is constant because they feel that you you do in and you do right now for your project is something new to
00:03:23.350 the market it's something new to the world and those your problems are also new in your solution to those problems
00:03:29.020 also here and I rarely hear a phrase from people that we're running this new
00:03:35.709 project awesome idea and we're running it right now but only for three weeks and after three weeks we shutting down
00:03:41.500 the application we don't want to work anymore people usually think and think in a future they want to do the
00:03:47.980 application that will last for years that will help and solve certain problems for people and as you solve the
00:03:53.950 problems and you accumulate more features and you accumulate more solutions to your problem you grow
00:04:00.430 complexity and as you grow complexity you also accumulate lots of box and lots
00:04:07.570 of and lots of solutions that are custom for you as if star wars is only starting
00:04:12.670 the application you're thinking about well it's a greenfield project I can use whatever I like have you used the edge
00:04:18.299 edge case technologies and I will make it definitely the word the best thing at
00:04:24.490 a time at my time and then you finishing the project like in Midway of your
00:04:29.590 project and you seen that looks like I have a lot of things that I made incorrectly and I need to fix them but
00:04:36.400 just but rarely you get in back and you fix in the problems you're still building your perfect plane and you see
00:04:43.419 building things on top of the existing existing application and easy build that
00:04:49.270 you accumulate the dependencies dependencies could be external dependencies like your database your
00:04:55.360 certain api's that you consume you certain web hooks that you use a certain
00:05:00.939 technology that you are using but also it could be internal dependencies as the application is growing a lot of modules
00:05:07.629 do you use it inside they are dependent to each other are they dependent in a general way and dependencies only you
00:05:16.030 see this massive dependence and seven massive things and you're trying to fix something and you're trying to like make
00:05:22.120 a new feature you're trying to a Joe that you make certain adjustments you actually created more problems and by
00:05:28.930 creating more problems you end up in a mess like that and this is the mess
00:05:34.680 honestly I don't know how you can work on this like if you need to do something it will take you years to figure out at
00:05:41.560 least what's going on and dependence is
00:05:46.569 often I'm not sure if it will work though yeah looks like it works dependencies and and
00:05:54.190 the work with that is like it's like you're an operator on a moving train your train is moving your application is
00:06:00.580 working you have customers each second thousands of customers each second and you see that you're undertaking a
00:06:06.819 problem in front of you and now you are on a moving train trying to fix the problem and changing the views in a
00:06:14.110 moving train it could be really hard things to solve and it often looks like
00:06:20.319 that and it's enormous stress to work like that so this is one of the carters problem
00:06:26.979 that software engineer could face it's a problem on thread in the needle it's a problem on finding what is your business
00:06:35.379 logic looks like what would when you have a feature what exact feature and what exact place in the application you
00:06:41.800 actually need to change what those where use words mean in your court because court rarely
00:06:49.810 reflect the actual business processes that you application has and that's why
00:06:55.360 you have this and now you need to find what does it mean to adjust the balance
00:07:02.620 how I'm adjusting a balance for my customer I don't know my user well where
00:07:08.800 to find that I don't know but what we want to see is the same amount of features but features that are
00:07:17.010 segregated in a smaller chunks of information and when we know that we
00:07:22.150 need to adjust the balance or we need to make certain certain design decisions we
00:07:27.160 know where to look for those things we know where to find those things and how we can actually adjust it and it's not
00:07:35.200 an easy task of course and it's a task that can lead to you to the vertical
00:07:40.740 architecture where your each individual part of your system is in dedicated part
00:07:46.180 of your codebase it could be even different projects that communicate between each other but I will talk about
00:07:52.600 it a bit later as Alan Kay I heard that if you enter the quote from Alan Kay
00:07:58.330 your presentation is way better so I definitely find Alan Kay quote and alan
00:08:05.020 keyes said one that one of the things that suffer engineers need to do is to
00:08:11.110 find something that is a bit better than you have right now instead of trying to find the silver bullet that you'll
00:08:16.479 definitely solve all of your problems you just see on your application what is the worst thing that you have right now
00:08:21.820 probably the worst thing is the one that you scary the most if you have the permit or implication that you scare
00:08:27.250 about this is the most important thing to solve right now and this the thing that you actually need to to find a
00:08:33.700 better way how to solve it and I want to talk about DDT today and DDT is not the
00:08:40.870 Holy Grail DDT that you know is the one that we use often it's a database driven development and database driven
00:08:48.880 development is what we often do when we start an application and we have certain certain tasks that you need to do
00:08:54.850 something something simple something simple let's say a transfer money and I need to adjust the balance for them for the for the payee and for
00:09:02.970 bar whatever it just I came up with this example anything okay I have I have
00:09:09.030 users and they have a transactions and users probably have a balance so I will create a new table example call it users
00:09:16.320 they have balance whatever it works I will create turns actions transactions
00:09:21.900 connect users and there is a certain amount and now I need to think okay I have two tables how and where I should
00:09:28.740 put my logic my logic did should represent what is actually I'm doing I need to transfer 10% of my balance and
00:09:35.880 my amount to my balance I can do it in a in a MySQL or pause briefly where
00:09:42.270 triggers or procedure it's kind of hard to scale with people maybe I heard this
00:09:47.340 is some people use callbacks and callbacks a silver bullet you can use it everywhere I go just put in a callback
00:09:53.130 each time when we create the transaction I will adjust I will adjust the balance and will adjust the balance for both
00:09:59.160 users it works I made some tests works fine no problems let me have another things that we need
00:10:06.360 to do those transactions that will check negative or positive so we wouldíve you
00:10:11.850 to be able to give them a type just to give it a type to use some report to display it somewhere not a big deal sure
00:10:18.390 I can create a migration and immigration I can make this decision either I need
00:10:23.460 to create it as a as a lawn or the credit base and type and base a balance
00:10:28.550 but I run it in production and suddenly I have so many complaints that balances
00:10:35.130 all over the place for people and I see this little thing that I added to my immigration I saved it and when I saved
00:10:41.640 it I run my callbacks for all existing transactions and when I run all of this exists and transactions I had this and
00:10:50.870 it's a simple example I just made it here but usually we have 10 to 12 to 20
00:10:56.820 callbacks those callbacks on other callbacks and we have a callback hell and come back holes in immigrations and
00:11:03.300 maintenance tasks it's a bad thing to have if you of course can make workarounds
00:11:09.550 lots of people do that but it's not about workarounds in the next example we
00:11:15.240 we have another a part of the application and in this part of vacation we want to make users be able to upload
00:11:22.390 images we have image we have same user they have a name it's a pretty plain
00:11:28.090 string they can come they may make it can make a name for their for their images and then users sad you know what
00:11:36.250 I drew like this image and I want to give it better description so just copy paste from wikipedia the whole text I
00:11:43.090 paste it in the input and it'll try to save it and I cannot and it's a bad
00:11:48.310 experience and as you grow and is it is the application growing as you like in the first steps of your of you growing
00:11:55.260 growing curve those bugs and those problems they are declining the trust
00:12:01.870 that you have with your customers and declining the trans meaning that you will grow will slower and it may end
00:12:07.990 that that you may not grow at all and you may sunset your application so what
00:12:15.820 I mean by that I mean with that but that your business operations and your things that your business is working on and
00:12:21.490 really care about it's not your data base it's not the thing that you that
00:12:27.820 you need to worry about when you design and when you grow your business data base is just an artifact of your
00:12:33.880 business operations when user wants to applaud something it has a starting point and an ending point database and
00:12:41.200 dollar stores it could be not only one database it will be multiple others it's just a legacy it's just the history what
00:12:48.130 happened by the database in the understory you may retrieve the history or what happened but it's not an actual
00:12:54.490 operation that happened so thus it's better to separate your
00:13:00.130 persistence from your business logic you can separate your persistent by many ways in if you use in rails it could be
00:13:08.380 active model or active record and if you use sequel it could be a sequel record
00:13:13.570 and there is lots of other ways how you can you if you don't know if you want to you can even separate it by additional
00:13:19.930 layer that you place in between your application your business logic and your persistence so you end up with something
00:13:27.430 like that and your persistence layer is sheltering you from the database the shelter and your business separation
00:13:33.010 from your database that's all your all your logical things that you need to do
00:13:38.380 all that your business is supposed to do is independent from the way how you
00:13:44.320 store those artifacts and when it's independent from what you have in store reserved tracks you can write your tasks
00:13:50.830 better you can shelter it you can make it faster you can make sure that it actually works and you don't need to
00:13:56.470 worry about how you scale your database and your scaling of your database is not related to your business logic in the
00:14:04.210 next example what would happen if we we have a simple task now we have
00:14:10.900 transaction and we have images and we want to display some analytics about it pretty simple we made up analytics
00:14:18.460 controller and I should call it visible with that but usually it's a big massive
00:14:24.580 SQL and that's how it's usually looks like you you were thinking okay I have a
00:14:29.980 persistence layer somewhere I don't want to put it in anywhere because it's not related to any of my tables and my
00:14:36.310 models let's say we put it just in a controller whatever yeah I will put in a controller is just one small analytical
00:14:42.550 thing I put it there no one will worry I will have some reviewers my friend who can review it and we can approve it and
00:14:48.550 ship it ship it then we have another thing you know the one table that you
00:14:54.160 made there it's really cool we really want to hear it in CSV or XML format because we need to share it with our
00:14:59.800 executive and they need to see how fast we draw in you think yeah sure I can do
00:15:05.500 that I can have a small buttons there let's applaud it down Laura and you should have visible that I made
00:15:11.390 a another slide which is a bit better but it's not really really important how
00:15:16.760 it's written it's the concept that it represents so you did two things they
00:15:21.920 you made it to CSV to XML you wanna filter if it's Excel all you want to filter the empty strings or whatever you
00:15:28.730 need to filter for if sanal xml could be really tricky the really depends on the schema so all of your logics go there
00:15:34.430 because well you haven't made a decision where this logic should go so it go where the where it was made it love last
00:15:40.670 time in a controller and it could be a really big thing that you end up in at the very end it could have like lots and
00:15:47.690 lots of like small conditional not related to your initial task and then
00:15:53.899 your business said you know we have a new awesome marketing tool that you want to have and they really would like to
00:15:59.720 have this data can we send it to them any like not really so this means that
00:16:10.300 ideally you need to segregate you interfaces from your business logic because the moment that you have certain
00:16:17.089 requirement to do like to display certain data in certain format this represents a certain business value that
00:16:23.209 this thing this particular thing is for you for your business and thus
00:16:28.850 separating those interfaces could pays you back once you need to provide this
00:16:33.920 this particular inter business thing to other interfaces like CSV like XML like
00:16:40.160 web hooks so you end up here where you have lots of interfaces that all point
00:16:45.740 in to your business logic I will expand on this a parodic method back and bit
00:16:51.709 farther they later of course I promise that you want to grow and you want to
00:16:57.320 grow fast and it's supposed to be an easy thing but it's not an easy to make it to make
00:17:02.930 it easy because simple is not easy it's really hard to make something simple
00:17:08.890 because you need to invest time and you need to invest your knowledge into making things simpler
00:17:15.540 I will talk about a bit how you can do that how isn't very important important
00:17:23.430 thing because if you don't say how people don't know how to do that then they see the problem but they don't
00:17:29.400 knows the solution in ideal situation that we know who it's not me in ideal
00:17:39.240 situation we want to grow this time and we're going to grow our features and our complexity would be a lie near at least
00:17:45.360 somehow a lie near complexity is the community it's not only a amount of
00:17:52.350 objects that you have in your system it's also a communication between those objects also play a big part in their
00:17:57.630 complexity and thus it usually we end up in a situation like this when the amount
00:18:03.030 of features over time the not allowing us to do anything more than that each
00:18:09.930 new feature takes ages to develop and we don't know why let's stick down to the rabbit hole and
00:18:17.420 see how we can simplify at least a bit simplify this problem for our future and
00:18:24.650 ongoing development and the main thing here is that all other things are super
00:18:31.440 simple they're making web UI JSON interface XML it's a mechanical task
00:18:37.400 filtering XML is a mechanical task making a persistent very easy and extendable in mechanical tasks those
00:18:44.160 little errors on a bottom they basically represent some it may not even exist if
00:18:49.620 you don't need it but it represents the data flow that you need to send from one data store to another one for whatever
00:18:55.440 reason you need for some reporting or from other stuff or some backups those small scripts they're not related to
00:19:02.160 your business they related to your infrastructure and those infrastructure things they could be complex to grow to
00:19:08.940 grow you to grow your infrastructure but if not related to your business directly it's more related to how you roll your
00:19:16.050 application in a form of servers and in form of data flows
00:19:21.410 the juicy part of this diagram is the business logic is the thing that rarely people know how takes how to work with
00:19:29.330 and I remember back in the days everyone everywhere was the fat controllers and
00:19:35.090 thin models and people like oh we have so big controllers it's all over the place it's like some thousand of lions
00:19:41.120 and we didn't know what to do with them then someone came and said you know what thin controller and that model will
00:19:47.000 solve all your problems in the world and you're like oh nice if you've routed everything in a in a model and now and
00:19:53.690 then you see all those callback hell's problems and you see there is certain concepts that intermix with each other
00:19:59.450 and you probably accumulated lots and lots of mix-ins all over the place and you mix in pink things around and you
00:20:05.870 don't know what the objects are representing anymore and then someone came and said you know what everything
00:20:13.370 should be thin but we add in services further to your life and everything became a service even the things that
00:20:18.980 not a service now right at that point became a service if things that represent certain business value certain
00:20:25.549 data flow certain data that you sent between your modules it became a service
00:20:31.730 which is always not true often not true so let's see what your business logic
00:20:37.880 often looks like you probably have few God classes probably one maybe two God
00:20:43.940 class it's the one that's tickling around like thousand or 2,000 lines and one change in this class
00:20:50.600 putting down the whole application and the main architecture and your project says don't go there and don't look back
00:20:57.049 like you don't make any changes there just just don't and you probably you
00:21:03.260 wanna you wanna fix that and you want to change that and that's what I'm currently do each time when you see
00:21:09.890 problem love your problem love your problem and try to understand the problem and then try to fix your
00:21:16.400 problem because this will help other people and it will help you grow with time we can apply certain principles all
00:21:23.929 architecture are software engineering those problems they're not new and the solution to the problem they they're not
00:21:29.690 new so many design see that there is a certain certain
00:21:34.850 parts of the application require your attention unique you can apply first you can apply certain principles to make it
00:21:40.730 easy and clear what's good what's exactly going on in each individual object one of this principle is Hika
00:21:46.610 Hashem the Hessian stands for the understanding of the objects about
00:21:52.490 themselves each object should be meaningful enough to justify the existence but not have
00:21:58.429 lots of meanings inside that each individual part of it will be different one from another so it should represent
00:22:05.870 one idea not many ideas that's what your property project is and if you apply it
00:22:10.880 you got got classes and you got objects they usually represent lots of things they could be they could mix those
00:22:18.650 Keshav ideas together and you need to thread in thread a needle and understand
00:22:24.470 what part is related to to what other part and slice this and slide this big
00:22:30.020 object into smaller pieces and use the smaller pieces where it's important so you end up something like that you see
00:22:35.900 how simple I'm just made a slide and you're done but usually it's of course it's a way harder problem you actually
00:22:42.200 need to dive in you spend time and make sure that you fix in the right thing
00:22:47.799 next principle is you want to make it low couple lower coupling and lower
00:22:53.630 coupling means that you don't have lots of dependencies for your objects it's decoupled from other object as far as it
00:23:01.010 can be because having lots of dependency meaning that you have lots of things that you would that the object is responsible for and it's it's usually a
00:23:08.630 bad thing to have so you implying some decoupling principles and it's still kind of a lot of things to lots of
00:23:16.700 things going on there is a few other things that you can work on and you can apply you can apply other principles one
00:23:24.590 of the died like for example is dependency direction it meaning that when you design in your system you will
00:23:32.299 still have the modules that are more important than others there are things that are really represents some core
00:23:38.330 ideas and the things that are supporting ideas or some objects that the utility
00:23:43.760 classes you need to transform data from one from one type to another one and in this case
00:23:49.429 in this case is your higher-level modules they shouldn't dependent on a lower level modules your lower level
00:23:57.679 modules you can think about it is a duck typing your if you if you family resists idea so your main object is not
00:24:04.849 dependent on your objects that are coming into your main objects those smaller orbitals should be dependent on
00:24:11.539 the interface that your main object is given here and thus you you make a right
00:24:18.199 direction of your dependencies and at this point it still could be a really really messy you can have like thousand
00:24:24.619 of thousand a thousand of objects each of them may be in general wouldn't be hard to work with but as a general
00:24:31.969 concept and general ideas you didn't know what who is responsible in a general way toward other things and
00:24:39.669 that's you need to find and you need to bind your business context you need to
00:24:46.099 find the objects that are coming together and updating together there is
00:24:51.469 lots of techniques from scrolling through github or SVM and finding what objects were coming to were most often
00:24:59.179 changed together so you can find those objects or you can start writing a dependence in app and see what is the
00:25:05.719 what is dependent what kind of dependencies you object has and by finding those business context you can
00:25:12.469 find those objects that are important to what other parts of your system and at this point you can already kind
00:25:19.579 of slow down this is already good enough to start working towards to better
00:25:25.579 things you already know if you see if those on left side rats and in the middle those things are present certain
00:25:32.690 ideas and you and your team probably know that ideally in your application you can have a different different
00:25:38.749 folder for each of those concepts it's still same application but on a
00:25:44.419 conceptual level this application now has different business contacts and each business contacts represent a ad about
00:25:51.440 it it could be like one is analytic context and other one it could be sales contacts third one could be imaginary or
00:25:58.730 something like that the one thing that will work with images that we talked about before but you can go to can go
00:26:04.879 farther and you can separate them in a free different business contacts and through an essentially in three
00:26:10.580 different application but you always need to remember about midcal flaw mid-gulf law says that your your
00:26:18.350 complexity of the system it's not really a correlated to the amount of object
00:26:23.779 that you have but also correlated to the amount of connections that operatives have between themselves it may solve you
00:26:29.690 some problem separating things in a smaller pieces but it will also create you and other problems that comes to
00:26:36.769 them comes with them there are some solutions in the market that are on in
00:26:41.869 our community right now that can help you and it can grow your application this time if it's if you have a small
00:26:49.730 application maybe something like you playing Ruby file will work probably until the thighs 5,000 of time I love
00:26:55.759 lions you can work with it within one file I've seen people done that I didn't like
00:27:01.580 that but it's probably work for some people if it's go more than that it's
00:27:09.169 becoming a huge pain and some other things like Sinatra grape can we can fit
00:27:14.539 in this particular small small in this particular small SEC segment then of
00:27:20.840 course it's really a new application can omit that I did I like and I really like
00:27:26.990 the people diving into that and if it's bigger than that you look in honest
00:27:33.919 solutions that are not rails anymore and it's probably not even her name anymore you trying to grow the concepts rails
00:27:40.610 and Honami and trailblazer and rarbie those are the concepts that are Universal soldiers they are made for 80%
00:27:48.320 of the time but you still have 20% of the time and you still have a solution that you need to build for yourself and
00:27:54.950 where in in this particular case they may fail you and no one in your in
00:28:01.480 no one in the world knows better your application than you are knows better
00:28:07.750 application than you are that's why you have the most contacts and that's why you may build your business logic better
00:28:14.620 because when you evaluate those kudos those additional things those if you want to bring Trailblazer to application
00:28:21.460 or you want to bring drier B to your application you need to think about it as a dependencies and when you think
00:28:26.710 about dependencies if you wanna if you if you go in and I in a supermarket and you want to have something sweet you
00:28:32.740 don't buy a cake right you usually buy quite a small piece of a cake if you buy a huge cake you probably regret about
00:28:39.790 that will you regret about that with time so if you buy in a smoky and don't buy a cake if you want a small piece and
00:28:47.669 ideally in your engineering you need to end up with a situation where the only one condition is the one that you're
00:28:54.280 choosing the object that you are using right now in each particular situation and this the end with the arm partisan
00:29:01.090 port sorry for using without asking and
00:29:07.900 that's it you can ask me question if you have any and I said I love your problems talk to me afterwards
00:29:21.960 questions on the talk or otherwise any guys come on up
00:29:28.140 oh there you go of course Tim are there any books or places that you could
00:29:33.840 recommend for sort of learning that change in mindset I would see lots of
00:29:39.480 DDT books they are really wake you sometime and it's like a big books eight
00:29:45.300 hundred of em of pages but they can help to build their mindset that will think
00:29:51.420 about objects and businesses instead of just throw something in those file and forget about it I like the old books
00:29:58.830 about for pattern guys and girls about patterns of object-oriented suffer lots
00:30:07.020 of sentiments books and seminars of course guard branched in few stalks from
00:30:13.170 gari brush named with Gibbs yeah that's that's it that's a good one that's a lot
00:30:20.280 of resources any more questions yep sure
00:30:26.820 could apply this well
00:30:35.460 quite often your existing application will have a lot of complexity and when
00:30:41.019 you start developing an application you just go with the flow and you put it a lot of pieces together at a lot of
00:30:46.749 requests as they come by and so see you've reached a point in your application where you develop a lot you
00:30:54.549 wanna roll back the weight and stop using this approach to smooth things
00:30:59.559 over so how do you have is this what this particular with this idea apply or
00:31:05.950 Tony kobold yeah those think you have an idea supply ask for things is this application as
00:31:12.549 for new one when you build a new one you it's it's way easier than refactoring
00:31:17.889 the old legacy systems I have factored lots of all legacy systems all of that is it's a big pain but you can soften
00:31:24.849 the pain so you are by applying application a better planet is if you
00:31:30.129 have a legacy system first thing that you need to do is reveal the truth diagram true diagram means that how many
00:31:36.549 times the file was changed and what is the complexity of the file in this diagram you meet an axis and y and see
00:31:44.229 those files that the change in most often and most complex one and you start from them because they are the most
00:31:50.769 problematic one in your application Vietnam and then you slowly peeking in and slowly trying to make this refactor
00:31:57.479 refer green rather factoring I try to make test that's if you have test often
00:32:03.700 you don't have dust that way you need to do this first and you trying to
00:32:09.220 understand the context of you of the things that each particular system does and then eventually fortunately and
00:32:16.239 hopefully you will be able to make it simple
00:32:21.350 did that answer the question I think the LA Convention I mean it's
00:32:31.530 it's it's you know if you want to soften the blow it's that we're gonna take off people or if he referred to you know
00:32:38.600 research the back of your for and see how you can break it down a bit into clusters and stocks are sure
00:32:44.780 step-by-step anymore guys come on don't
00:32:52.260 be shy there you go when do you know that what
00:32:59.960 do you get a feeling that you over have detected application try not to over
00:33:07.249 architect try not to solve problems it doesn't exist if you feel and you see that you you
00:33:13.490 have problems that I exist and if you see that certain features are starting
00:33:19.039 harder to develop and certain things are really and you scared or certain parts of the application that's problems start
00:33:25.759 when you need to do arbiter like when you need to repair before that not try to invent the perfect thing just make it
00:33:32.990 good enough thank you thank you for the
00:33:38.960 question and last question come up with a one
00:33:49.350 all right that's it thank you so much Alex
Explore all talks recorded at RubyConf MY 2017
+16