<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Software on Ricky</title><link>https://linzeyan.github.io/zh-tw/categories/software/</link><description>Recent content in Software on Ricky</description><generator>Hugo -- gohugo.io</generator><language>zh-tw</language><lastBuildDate>Thu, 14 Nov 2024 09:52:00 +0800</lastBuildDate><atom:link href="https://linzeyan.github.io/zh-tw/categories/software/index.xml" rel="self" type="application/rss+xml"/><item><title>Mac 小眾軟體推薦與工作流程分享（2024）</title><link>https://linzeyan.github.io/zh-tw/posts/2024/20241114-mac-app-share/</link><pubDate>Thu, 14 Nov 2024 09:52:00 +0800</pubDate><guid>https://linzeyan.github.io/zh-tw/posts/2024/20241114-mac-app-share/</guid><description>&lt;ul>
&lt;li>&lt;a href="https://blog.ursb.me/posts/mac-app-share-2024/" target="_blank" rel="noopener">Mac 小眾軟體推薦與工作流程分享（2024）&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>一些软件设计的原则</title><link>https://linzeyan.github.io/zh-tw/posts/2023/20230418-software-design-principles/</link><pubDate>Tue, 18 Apr 2023 13:58:38 +0800</pubDate><guid>https://linzeyan.github.io/zh-tw/posts/2023/20230418-software-design-principles/</guid><description>&lt;ul>
&lt;li>&lt;a href="https://coolshell.cn/articles/4535.html" target="_blank" rel="noopener">一些软件设计的原则&lt;/a>&lt;/li>
&lt;/ul>
&lt;h3 id="1-dont-repeat-yourself-dry">1. Don&amp;rsquo;t Repeat Yourself (DRY)&lt;/h3>
&lt;h3 id="2-keep-it-simple-stupid-kiss">2. Keep It Simple, Stupid (KISS)&lt;/h3>
&lt;p>把一个事情搞复杂是一件简单的事，但要把一个复杂的事变简单，这是一件复杂的事。&lt;/p>
&lt;h3 id="3-program-to-an-interface-not-an-implementation">3. Program to an interface, not an implementation&lt;/h3>
&lt;ol>
&lt;li>喜欢组合而不是继承&lt;/li>
&lt;li>依赖倒置原则&lt;/li>
&lt;/ol>
&lt;h3 id="4-command-query-separation-cqs---命令-查询分离原则">4. Command-Query Separation (CQS) - 命令-查询分离原则&lt;/h3>
&lt;ul>
&lt;li>查询：当一个方法返回一个值来回应一个问题的时候，它就具有查询的性质；&lt;/li>
&lt;li>命令：当一个方法要改变对象的状态的时候，它就具有命令的性质；&lt;/li>
&lt;/ul>
&lt;h3 id="5-you-aint-gonna-need-it-yagni">5. You Ain&amp;rsquo;t Gonna Need It (YAGNI)&lt;/h3>
&lt;p>只考虑和设计必须的功能，避免过度设计。只实现目前需要的功能，在以后您需要更多功能时，可以再进行添加。&lt;/p>
&lt;h3 id="6-law-of-demeter---迪米特法则">6. Law of Demeter - 迪米特法则&lt;/h3>
&lt;blockquote>
&lt;p>最少知识原则（Principle of Least Knowledge）
不要和陌生人说话&lt;/p>&lt;/blockquote>
&lt;blockquote>
&lt;p>如果你想让你的狗跑的话，你会对狗狗说还是对四条狗腿说？
如果你去店里买东西，你会把钱交给店员，还是会把钱包交给店员让他自己拿？&lt;/p>&lt;/blockquote>
&lt;p>对于对象 O 中一个方法 M ，M 应该只能够访问以下对象中的方法：&lt;/p>
&lt;ol>
&lt;li>对象 O；&lt;/li>
&lt;li>与 O 直接相关的 Component Object；&lt;/li>
&lt;li>由方法 M 创建或者实例化的对象；&lt;/li>
&lt;li>作为方法 M 的参数的对象。&lt;/li>
&lt;/ol>
&lt;h3 id="7-面向对象的-solid-原则">7. 面向对象的 S.O.L.I.D 原则&lt;/h3>
&lt;h4 id="single-responsibility-principle-srp---职责单一原则">Single Responsibility Principle (SRP) - 职责单一原则&lt;/h4>
&lt;p>一个类，只做一件事，并把这件事做好，其只有一个引起它变化的原因&lt;/p></description></item></channel></rss>