Comments by "MrAbrazildo" (@MrAbrazildo) on "Refactoring Legacy Code: STEP BY STEP (Part 1)" video.
-
7:30, I use tab = 2.
9:10, what is xPathString? You just deleted the comment. 10:15, don't delete, just put it at the right side. 11:00, mm... I wouldn't do that. 11:11, omg... I know Java is awkward, but the comment was saying where things were placed. 13:52 and 14:01, somebody put this man in jail! :)
12:25, I would permanently highlight the 'hasChildren' 1st, or if this doesn't exist in the IDE, I would use the find recurse, to spot every occurrence of it.
12:45, "equal to" and "has it" are 2 different things to me. That's why I would not delete the comment.
- Here's the proof of a DRY violation: there's the hasChildren f(), but the programmer forgot it, because the previous f() was too big.
- 13:17: at least in compiled languages, deleting (safer: turning it into a comment, actually) getXPathString() would reveal all calls to this "f()".
How C++ is elegant compared to this s**! You could write:
11:20, jsonString += Str1 + Str2 + ... StrN.
13:00, return jsonString.substr (blabla) + "]". Period!
13:40, String tagetString = shortXPath.equals("") ? "//toc" : "//".
2