Author Topic: TDD for Bricscad examples  (Read 9973 times)

0 Members and 1 Guest are viewing this topic.

MickD

  • King Gator
  • Posts: 3636
  • (x-in)->[process]->(y-out) ... simples!
Re: TDD for Bricscad examples
« Reply #30 on: August 07, 2014, 07:28:52 PM »
Hey Mick,

Did you ever have moment where you were thinking TDD seems like it is not useful then you looked at project and realized Holy Sh*t I have almost a complete working code base for project and I did not spend hours(while driving, at night, etc..) thinking about what classes to create, abstractions, how each object will talk with one another, etc..... it just happened?

How much better would it be if that code base was already tested and decoupled?
I see your point and I'm not saying you need to write every app from scratch, that's the point of writing SOLID code using TDD, it's even more reusable.

Take the CadEngine I've used as an example, it would be very easy to plug that into another app and extend it as needed making the extensions available to other apps for free.

I think that when writing your new project with TDD and reusing your existing 'tested' code base would be a coding utopia :)

<edit> Actually, by using TDD you should only do the thinking as you code, thinking about design at any other time is a waste of time. You do need some basic idea of your goals and some very basic architecture you think you might need but this should only be like a napkin sketch as it will no doubt change as start to develop your code base and your code will be ready to accept those changes.
« Last Edit: August 07, 2014, 07:55:21 PM by MickD »
"Programming is really just the mundane aspect of expressing a solution to a problem."
- John Carmack

"Short cuts make long delays,' argued Pippin.”
- J.R.R. Tolkien