# Item 30: Define contracts with documentation

DevFeed: [Item 30: Define contracts with documentation](<https://devfeed.tech/articles/item-30-define-contracts-with-documentation-39275.md>)

Original publisher: [Read original article](<https://kt.academy/article/ek-contracts-documentation>)

Published: 2024-07-08T00:00:00Z

Content type: tutorial

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Documentation](<https://devfeed.tech/topics/documentation.md>), [abstraction](<https://devfeed.tech/topics/abstraction.md>), [Code](<https://devfeed.tech/topics/code.md>), [implementation](<https://devfeed.tech/topics/implementation.md>), [Library](<https://devfeed.tech/topics/library.md>)

Tags: [abstraction](<https://devfeed.tech/tags/abstraction.md>), [code](<https://devfeed.tech/tags/code.md>), [documentation](<https://devfeed.tech/tags/documentation.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [library](<https://devfeed.tech/tags/library.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

## AI overview

This article explains how documentation defines contracts for library or module elements. It argues that clearly documenting expected behavior lets users depend on an abstraction rather than its current implementation, while allowing creators to change the implementation as long as the contract is preserved.

## Source excerpt

How do we express our library or module contracts and why are they so important.