这是我在2018年4月写的英语演讲稿,可惜没人听得懂(实际上就没几个人在听)。

文章的内容是我从此前做过的项目中总结出来的经验,从我们的寝室铃声入手,介绍了可扩展性、兼容性与可复用性等概念,最后提出良好的设计应该平衡这些特性与性能、成本之间的三角关系。

第一次用英文写有一点专业性的东西,不知道算不算好。

以下为原文:

Design Principles

Intro

One day, on the noticeboard in our dormitory, there was a paper saying that the ring for rainy days cannot be added into the bell system in our dorm, and also, they won’t rebuild the system for us. I wondered why, because if the system were designed by me, anything could be easily added. Today, I’m not going to comment on their attitude or solution, but to show what a well-designed system should be like, or, what features should a well-designed system have.

Performance

No matter the system is made for yourself or for others, your design must meet the requirements.

The stick in my hand can display images when I’m shaking it. It has a microcontroller, running at 8MHz, to take control of the LED’s. If I used a microcontroller that could only run at 1MHz, it couldn’t display such complex words.

Cost

Obviously, the one at 8MHz is more expensive than the one at 1MHz. Usually the higher the performance, the more you should pay.

Some people build their computers with accessories chosen by themselves. They can be cheap or expensive, according to your choice. If you don’t pay attention to the balance between performance and cost, you’ll probably have a budget of 3’000 and finally spend 98’000.

This stick examines the frequency of shaking by a mercury switch. (If you are interested, I’ll explain its principle after class.) Another approach is to examine the direction of acceleration to get a more accurate position and frequency, which will be more expensive. However, I made it just for fun, so I didn’t want to spend more.

Extensibility

Performance and cost are basic, which everyone, when designing a system, can take into consideration. But engineering design is not such simple. From now on, I will introduce some professional concepts.

Extensibility is the ability to be extended or stretched, or the quality of being designed to allow the addition of new capabilities or functionalities.

Take an example. Some of you know my research project, which is to build a modular development system. It has pluggable boards and abstractions of every module in source code. The use of the system is quite simple but the usage is powerful: buy modules with functionalities you want, plug them together, write several lines of code, then, it works. The core module itself has limited functions, but by plugging and programming, all functionalities of other modules can be added, which means it has strong extensibility.

Compatibility

We need extensibility because the requirements may change, but what if it changes too much? We can design a new system, but we already have something useful in the previous system. Can they work together? A system with compatibility can.

Compatibility is the state of being compatible, in which two or more things are able to exist or work together in combination without problems or conflict. In your computer, sometimes you have to run a program in compatibility mode. The word here refers to backward or downward compatibility, which is a property that allows for interoperability with an older legacy system.

My modular system is a new concept, but there are already lots of traditional dev boards, a large number of users who are familiar with them, and an amount of valuable but not portable code. So, I’m going to program on other platforms to make my system compatible with them.

A complementary concept is forward compatibility. While backward compatibility can solve some historical problems, extensibility and forward compatibility can reduce the workload in the future.

Reusability

Since a system may upgrade, the unchanged parts in the previous version can be reused in the new version. Also, different systems may have something in common.

The modules in my modular system communicate on a bus. The microcontroller on this stick has access to the storage chip by the same kind of bus. Actually, in the source code of the stick, I just wrote an instruction to include the file in the former system. The source code of bus communication is reused.

Reusability is the state or quality of begin used more than once.

The bus of the stick is only used to transfer data from the storage chip to the microcontroller, but the whole functionality of bus communication is implemented. If I made the stick before the modular system, I may have integrated the storage operation with bus communication, which could make the program faster. But when building the modular system, I would have to redo the work.

Relationship among these features

Extensibility, compatibility and reusability have many emphasized properties in common, including modularity, high cohesion and low coupling. They are tightly linked.

All features above can be divided into 3 groups: performance, cost, and the other 3. An ideal system with high performance, low cost and many other features, can only exist in our mind. We cannot have everything at the same time.

As explained before, and also in your common sense, performance and cost are often incompatible.

If I use the modular system to make a simple project, you may think that it will be better to make a single board. Yes, I’ll need fewer boards, fewer chips, less code, and the program will run faster, which means higher performance. But what if I want to add more functionalities? I’ll have to redesign the board, resolder the board, and change lots of the code.

If I want to change the picture displayed by the stick, I must change the source code. An approach to avoid it is to add a Bluetooth module so that I can control it with my phone. But the price of a Bluetooth module is higher than the whole stick.

The 3 groups can form a triangle. You can’t make all of them the best at the same time. But you can do your best, which is to balance them. So, when you’re designing, think about as many aspects as you can. Don’t design a poor system like the one in our dorm.

Thank you.

