志当存高远,望尽天涯路

人生已如此艰难,就不要再拆穿了


  • 首页

  • 归档

  • 分类

  • 标签

软件开发工具2

发表于 2018-03-03 | 分类于 自考

02软件开发过程及组织脑图

软件开发工具1

发表于 2018-03-01 | 分类于 自考

01绪论脑图

1.绪论

1.1 由来

范围

第三代基础上
为了提高质量、效率
从分析、设计、测试、文档管理各方面对开发者提供支持的软件

开发软件的软件

软件危机

20世纪60年代末

发展历程

机器

汇编

三代高级,独立于机器,硬件差异交给编译系统完成

第四代语言

非过程化程序设计语言
用户提出要求
某些标准过程的自动生成
具体执行步骤的安排交邮软件自动处理

利用通用软件

专用软件

集成的软件开发工具阶段

通用软件不足

太表面 、初级了

许多工作无法完成

报表、文档生成
找规律编程wx

形似而不是神似

一致性困难

1.2概念

三代语言后
对软件开发不同方面、不同程序支持
支持全过程,不限于编码等

case工具

计算机辅助软件工程

计算机辅助系统工程

地位

一定阶段必然产物

作用

提升开发效率

质量

成本

规范

1.3功能&性能

过程

需求提出,功能说明书

总体设计

,根据功能说明书
结构图、公用数据结构、数据库、模块清单等

实现阶段

代码编写、文档编写

测试与联调阶段

对模块的调试与整个软件联调

功能

认识与描述客观系统

需求阶段,给予更多帮助

存储与管理开发过程中的信息

代码编写与文档的生成

软件项目管理

针对项目管理人员,非程序员

  • 质量管理
  • 资源与费用管理
  • 项目进度管理

需要支持:

  • 测试工作支持
  • 版本管理问题

性能

表达能与与描述能力

方便程度、易用性

对软、硬件要求

稳定性

保持信息一致的能力

1.4 类别

按工作阶段

设计工具是具体的,
计划、分析工具独立于平台

分析工具

支持需求分析
数据字典dictonary3000、cdd
流程图 flow

计划工具

更宏观角度
项目管理角度
进度、资源、质量、验收
跨生命周期

设计工具

实现阶段、具体的
如:代码生成
最早、数量最多

集成度

单一的

某一阶段支持

集成

面向全过程

对机器或软件依赖

独立

计划、分析工具

非独立

  • 集成化工具
  • 设计工具

一道事件循环列面试题

发表于 2018-02-03 | 分类于 基础
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
console.log('script start')

const interval = setInterval(() => {
console.log('setInterval')
}, 0)

setTimeout(() => {
console.log('setTimeout 1')
Promise.resolve().then(() => {
console.log('promise 3')
}).then(() => {
console.log('promise 4')
}).then(() => {
setTimeout(() => {
console.log('setTimeout 2')
Promise.resolve().then(() => {
console.log('promise 5')
}).then(() => {
console.log('promise 6')
}).then(() => {
clearInterval(interval)
})
}, 0)
})
}, 0)

Promise.resolve().then(() => {
console.log('promise 1')
}).then(() => {
console.log('promise 2')
})

最终结果

safari,ff,nodejs与此结果一致,chrome某些版本会多出现一次interval(promise4后)

1
2
3
4
5
6
7
8
9
10
11
script start
promise1
promise2
setInterval
setTimout1
promise3
promise4
setInterval
timeout2
promise5
promise6

参考链接

https://stackoverflow.com/a/30910084
https://blog.risingstack.com/node-js-at-scale-understanding-node-js-event-loop/

分析步骤

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/// whole script tag as task,start exec
///
/// script start log
///
/// task queue: setInterval,setTimeout1
/// micro queue : [then1,then2]
///
/// start exec microqueue,执行完所有micro queue再执行下一次task queue
/// promise1 log
/// promise2 log
///
/// task queue: setInterval,setTimeout1
/// micro queue : []

/// 开始执行setInterval
/// setInterval log
///
/// task queue: setTimeout1,setInterval
/// micro queue : []

// micro queue 为空,继续下一轮task queue,执行setTimout1
// setTimout1 log
//
/// task queue: setInterval
/// micro queue : [then3,then4,then45(第三个)]
///
/// 开始执行micro queue
/// promise3 log
/// promise 4 log
/// 将timeout push到taskqueue
///
/// task queue: setInterval,setTimeout2
/// micro queue : []

