2013/03/26

Some practical contradictions of the reality of project management

1, the lack of testing resources and software quality assurance contradictions

No available test team or testers widespread problem of inadequate testing resources in many small development teams and small companies, and even in some large companies may also occur. Strict cost control, resulting in relatively enough testing resources; the failed project development plan will result in compression test of time to ensure that the research and development time; to the test of time, it certainly appears that you are such a situation. The final result of it all had not: leadership because of customer complaints and headache even scolded by the boss; Quality primary responsibility of the project manager will have primary responsibility for the entire project. If the test team, the quality control of the test will have primary responsibility. No, the primary responsibility of the project manager.

Responses to the following: let developers do the test; allow a limited number of testers to test the core function point only; project manager to carry the dead, own hands; reduce software quality; leadership is fully aware of this contradiction risk.

2, the project schedule abnormal urgent and time on the line contradictions

The biggest problem is the time cost of such projects. Time costs more tightly, the greater the risk of failure. To improve the survival probability of such a project, there is only one way. Cut range. The of all dispensable demand cut on the next issue to be realized. Ensure that the team to reasonable productivity output results. Project manager to do the most important thing is to leave no stone unturned, the low-priority function cut. Focus our resources to ensure that the output of the high-priority needs. Understand the maximum output of the customers, team, and the team is doing what features you want at any time tell. In a timely manner so that customers confirm and adjust. Let the customers understand how risk where. This is a test project manager communication, negotiation, organization and coordination skills. Can customers bite down, to ensure that the team is working properly, there may be living in the 1,2 points. Otherwise, the last on a scapegoat. The team, the boss, the customer, all you need to take responsibility.

3 team productivity seriously below the estimates and the project on time and on line conflicts

The bidding of the project is a project to estimate when and quoted by the company's senior architect of the Group in accordance with existing productivity, but after the start of the project, the problem of a lack of resources, such as: the original C + + team of experienced engineers emptied, only two new available. The former Senior C + + Developer productivity of engineers to estimate the time, such a team to give you productivity and Senior C + + development engineers a lot of difference. The project schedule is unusually urgent, how to do this? No way. The risk of failure of this project is extremely high. Solution only to find foreign aid or project manager to carry the dead, or the type of project failure is inevitable. Team members suddenly left a great risk of the project, especially the core of experienced developers, often at the cost reasons, can not everyone have a backup personnel, so the core of experienced developers suddenly left to tend to make the project is in a high-risk status.

4, project managers act as the Team Leader contradictions

Two posts of Project Manager and Team leader looks like, in fact. The project manager's responsibilities include: project schedule control, cost control, demand control, risk management, configuration management, task allocation, and communication and exchange with customers. Team leader of the main responsibilities include technical program confirmed that development planning and tracking, technical architecture design, important technical issues research, the core code writing and technical guidance and the development team management. For small companies, in order to save costs is likely the two roles for a person to assume this mixed role requires a very high capacity of individuals need the expertise of both, the two had first-hand grasp, a lot of pressure. Many large companies are basically split these two roles, the project manager is the tube progress, do coordination, Team Leader, responsible for the development of related matters, in addition to a role called Product Manager, this role is to market and development before do coordination. As I understand it, the project manager needs to have a very in-depth understanding of project functions and requirements (product), considerable experience in the software development process, but also has a strong ability to communicate, because customers are cattle mess, you want to guide customers needs, communicate martial artists. In addition, the project manager is the total person in charge of the project, the leadership of timely communication and coordination across projects and departments also need to get the best resources to solve the problems in the process. Team leader needs to control systemic risk in the development process, the overall architecture and key core part of the development. There are many aspects of the software development process, a part of any large error will result in bruised and battered and ultimately project failure. But in most companies, we do not call it fails, the general would say: project delays, good extension of six months, the poor and even some 1-year extension Core competencies: development and management + strong technical capabilities.

5, limited resources and time and time on contradictions

