2015 Summary

Einstein

工作

科研项目统计

模块数 代码 测试用例 工时 培训积分 组织培训 工会积分
51 8000 333 1900 56 1 15

智能固话中的日历项目-人力外包

  • 需求 - 没想透

    1. 让需求跑起来。
    2. 功能之间相互交叉影响到底怎么样的,每个功能与其他功能是否相互影响,比如默认日历与日历设置。
    3. 清晰的业务逻辑代表了清晰的代码,逻辑不闭合,必然引入更多的bug。
  • 人员招聘 - 太难

    1. 总体:老手带新手,并制定一人负责。
    2. 测试:至少为开发人员的一半,最少两名。
  • 迭代开发

    1. 分模块,边测边改。
    2. 每日站会,讨论实现细节。
    3. code review。

    Read More

How to Develop Commercial-Grade Product

TO be continue

Indicators

Tech indicators

Security

Stability

Availability

  1. MTBF (Mean Time Between Failure)
  2. MTTR (mean time to restoration)
  3. Availability = (MTBF/(MTBF+MTTR))*100%

Performance

Operation indicators

Trading volume

CVR (Click Value Rate)

User account

PV/UV

Bounce Rate

Development Cycle

Requirements

BackLog

User Story

UISpec

Design

Design drawing

html & CSS

Develop

develop Environment:

  1. github Boxen for ios
  2. vagrantup

Version Manage Tools: git

Package Manager:

OS level

  1. BSD/Macos: homebrew(made of ruby& git)
  2. Linux
    • from source: configure/make/make install
    • using rpm/dpkg(hard mode): ==> centos/debian(ubuntu)
    • using yum/apt(easy mode): ==> centos/debian(ubuntu)

Language level

  1. .net: nuget
  2. java: maven
  3. sacla: sbt
  4. ruby: gem
  5. jsp: npm
  6. swift: spm
  7. python:
    • easy install (setuptools), can’t support uninstall
    • pip (good)
  8. go: get

Branchs Manage: master develop

Develop Process: Scrum

Engineering: CI (Continuous interaction) / CD(Continuous delivery) / platformization / Framization

Timer: 2 weeks

FrontEnd

BackEnd focus

High Scalability: timeout

Performance: cache/parallelization

Stress Testing tool:

  • TSung: TCPCopy
  • A/B test

debug

  1. keep context: no reboot, gcore/jmap/tcpdump
  2. restore context: tcpcopy,touchstone
  3. snap analysis: gdb、Xmap、mat、jstack
  4. call analysis: btrace、Xtrace
  5. composed ansysis: perf、Xstat、Xtop、sysdig

Security

Integration

tools

  1. jenkins
  2. Travis CI based on GitHub

process

one project, one build for small business

  • Project Architecture diagram
    image
  • develop process diagram
    image
  • Quality Assurance
    hand-test

    multi-projects, one build for mid business

    Module num > 20
    develop num > 100
  • Project Architecture diagram
    image
  • develop process diagram:
    commit role: from dev to bundle
    commit way: from committing code to repositories
    image
    image
  • Quality Assurance
    make code review platform
    make bundle platform
    make buider platform
    make test platform
    make insepection platform
    make gray release process
    image

    multi-projects, multi-build, pluginization for large business

    every Module is individual on the develp,code review,integration,test
  • Project Architecture diagram
    image
  • develop process diagram:
    image
    bundle dev phase
    integration phase
    release phase
  • Quality Assurance: CI,CD
    image

e.g

  • web develop process (from zhihu)
    1. Erect task on phabricator
    2. commit diff and relating to task
    3. unit test
    4. code reviewer
    5. merge code
    6. online test
    7. close task
  • android
    1. Genymotion (android emulator)
  • mobile quality assurance (from meituan)
    image
    image

Static resource optimization

Static code review

  1. regulation: google’s C++ coding style guide for all dev languages
  2. phabricator from facebook (good)
  3. gerrit

Develop output check

Build tools

  1. buildout for python
  2. gradle for android build
  3. maven

Version and config file

deploy tools

  1. fabric
    • made of python
    • <10 servers
    • servers status are same
  2. chef/puppet
    • made of ruby
    • slow
  3. salt/ansible (good)
  4. Docker (best,final)

route: BGP((Border Gateway Protocol), one IP, support accessing from Various Operators

CDN:

VPS(Virtual Privates Srever)

  • ailiyun
  • qingcloud
  • digitial ocean
  • linode
  • aws

Releases for various platform

Operation

improve abailability

  1. Avoid single point of failure:network/Device/code problem
  2. Narrow time of failure (imporant)
    • automate
    • one click
  3. Cure:
    • for stateless instance
      image
    • for state instance
      HA:master-salve
      Paxos/raft
      image
    • for cluster
      downgrade
      limit crowding
      automatic scaling
      fast fallback
    • for data center: multi-IDC
    • for local city
      image
    • for domestic city
      image
    • for global

Monitor and Warning

  1. zabbix+graphite(zhihu)
  2. xiaomi open-falcon
  3. supervisor

Log from frontend to backend

exception log
performance log
Visit log
Influence log
trace log
e.g
  1. zhihu’s log

Profiling everything

  1. for backend

    • gperftools
    • perf
    • gprof
      1
      2
      3
      gcc -pg a.c -o a
      ./a
      gprof ./a
  2. for frontend

User Actions

Data Analysis

Data Sample

PV/UV/BounceRate..

A/B Test

Recurrence

Build Static Blog Using Github & Hexo on Windows

Configure environment

  1. install git , please ref link: http://www.cnblogs.com/zhcncn/p/3787849.html
  2. install node.js , download :http://nodejs.org/download/,node-v0.10.33-x64.msi

Configure Github

Create a Repository from github pages

  1. Registe a account(optional)
  2. Choose a free personal plan.(optional)
  3. Verify your mail(optional)
  4. Make new Repository which must be corresponding to your user name and named your_user_name.github.io
  5. In master branch,Repository setting,overwrite automatic page generator
  6. Create a github user pages site(optional)
  7. Choose a theme(optional)
  8. Publish(optional)

Read More