//开始执行task
//
//setInterval log
//

/// task queue: setTimeout2,setInterval
/// micro queue : []

// micro为空,继续执行task, timeout2出
// timeout2 log
// 将then5 then6 thenlast push到micro queue
//
/// task queue: setInterval
/// micro queue : [then5 then6 thenlast]

//开始执行micro queue
//
// promise5 log
// promise6 log
// then last clearInterval
//
/// task queue: []
/// micro queue : []

正则练习-USD格式

发表于 2018-02-02 | 分类于 题

给定字符串 str,检查其是否符合美元书写格式
1、以 $ 开始
2、整数部分,从个位起,满 3 个数字用 , 分隔
3、如果为小数,则小数部分长度为 2
4、正确的格式如:$1,023,032.03 或者 $2.03,错误的格式如:$3,432,12.12 或者 $34,344.3
逗号和后边的数组放一组而不是数据前逗号后

1
2
3
4
function isUSD(str) {
var reg = /^\$\d{1,3}(,\d{3})*(\.\d{2})?$/
return reg.test(str)
}

正则替换题1

发表于 2018-01-18 | 分类于 javascript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
var str = 'x-x_';
var retArr = [];
str.replace(/(x_*)|(-)/g, function(match, p1, p2,pos1) {
if (p1) {
retArr.push({ on: true, length: p1.length });
}
if (p2) {
retArr.push({ on: false, length: 1 });
}
});
//替换的逻辑是 (或|) 左边->右边 ->左边->右边
// match x p1 x p2 undefined
// match - p1 undefined p2 -
// match x_ p1 x_ p2 undefined
// str = '';
//

// [{
// on : true,
// length : 1
// },{
// on: false,
// length: 1
// },{
// on : true,
// length : 2
// }]
// 没有return 不会影响字符串
console.log(str);
console.log(retArr);

linux之umask

发表于 2018-01-14 | 分类于 linux

umask 文件、目录默认权限掩码
文件最高666 rw-rw-rw-
目录最高777 rwxrwxrwx

假如:umask是022

则默认目录权限是:
777-022 755 (rwxr-xr-x)
文件:
666-022 644(rw-r–r–)

http压缩

发表于 2018-01-07 | 分类于 前端

效果还是很惊人的

nginx压缩开启

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;
#tcp_nopush on;

keepalive_timeout 65;

gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_comp_level 5;
gzip_types text/css text/javascript application/javascript;
include /etc/nginx/conf.d/*.conf;
}

http缓存

发表于 2018-01-07 | 分类于 前端
  • cache-control说明
  • http缓存请求流程
  • 缓存策略
  • nginx缓存配置
  • 缓存和刷新的关系
阅读全文 »

css fullscreen 100%

发表于 2017-09-16

在线demo
height 100%

1
2
3
4
5
6
7
8
9
10
11
12
body{
padding:0;
margin:0;
}
.a1{
background-color: red;
position:absolute;
left:0;
right:0;
top:0;
bottom:0;
}

不定尺寸元素水平、垂直居中两种方式
/demos/2018/valign1.html

find命令最常用法

发表于 2017-08-21 | 分类于 前端

命令行查找文件、目录还是很方便的,常用如下:

精确匹配

1
2
3
➜  hexo-src git:(master) ✗ find ~/work/respo -name travel_touch
/Users/qitmac000321/work/respo/source-travel/fonts/travel_touch
/Users/qitmac000321/work/respo/travel_touch

正则模糊查找文件

1
2
3
➜  hexo-src git:(master) ✗ find ~/work/respo -name 'travel_t*' -type f
/Users/qitmac000321/work/respo/source-travel/fonts/travel_touch/1.0.1/travel_touch.ttf
/Users/qitmac000321/work/respo/source-travel/fonts/travel_touch/1.0.1/travel_touch.woff

正则模糊查找目录

1
2
3
➜  hexo-src git:(master) ✗ find ~/work/respo -name 'travel_t*' -type d
/Users/qitmac000321/work/respo/source-travel/fonts/travel_touch
/Users/qitmac000321/work/respo/travel_touch
1…101112…17
331502715@qq.com

331502715@qq.com

162 日志
14 分类
113 标签
© 2021 331502715@qq.com
由 Hexo 强力驱动
|
主题 — NexT.Mist v5.1.4