/avatar.png

格心

个人技术蓝图

个人技术蓝图

计算机基础 [the-basics-of-computer-science]

计算机的组成原理 [principles-of-computer-composition]

操作系统原理 [principle-operating-system]

编译原理 [principle-of-compiling]

数据库系统 [database-system]

计算机网络 [network-of-computer]

TCP

HTTP

语言与平台 [language-and-platform]

C# & .NET 5 [chsarp-and-dotnet5]

.NET 本质论 [dotnet-essentialism]

dotnet-essentialism

开发方法

Software Development Methodologies

开发方法

软件的生命周期

可行性研究与计划->需求分析->概要设计->详细设计->实现->集成测试->确认测试->使用与维护

软件开发模型

  • 瀑布模型
  • 演化模型
  • 螺旋模型
  • 增量模型
  • 构建组装模型

统一过程

  • UP的9个核心工作流
    业务建模,需求,分析设计,实施,测试,部署,配置与变更管理,项目管理,环境
  • UP的生命周期
    目标里程碑,架构里程碑,能力里程碑,发布里程碑
  • UP的特点
    • UP不但给出类迭代的生命周期,还给出了生命周期每一阶段的迭代指南
    • 采用不同迭代方式的UP可以演变为演化模型或增量模型
    • 迭代特点使得更容易控制软件开发的风险
    • UP本身并不属于敏捷
    • 实际应用中可以根据具体问题对UP进行剪裁
  • 架构师在UP中的活动
    • 同需求人员和项目管理人员密切协作
    • 细化软件架构
    • 保持整个架构的概念完整性

敏捷方法

  • 极限编程

    • XP是一种轻量(敏捷)、高效、低风险、柔性、可预测、科学而且充满乐趣的软件开发方式。

      • 在更短的周期内,更早的提供具体、持续的反馈信息
      • 迭代的进行计划编制
      • 依赖自动测试程序来监控开发进度,并及早捕获缺陷
      • 依赖口头交流、测试和源程序进行沟通
      • 倡导持续的、演化式的设计
      • 依赖与开发团队内部的紧密协作
      • 尽可能达到程序员短期利益和项目长期利益的平衡
    • 四大价值观
      沟通,简单,反馈,勇气,(尊重)

    • 十二个最佳实践
      计划游戏,小型发布,隐喻,简单设计,测试先行,重构,结对编程,集体代码所有制,持续集成,每周工作40小时,现场客户,编码标准

  • 特性驱动开发
    FDD也是一个迭代开发模型,FDD每一步都强调质量,不断的交付可运行的软件,并以很小的开发提供精准的项目进度报告和状态信息。

    1. FDD角色定义
      项目经理,首席架构设计师,开发经理,主程序员,程序员,领域专家
    2. 核心过程
      开发整体对象模型、构造特征列表、计划特征开发、特征设计、特征构建
    3. 最佳实践
      领域对象建模、根据特征进行开发、类的个体所有、组成特征小组、审查、定期构造、配置管
  • Scrum
    Scrum是一个用于开发和维护复杂产品的框架,是一个增量的、迭代的开发过程。

    1. Scrum 的五个活动
      产品待办事项列表梳理、Sprint计划会议、每日Scrum会议、Sprint评审会议、Sprint回顾会议
    2. Scrum的5大价值观
      承诺、专注、开放、尊重、勇气
  • 水晶方法
    Crystal 是发展一种提倡“机动性“的方法,包括共有的核心元素,每个都含有独特的角色,过程模式,工作产品和实践。
    7大体系特征:经常交付,反思改进,渗透式交流,个人安全,焦点,与专家用户建立方便的联系,配有自动测试、配置管理和经常集成功能的技术环境

软件重用

  • 软件重用
    源代码重用,架构重用,应用框架重用,业务建模重用,文档及过程的重用,软构件重用,软件服务重用

