this is a kind of question I have always asked to myself and that would have been closed as too broad on other forums. So will be longer than the average, the next ones will be shorter.
John Smith is starting to work as a Senior Galactic Developer in Acme Company. He have to solve a ticket, let’s say to change a small
ViewModel logic so to make something with a retrofit response.
John Smith realizes that Acme colleagues knowledge of architecture is related only on how their houses are built, and that they do not have wise uncles that taught them what should be clean code. They are paid a lot and have to solve an issue, and making a
small refactor, would have the same effect to throw a glass of water in the ocean.
A really common situation.
What John have to do to understand which line of code he should go from the screen he sees in the emulator to the ViewModel line he needs to intervene?
- He runs the
Layout Editor? But from there he cannot see the single binding with the
@idof the layouts, he only see a hierarchy of nested components, not where in the code are called.
- He runs the application putting some breakpoints, or
Log.dwith some common sense/consulting
- He runs a
JunitTest trying to do some refactoring?
4 )He registers an
Espressocall of that activity so that can understand what is going on?
- He executes control click(Ctrl/Command+B) everywhere to try to find the flow of the complex Application going from the Manifest, to the first
Application, trying to find his way through his quest to the holy graal viewModel?
- He uses some intelliJ plugin as
CodeIristhat gives him a clear view of the hundreads of classes, so that he can see graphically which class calls what
- He starts to change the name of every method
- He begin from scratch to do some TDD of the new feature, ignoring all the code?
- He hires an hypnotist to convince his colleagues that they need to refactor all the code.
- Something else? What is the best way to be time efficient in solving an issue when speaking to improve the code is not an option? Of course depends, but there is some way to act that is more time efficient/impactful than others?