Really good video, you should keep going with videos like this. Especially how to unmess this e-commerce enterprise mess, it happened many times while working as programmer
Cool. What I would personally first do is write a Player class (a prop for Score, an WinPoint method and a WonPoint event). Then remove the WonPoint method from the tennis game interface (what if the given string does not match any players names?) and add instead 2 TennisPlayer props. The implementation of the interface can then become even more meaningful...
Nice video. Many years ago I was doing one type of refactoring quite often. Some time later, when I was learning the essentials of software architecture, I found out how this refactoring pattern is called - Boy Scout Rule. It says thay you should leave the code better than you found it.
1) Stop using Hungarian Notation. Both "m_..." and "_..." are Hungarian notation. If you want to show that something is a private field use "this.variableName". 2) By adding the default case you changed the behavior. 3) What would be your name for the constant equal to "-1" and how would it help you understand what it does?
@@rafazieba9982 1) No thanks, I like my style. 2) True, acceptable for me. 3) We're not looking at the shortcomings of the implementation here (and there are many), as I didn't write the original code.
"_..." notation for naming private variables is a standard that is used by Microsoft, you even have built-in analyzer in the IDE that suggest using this notation
@@antonmartyniuk Microsoft switched from leading underscore to no prefix some time ago. Microsoft doesn't always follow its own advice. Check the IDE options. You can chose between underscore and no prefix. Use .editorconfig file to promote single code guidelines to whole repository.
If I need to depends on ceremony, I rather have one that is shorter. Therefore, _ is shorter than this. It's a known convention and it met my laziness and requirement. 😊