Project management is how the main contradiction in the limited cost (resources) and quality time to complete the system. The hair * Ze (East ideological revolution is successful, to be able to distinguish between the various stages of the revolution principal contradiction, concentrate superior forces to be combated in time management is the severity / urgency severity, that is, whether the core needs; priorities, namely priority class, order. limited resources, then the core resources on core functions and components of greatest risk I remember those years, his work would never consider such issues, leadership let Zuosa on Zuosa passive positive (with on the go all of the tasks, no task on the self-study, indifferent) time I'm just a performer. fact, anything can be divided into two phases: first assigned, and then perform the (daily life, we do anything are first assigned in mind). while in the company, these two things are often separated: the leadership to do the assigned subordinates do perform.

The core principles of the allocation of tasks is to prioritize, as a manager, it must take it a habit.


2013/03/25

A Chinese famous enterprises then test cattle

Know that Google TE fewer people, because the research and development of early defect prevention and detection do enough, in addition to a variety of tests to build a good foundation, the RD design and code quality high graves and or test execution resources, so without much TE. But later want to add the TE, should be aware of existing quality assurance processes and the ability to model the existence of loopholes in the release part not handle, only to change their view to how much pressure people to change values


Under Linux installation, start the MySQL

Three or four years is not installed mysql + apache + php environment, I used to do the the bank performance test outsourcing services in the the Party Development Center encountered such environment project is relatively small, mostly WebLogic / WebSphere + Oracle/DB2 architecture of large-scale systems. Get involved in the electricity supplier industry project, had to go to ponder those almost forgotten IIS, apache, MSsql, mysql environment.

An virtual centos4.7 of the platform: VMware

Host: windows

Install mysql preparation:

1, check whether the environment has been installed mysql, check: netstat-ano command to view the mysql port 3306 by default exists; execute mysql command line

2, download mysql installation package

Http://www.mysql.com/downloads/mysql/ # downloads download mysql installation package:

MySQL-server-5.5.28-1.linux2.6.i386.rpm

MySQL-client-5.5.28-1.linux2.6.i386.rpm

Rpm-ivh command to install mysql not say it here.

First take a look at some of the main directory of the default mysql database:

Database directory / var / lib / mysql /

2, the configuration file / usr / share / mysql (of the mysql.server command and configuration files)

Related command / usr / bin (mysqladmin mysqldump command)

4, the startup script / etc / rc.d / init.d / (startup script file mysql directory)

Default port 3306 netstat-ano command to view installed mysql start mysql service if it does not exist, according to the following method.

Start mysql service:


[Root @ localhostmysql] # pwd
/ Usr / share / mysql
[Root @ localhostmysql] #. / Mysql.server start
StartingMySQL ... [OK]
[Root @ localhostmysql] # netstat-ano
ActiveInternet connections (servers and established)
ProtoRecv-Q Send-Q Local Address Foreign Address State Timer
tcp 0 0 0.0.0.0:3306 0.0.0.0: * LISTEN off (0.00/0/0)
[Root @ localhostmysql] # mysql
Welcometo the MySQL monitor. Commands end with; or \ g.
YourMySQL connection id is 1
Serverversion: 5.5.28 MySQL Community Server (GPL)
Copyright (c) 2000, 2012, Oracle and / or its affiliates. All rights reserved.
Oracle isa registered trademark of Oracle Corporation and / or its
affiliates.Other names may be trademarks of their respective
owners.
Type'help; 'or' \ h 'for help. Type' \ c 'to clear the current input statement.
mysql>
mysql>

Start and stop

1 to start
Mysql MySQL installation is complete, start-up file in the / etc / init.d directory, run the following command in the need to start.

[Root @ localhost mysql] # / etc / init.d / mysql start
2, stop

[Root @ localhost mysql] # / usr / bin / mysqladmin-u root-p shutdown
3, automatic start

1) back to mysql automatically start list