基于架构的软件设计

  • ABSD方法于生命周期
    ABSD:分解功能,通过选择架构风格来事先质量和业务需求,软件模版的使用
    1. 抽象功能需求,包括变化的需求和通用的需求
    2. 用例(实际功能需求)
    3. 抽象的质量和业务需求
    4. 架构选项
    5. 质量场景
    6. 约束
  • 基于架构的软件开发模型(ABSDM)
    • 架构需求
      需求获取,标识构件(生成类图,对类分组,打包构件),需求评审
    • 架构设计
      提出软件架构模型,把已标识的构件映射到软件架构中,分析构件的互相作用,产生软件架构,设计评审
    • 架构文档化
      输出:架构需求规格说明,测试架构需求的质量设计说明
    • 架构复审
    • 架构实现
    • 架构演化
      需求变动归类,制定架构演化计划,修改、增加或删除构件,更新构件的互相作用,构件组装与测试,技术评审

PYTHON 技巧

Python Quick Grammar

1. 变量互换

a=1
b=2
a,b=b,a
a,b
(2, 1)

2. 连续赋值

a=b=c=50
a,b,c
(50, 50, 50)

3. 自动解包

a,b,c=[1,2,3]
a,b,c
(1, 2, 3)
a,*others=[1,2,3,4]
print(a)
print(*others)
1
2 3 4

4. 链式比较

a=10
if(5<a<15):
    print(a)
10

5. 重复列表

[5,2]*4
[5, 2, 5, 2, 5, 2, 5, 2]

6. 重复字符串

"hello"*3
'hellohellohello'

7. 三目运算

age = 30
slogon = "牛逼" if age == 30 else "niubility"
print(slogon)
牛逼

8. 字典合并

a={"a":1}
b={"b":2}
{**a,**b}
{'a': 1, 'b': 2}

9. 字符串反转

s = "i love python"
s[::-1]
'nohtyp evol i'

10. 列表转字符串

s = ["i", "love", "python"]
" ". join(s)
'i love python'

11. for else 语句

foo=[2,3,4,5]
for i in foo:
    if i == 0:
        break
else:
    print("未发现")
未发现

12. 字典推导式

m = {x: x**2 for x in range(5)}
m
{0: 0, 1: 1, 2: 4, 3: 9, 4: 16}

13. 用Counter查找列表中出现最多的元素

content = ["a", "b", "c", "a", "d", "c", "a"]
from collections import Counter
c = Counter(content)
c. most_common(1)
[('a', 3)]

14. 默认值字典

from collections import defaultdict
d = defaultdict(list)
d['a']. append(1)
d['a']
[1]

15. 赋值表达式

import re
data = "hello123world"
if match:=re. search("(\d+)", data):
    num = match. group(1)
else:
    num=None
num
'123'

16. isinstance

x=1
b=isinstance(x, (int, float))
b
True

17. 用 http.server 共享文件

#python3 -m http. server

18. zip 函数实现字典键值对互换

lang = {"python":". py", "java":". java"}
dict(zip(lang. values(), lang. keys()))
{'. py': 'python', '. java': 'java'}

19. 查找列表中出现次数最多的数字

test = [1, 2, 3, 4, 2, 2, 3, 1, 4, 4, 4, 5]
max(set(test), key=test. count)
4

20. 使用 slots 节省内存


class MyClass(object):
    def __init__(self, name, identifier):
        self. name = name
        self. identifier = identifier
        self. set_up()
 
print(sys. getsizeof(MyClass))
 
class MyClass(object):
    __slots__ = ['name', 'identifier']
 
    def __init__(self, name, identifier):
        self. name = name
        self. identifier = identifier
        self. set_up()
 
print(sys. getsizeof(MyClass))
1064
896

21. 扩展列表

i = ['a','b','c']
i. extend(['e','f','g'])
i
['a', 'b', 'c', 'e', 'f', 'g']

22. 列表负数索引

a = [ 1, 2, 3]
a[-1]
3

23. 列表切片

