<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>chamotarooo</author_name>
  <author_url>https://blog.hatena.ne.jp/chamotarooo/</author_url>
  <blog_title>chamotaroooのブログ</blog_title>
  <blog_url>https://chamotaro.hatenablog.com/</blog_url>
  <categories>
    <anon>技術</anon>
  </categories>
  <description>先に結論を書く。 同じ引数の組があちこちの関数に何度も出てくるなら、まだ名前を付けていない「部品」がそこにある。 その組に名前を付けて1つの入れ物にすると、引数が減り、その部品に関する処理の置き場所もできる。 この状態は「データの群れ（Data Clumps）」と呼ばれ、改善した方がよい兆候、いわゆるコードの臭いの1つとされている。 どんな状態を指すのか 典型例は住所である。 請求書を送る関数と、宛名ラベルを印刷する関数が、どちらも「番地、市区町村、郵便番号」の3つを別々の引数で受け取っている。 def send_invoice(name, street, city, zip) # ... e…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fchamotaro.hatenablog.com%2Fentry%2Ftech%2Fdata-clumps&quot; title=&quot;同じ引数の組が何度も出てくるなら、名前のない部品がある - chamotaroooのブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2026-10-05 16:17:15</published>
  <title>同じ引数の組が何度も出てくるなら、名前のない部品がある</title>
  <type>rich</type>
  <url>https://chamotaro.hatenablog.com/entry/tech/data-clumps</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
