你是按照什么工作流程来设计你将要编写的软件的?[英] What is the workflow you follow to design the software you're about to write?

本文是小编为大家收集整理的关于你是按照什么工作流程来设计你将要编写的软件的?的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

我已经开始研究一个相当复杂的软件.这是一个个人项目,但我仍然付出了很多努力.现在,我习惯于处理其他人的解决方案/设计或以非常可控的方式发展的项目.

这一次,我开始两次编写基础代码,但很快发现自己陷入了困境.所以我休息了一下,决定在编写一行代码之前写下完整的解决方案.我所做的(按顺序)是:

  1. 以 CLI 命令的形式编写用例(这是一个命令行应用程序)
  2. 写一些帮助
  3. 为各个部分设计类、数据文件的结构和功能性工作流程.

现在,我在这整个部分的速度真的很慢.我已经建立了一个个人 wiki,并使用它来编写这些规范,但我清楚地感到我缺乏经验和清晰的方法论.

我知道软件设计是一个非常复杂的主题,并且已经写了很多关于它的书籍,但我希望您分享您的经验/建议/方法.

在处理个人的中型项目时,您在开始编码之前会指定什么?怎么样?

提前致谢

推荐答案

在从事个人、中型项目时,您在开始编码之前会指定什么?

我指定功能规范:

  • 我担心如果我刚开始编码(这是"如何"),可能太容易忘记我想要编码的"为什么"和"什么"(对于"相当复杂"的软件,几个月来或可能需要几年的发展时间).
  • 我还想或多或少地了解我将要开发的"范围":以便大致评估(到一个数量级):
    • 会有多大
    • 我能不能完成它
    • 是否值得入手
    • 可以先开发它的哪个子集

为了风险管理,我要补充一点,我想开发的一些东西意味着使用一些我不熟悉的软件;为了尽量减少与此相关的风险,我还做了一些一次性原型设计.

<块引用>

怎么做?

我用笔和纸勾勒了一个功能规范.我写的一些是高层次的(业务级别的"愿景"文档),还有一些是低层次的,更像是设计(一些 UI 细节).有时我停下来想知道如何组织它,但接着又继续说,每一页对每个主题或多或少都有连贯性,我以后会想知道如何组织这些页面(可能很像你的维基).

我提前指定了软件架构:

  • 我从一个基本架构(一些小组件)开始开发,然后添加代码;而且,当我添加代码时,如果任何组件变得太大和复杂,那么我将它细分为几个更小的组件......这是一个进化过程......正如它在 Systemantics、A 中所说的那样工作的复杂系统总是从一个工作的简单系统演变而来的.
  • 我没有记录架构;或者更确切地说,体系结构的唯一文档是代码本身:例如,源代码在源目录、命名空间和 DLL 中的排列方式.

我确实对现在的架构有理论依据,但我没有记录这些原因:

  • 我是唯一的开发者
  • 实际架构由代码记录
  • 架构的原因在我的脑海中,并且可以通过源代码中的命名约定以及各种组件的依赖关系等[重新]发现

如果(仅当)我不是唯一的开发人员,那么我可能认为值得记录架构及其基本原理.

我上面所说的关于软件架构的内容也适用于软件处理的数据.

至于测试,我写了一点代码,然后测试一下;或编写一个测试,然后编写将通过该测试的功能.我不是在做"大爆炸集成",即几个月的写作没有任何测试.

我的流程中最大的弱点之一(或缺少的东西)是提前估计工作量,然后根据估计跟踪实施......这是这种"个人"之间的区别之一' 项目流程与我会在商业上为其他人做的付费项目.不过,我怀疑这是否好:如果估算是商业上的最佳实践,那么也许我"应该"在个人项目中也这样做.

本文地址:https://www.itbaoku.cn/post/627376.html

问题描述

I've started working on a fairly complicated software. It is for a personal project, but nonetheless I'm putting a lot of effort into it. Now, I'm used to work on other people's solutions / designs or on projects that grow in a very controllable way.

This time, I started twice to code the basics and I rapidly found myself stuck. So i took a rest and decided to write down the complete solution before coding a single line. What I've done (in order) is:

  1. writing the use cases in the form of CLI commands (this is a command line application)
  2. write some help
  3. design the classes, the structure of the data files and the functional workflow for the various parts.

Now, I'm going really slow in this whole part. I've set up a personal wiki and I'm using it to write those specifications, but i clearly feel my lack of experience and a clear methodology.

I'm aware that software design is a very complex subject and that a pletora of books have been written about it, but I'd love you to share your experience / advices / methodology.

When working on personal, middle-sized projects, what do you specify before starting to code? How?

Thanks in advance

推荐答案

When working on personal, middle-sized projects, what do you specify before starting to code?

I specify the functional specification:

  • I feared that it might be too easy, if I just started coding (which is the "how"), to forget "why" and "what" I wanted to code (for "fairly complicated" software, over the months or years that it might take to develop).
  • I also wanted to understand, more or less, the "scope" of what I would be developing: in order to assess approximately (to an order of magnitude):
    • How big it will be
    • Whether I could finish it
    • Whether it was worth starting
    • What subset of it can be developed first

For the sake of risk management I'll add that some of what I wanted to develop implied using some software that I wasn't familiar with; to minimize the risk associated with that, I also did a little throw-away prototyping.

How?

I outlined a functional specification, using pen a paper. Some of what I wrote was high-level (a business-level "vision" document), and some was lower-level, more like design (some of the UI details). Sometimes I stopped and puzzled about how to organize it, but then went on, reasoning that each page is more-or-less cohesive about each topic, and that I can puzzle later about how to organize the pages (much like your wiki, perhaps).

I both did and didn't specify the software architecture in advance:

  • I start development with a basic architecture (a few small components) in mind, and then add code; and, as I add code, if any component gets too big and complicated then I subdivide it into several smaller components ... it's an evolutionary process ... as it says in Systemantics, A COMPLEX SYSTEM THAT WORKS IS INVARIABLY FOUND TO HAVE EVOLVED FROM A SIMPLE SYSTEM THAT WORKED.
  • I'm not documenting the architecture; or, rather, the only documentation of the architecture is the code itself: for example, the way in which source code is arranged into source directories, namespaces, and DLLs.

I do have a theoretical justification for the architecture as it is now, but I haven't documented these reasons:

  • I'm the sole developer
  • The actual architecture is documented by the code
  • The reasons for the architecture are in my head, and are [re]discoverable by things like the naming conventions in the source code, and the various components' dependencies

If (only if) I weren't the sole developer, then I might think it worth documenting the architecture and its rationale.

What I said above about the architecture of the software is also true of the data which the software processes.

As for testing, I code a bit and then test it; or write a test and then code the functionality which will pass that test. I'm not doing "big bang integration", i.e. months of writing without any testing.

One of the biggest weaknesses in (or thing missing from) my process is estimating effort in advance, and then tracking implementation against the estimate ... this is one of the differences between this 'personal' project process versus a paid project that I'd do for someone else commercially. I doubt whether this is good though: if estimation is a best practice commercially, then perhaps I 'should' be doing it too on a personal project.