Walked in and heard: “if you get nothing else from this session. it should be USE VERSION CONTROL” Well then. Nice to hear it again.
CompareNoCase – leads to comparing two things. worse CF function ever. “if something is true, then its false. that will blow your mind.”
Breaking down if’s into multiple rather than large wrapped/nested blocks.
Add more comments. Not everyone else is going to fully understand what you are talking about. Made reference to the children’s game “Telephone” where you say a phrase and pass it on. Things get messed up when people don’t fully “hear” or in this case rather understand.
“less code is not always better code”
CFSwitch? yes that’s another way but normally save that for when I have more cases. There would only be 3 here.
Splitting complicated logic into multiple functions will create simplier code in the end. Reading through the main function will be much easier down the line even though the code is split into different parts/areas.
“sometimes I write the comments before I actually write the code” glad to hear that someone else also does this!
? – How do you not get distracted with little things instead of refactoring the logic?
“I have raging ADD so that is a problem” Try to make sure the changes that you are doing actually add value and are not just fixing things to be “your way” of doing things.
Splitting this logic into different functions also helps with debugging because you know where to look.
? How do you balance refactoring with adding new functionality?
You should actually have the time but you have to decide where you are spending your time. Making incremental changes will make changes down the line faster to implement so in the end it can actually end up being faster. If it took you 30 minutes to figure out and 30 minutes to edit, spending 15-30 minutes more to refactor and make your changes will make the next change to this area much less. The next developer could take 30 instead of 60+ and then what about the next developer.
I like the ideas but skeptical that managers will see the time use now even if there is time saved down the line. Crunch time normally means “little” extra time now and “lots” of extra time later. The real question is: do we ever go back?
Post a Comment