Relative Content

Tag Archive for logic

Matching up articles with similar ones

I am creating a site where people can write on a niche topic. It is almost like a blog, however the area as I mentioned is a small niche with (hopefully) passionate users.

How Do Computers Process Conditional/Input/ Event Based Code? [duplicate]

This question already has answers here: How Do Computers Work? [closed] (12 answers) Closed 9 years ago. I understand that computers are basically a complex system of electrical signatures that can calculate based on logic boards, and some sort of gate mechanism, but how do computers process something like if the number produced by the […]

How to unit test method that returns a collection while avoiding logic in the test

I am test-driving a method that is to generate a collection of data objects. I want to verify that the properties of the objects are being set correctly. Some of the properties will be set to the same thing; others will be set to a value which is dependent on their position in the collection. The natural way to do this seems to be with a loop. However, Roy Osherove strongly recommends against using logic in unit tests (Art of Unit Testing, 178). He says: