Conceptual distinction – SW-Development

Parameter vs. Argument

Both are related to functions.

  • Parameters are the required input of a function.
  • Arguments are the provided input to a function.

Mutex vs. Semaphore

Both are used for resource access control.

  • A Mutex realizes explicit access to a resource. Only one thread can access it at once.
  • A Semaphore provides multiple threads access to a resource. The counter can be configured.

A Mutex is like a binary semaphore, a semaphore with a counter of 1.


Architecture vs. Design

Both are used to define the structure and behavior of software.

  • Architecture gets used on system level. (Relations between components, High level)
  • Design gets used on component level. (Relations within a component, Low level)

Stub vs. Mock vs. Fake

All of them are test doubles.

  • Stubs are objects with predefined return values.
  • Mocks are objects with predefined behavior.
  • Fakes are objects with shortcut implementations.