a = [0,1,2,3,4,5,6,7,8,9]
a[3:6] # 第3个到第6个之间的元素
a[:5] # 前5个元素
a[5:] # 后5个元素
a[::] # 所有元素(拷贝列表)
a[::2] # 偶数项
a[1::2] # 奇数项
a[::-1]  # 反转列表
[9, 8, 7, 6, 5, 4, 3, 2, 1, 0]

24. 二维数组变一维数组

import itertools
a = [[1, 2], [3, 4], [5, 6]]
i = itertools. chain(*a)
list(i)
[1, 2, 3, 4, 5, 6]

25. 有索引的迭代

a = ['Merry', 'Christmas ', 'Day']
for i, x in enumerate(a):
    print ('{}: {}'. format(i, x))
0: Merry
1: Christmas 
2: Day

26. 列表推导式

le = [x*2 for x in range(10)]
le  # 每个数取平方
le = [x for x in range(10) if x%2 == 0]
le  # 获取偶数项
[0, 2, 4, 6, 8]

27. 生成器表达式

ge = (x*2 for x in range(10))
print(ge)
print(next(ge))
print(next(ge))
print(next(ge))
<generator object <genexpr> at 0x000001D693764190>
0
2
4

28. 集合推导式

 nums = {n**2 for n in range(10)}
 nums
{0, 1, 4, 9, 16, 25, 36, 49, 64, 81}

29. 判断key是否存在字典中

d = {"1":"a"}
print('1' in d)
print(d['1'])
print(d. get("1"))
print(d. get("2"))
True
a
a
None

30. 装饰器

from functools import wraps
 
def tags(tag_name):
    def tags_decorator(func):
        @wraps(func)
        def func_wrapper(name):
            return "<{0}>{1}</{0}>". format(tag_name, func(name))
        return func_wrapper
    return tags_decorator
 
@tags("p")
def get_text(name):
    """returns some text"""
    return "Hello " + name
 
print(get_text("Python"))
<p>Hello Python</p>

31. 字典子集

def sub_dicts(d, keys):
    return {k:v for k, v in d. items() if k in keys}
sub_dicts({1:"a", 2:"b", 3:"c"}, [1,2])
{1: 'a', 2: 'b'}

32. 反转字典

d = {'a': 1, 'b': 2, 'c': 3, 'd': 4}
zip(d. values(), d. keys())
z = zip(d. values(), d. keys())
dict(z)
{1: 'a', 2: 'b', 3: 'c', 4: 'd'}

33. 具名元组

from collections import namedtuple
Point = namedtuple("Point", "x,y")
p = Point(x=1, y=2)
print(p. x)
print(p[0])
print(p. y)
print(p[1])
1
1
2
2

34. 设置字典默认值

d = dict()
if 'a' not in d:
    d['a'] = []
d['a']. append(1)
d
d. setdefault('b',[]). append(2)
d
{'a': [1], 'b': [2]}

35. 有序字典

