<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>osatohh</author_name>
  <author_url>https://blog.hatena.ne.jp/osatohh/</author_url>
  <blog_title>おさとの雑記帳</blog_title>
  <blog_url>https://osatoh.com/</blog_url>
  <categories>
    <anon>本</anon>
  </categories>
  <description>「簡潔さ」と「安心」のどちらが大切か、またどのようにその判断を行うか 以下のコードを見比べて見ましょう。 # A n = 3 puts n % 2 == 0 ? &quot;#{n}は偶数です&quot; : &quot;#{n}は奇数です&quot; #=&gt; 3は奇数です # B n = 3 if n % 2 ==0 puts &quot;#{n}は偶数です&quot; else puts &quot;#{n}は奇数です&quot; end #=&gt; 3は奇数です Aの方が簡潔で、Bの方が実行したいことがわかりやすい気がします。 おそらくBであればプログラミングをやっていない人にもなんとなく意味が伝わるのではないでしょうか？ 例のような簡単な条件分岐であれば大きな差はない…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fosatoh.com%2Fentry%2F2022%2F10%2F08%2F143843&quot; title=&quot;【リーダブルコード】第一章 理解しやすいコード の要約 - おさとの雑記帳&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>2022-10-08 14:38:43</published>
  <title>【リーダブルコード】第一章 理解しやすいコード の要約</title>
  <type>rich</type>
  <url>https://osatoh.com/entry/2022/10/08/143843</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
