white box (software engineering)
{{short description|System whose internals can be viewed but not altered}}
{{Hatnote|"Open box" redirects here. "Open box" is also the name of the visible symbol ␣ that is sometimes used to indicate a space. See whitespace character.}}
{{Distinguish|White-box testing|White-box cryptography|White box (computer hardware)}}
{{Black-box}}
A white box (or glass box, clear box, or open box) is a subsystem whose internals can be viewed but usually not altered.Patrick J. Driscoll, "Systems Thinking," in Gregory S. Parnell, Patrick J. Driscoll, and Dale L. Henderson (eds.), Decision Making in Systems Engineering and Management, 2nd. ed., Hoboken, NJ: Wiley, 2011, 40. The term is used in systems engineering, software engineering, and in intelligent user interface design,{{cite journal |last1=Höök |first1=Kristina |last2=Karlgren |first2=Jussi |last3=Waern |first3=Annika |last4=Dahlbäck |first4=Nils |last5=Jansson |first5=Carl Gustaf |last6=Karlgren |first6=Klas |last7=Lemaire |first7=Benoît |title=A glass box approach to adaptive hypermedia |journal=Adaptive Hypertext and Hypermedia |date=1998 |page=143-170|doi=10.1007/978-94-017-0617-9_6 |isbn=978-90-481-4944-5 }}{{cite journal |last1=Karlgren |first1=Jussi |last2=Höök |first2=Kristina |last3=Lantz |first3=Ann |last4=Palme |first4=Jacob |last5=Pärgman |first5=Daniel |title=The glass box user model for filtering |journal=Fourth International Conference on User Modeling |date=1994}} where it is closely related to recent interest in explainable artificial intelligence.{{cite journal |last1=Raj |first1=Arun |title=Explainable AI: From black box to glass box |journal=Journal of the Academy of Marketing Science |date=2020 |volume=48 |issue=1 |page=137-141|doi=10.1007/s11747-019-00710-5 }}{{cite journal |last1=Höök |first1=Kristina |last2=Karlgren |first2=Jussi |last3=Waern |first3=Annika |title=A glass box intelligent help interface |journal=First Workshop on Intelligent Multimodal Interfaces |date=1995}}
Having access to the subsystem internals in general makes the subsystem easier to understand, but also easier to hack; for example, if a programmer can examine source code, weaknesses in an algorithm are much easier to discover.{{Fact|date=July 2015}} That makes white-box testing much more effective than black-box testing but considerably more difficult from the sophistication needed on the part of the tester to understand the subsystem.
The notion of a "Black Box in a Glass Box" was originally used as a metaphor for teaching complex topics to computing novices.{{cite journal |last1=du Boulay |first1=Benedict |last2=O'Shea |first2=Tim |last3=Monk |first3=John |title=The black box inside the glass box: presenting computing concepts to novices |journal=International Journal of Man-Machine Studies |date=1981 |volume=14 |issue=3 |page=237-249|doi=10.1016/S0020-7373(81)80056-9 }}