Murphy's Computer Law + others

博客介绍了一系列有趣的编程定律,如Bove's Theorem、Brook's Law等。这些定律涉及项目进度、人力投入、程序运行、错误处理等方面,揭示了编程过程中常见的现象和问题,对编程工作有一定的启示意义。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Interesting programming laws. 

Bove's Theorem
The remaining work to finish in order to reach your goal increases as
the deadline approaches.

Brook's Law
Adding manpower to a late software project makes it later.

Cann's Axiom
When all else fails, read the instructions.

Deadline-Dan's Demon
Every task takes twice as long as you think it will take. If you
double the time you think it will take, it will actually take four
times as long.

Demian's Observation
There is always one item on the screen menu that is mislabeled and
should read "ABANDON HOPE ALL YE WHO ENTER HERE."

Dr. Caligari's Come-Back
A bad sector disk error occurs only after you've done several hours
of work without performing a backup.

Finagle's Rules:

  1. To study an application best, understand it thoroughly before you
    start.
  2. Always keep a record of data. It indicates you've been working.
  3. Always draw your curves, then plot the reading.
  4. In case of doubt, make it sound convincing.
  5. Program results should always be reproducible. They should all
    fail in the same way.
  6. Do not believe in miracles. Rely on them.

Franklin's Rule
Blessed is the end user who expects nothing, for he/she will not be
disappointed.

Gilb's Law of Unreliability

  1. At the source of every error which is blamed on the computer you
    will find at least two human errors, including the error of blaming
    it on the computer.
  2. Any system which depends on human reliability is unreliable.
  3. Undetectable errors are infinite in variety, in contrast to
    detectable errors, which by definition are limited.
  4. Investment in reliability will increase until it exceeds the
    probable cost of errors, or until someone insists on getting
    some useful work done.

Gummidge's Law
The amount of expertise varies in inverse proportion to the number
of statements understood by the general public.

Harp's Corollary to Estridge's Law
Your "IBM PC-compatible" computer grows more incompatible with every
passing moment.

Heller's Law
The first myth of management is that it exists.

Hind's Law of Computer Programming

  1. Any given program, when running, is obsolete.
  2. If a program is useful, it will have to be changed.
  3. If a program is useless, it will have to be documented.
  4. Any given program will expand to fill all available memory.
  5. The value of a program is proportional to the weight of its
    output.
  6. Program complexity grows until it exceeds the capability of the
    programmer who must maintain it.
  7. Make it possible for programmers to write programs in English,
    and you will find that programmers cannot write in English.

Hoare's Law of Large Programs
Inside every large program is a small program struggling to get out.

The Last One's Law of Program Generators
A program generator creates programs that are more "buggy" than the
program generator.

Meskimen's Law
There's never time to do it right, but always time to do it over.

Murphy's Fourth Law
If there is a possibility of several things going wrong, the one
that will cause the most damage will be the one to go wrong.

Murphy's Law of Thermodynamics.
Things get worse under pressure.

Ninety-Ninety Rule of Project Schedule
The first ninety percent of the task takes ninety percent of the
time, and the last ten percent takes the other ninety percent.

Nixon's Theorem
The man who can smile when things go wrong has thought of someone
he can blame it on.

Nolan's Placebo
An ounce of image is worth a pound of performance.

Osborn's Law
Variables won't constants aren't.

O'Toole's Commentary on Murphy's Law
Murphy was an optimist.

Peer's Law
The solution to a problem changes the problem.

Rhode's Corollary to Hoare's Law
Inside every complex and unworkable program is a useful routine
struggling to to be free.

Robert E. Lee's Truce
Judgement comes from experience; experience comes from poor judgement.

Sattinger's Law
It works better if you plug it in.

Shaw's Principle
Build a system that even a fool can use, and only a fool will want to
use it.

Snafu Equations

  1. Given any problem containing N equations, there will be N+1
    unknown.
  2. An object or bit of information most needed will be least
    available.
  3. Any device requiring service or adjustment will be least
    accessable.
  4. Interchangeable device's won't.
  5. In any human endeavor, once you have exhausted all possibilities
    and fail, there will be one solution, simple and obvious, highly visible
    to everyone else.
  6. Badness comes in waves.

Thoreau's Theories of Adaptation

  1. After months of training and you finally understand all of a
    program's commands, a revised version of the program arrives
    with an all-new command structure.
  2. After designing a useful routine that gets around a familiar "bug"
    in the system, the system is revised, the "bug" is taken away, and
    you're left with a useless routine.
  3. Efforts in improving a program's "user friendliness" invariably
    lead to work in improving user's "computer literacy."
  4. That's not a "bug," that's a feature!

Weinberg's Corollary
An expert is a person who avoids the small errors while sweeping on
to the grand fallacy.

Wood's Axiom
As soon as a still-to-be-finished computer task becomes a life-or-death
situation, the power fails.

