[0] https://blog.cleancoder.com/uncle-bob/2016/10/26/DijkstrasAl...
[0] https://blog.cleancoder.com/uncle-bob/2016/10/26/DijkstrasAl...
So thanks for the link, I guess. I’ll keep this as ammunition for the next time someone quotes Uncle Bob.
The code is definitely a horrow show.
I would just like to compare them. I too find Uncle Bobs “clean code” book very much overrated.
My understanding of the “design” aspect of TDD is, that you start from client code and create the code that conforms to your tests. Too often I worked in a team with other developers and I wanted to use what they wrote, and they somehow coded what was part of the spec, but it was unusable from my code. Only because I was able to change their code (most often the public API) I was able to use it.
You iterate through all of the edges every time to find a nodes neighbors?
idk, this code just looks terrible to me.
I’ve been in too many projects where devs almost never write tests. They cut corners by neither writing tests nor documentation because of time pressure. Then the code breaks in production with simple edge cases like NullPointerException and they need to fix it, so they don’t have time to write unit tests for the next feature. And it’s definitely harder to write tests after you implemented something.