Your comments
Thanks for the great suggestion, Zen! I'll provide the alternative versions once I get some spare time. If you'd like to help, feel free to point me into other examples where the changes can be applied.
Hi Indiver!
Nice question! If I were you, I'd implement something similar to your "file-type -> class-name" association idea, but instead of keeping it in database, I'd load it from a config file and probably cached it somewhere during the app initialization.
Hi! Why do you think it's better?
Hi, Atanas.
Great question! In most cases, this refactoring is mandatory as a step towards the Extract Method which is extremely common and useful. Replace Temp with Query can eliminate a local variable that stands in the way of extracting code into separate method.
As with other performance issues, let it slide for the moment. Nine times out of ten, it won't matter. When it does matter, you will fix the problem during optimization. With your code better factored, you will often find more powerful optimizations, which you would have missed without refactoring. If worse comes to worse, it's very easy to put the temp back.
Fixed, thanks!
Hey Matt,
Thanks for asking! They start once you get to the "Refactoring Techniques" section.
The course structured a way that let you get the general idea about problems and possible solutions first (while in Code Smells). Then, after you've gone through all code smells, you begin to study each refactoring in details.
Let me know if you have further questions.
Okay, it's fixed now.
Customer support service by UserEcho
Fixed, thanks!