<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/494-primitive-obsession-lwfwy1srk" -->

---
title: 494: Primitive Obsession | daily.dev
description: Primitive obsession is a code smell where developers overuse basic data types (strings, integers, booleans) instead of creating custom types or objects. The...
canonical: https://daily.dev/posts/494-primitive-obsession-lwfwy1srk
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: 494: Primitive Obsession | daily.dev
og:description: Primitive obsession is a code smell where developers overuse basic data types (strings, integers, booleans) instead of creating custom types or objects. The...
og:url: https://daily.dev/posts/494-primitive-obsession-lwfwy1srk
og:image: https://api.daily.dev/og/posts/lwfWY1SrK.png
og:image:alt: 494: Primitive Obsession
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.

# 494: Primitive Obsession

**[RUBYLAND](https://daily.dev/sources/rubyla)** · 1 min read · 0 upvotes · 0 comments

## Summary

Primitive obsession is a code smell where developers overuse basic data types (strings, integers, booleans) instead of creating custom types or objects. The discussion covers how to recognize this pattern in code, its drawbacks including reduced type safety and scattered validation logic, and strategies for refactoring toward more expressive domain models. The hosts explore when primitives are appropriate versus when custom abstractions improve code maintainability and readability.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://bikeshed.thoughtbot.com/494>

## Similar posts on daily.dev

- [Mastering Value Objects in PHP 8.5\+ \(2026 Edition\)](https://daily.dev/posts/mastering-value-objects-in-php-8-5-2026-edition--lxspcwxig) · CodeCraft Diary · 2 upvotes · 3 comments

---

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

[View this post on daily.dev](https://daily.dev/posts/494-primitive-obsession-lwfwy1srk)

```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":"494: Primitive Obsession","url":"https://daily.dev/posts/494-primitive-obsession-lwfwy1srk","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/494-primitive-obsession-lwfwy1srk"},"datePublished":"2026-02-17T15:24:48.876Z","dateModified":"2026-02-17T16:43:19.881Z","description":"Primitive obsession is a code smell where developers overuse basic data types (strings, integers, booleans) instead of creating custom types or objects. The...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/13cc8247c8fea079f9e947cb41b4caf8?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/13cc8247c8fea079f9e947cb41b4caf8?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"RUBYLAND","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":"RUBYLAND","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/rubyla","url":"https://daily.dev/sources/rubyla"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/494-primitive-obsession-lwfwy1srk","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"architecture,design-patterns","timeRequired":"PT1M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"RUBYLAND","item":"https://daily.dev/sources/rubyla"},{"@type":"ListItem","position":3,"name":"494: Primitive Obsession"}]}
```