[Root @ localhost mysql] # / sbin / chkconfig-list
2) MySQL add to your system startup services group inside to

[Root @ localhost mysql] # / sbin / chkconfig - add mysql
3) to remove the MySQL service group from the start inside.

[Root @ localhost mysql] # / sbin / chkconfig - del mysql


About the the performance test tesseract-ocr tools to identify some of the ideas in the verification code

About the the performance test tesseract-ocr tools to identify some of the ideas in the verification code
The last week, I engaged in the verification code, fortunately tesseract-ocr tools can identify the characters stored in the local picture, is to take advantage of this, a lot of friends this function is used in the identification verification code (some verification code can not be identified, the accuracy is not high, it may hinder the identification to verify the presence of noise in the code). I is just copy or imitate the, solve the problem of the LoadRunner identify verification code, all C-based environments. Can see my blog post: http://www.cnblogs.com/zhuque/archive/2013/03/06/2946565.html


Tesseract-ocr tools for some verification code recognition accuracy is not too high, and even some picture identification simply does not come out, it is recommended that formal stress tests, do not use this method to solve the problem of verification code, the better approach is in code to solve, or using a universal verification code. Another method is the the login transaction code (involving verification code code) into vuser_init () to that after a successful login, the frequent pressure measured behind the transaction. But there are many transactions of the type of operation and verification code, such as: the payment of this you must use a universal verification code.


Do not tangle in the performance testing process verification code, after all, more than 98% of the performance test are specialized independent test environment can modify the code to solve the verification code problems, there are many ways. But does not rule out some metamorphosis the CTO or customer requirements online environment pressure measured, we can try to tesseract-ocr recognition verification code, if you can not identify, and then to try to remove the noise in the captcha identification. How to remove captcha the noise go after study, evidently, this is a big project.


LoadRunner using the system () function call Tesseract-OCR recognition verification code script code

Here is loadrunner script: C disk Establish test.bat batch:
Action ()
{
    int flen; / / define an integer variable to hold the size of the file
    long filedes; / / save the file handle
    char file [256] = "c: \ \ test1.jpg"; / / save the file path and file name
    char result [10]; / / store verification code

    web_set_max_html_param_len ("2000000") ;
/ / set the page to receive the maximum number of bytes, the setting should be greater than the download file size

         web_reg_save_param ("pic",
                   "LB =",
                   "RB =",
                   "Ord = 1",
                   "Search = Body",
                   LAST);

         web_url ("randpiccloud", "URL = https://passport.csdn.net/ajax/verifyhandler.ashx?r_d=63178", LAST);

         / / Http://biz.ftuan.com/CheckImg.aspx
         / / Http://passport.ftuan.com/SecurityCode.aspx?refresh=Wed Mar 6 11:21:21 UTC +0800 2013
         / / Http://comment8.mydrivers.com/radompage.aspx?0. {Rnum}
         / / Https://passport.gaopeng.com/captcha?w=98&h=36&r=0.4655476964544505
         / / Https://passport.csdn.net/ajax/verifyhandler.ashx?r_d=63178

    
    flen = web_get_int_property (HTTP_INFO_DOWNLOAD_SIZE); / / get file size

    if (flen> 0)
    {
        if ((filedes = fopen (file, "wb")) == NULL)
        {
            lr_output_message ("oh cloud your Open File Failed!");
            return -1;
        }
        fwrite (lr_eval_string ("{pic}"), flen, 1, filedes);

        fclose (filedes);
    }


       system ("c: \ \ test.bat");
       / / Call the C drive under test.bat file, change the file as follows:
       / *
        c:
        cd C: \ Program Files \ Tesseract-OCR
        tesseract.exe c: \ test1.jpg c: \ test-l
       * /
       / / First, download the the Tesseract tools and installation, must cd to the installation directory in a batch file, or LR called the prompt "tesseract.exe than internal command"

       if ((filedes = fopen ("c: \ \ test.txt", "rt")) == NULL)
        {
            lr_output_message ("oh, cloud your Open File Failed!");
            return -1;
        }
        fread (result, 5,1, filedes); / / here to control the length of the verification code
        fclose (filedes);

         lr_output_message ("result:% s", result);
lr_save_string (result, "txtCheck"); / / pass validation code to txtCheck parameters
lr_output_message ("txtCheck:% s", lr_eval_string ("{txtCheck}")); / / lr_eval_string ("{txtCheck}") used in the following registry
return 0;
}


