<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/tell-don-t-ask-or-how-to-keep-an-eye-on-boiling-milk-oa8c4zbhq" -->

---
title: Tell, don&#x27;t ask! Or, how to keep an eye on boiling milk
description: A discussion of the &#x27;tell, don&#x27;t ask&#x27; principle in API design, using the analogy of watching milk boil. The post argues against defensive check-before-act...
canonical: https://daily.dev/posts/tell-don-t-ask-or-how-to-keep-an-eye-on-boiling-milk-oa8c4zbhq
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Tell, don&#x27;t ask! Or, how to keep an eye on boiling milk | daily.dev
og:description: A discussion of the &#x27;tell, don&#x27;t ask&#x27; principle in API design, using the analogy of watching milk boil. The post argues against defensive check-before-act...
og:url: https://daily.dev/posts/tell-don-t-ask-or-how-to-keep-an-eye-on-boiling-milk-oa8c4zbhq
og:image: https://api.daily.dev/og/posts/oA8c4Zbhq.png
og:image:alt: Tell, don&#x27;t ask! Or, how to keep an eye on boiling milk
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Tell, don't ask! Or, how to keep an eye on boiling milk

**[Event-Driven by Oskar Dudycz](https://daily.dev/sources/event-driven-io)** · 5 min read · 0 upvotes · 0 comments

## Summary

A discussion of the 'tell, don't ask' principle in API design, using the analogy of watching milk boil. The post argues against defensive check-before-act patterns (like calling Exists() before Add()) in favor of encapsulating validation inside the API itself. Benefits include simpler, more reliable, and more performant code — especially when leveraging database-level constraints like unique indexes instead of redundant application-level checks.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://event-driven.io/en/tell_dont_ask_how_to_keep_an_eye_on_boiling_milk>

## Similar posts on daily.dev

- [DRY Is the Most Misunderstood Rule in Programming](https://daily.dev/posts/dry-is-the-most-misunderstood-rule-in-programming-ithr21mpi) · Milan Jovanović · 11 upvotes · 0 comments
- [To test, or not to Test? Part 2 – Make it hard to make mistakes](https://daily.dev/posts/to-test-or-not-to-test-part-2-make-it-hard-to-make-mistakes-fnfxbqcof) · We Are .NET · 0 upvotes · 0 comments

---

Tags: [#general-programming](https://daily.dev/tags/general-programming), [#architecture](https://daily.dev/tags/architecture)

[View this post on daily.dev](https://daily.dev/posts/tell-don-t-ask-or-how-to-keep-an-eye-on-boiling-milk-oa8c4zbhq)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Tell, don't ask! Or, how to keep an eye on boiling milk","url":"https://daily.dev/posts/tell-don-t-ask-or-how-to-keep-an-eye-on-boiling-milk-oa8c4zbhq","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/tell-don-t-ask-or-how-to-keep-an-eye-on-boiling-milk-oa8c4zbhq"},"datePublished":"2026-06-17T11:26:11.028Z","dateModified":"2026-06-17T11:32:11.908Z","description":"A discussion of the 'tell, don't ask' principle in API design, using the analogy of watching milk boil. The post argues against defensive check-before-act...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d734a4b51be568317e6fa070742af675?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d734a4b51be568317e6fa070742af675?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Event-Driven by Oskar Dudycz","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Event-Driven by Oskar Dudycz","logo":"https://media.daily.dev/image/upload/s--unDKCFQ0--/f_auto,q_auto/v1781695550/logos/event-driven-io?_a=BAMAMiWQ0","url":"https://daily.dev/sources/event-driven-io"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/tell-don-t-ask-or-how-to-keep-an-eye-on-boiling-milk-oa8c4zbhq","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"general-programming,architecture","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Event-Driven by Oskar Dudycz","item":"https://daily.dev/sources/event-driven-io"},{"@type":"ListItem","position":3,"name":"Tell, don't ask! Or, how to keep an eye on boiling milk"}]}
```

