<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/being-smart-is-painfull-ojxzh9joy" -->

---
title: Being &quot;Smart&quot; Is Painfull | daily.dev
description: A developer argues against overly clever code patterns, using a TypeScript namespace trick for component props as an example. The post explains why &#x27;smart&#x27;...
canonical: https://daily.dev/posts/being-smart-is-painfull-ojxzh9joy
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Being &quot;Smart&quot; Is Painfull | daily.dev
og:description: A developer argues against overly clever code patterns, using a TypeScript namespace trick for component props as an example. The post explains why &#x27;smart&#x27;...
og:url: https://daily.dev/posts/being-smart-is-painfull-ojxzh9joy
og:image: https://api.daily.dev/og/posts/oJXzH9JOY.png
og:image:alt: Being &quot;Smart&quot; Is Painfull
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.

# Being "Smart" Is Painfull

**[Fabian Letsch](https://daily.dev/sources/v7balm8y0o32yjz1hhf5a)** · [@fabianletsch](https://daily.dev/fabianletsch) · 2 min read · 478 upvotes · 42 comments

## Summary

A developer argues against overly clever code patterns, using a TypeScript namespace trick for component props as an example. The post explains why 'smart' code that combines component exports with prop types creates unnecessary complexity, confuses team members, breaks in edge cases, and makes code harder to maintain. The author advocates for writing boring, idiomatic code that prioritizes clarity and maintainability over cleverness.

## Content

**Look At This Marvel:**

![1000079881](https://media.daily.dev/image/upload/s--uTV7_kxt--/f_auto/v1758808649/ugc/content_9044e6e9-bda5-4d2e-ae4b-86bbd3e6264c?_a=BAMAK+ZW0)

With this you will never have to ```import type { ButtonProps } from './Button'``` ever again! Just ```import { Button } from './Button'``` and voila! Component ```<Button />``` and Props ```Button.Props``` are right there.

Isn't it smart?

...

Well yes it is and that is exactly the problem!

You see, in software development *SMART* usually means *COMPLICATED* and if i have learned anything over the years it is that *COMPLICATED* means *BAD*.

And this code is smart and complicated for so many reasons!!

**1. You Hardly Ever Import Props Directly**

Seriously, how often do you actually need to import the props from outside the component file? Maybe twice a year? Forcing every file to bend to this “smart” import logic is like carrying an umbrella every day because it once rained in 2017.

**2. Every Developer And Their Mum Will Ask "Why?"**

Yeah, it’s clever. For about 5 minutes. Then you realize nobody will remember two months from now why the Button has a mysterious namespace. “Props” isn’t just a type anymore, it’s an easter egg with a riddle.

**3. Weird Edge Cases**

Have you tried assigning namespaces to an object?

![1000079895](https://media.daily.dev/image/upload/s--r0o-Z7Jt--/f_auto/v1758813821/ugc/content_e44a7db1-4e47-44c6-a961-1f12d4f3f2c2?_a=BAMAK+ZW0)

Well lets keep this short, it doesn't work. So when you ever run into this, you will have to solve this in an even more complicated way... Congrats!

**4. Even LLMs don't get it**

As this code is unusual LLMs will not get it and will definitely not start writing it themselves unless you add a rule for it. Just like devs, LLMs work better with what’s idiomatic. (Idiomatic means: Writing code the way locals would—not like a tourist with a guidebook.)

-----

**As Grug once said "complexity *very*, *very* bad"**

The truth is, the best devs don't add complexity, they remove it. Being able to write smart code, but then not doing it. That is true wisdom. With smart code you will get: More bugs, more questions, more dependence, more confusion, more time spent reading code and more time spent explaining your idiocy to LLMs...

**Let my pain be your warning!** Do yourself a favor and write your Props the *boring* way. In fact, write all your code the *boring* way. Your future self will thank you!

## Community discussion

Top comments from developers on daily.dev.

**@friedrich** · 38 upvotes

> Based. Come back two months later and the code looks so obscure. Then you remember that it is YOU who wrote it. When you wrote it, it was a masterpiece. Now it is a liability

**@seyoungcho** · 13 upvotes

> True story

**@claudette** · 5 upvotes

> Thanks for a cool post!

**@micahnorwoodjordan** · 4 upvotes

> coming back to your old, trash code months later:
>
> ![image](https://media.daily.dev/image/upload/s--XyJeNQis--/f_auto/v1759591302/ugc/content_87c1d987-a726-4c09-bafb-fcf0f6f30ed3?_a=BAMAK+ZW0)

**@20rp** · 3 upvotes

> The irony of misspelling painful in the title of this post is not lost on me.

---

Tags: [#react](https://daily.dev/tags/react), [#typescript](https://daily.dev/tags/typescript)

[View this post on daily.dev](https://daily.dev/posts/being-smart-is-painfull-ojxzh9joy)

```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":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/being-smart-is-painfull-ojxzh9joy","headline":"Being \"Smart\" Is Painfull","text":"A developer argues against overly clever code patterns, using a TypeScript namespace trick for component props as an example. The post explains why 'smart' code that combines component exports with prop types creates unnecessary complexity, confuses team members, breaks in edge cases, and makes code harder to maintain. The author advocates for writing boring, idiomatic code that prioritizes clarity and maintainability over cleverness.","url":"https://daily.dev/posts/being-smart-is-painfull-ojxzh9joy","datePublished":"2025-09-25T16:30:16.754Z","dateModified":"2025-09-25T23:17:05.642Z","author":{"@type":"Person","name":"Fabian Letsch","url":"https://daily.dev/fabianletsch","image":"https://lh3.googleusercontent.com/a/ACg8ocKR6BVy_wn23EoOKq7-BlszlcXcLmASlnb7l-GtS-q1bePnkaJf=s96-c","description":"Hey, i'm Fabian and I deeply care about helping devs ship more code with less bugs in less time! 🔥","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":49920}},"image":"https://media.daily.dev/image/upload/s--yh9QV13E--/f_auto/v1758817817/posts/oJXzH9JOY?_a=BAMAK+ZW0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":478},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":42}],"comment":[{"@type":"Comment","text":"Based. Come back two months later and the code looks so obscure. Then you remember that it is YOU who wrote it. When you wrote it, it was a masterpiece. Now it is a liability","datePublished":"2025-09-28T17:44:24.209Z","url":"https://daily.dev/posts/oJXzH9JOY#c-YM27peSfW","author":{"@type":"Person","name":"Friedrich WT","url":"https://daily.dev/friedrich","image":"https://avatars.githubusercontent.com/u/136119888?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":38}},{"@type":"Comment","text":"True story","datePublished":"2025-09-25T23:00:20.346Z","url":"https://daily.dev/posts/oJXzH9JOY#c-PLFnAvPPB","author":{"@type":"Person","name":"SeyoungCho","url":"https://daily.dev/seyoungcho","image":"https://media.daily.dev/image/upload/s---QniJFEK--/f_auto/v1724901542/avatars/avatar_O3ucZSadxc0iLADSOH3rX"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":13}},{"@type":"Comment","text":"Thanks for a cool post!","datePublished":"2025-09-30T08:04:49.035Z","url":"https://daily.dev/posts/oJXzH9JOY#c-W0kjNMlYv","author":{"@type":"Person","name":"Claudette","url":"https://daily.dev/claudette","image":"https://media.daily.dev/image/upload/s--XETtmu2---/f_auto/v1768495176/avatars/avatar_kHOkBMuMUz4W1VBvtNmLd?_a=BAMAMiiu0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":5}},{"@type":"Comment","text":"coming back to your old, trash code months later:","datePublished":"2025-10-04T15:22:31.968Z","url":"https://daily.dev/posts/oJXzH9JOY#c-ykVDjyGdy","author":{"@type":"Person","name":"Micah Norwood","url":"https://daily.dev/micahnorwoodjordan","image":"https://media.daily.dev/image/upload/s--F7AsERgm--/f_auto/v1744468090/avatars/avatar_RkUh6L39HXCnFFgzyIq88"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4}},{"@type":"Comment","text":"The irony of misspelling painful in the title of this post is not lost on me.","datePublished":"2025-10-07T23:26:41.855Z","url":"https://daily.dev/posts/oJXzH9JOY#c-dO8fFQsC9","author":{"@type":"Person","name":"Arlo Wotherspoon","url":"https://daily.dev/20rp","image":"https://avatars.githubusercontent.com/u/65660355?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3}}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/sources/v7balm8y0o32yjz1hhf5a","name":"Fabian Letsch"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Fabian Letsch","item":"https://daily.dev/sources/v7balm8y0o32yjz1hhf5a"},{"@type":"ListItem","position":3,"name":"Being \"Smart\" Is Painfull"}]}
```

