Short version: It's testing individual pieces of a (large) system one at a time to get them working as specified before putting them all together to test the complete system. Building and testing a complete sytem is a horribly inefficient way of finding a bug in one small component.
> So is it necessary to successful software engineering or just option?
Absolutely necessary if you are working with a dynamically typed language like Python, Ruby etc. where values have types, variables don't. In the absence of unit tests, aggressive re-factoring becomes risky due to the lack of compile time checks and you end up with breaking existing code if you are not careful.
Not really necessary when working with statically typed languages like Java which offer decent compile time type safety. Changing method signature, class name, method name etc. results in compile time errors. Changing logic still requires proper verification but there's nothing which a decent testing round can't uncover. Though I must admit the turnaround time for testing a new/changed functionality is pretty short when it comes to unit testing.
The greatest pitfall when advocating unit tests is that it ends up giving developers/managers a false sense of security. Unit tests are not magic; they end up testing code the way you have "written" it to be tested. Countless times I have seen code bases littered with "unit tests" which did nothing more then instantiating the class to be tested and invoking random methods here and there.
Discipline is of prime importance when it comes to writing unit tests. I strongly recommend junior team members/programmers/unit testers being mentored by someone who *knows* his stuff to avoid turning the entire application unit test code base into a big pile of useless ****. :-)
OK, so HostGator for some reason no longer allows gcc/g++ access unless you have a Designated Server account, which is a lot of money to spend just to compile my "Hello World" program. Thus I figured I'd compile at home, then upload. Program is your regular old bare-bones Hello World ...
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...