from collections import OrderedDict
m = OrderedDict((str(x), x) for x in range(10))
m. keys() # key 按照插入的顺序排列
odict_keys(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'])

36. 列表中最大最小的前n个数

import heapq
a = [51, 95, 14, 65, 86, 35, 85, 32, 8, 98]
heapq. nlargest(5,a)
heapq. nsmallest(5,a)
[8, 14, 32, 35, 51]

37. 打开文件

import os
with open('foo. txt', 'w') as f:
    f. write("hello")
os. remove("foo. txt")

38. 两个列表组合成字典

list_1 = ["One","Two","Three"]
list_2 = [1,2,3]
dictionary = dict(zip(list_1, list_2))
print(dictionary)
{'One': 1, 'Two': 2, 'Three': 3}

39. 去除列表中重复元素

my_list = [1,4,1,8,2,8,4,5]
my_list = list(set(my_list))
print(my_list)
[1, 2, 4, 5, 8]

40. 打印日历

import calendar
print(calendar. month(2021, 1))
    January 2021
Mo Tu We Th Fr Sa Su
             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

41. 匿名函数

add = lambda a,b:a+b
add(1,2)
3

Scrum 学习笔记

Scrum Learning Notes

Scrum 学习笔记

理论与价值观

在有限的时间(TimeBox)里 团队一起合作(Work Together),我们彼此信任(Trust)并发挥自我最大的能力和优势(Do The Best),持续不断的交付(CI,CD)可用、有价值(Usable,Valuable)的软件,赢得客户的满意。

敏捷宣言

个体和互动 高于 流程和工具 (合作,信赖)
工作的软件 高于 详尽的文档 (产品增量)
客户合作 高于 合同谈判(同一组织)
响应变化 高于 遵循计划(公开,透明)

JUPYTER NOTEBOOK SHORTCUTS

Jupyter Notebook Shortcuts

Command model

KeyFunction作用
Entertake you into edit mode转入编辑模式
Shift-Enterrun the current cell, select below运行本单元,选中下个单元
Ctrl-Enterrun selected cells运行本单元
Alt-Enterrun the current cell, insert below运行本单元,在其下插入新单元
Ychange the cell type to Code单元转入代码状态
Mchange the cell type to Markdown单元转入 markdown 状态
Rchange the cell type to Raw单元转入 raw 状态
1set level 1 title设定 1 级标题-仅在 markdown 状态下
2set level 2 title设定 2 级标题
3set level 3 title设定 3 级标题
4set level 4 title设定 4 级标题
5set level 5 title设定 5 级标题
6set level 6 title设定 6 级标题
Upselect cell above选中上方单元
Kselect cell above选中上方单元
Downselect cell below选中下方单元
Jselect cell above选中下方单元
Shift-KMove selected cells up连续选择上方单元
Shift-JMove selected cells down连续选择下方单元
Ainsert cell above在上方插入新单元
Binsert cell below在下方插入新单元
Xcut selected cells剪切选中的单元
Ccopy selected cells复制选中的单元
Shift-Vpaste cells above粘贴到上方单元
Vpaste cells below粘贴到下方单元
Zundo cell deletion恢复删除的最后一个单元
D,Ddelete selected cells删除选中的单元
Shift-Mmerge cell below合并选中的单元
Ctrl-Ssave and checkpoint保存当前 NoteBook
SSave and Checkpoint保存当前 NoteBook
Ltoggle line numbers开关行号
Otoggle output转换输出
Shift-Otoggle output scrolling转换输出滚动
Escclose pager关闭页面
Qclose pager关闭页面
Hshow all shortcuts显示快捷键帮助
Shift-Spacescroll notebook up向上滚动
Spacescroll notebook down向下滚动

Edit Mode

KeyFunction作用
Tabcode completion or indent代码补全或缩进
Shift-Tabtooltip提示
Ctrl-]indent缩进
Ctrl-[dedent解除缩进
Ctrl-Aselect all全选
Ctrl-Zundo撤销
Ctrl-Shift-Zredo重做
Ctrl-Yredo重做
Ctrl-Homego to cell start跳到单元开头
Ctrl-Upgo to cell start跳到单元开头
Ctrl-Endgo to cell end跳到单元末尾
Ctrl-Downgo to cell end跳到单元末尾
Ctrl-Leftgo one word left跳到左边一个字首
Ctrl-Rightgo one word right跳到右边一个字首
Ctrl-Backspacedelete word before删除前面一个字
Ctrl-Deletedelete word after删除后面一个字
Esccommand mode切换到命令模式
Ctrl-Mcommand mode切换到命令模式
Shift-Enterrun cell, select below运行本单元,选中下一单元
Ctrl-Enterrun cell运行本单元
Alt-Enterrun cell, insert below运行本单元,在下面插入一单元
Ctrl-Shift- -split cell分割单元
Ctrl-Shift-Subtractsplit cell分割单元
Ctrl-SSave and Checkpoint保存当前 NoteBook
Upmove cursor up or previous cell光标上移或转入上一单元
Downmove cursor down or next cell光标下移或转入下一单元
Ctrl-/toggle comment on current or selected lines注释整行/撤销注释

Written with StackEdit.