谈谈设计不足(under-engineering)与过度设计(over-engineering)

什么是设计不足?设计出来的系统复用性差,扩展性不强,不能灵活的应对变化,简言之,设计没到位。设计不足,多半是因为经验有限,设计能力有限。

什么是过度设计?设计出来的系统比恰到好处要复杂臃肿的多,过度的封装、一堆继承、接口和无用的方法,超复杂的xml配置文件,简言之,客户需求是要一把杀鸡的刀,你给设计了一把牛刀(杀鸡用牛刀)。过度设计,多半是因为有设计的癖好,喜欢炫耀或玩弄无谓的技巧,或是喜欢把简单的问题搞复杂化。

如此说来,没有人能说自己的设计就是恰到好处的。适合的就是最好的,但什么是适合的?这个度很难把握。

客户只是告诉你他“需要一把杀鸡的刀”,至于将来有没有需求变化,有没有可能要这把刀能杀牛,客户也不知道。所以当然这个设计的度就很难把握了。

 

有人主张设计必须前瞻与用户需求,不能以需求为导向。因为客户从来不会告诉你他未来的需求,连他也不知道。例如,消费者从来不会告诉RIM公司,我需要一款能收企业邮件的BlackBerry手机。

但也有人持相反观点,认为设计必须以需求为导向,软件以人为本,以用为本。

其实从一定意思上说,过度设计和设计不足都是“设计错误”的一种形式。

设计不足,则意味着系统复用性扩展性和灵活性差,系统僵化,不能应对将来的需求变化,或者将来修改和维护的代价和成本会很高,这当然是设计错误;

过度设计,则意味着为了实现这个设计要付出的额外代价,例如成本上升,缺陷可能性加大,提升维护成本,甚至降低系统性能。而可维护性和系统的高性能都是系统的隐性需求,这些需求没实现好,当然也是设计错误。

从另外一个角度看来,能够进行过度设计的,多半设计能力高于设计不足的;过度的设计改回来的成本也比设计不足的改过去的成本低的多。

 

Martin Fowler说敏捷开发不是轻视设计重实践和重构,而是演进式的设计(Evolutionary Design,区别与计划性的设计 Planned Design)。每一次的重构和迭代都映射和更新到最新的设计中来,从而最大限度的满足客户的功能性需求和非功能性需求。从最初的Prototyping、初始需求分析与建模,然后进行演进式的架构设计和实践,这也许是适合于大多数中小型项目的最佳实践。

 

因为变化是无穷无尽的,需求是变幻莫测的,我们每天都跟在需求后面跑,跑的很累。而客户还要求我们随需应变,抱怨我们不够敏捷,要求我们以欢喜的心态来拥抱变化,因为变化就是IT的机会嘛! 但我们能找到“银弹”来封装所有未知的需求变化吗?我们能超前于客户的需求,能变被动为主动吗?我们能设计出一个系统超前于未来客户的需求吗?

 

没有一个完美的能随需应变的系统,所谓“设计之美”也是盛名之下其实难副。我们实际的目标只是最大限度的封装变化,最大限度的预测某些未来可能的变化,提供某些系统扩展和变化的可能性,从而减低未来变化的成本,为客户创造价值

 

也许,最简单的才是最好的。大巧若拙,大道至简,有时候越简单的反而越难实现,而且越接近真理。也许这个只能靠个人体会和悟性了,才能最终体会到简单的精妙设计之美。熟背各种设计模式、学个一招半式的人,就像一个天天背着一把剑的剑客一样,唯恐旁人不知道其剑术高强;而真正的高手是手中无剑,却照样可以打赢别人,因为万物都可被他用来施以剑法。这才是真正的高境界。

 

我们缺乏的是真正有创意的创造性的设计,比如我们为什么没有设计出中国人自己的framework和platform?因为我们经验、技术和设计能力不足,大家都沉迷于玩一些小技巧,战术技巧,不是战略技巧;玩到30岁然后都去做PM做培训做销售去了。而在那些需要简约设计的地方,我们却自诩为高手而加上很多华丽的设计来维护虚幻的可扩展性和灵活性。

中国的架构师,缺乏的不仅仅是经验、技术、创意、设计能力,也许最缺乏的是思想,是心境。

### Ollama GUI Introduction and Usage Ollama, as part of the various Large Language Model (LLM) inference frameworks mentioned, offers a graphical user interface (GUI) that simplifies interaction with LLMs[^1]. The Ollama GUI is designed to provide users with an accessible way to interact with language models without needing deep technical knowledge. #### Features Overview The Ollama GUI includes several key features: - **Model Management**: Users can easily load, switch between different pre-trained models. - **Parameter Tuning**: Adjust settings such as temperature, top-k sampling directly through intuitive sliders or input fields. - **Prompt Engineering**: Provides tools for crafting prompts effectively by offering templates and examples. - **Output Visualization**: Displays generated text clearly alongside options to refine outputs further. #### Installation Instructions To install and use the Ollama GUI application on your system, follow these general guidelines based on typical installation procedures for similar software packages. However, specific instructions may vary depending on updates from developers after this information was last reviewed. For Linux systems: ```bash sudo apt-get update && sudo apt-get install -y ollama-gui ``` For macOS using Homebrew: ```bash brew install ollama-gui ``` Windows users should refer to official documentation provided at repositories like GitHub where more detailed setup guides are available[^2]. #### Basic Operations Guide Once installed, launching the program usually involves running `ollama-gui` command in terminal/command prompt which opens up main window displaying all core functionalities described earlier under "Features". Users then proceed configuring desired parameters before entering their query into designated area within UI layout presented upon startup. After submitting request via button click or keyboard shortcut assigned for submission action, results appear almost instantly inside same view allowing immediate review & iteration over inputs if necessary adjustments need making. --related questions-- 1. What other interfaces besides GUI does Ollama offer? 2. How frequently do developers release new versions of Ollama GUI? 3. Are there any community forums dedicated specifically towards discussing issues related to Ollama's products including its GUI tool? 4. Can you recommend resources for learning how to fine-tune large language models effectively? 5. Is it possible integrate custom-built modules/plugins into existing framework offered by Ollama suite?
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值