Git Sheet
git-cheatsheet
git-cheatsheet
The most of TDD’s gain is from having to think about the implementation before youstart to type codes. The steps to use tdd is like this: a. write down “real code” class and methods signatures based on the design b. write down some comments about the initial implementations. c. write down one unit test in… Continue reading TDD (1)
binary and value expression are different. Basically, be is the store format in memory while ve is the human-readable values that be represents. eg. short a = 128, its value expression is looking like this: 00000000 10000000 its binary expression is looking like this: little endian 10000000 00000000 big endian 00000000 10000000 the aim… Continue reading the things about endian
I will translate it to English when available. 软件代码评审检查点–C-C++
1.Test is to execute a program with data set deigned to discover errors. Debug is a process of remove of known errors Acceptance test is a process of testing a program in the real environment with real data. 2.requirement analysis is vital 3. Prefer to static test before do dynamic test. 2.Test based on data… Continue reading OOP Practise (2) – Test
OO characteristics to use in practice : 1.Try to use different class with different responsibilities to solve problems. 2.Then try to use composition to design high cohesion module 3.Then try to use aggregation to design reusable module 4.Then try to use dependency with interface to design stable interface 3.Then try to use inheritance and interface… Continue reading OOP Practises (1)
Deferred is a type of object designed to do one thing only: encode the execution order as callback-based and separately from the normal order of the python source codes. It does not deal with threads, parallelism, signals or subprecesses.It does not no know anything about an event loop, greenlets or scheduling. All it knows is what order… Continue reading understand twisted deferred (1)
use ~ (`) in your keyboard to enclose script #!/bin/bash user_id=`id -u $username` user_gid=`id -g $username` if [$user_id -eq $user_gid];then echo “good guy” else echo “bad guy” fi timestamp==`date +%s` let startday=$timestamp/86400 echo $startday #get user id and gid not using id if ! grep “^$user_name\>” /etc/passwd &> /dev/null;then echo “no such user” exit $?… Continue reading Linux Bash Shell Script Pieces
1.developers themselves should do OO design modeling, for themselves, not to create diagrams that are given to other programmers to implement, which is unagile water-fall-oriented practice. 2.Model in pairs. Better to rotate the pen sketching across the members so that all participate. 3.quality requirements have a strong impacts on the system architecture design. 4.high level… Continue reading Agile Unified Process
1. Client pre-generats challenge then send connection request to server. +Header (1) ID_OPEN_CONNECTION_REQUEST_1 +OfflineMesageID (16) +ProtocolNumber (1) +Pad (toMTU) 2. Server generates cookie and then send it to client to answer. +Header (1) ID_OPEN_CONNECTION_REPLY_1 +OfflineMesageID (16) +Server GUID (8) +HasCookieOn (1) +Cookie (4, if HasCookieOn) protect syn-floods-attack with faked ip adress +Server Public Key (if… Continue reading Encryption Client/Server Communication