Full-width and half-width of the difference between input method

A What is the full-width and half-width?
(1) angle - a character occupies two standard character position.
Kanji characters and provides for the full-width English characters and the national standard GB2312-80 graphic symbols and special characters are full-width characters. The general command of the system do not have the full-width characters, just word processing will use the full-width characters.

(2) half-width - refers to the position occupied by a character of a standard character.
Usually letters of the alphabet, numeric keys, symbol keys are half-width, within a half-width of the display code is a byte. Within the system, these three characters are handled as a basic code, so the user input commands and parameters generally use half-width.

B full-width and half-width of each in what circumstances?
The full-width accounted for two-byte, half-width of one byte.
The half-width full-width punctuation, full-width punctuation accounted for two-byte, half-width of one byte, regardless of the half-width or full-width, Chinese characters, or to account for the two bytes.
Only in the source code of the programmed use of the half-width punctuation (excluding internal data string)
(In fact, this case simply does not exist the concept of full-width of the half-width on a computer that does not support Chinese characters and other languages ​​can only use half punctuate)

For most fonts, full angle looks larger than the half-width, of course this is not the essential difference.

C full-width and half-width of the difference between
The full-width is the width of letters and numbers, such as Chinese characters accounted position word. Half-width ASCII character way to do with the time from the Chinese character input method input alphanumeric characters are half-width.

Appear in the Chinese character input method, input alphanumeric default to half-width, but the punctuation is the default for the whole angle corresponding toolbar button mouse click input method.

D "full" and "half-width":
The whole angle: means in GB2312-80 (information exchange · basic set of Chinese ideograms coded character set ") in a variety of symbols.
Half-width: refers to the various symbols of the ASCII code of the English document.



Software testing methods and rules

Hump ​​naming rules: first letter lowercase, followed by the beginning of each word uppercase money (java all the methods and properties named in camel)

Pascal naming convention: the first letter capitalized, behind the beginning of each word uppercase Money (C # inside classes, methods, properties, java inside class named)

The variable type character dMoney Hungarian rule: the basis of Pascal naming rules, plus a lowercase

static: static belong to the class of all owners do not need to instantiate, only a small memory consumption during the execution of a program in memory assigned space

Non-static: have to belong to the object, you need to instantiate

Person p = new Person ();
Person p1 = new Person ();

Write a police class, there is a method of training and duty, a police officer the name of an attribute of police officers a property number, write a test class
Assignment by the police number and name call training and duty
JAVA inside strict case-sensitive
public-modified class, the class name and the file name must be exactly the same

Singleton Pattern
If a class constructor is private, outside the class can not directly call the constructor to create methods
Outside the class and can not by the object. Way to call

When a class can not be instantiated, we can only call it what method? Can only call the static method

Class class name {
   Private constructor

   Static public method static
        Only such internal call a private constructor and the instance should return out, returned instance must be a member variable
}

Thread safety issues? For inside the static method to instantiate this variable may still exist, when multiple threads at the same time to get the object, creating multiple objects

The simplest single cases of how to achieve

public class PoliceMan {
   / / Constructor private
   private PoliceMan () {
   }

   / / Member variables private, static, static code is executed only once
   private static PoliceMan onePolice = new PoliceMan ();
   / / Static method Total, returns an instance of the private member variables
   public static PoliceMan getInstance () {
      return onePolice;
   }
}