General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Immudzen
Continuous Delivery
comments
Comments by "Immudzen" (@Immudzen) on "If Your Code Looks Like This... You're A GOOD Programmer" video.
What I generally find is that having junior developers test their code is what makes it better code. You have them test the code and they complain about how hard it is to test. I work with them to understand that if it is hard to test it is also hard to work with later and we break up the code into smaller functions, make the output of the function depend on the input where possible, simplify the interfaces, etc. and by the time they are done they end up with code that is much better and also tested. At this point I used tests to determine if code is good or bad. If you have never actually used the code you can't say if the design is good or bad and testing will force you to use it and actually confront what you have done. It is also why developers can't just hand off testing to someone else. They need to feel the pain of the code they have written and fix it to get better.
169
@traveller23e I normally push for only the flexibility actually required. I don't do interfaces for something until I have two use cases so I can make an interface to do that job. Otherwise you are just building an abstraction without a usage case and you don't know exactly where and what kind of flexibility you need. If you make it more flexible than is needed you also make your life and everyone else that uses the code much harder because the code will have a higher conceptual burden.
6
@tylerarrigoni7700 Just a few hours ago I worked with a junior developer that was complaining about how hard testing some of the code was. I helped them factor it into more, smaller, methods and they got all the tests done about half an hour later and found some bugs in the process. I am a firm believer in testing because it forces you to make the code better.
6
@kiyasuihito I work in a highly regulated field. The focus is on doing stuff right and making sure it works reliably. Simulations must be traceable and reproducible. I teach junior devs I would prefer they take longer and make sure it is right and tested.
3