转载于:https://www.cnblogs.com/jerry-fuyi/p/11140459.html

Design Principles (设计原则)相关推荐

  1. 【拓展】深度解析蚂蚁Ant Design的设计原则

    作者:菜菜不甜 https://www.zcool.com.cn/article/ZMTI1OTI1Mg==.html 本文讲述了Ant Design设计原则的相关内容,希望可以给到各位帮助. 『 A ...

  2. 深度解析蚂蚁Ant Design的设计原则

    『 Ant Design是什么 』 众所周知蚂蚁集团的B端产品是一个庞大的系统,数量多且功能复杂,而且变动频繁,常常需要设计师和开发人员能快速做出工作上的配合.同时这类产品中有存在很多类似的页面以及组 ...

  3. #Ant Design# 设计规范 设计原则

    转载自:https://www.douban.com/note/643930072/ #Ant Design# 设计规范 01设计原则 1. 亲密性 距离近-关联高-统一视觉单元,亲密性根本目的:实现 ...

  4. 面向对象设计原则_面向对象的设计原则

    面向对象设计原则 Programming is fun until you have to incorporate a new requirement that changes the whole d ...

  5. Robert C. Martin The Principles of OOD 面向对象设计原则

    本文由来自美国业界大牛--Robert C. Martin(俗称"Bob大叔) 发布在 butunclebob.com 上,已获得翻译授权. 英文原文链接:http://butunclebo ...

  6. 设计模式-设计原则(Design Principle)

    本文由@呆代待殆原创,转载请注明出处. 写在前面:所谓设计原则并不是一定要遵守的法则,只是一种建议,因为保持这些原则本身会有一定代价,若是这些代价超过了带来的好处就得不偿失了,所以一切还是以简单为准. ...

  7. [Design]设计模式-- 为什么要学习设计原则/模式

    首先来考虑一款软件系统的生命周期.任何事物都要经历两次创造过程,软件项目系统也不例外.系统设计师拿到系统的设计需求后,首先系统存在于设计者们的头脑中,然后存在于设计图纸上,然后变成原型系统,最后变成真 ...

  8. [译] 前端组件设计原则

    原文地址:Front end component design principles 原文作者:Andrew Dinihan 文中示例代码:传送门 限于个人能力,如有错漏之处,烦请不吝赐教. 前言 我 ...

  9. API设计原则 - Qt官网的设计实践总结

    原文链接:API Design Principles - Qt Wiki 基于Gary的影响力上 Gary Gao 的译文稿:C++的API设计指导 译文发在酷壳 - CoolShell:API设计原 ...

最新文章

  1. 不使用powerdesigner手工绘制用例图例题详解
  2. php实现人员权限管理(用户界面)
  3. Java语言编码规范(1)
  4. 用顺序栈实现十进制向二进制转化
  5. springboot配置jasypt实现对配置文件敏感信息加密全流程详解
  6. win7中输入文件夹首字母跳到相应的文件或者文件夹,却在搜索栏出现输入的字母...
  7. python-封装pymysql的思路步骤
  8. 搭建局域网YUM服务器
  9. POJ-3061 Subsequence 二分或尺取
  10. mysql的表导入pgsql用_postgresql 导入数据库表并重设自增属性的操作
  11. c++关于函数的参数传递全部知识点详解
  12. 批量部署windows和linux系统,使用Cobbler批量部署Linux和Windows:Windows系统批量安装(三)...
  13. 学习笔记:LR语法分析
  14. 三层架构的bussiness层没用?
  15. 【Hive】Hive 查询
  16. Flutter 打包iOS包出现 ld: bitcode bundle could not be generated because
  17. 十六进制解码_快速十六进制编码和解码
  18. MOPSO算法总结,包括OMOPSO,SMPSO,dMOPSO,CMPSO,DDMOPSO,MMOPSO等
  19. 图像处理学习笔记-04-频率域滤波03
  20. GeoHash算法与用法

热门文章

  1. 荣耀20i什么时候鸿蒙系统,华为官方公布鸿蒙系统百款机型适配时间,荣耀手机没有?...
  2. IceCTF 2016
  3. 删除桌面的“回收站”图标
  4. tomcat启动失败_严重: A child container failed during start
  5. C Primer Plus 第六版 编程练习第四章答案 最新出炉
  6. 离开中国,舍不得淘宝和快递,还有收快递时的菜鸟驿站!
  7. WSA安卓子系统最新版下载直链:微软已更新至1.8.32822.0版本适用于Android的Windows子系统无需切换美区和Beta通道
  8. Anaconda Jupyter notebook 如何进入D盘 个人解决办法
  9. 富士康和苹果的印度制造计划受挫,还是中国制造更可靠
  10. dnf服务器未响应怎么解决方法,DNF未响应的原因分析与解决方法