Software Development

  • Thinking functionally

            The following are the notes I took (using XMind) when reading the “Thinking Functionally” series on F# for fun and profit. More.

    · ,

    ·

    1–2 minutes
  • 什么是好软件?

    古罗马建筑大师Marcus Vitruvius认为一个好的建筑要达到“稳固(firmness)、实用(usefulness)、赏心悦目(delight)”。把美观放到了极高的位置。Frederick P. Brooks, Jr.在他的著作“The Design of Design”中反复用这三个准则衡量他亲自参与的设计,包括建筑、计算机结构、操作系统、甚至书籍的版面设计。显然他认为这三个准则同样适合于软件。 对用户而言,一个软件不死机、不出错可称之为稳固;能让用户顺利完成其任务可称之为实用;能给用户提供一个简洁、布局合理、色彩搭配和谐的界面或可称之为赏心悦目。然而,这三个特征还有程度的不同,如真正实用的软件要易学易用,能引导用户的操作,为用户提供及时的反馈;使常用的功能容易做,不常用的功能能够做。 就开发人员而言,稳固应该指软件的整体结构相对稳定,在可预见的未来,不会因为增加新功能而导致整体结构不堪重负。实用应指每个模块(module)、每个类(class)、每个函数(function或method)都有其特定功能。模块之间、类之间、函数之间没有功能重叠。开发人员能很快找到他想用的类或函数。赏心悦目应指从结构设计到代码、文档都简洁且风格统一,给人以美感。 唯简单才能达到稳固、实用、赏心悦目。简单才容易扩展。一个已经很复杂的结构是很难再扩展的,所以在扩展软件结构时要慎之又慎。简单才易学易用。简单才容易做到整洁、美观。 无印良品的产品推崇极简设计,去除了一切不必要的加工和颜色,简单到只剩下素材和功能本身。却反而给人们一种结实、易用、美观的感觉。在IT领域,极简设计也越来越流行。Android、iOS和Windows Phone 8在界面设计上都提倡平面化设计(flat UI)。 数学美的特征是简单、和谐、奇异。这似乎也同样适用于软件设计。简单并不易做到。唯有对事物做到高度抽象后才能做到简单。需认真分析所要解决的问题,发现其背后的逻辑规律,才能使设计简化。软件设计师切忌卖弄聪明,在设计中添加不必要的元素。要知道很多软件项目失败的根本原因是没有控制好软件的复杂度。当然追求简单不能以牺牲功能为前提。 光简单还不够,还要有统一的风格,给人以整洁和谐的美感。统一的风格也能使设计更易于理解。 如果一个设计在简单、风格统一的基础上能出人意表,让人耳目一新,那就是传说中的上上之作吗?真正好的设计增一分太肥、减一分太瘦。这样的设计若非妙手偶得,便是经过锤炼的设计的精华。似我等普通人就只有通过不断研究前人的设计成果、不断练习来提高自己的设计能力了。 最近几年,我对Eric Evans倡导的领域驱动设计(Domain Driven Design)极感兴趣,并有意识地在我开发的几个软件上应用,觉得获益匪浅。Jeffery Palermo在领域驱动设计的基础上提出了洋葱架构(Onion architecture)的概念。不同于普通的水平层次结构,他认为软件结构应该是球形层次结构:核心是领域模型(Domain Model),向外依次是领域服务(Domain Services),应用服务(Application Services),最外层是用户界面、基础设施(如数据库)。这个结构与地球的结构和细胞的结构是何其相似。如果一个软件结构与自然界中的某种结构相吻合,那这种结构自有其合理之处。我的经验告诉我洋葱架构有助于开发稳定、实用的结构。至于赏心悦目,那就要看我的造化了。 More.

    · ,

    ·

    1–2 minutes
  • WPF Localization Using RESX Files

    I discovered this article, WPF Localization Using RESX Files, on codeproject.com when I was thinking about how to localize my WPF application, BarModelMaker. After having examined the sample code of the… More.

    · ,

    ·

    1–2 minutes
  • The name “LayoutAwarePage” does not exist in the namespace

    After I added a Split Page to a Windows Store app that was created with the Blank App template, I got the error mentioned in the title whenever I opened… More.

    · , ,

    ·

    1–2 minutes
  • BarModel Animation

    I’ve captured a video of the BarModel Player for the following word problem: Ryan had $200 more than Danish at first. Ryan gave ¾ of his money to Danish. Danish in… More.

    · , , ,

    ·

    1–2 minutes
  • Bar Model Maker

    I am developing a Windows desktop application, called Bar Model Maker, that allows you to draw Bar Models by writing Bar Model Script. The tool displays the bar model as… More.

    · , ,

    ·

    1–2 minutes
  • MathGrapher (Android app)

    I’ve published an Android app, MathGrapher, a while ago. It seems to be attracting more and more users. With MathGrapher, you can visualize function equations, parametric equations, and/or polar equations.… More.

    · ,

    ·

    1–2 minutes
  • SATWordPuzzle (Android app)

    I’ve published a new Android app, SATWordPuzzle, with which you can play CrossWord and WordSearch puzzle games as well as learn SAT vocabulary. SATWordPuzzle generates CrossWord and WordSearch puzzles from… More.

    · ,

    ·

    1–2 minutes
  • Using pre-existing sqlite database in Android app

    In some of my apps, I need to use a pre-existing database, which is very likely to be upgraded in a later release and which could be pretty big (over… More.

    · , , ,

    ·

    2–3 minutes
  • iOS app成语纵横1.1版

    iOS app成语纵横1.1版的简体版和繁体版都被approve了。1.1版主要是提高可用性(Usability)。在找成语时通过滑动手指找出成语,并能提供即时反馈。在玩填字游戏时,可沿某成语的方向滑动手指,调出该成语的提示。 More.

    · , ,

    ·

    1–2 minutes

Related Articles

Get updates

Spam-free subscription, we guarantee. This is just a friendly ping when new content is out.

Go back

Your message has been sent

Warning
Warning
Warning.