Zymurgy's First Law of Evolving System Dynamics
Once you open a can of worms, the only way to recan them is to use
a larger can.

内容概要:本文系统介绍了基于C#(VS2022+.NET Core)与HALCON 24.11的工业视觉测量拟合技术,涵盖边缘提取、几何拟合、精度优化及工业部署全流程。文中详细解析了亚像素边缘提取、Tukey抗噪算法、SVD平面拟合等核心技术,并提供了汽车零件孔径测量、PCB焊点共面性检测等典型应用场景的完整代码示例。通过GPU加速、EtherCAT同步等优化策略,实现了±0.01mm级测量精度,满足ISO 1101标准。此外,文章还探讨了深度学习、量子启发式算法等前沿技术的应用前景。 适合人群:具备一定编程基础,尤其是熟悉C#和HALCON的工程师或研究人员,以及从事工业视觉测量与自动化检测领域的技术人员。 使用场景及目标:①学习如何使用C#和HALCON实现高精度工业视觉测量系统的开发;②掌握边缘提取、抗差拟合、3D点云处理等核心技术的具体实现方法;③了解工业部署中的关键技术,如GPU加速、EtherCAT同步控制、实时数据看板等;④探索基于深度学习和量子计算的前沿技术在工业视觉中的应用。 其他说明:本文不仅提供了详细的理论分析和技术实现,还附有完整的代码示例和实验数据,帮助读者更好地理解和实践。同时,文中提到的硬件选型、校准方法、精度验证等内容,为实际项目实施提供了重要参考。文章最后还给出了未来的技术演进方向和开发者行动建议,如量子-经典混合计算、自监督学习等,以及参与HALCON官方认证和开源社区的建议。
内容概要:本文介绍了基于WOA-GRU-Attention模型的时序数据分类预测项目,旨在提升时序数据分类准确率,实现智能优化,并提供强泛化能力的分类框架。项目背景指出传统机器学习方法难以处理时序数据的复杂特性,而GRU、注意力机制和WOA的结合能有效应对这些问题。文章详细描述了项目的目标与意义,包括提升分类准确率、实现智能优化、推动元启发式算法的应用等。同时,文中列出了项目面临的挑战及解决方案,如高维数据特征复杂、超参数调优难度大等。项目模型架构由WOA、GRU和注意力机制三部分组成,通过Python代码示例展示了模型的具体实现,包括模型定义、训练过程和WOA优化算法的核心步骤。; 适合人群:具备一定编程基础,尤其是对深度学习、时序数据分析感兴趣的开发者和研究人员。; 使用场景及目标:① 提升时序数据分类准确率,特别是在金融、医疗、智能制造等领域;② 实现模型训练过程的智能优化,避免传统调参的局限;③ 提供具备强泛化能力的时序数据分类框架,支持多行业多场景应用;④ 推动高性能时序模型的工业应用落地,提高智能系统的响应速度和决策质量。; 其他说明:项目不仅实现了工程应用,还在理论层面对GRU结构与注意力机制的融合进行了系统分析,结合WOA优化过程对模型训练动力学展开研究,促进了深度学习与优化算法交叉研究领域的发展。读者可以通过提供的代码示例和链接进一步了解项目的具体实现和应用场景。
内容概要:本文详细介绍了如何使用PyQt5创建一个功能全面的桌面备忘录应用程序,涵盖从环境准备、数据库设计、界面设计到主程序结构及高级功能实现的全过程。首先,介绍了所需安装的Python库,包括PyQt5、sqlite3等。接着,详细描述了SQLite数据库的设计,创建任务表和类别表,并插入默认类别。然后,使用Qt Designer设计UI界面,包括主窗口、任务列表、工具栏、过滤器和日历控件等。主程序结构部分,展示了如何初始化UI、加载数据库数据、显示任务列表以及连接信号与槽。任务管理功能方面,实现了添加、编辑、删除、标记完成等操作。高级功能包括类别管理、数据导入导出、优先级视觉标识、到期日提醒、状态管理和智能筛选等。最后,提供了应用启动与主函数的代码,并展望了扩展方向,如多用户支持、云同步、提醒通知等。 适合人群:零基础或初学者,对Python和桌面应用程序开发感兴趣的开发者。 使用场景及目标:①学习PyQt5的基本使用方法,包括界面设计、信号与槽机制;②掌握SQLite数据库的基本操作,如创建表、插入数据、查询等;③实现一个完整的桌面应用程序,具备增删改查和数据持久化功能;④了解如何为应用程序添加高级特性,如类别管理、数据导入导出、到期日提醒等。 阅读建议:此资源不仅适用于零基础的学习者,也适合有一定编程经验的开发者深入理解PyQt5的应用开发。建议读者跟随教程逐步实践,结合实际操作来理解和掌握每个步骤,同时可以尝试实现扩展功能,进一步提升自己的开发技能。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值