A
A
alk2015-03-03 12:29:35
Project management
alk, 2015-03-03 12:29:35

How do you deal with legacy code on large projects?

Good afternoon colleagues!
I would like to know the public opinion about the heritage of the code. It is no secret to anyone that large projects that have been developed for many years are often greatly overcomplicated in their structure, architecture, with the help of a "technology zoo", etc. And if you dig deeper, you can often stumble upon a frank govnokod, but it works.
Often this situation comes up: the code is terrible but it works, and refactoring is even more scary than the code.
How do you solve such a problem?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2015-03-03
@Alexey_Kutepov

No amount of code should be intimidating if the budget is allocated for it.
If it does not stand out, then refactoring for the sake of refactoring is not needed.
If the client needs the program, then just take it and conduct an investigation - which will be better and more profitable in the long run - large-scale refactoring or writing from scratch. If the price suits, the terms are determined, people are hired. In general, it doesn't scare you.

A
Alexander Kondaurov, 2015-04-16
@kondaurov

Development through testing (the presence of tests) gives at least some guarantee for the architecture of your application that it will not change if another person comes to the place of the application creator.

vasIvas @vasIvas
Can you explain how tests help to get rid of bad code and, moreover, of incorrect architecture?
Written March 03
Reply
Nc_Soft @Nc_Soft
vasIvas: no way

What are you driving? before you write a function, come up with a test and come up with 3 - 4 cases for it! I develop through testing and not "testing hundreds of function runs by hand." Then I confidently use these functions in combination with others and get a project that immediately works and I do not need to write more integration tests because the root of evil was killed at the beginning.
Then you can safely refactor! And it’s simply not realistic to refactor code that you yourself didn’t write or wrote for a long time, and if your project is connected with the spinning of money, then it’s scary

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question