Permalink Show master Switch branches/tags
Could not load branches Nothing to show {{ refName }}
Name already in useA tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Go to file
ProgramLover books Latest commit 4331a90 Oct 9, 2016 History1 contributor Users who have contributed to this file15 MB Download
Sorry, something went wrong. Reload? Sorry, we cannot display this file. Sorry, this file is invalid so it cannot be displayed. [toc] 我们可以使用 try/catch/finally 来捕获错误和抛出错误。 抛出的每个异常,都应当提供足够的环境说明,以判断错误信息的来源和位置。同时应创建信息充分的错误消息,并和异常一起传递出去,在消息中,应包括失败的操作和失败的类型。 results matching ""No results matching ""官网:https://haomo-tech.com 作者:毫末科技 邮箱: 本章节主要目的是为了规范代码编写过程中的几个标准,防止写出难以维护和修改的代码。 编写过程没有构思,从头写到尾 命名混乱 缺乏注释信息 代码臃肿 公共方法和组件没有抽离 核心逻辑无法测试 整洁的代码(素描)
必要性写出糟糕代码的原因:
项目经理是进度和需求的守护者,程序员是代码质量的守护者。 面对项目经理的压力,我们应该如实告诉项目经理任务中遇到的问题以及导致任务时间偏差的原因,而不是逃避问题并制造混乱。写出整洁的代码,守护住代码的质量是程序员专业性的体现。 糟糕的代码难以维护和修改,会严重拖累项目的质量进度。 方法有意义的命名
示例: 设计云组件ID命名:动词(操作)+名词(表名+(字段名)+组件名) https://dev.block-design.cn/edit-page/?pageId=1417653844220841986 示例 添加用户按钮(addSysUserButton)、用户表格(sysUserTable)、添加用户名称输入框(addSysUserNameInput) 函数
示例:
重构后:
注释
格式
边界
单元测试
规范
参考
results matching ""No results matching "" |