Saturday, June 16, 2007

Measurement and Analysis: Specific Practices by Goal

SG 1 Align Measurement and Analysis Activities
Measurement objectives and activities are aligned with identified information needs and objectives. The specific practices covered under this specific goal may be addressed concurrently or in any order:
· When establishing measurement objectives, experts often think ahead about necessary criteria for specifying measures and analysis procedures. They also think concurrently about the constraints imposed by data collection and storage procedures.
· It often is important to specify the essential analyses that will be conducted before attending to details of measurement specification, data collection, or storage.

SP 1.1 Establish Measurement Objectives
Establish and maintain measurement objectives that are derived from identified information needs and objectives.
Measurement objectives document the purposes for which measurement and analysis are done, and specify the kinds of actions that may be taken based on the results of data analyses.
The sources for measurement objectives may be management, technical, project, product, or process implementation needs.
The measurement objectives may be constrained by existing processes, available resources, or other measurement considerations.
Judgments may need to be made about whether the value of the results will be commensurate with the resources devoted to doing the work.
Modifications to identified information needs and objectives may, in turn, be indicated as a consequence of the process and results of measurement and analysis. Sources of information needs and objectives may include the following:
· Project plans
· Monitoring of project performance
· Interviews with managers and others who have information needs
· Established management objectives
· Strategic plans
· Business plans
· Formal requirements or contractual obligations
· Recurring or other troublesome management or technical problems
· Experiences of other projects or organizational entities
· External industry benchmarks
· Process-improvement plans

Typical Work Products
1. Measurement objectives
Subpractices
1. Document information needs and objectives.
Information needs and objectives are documented to allow traceability to subsequent measurement and analysis activities.
2. Prioritize information needs and objectives.
It may be neither possible nor desirable to subject all initially identified information needs to measurement and analysis. Priorities may also need to be set within the limits of available resources.
3. Document, review, and update measurement objectives.
It is important to carefully consider the purposes and intended uses of measurement and analysis.
The measurement objectives are documented, reviewed by management and other relevant stakeholders, and updated as necessary. Doing so enables traceability to subsequent measurement and analysis activities, and helps ensure that the analyses will properly address identified information needs and
objectives.
It is important that users of measurement and analysis results be involved in setting measurement objectives and deciding on plans of action. It may also be appropriate to involve those who provide the measurement data.
4. Provide feedback for refining and clarifying information needs and objectives as necessary.
Identified information needs and objectives may need to be refined and clarified as a result of setting measurement objectives. Initial descriptions of information needs may be unclear or ambiguous. Conflicts may arise between existing needs and objectives. Precise targets on an already existing measure may be
unrealistic.
5. Maintain traceability of the measurement objectives to the identified information needs and objectives.
There must always be a good answer to the question, "Why are we measuring this?"
Of course, the measurement objectives may also change to reflect evolving information needs and objectives.
SP 1.2 Specify Measures
Specify measures to address the measurement objectives.
Measurement objectives are refined into precise, quantifiable measures.
Measures may be either "base" or "derived." Data for base measures are obtained by direct measurement. Data for derived measures come from other data, typically by combining two or more base measures.
Examples of commonly used base measures include the following:
· Estimates and actual measures of work product size (e.g., number of pages)
· Estimates and actual measures of effort and cost (e.g., number of person hours)
· Quality measures (e.g., number of defects, number of defects by severity)

Examples of commonly used derived measures include the following:
· Earned Value
· Schedule Performance Index
· Defect density
· Peer review coverage
· Test or verification coverage
· Reliability measures (e.g., mean time to failure)
· Quality measures (e.g., number of defects by severity/total number of defects)

Derived measures typically are expressed as ratios, composite indices,or other aggregate summary measures. They are often more quantitatively reliable and meaningfully interpretable than the base
measures used to generate them.
Typical Work Products
1. Specifications of base and derived measures
Subpractices
1. Identify candidate measures based on documented measurement objectives.
The measurement objectives are refined into specific measures. The identified candidate measures are categorized and specified by name and unit of measure.
2. Identify existing measures that already address the measurement objectives.
Specifications for measures may already exist, perhaps established for other purposes earlier or elsewhere in the organization.
3. Specify operational definitions for the measures.
Operational definitions are stated in precise and unambiguous terms. They address two important criteria as follows: · Communication: What has been measured, how was it measured, what are the units of measure, and what has been included or excluded?
· Repeatability: Can the measurement be repeated, given the same definition, to get the same results?
4. Prioritize, review, and update measures.
Proposed specifications of the measures are reviewed for their appropriateness with potential end users and other relevant stakeholders. Priorities are set or changed, and specifications of the measures are updated as necessary.

SP 1.3 Specify Data Collection and Storage Procedures
Specify how measurement data will be obtained and stored.
Explicit specification of collection methods helps ensure that the right data are collected properly. It may also aid in further clarifying information needs and measurement objectives.
Proper attention to storage and retrieval procedures helps ensure that data are available and accessible for future use.
Typical Work Products
1. Data collection and storage procedures
2. Data collection tools
Subpractices
1. Identify existing sources of data that are generated from current work products, processes, or transactions.
Existing sources of data may already have been identified when specifying the measures. Appropriate collection mechanisms may exist whether or not pertinent data have already been collected.
2. Identify measures for which data are needed, but are not currently available.
3. Specify how to collect and store the data for each required measure.
Explicit specifications are made of how, where, and when the data will be collected. Procedures for collecting valid data are specified. The data are stored in an accessible manner for analysis, and it is determined whether they will be saved for possible reanalysis or documentation purposes. Questions to be considered typically include the following:
· Have the frequency of collection and the points in the process where measurements will be made been determined?
· Has the time line that is required to move measurement results from the points of collection to repositories, other databases, or end users been established?
· Who is responsible for obtaining the data?
· Who is responsible for data storage, retrieval, and security?
· Have necessary supporting tools been developed or acquired?
4. Create data collection mechanisms and process guidance.
Data collection and storage mechanisms are well integrated with other normal work processes. Data collection mechanisms may include manual or automated forms and templates. Clear, concise guidance on correct procedures is available to those responsible for doing the work. Training is provided as necessary to
clarify the processes necessary for collection of complete and accurate data and to minimize the burden on those who must provide and record the data.
5. Support automatic collection of the data where appropriate and feasible.
Automated support can aid in collecting more complete and accurate data.

Examples of such automated support include the following:
· Timestamped activity logs
· Static or dynamic analyses of artifacts
However, some data cannot be collected without human intervention (e.g.,customer satisfaction or other human judgments), and setting up the necessary infrastructure for other automation may be costly.
6. Prioritize, review, and update data collection and storage procedures.
Proposed procedures are reviewed for their appropriateness and feasibility with those who are responsible for providing, collecting, and storing the data. They also may have useful insights about how to improve existing processes, or be able to suggest other useful measures or analyses.
7. Update measures and measurement objectives as necessary.

Priorities may need to be reset based on the following:
· The importance of the measures
· The amount of effort required to obtain the data
Considerations include whether new forms, tools, or training would be required to obtain the data.

SP 1.4 Specify Analysis Procedures
Specify how measurement data will be analyzed and reported.
Specifying the analysis procedures in advance ensures that appropriate analyses will be conducted and reported to address the documented measurement objectives (and thereby the information needs and
objectives on which they are based). This approach also provides a check that the necessary data will in fact be collected.
Typical Work Products
1. Analysis specification and procedures
2. Data analysis tools
Subpractices
1. Specify and prioritize the analyses that will be conducted and the reports that will be prepared.
Early attention should be paid to the analyses that will be conducted and to the manner in which the results will be reported. These should meet the following criteria:
· The analyses explicitly address the documented measurement objectives
· Presentation of the results is clearly understandable by the audiences to whom the results are addressed
Priorities may have to be set within available resources.
2. Select appropriate data analysis methods and tools.

Issues to be considered typically include the following:
· Choice of visual display and other presentation techniques (e.g., pie charts, bar charts, histograms, radar charts, line graphs, scatter plots, or tables)
· Choice of appropriate descriptive statistics (e.g., arithmetic mean, median, or mode)
· Decisions about statistical sampling criteria when it is impossible or unnecessary
to examine every data element
· Decisions about how to handle analysis in the presence of missing data elements
· Selection of appropriate analysis tools
· The work does not cost more to perform than is justified by the benefits that it provides.
Criteria for evaluating the conduct of the measurement and analysis might include the extent to which the following apply:
· The amount of missing data or the number of flagged inconsistencies is beyond specified thresholds.
· There is selection bias in sampling (e.g., only satisfied end users are surveyed to evaluate end-user satisfaction, or only unsuccessful projects are evaluated to determine overall productivity).
· The measurement data are repeatable (e.g., statistically reliable).
· Statistical assumptions have been satisfied (e.g., about the distribution of data or about appropriate measurement scales).

Color and Suggested meaning

Before your audience read and react to your information they see it in color.

It can excite, impress, entertain and persuade but color also can create instant negative associations.
It's good idea to be aware that how the majority of people respond to the colors and use this information in your choice of colors .

Following chart will help you



Note: Be careful in using colors in official emails.

Friday, June 08, 2007

The difference between the UAT and the Project Test plan

# A Test Plan covers all the identifiable test cases for all the components in a system.
# Here we don't limit only to the functionalities required by the customer and include all the important boundary conditions and exceptional cases
# The Test Plan should include the important back end features that are not exposed to the customer


# The UAT is only a subset of the Test Plan that consists of the most important test cases in the viewpoint of the customer
# Normally the UAT may not contain a lot of exceptional test cases and back end features not relevant to the customer

Following is extract from CSTE CBOK and will be useful


Difference between Acceptance Test and System Test
Acceptance testing is performed by user personnel and may include assistance by software testers.System testing is performed by developers and/or software testers. The objective of both types of testing is to assure that when the software is complete it will be acceptable to the user.


System test should be performed before acceptance testing. There is a logical sequence for testing, and an important reason for the logical steps of the different levels of testing. Unless each level of testing fulfills its objective, the following level of testing will have to compensate weaknesses in testing at the previous level.

In most organization units, integration and system testing will focus on determining whether or not the software specifications have been implemented as specified. In conducting testing to meet this objective it is unimportant whether or not the software specifications are those needed by the user. The specifications should be the agreed upon specifications for the software system.



The system specifications tend to focus on the software specifications. They rarely address the processing concerns over input to the software, nor do they address the concerns over the ability of user personnel to effectively use the system in performing their day-to-day business activities. Acceptance testing should focus on input processing, use of the software in the user organization, and whether or not the specifications meet the true processing needs of the user. Sometimes these
user needs are not included in the specifications; sometimes these user needs are incorrectly specified in the software specifications; and sometimes the user was unaware that without certain attributes of the system, the system was not acceptable to the user.

Examples include users not specifying the skill level of the people who will be using the system; processing may be specified but turnaround time not specified, and the user may not know that they have to specify the maintainability attributes of the software.


Effective software testers will focus on all three reasons why the software specified may not meet the user’s true needs. For example they may recommend developmental reviews with users involved. Testers may ask users if the quality factors are important to them in the operational software. Testers may work with users to define acceptance criteria early in a development process so that the developers are aware and can address those acceptance criteria.

How to import csv file directly to MySQL

In some situation we may need to import some huge CSV file directly to the SQL db rather converting them to SQL statements. As an example, in my case(project-ABC), It needed to insert large no of questions to the MySQL database which was saved as a csv file.

Command:
mysqlimport --fields-terminated-by=","
--fields-optionally-enclosed-by="\"" --lines-terminated-by="\n" -u user -ppassword

**Use your username & password
**give your csv file name

There is another way to do this too.
You can use command given (sample) from command line.
LOAD DATA LOCAL INFILE '/path/pet.txt' INTO TABLE pet;


http://dev.mysql.com/doc/refman/5.0/en/loading-tables.html

Thursday, June 07, 2007

Can't connect to local MySQL server through socket '/tmp/mysql.sock'

This is a very frequesnt error message seen by most of the users.

Reason : The default location of the socket file is /tmp but for various reasons the instllation may place the mysql.sock file in different location e.g. /var/lib/mysql/

It is actually But the solution is simple.


Solution 1: Specify the mysql.sock file location explicitly


mysql --socket=/var/lib/mysql/mysql.sock ...



Note : You could define an alias to avoid more typing.

Solution 2 : Update MySQL Configuration file /etc/my.cnf

Open the file using a text editor (vi) and go to client section. Update/Add socket variable value.



mysqld]
datadir=/usr/local/mysql/data
socket=/var/lib/mysql/mysql.sock

[mysql.server]
user=mysql
basedir=/usr/local/mysql

[client]
socket=/var/lib/mysql/mysql.sock


If there is not currently a section called [client], add one as in above section.

You won't need to restart your server or any other processes.

How to run 2 MySQL versions in the same machine ?

At least the following options must be different for each server:


port=port_num

port controls the port number for TCP/IP connections.


socket=path

socket controls the Unix socket file path on Unix and the name of the named pipe on Windows. On Windows, it is necessary to specify distinct pipe names only for those servers that support named-pipe connections.



pid-file=file_name

This option is used only on Unix. It indicates the pathname of the file in which the server writes its process ID.



Following article will help you to run several servers on one machine

[url]http://dev.mysql.com/doc/refman/5.0/en/multiple-unix-servers.html
[/url]

Here is a quick way to do the installation

1) Install the first MySQL server by following steps given in INSTALL_BINARY
Note : Soft link should be set to

ln -s full-path-to-mysql-VERSION-OS mysqlServer1


2) Start the server in the port you wish. You need to specify the path to


$ mysqld_safe --socket=file_name --port=port_number


e.g= fileName=/tmp/mysqlServer1.sock

3) Install the second server. Set the soft link as "mysqlServer2"

4) Start the server in the port you wish with socketFile Name


$ mysqld_safe --socket=/tmp/mysqlServer2.sock --port=3309

Client does not support authentication protocol requested by server; consider upgrading MySQL client

This happens because the latest versions of MySql uses a new format for the password (it's a longer hash). In order for old clients to continue to use the newer server,
1) you have to set the passwords on the server to their old format or
2) upgrade your client.

Because upgrading the client can sometimes be a pain, it's often easier to just update the passwords to the old format on the server.

Run mysql and login as root:


mysql -u root -p


Then, paste the following command, editing as necessary, to change the password of the user to the old format.


UPDATE mysql.user
SET password=OLD_PASSWORD('somepassword')
WHERE user='someuser'
AND host='somehost';


After you have set the passwords to the old format, flush the tables.


flush privileges;

How to get a mysql dump of a particular table

You can use ustility mysqldump located @ MYSQL/bin directory.

The utility write the output to standard output. You can redirect the output to file.
Here are few options
1) If you want only the data


mysqldump -u -p -t --compact > table.dmp
e.g
mysqldump -ucc -pcc123 -t --compact cc CallSummary > ~/CustomerCare/data/CallSummaryTable.dmp


Note : --compact for removing additional comments, -t for avoid table create create statement. Try mysqldump --help for all possible parameters.

2) If you seperate INSERT statements for each entry


mysqldump -u -p -t --compact -c > table.dmp

How to increase the mysql heap size

To increase the mysql heap size
1. One way is we can start the mysql with necessary size
bin/mysqld_safe --user=mysql --max_heap_table_size=300000000 &


2. Another way is editing the my.cnf file
Open the file (/etc/mycnf)
Add a variable name and assign the relevant value for heap size
-> max_heap_table_size=300M
Restart the mysql

How to get list of databases quickly

You can use mysqlshow to do your job.

Here are few samples
1) When you want to list dbs in local server


$./mysqlshow -u user -p


2) When you want to list dbs in a remote server.


$./mysqlshow -h -u user -p

Shell Scripts

1/
Use command time to start the watch


$ time cat


Use Ctrl + D to stop the watch. You cannot see the progress.


2/
There is a way to put current working directory into stack and use it later.
This is really helpful when working in real projects to save time.

You can use command pushd . to put current working directory and use popd to move to directory in the stack.

3/
There is a way to add multiple users (in batch) to fedora server.
Adding number of users to the system using useradd and passwd command takes time and bit boaring.

There is a way to automate this.


You can use newusers command, which update and create new users in batch.

This command reads a file of user name and clear-text password pairs and uses this information to update a group of existing users or to create new users. Each line is in the same format as the standard password file.


Since username and passwords are stored in clear text format make sure only root can read/write the file. Use chmod command:


# touch /root/batch-user-add.txt
# chmod 0600 /root/batch-user-add.txt


Create a user list as follows. Open file:

# vi /root/batch-user-add.txt



Append username and password:

user1:password:1001:513:Student Account:/home/user1:/bin/bash
user2:password:1002:513:Sales user:/home/user2:/bin/bash
user100:password:1100:513:Sales user:/home/user100:/bin/bash
tom:password:1110:501:Guest Account:/home/guest:/bin/menu
jerry:password:1120:501:Guest Account:/home/guest:/bin/menu



Now create users in batch:

# newusers /root/batch-user-add.txt

4/
Way to find the hard disk usage by each users during maintenance.

Following simple command can be used.

du --max-depth=1 /home/ | sort -n -r


If you need to see the information in human readable format.


du -H --max-depth=1 /home/user

5/
Replace a directory path in number of files to a given directory path.
All the files has .metadat extension.


Can use sed to do it.

1) Create a shell script as given below.

for fl in *.metadata; do
echo $f1
mv $fl $fl.old
#sed 's_/home/buddhini_/home/test_g' $fl.old > $fl
sed 's_$src_$dest_g' $fl.old > $fl
done


Note : Replace
/home/buddhini with your directory path to find in the files
/home/test with replacing directory path

"_" is used as delimeter in the above file

2) Place the in the directory where you have *.metadata files

3) Make the file executable

$ chmod +x


4) Execute the shell script
Orginal files are saved with *.old extension.

6/
Change the file's created date property

Can use the touch command to change the file access and modification time.


$ touch -t

Wednesday, June 06, 2007

What we must learn from the West

BY NARAYANA N. R. MURTHY

We need to reassess our values in order to get ahead, argues one of India’s most successful businessmen

The role of Western values in contemporary Indian society is a subject on which I have pondered for years. I come from a company that is built on strong values. Moreover, various stakeholders of our company—employees, investors, customers and vendors—come from across the globe, and in dealing with them over the years I have come to appreciate several aspects of the West’s value system. An organization is representative of society, and some of the lessons I have learnt from the West regarding values are, I think, applicable to us as a nation. Here are some of them:

Respect for the public good.
Indian culture has deep-rooted family values—parents make enormous sacrifices for their children; children consider it their duty to take care of aged parents; and marriage is held to be a sacred union with husband and wife bonded for life. Unfortunately, our attitude towards the community is very different from our attitude towards the family.

Although we keep our homes spotlessly clean, when we go out we do not think twice before littering. On the other hand, parks in the West are generally free of litter and their streets are clean.

We are also apathetic about community matters.
We see serious problems around us but behave as if they are someone else’s responsibility- For instance, all of us are aware of the problem of drought in India.

More than 30 years ago, irrigation expert Dr K. L. Rao suggested solving this problem by creating a water grid interlinking the Ganga and Cauvery and several other Indian rivers. Unfortunately, nothing was done about this.

The story of power shortage in Bangalore is another example. In 1995, it was decided to build a thermal power plant to meet Bangalore’s power requirements. Unfortunately, we have still not started it. Five years ago, because of the constant foreign travel required in the software industry, I suggested a 240-page passport to the government so that frequent visits to the passport office can be avoided. I have yet to get a response from the Ministry of External Affairs.

Could the reason for all this be that we were ruled by foreigners for over a thousand years and came to believe that solving public problems was the responsibility of a foreign ruler, not ours? Even our decision-makers look to somebody else to take decisions.

In the West, individuals understand that they have to be responsible to their community. They care for their society and make sacrifices for it. They solve societal problems proactively. This is where we need to learn from the West. Successful societies are those that harmoniously combine loyalty to family and loyalty to community.

Acknowledging the accomplishments of others.
In my extensive travels, I have not come across another society as contemptuous as we are of countries that have done better. This attitude, incidentally, is nothing new. Even al-Biruni, the noted 11th century logician and traveller, who spent about 20 years in India, referred to this trait of Indians.

If we want to progress, we must listen to and learn from people who have performed better than us.

Accountability.
Another attribute we must learn from the West is accountability. There, you are held responsible for what you do irrespective of your position. In India, the more ‘important’ you are, the less answerable you become. For instance, a senior politician once declared that he ‘forgot’ to file his tax returns for 10 consecutive years—and got away with it. And although there are over a hundred loss-making public sector units belonging to the central government, I have not seen action taken against top managers for bad performance in any of these organizations.

Dignity of labour.
Whereas this is an integral part of the West’s value system, in India we revere only supposedly intellectual work. For instance, I have seen many engineers, fresh from college, who only want to do cutting-edge work, and not work that is of relevance to business and the nation. For anything to be run successfully, everyone—from the CEO to the person who serves tea—must discharge his or her duties in a responsible manner We, therefore, need a mindset that reveres everyone who puts in honest work, no matter what work it is.

Professionalism.
In the West, people do not let personal relations interfere with their professional dealings. They do not hesitate to chastise a colleague for incompetence, even if he is a friend. In India, we tend to view even work interactions from a personal perspective. We are also the most thin-skinned society in the world – we see insults where none are meant.

We extend this lack of professionalism to our sense of punctuality. We do not respect the other person’s time. Indian Standard Time always runs late, and deadlines are typically not met.

Intellectual independence.
From the time their children are very young, Western parents teach them to think for themselves. So, these children grow up to be strong, confident adults. But in India we suffer from feudal thinking. I have seen bright people who prefer to be told what to do by their bosses. We need to overcome this attitude if we are to succeed globally.

Honouring contracts.
The Western value system teaches respect for contractual obligations. In India, we consider it crucial to fulfill personal vows—as with family or friends. However, we do not extend this to the public domain. For instance, I gave personal recommendations to five students who got scholarships to study abroad. Not one of them came back to India even though contractually they obliged to spend five years here getting their degrees. We have to change this attitude.

We are all aware of our rich citizens. But we often fail to acknowledge the duty that accompanies every right. We should keep in mind what former US President Dwight D. Eisenhower said: “A people that values its privileges above its principles soon loses both.” So lets work towards a society where “we would do unto others as we have them do unto us” and make country great.

Narayana N. R. Murthy is Chairman of the Board at the Bangalore-based Infosys Technologies Limited.

Working SMART vs. Working HARD

A Japanese soap manufacturing company received a complaint that a consumer had bought a box of soap that was empty. Management asked its engineers to solve the problem permanently to avoid any reoccurrence. The engineers worked hard to devise an X-ray machine with high-resolution monitors manned by two people to watch all the soapboxes that passed through the line to make sure they were not empty.

No doubt, they worked hard and they worked fast. But a rank-and-file employee that was posed the same problem came out with another solution. He bought a strong industrial electric fan and pointed it at the assembly line. He switched the fan on, and as each soapbox passed the fan, it simply blew the empty boxes out of the line. Clearly, the engineers worked hard, but the rank-and-file employee worked smart. So what's better than merely working hard? It's working smart. Having said that, it is still important to work hard. If you could combine both working hard and working smart, you would possess a major factor toward success. "Excellence is not a destination; it is a continuous journey that never ends."

Change Your Strategy

One day, there was a blind man sitting on the steps of a building with a hat by his feet and a sign that read: "I am blind, please help".

A creative publicist was walking by him and stopped to observe he only had a few coins in his hat, he dropped a few more coins in his hat and without asking for his permission took the sign,turned it around, and wrote another announcement.

He placed the sign by his feet and left. That afternoon the creative publicist returned by the blind man and noticed that his hat was full of bills and coins. The blind man recognized his footsteps and asked if it was

him who had re-written his sign and he wanted to know what did he write on it?

The publicist responded: "Nothing that was not true, I just rewrote your sign differently". He smiled and went on his way.

The blind man never knew but his new sign read : "TODAY IS SPRING AND I CANNOT SEE IT".

Change your strategy when something does not go your way and you'll see it will probably be for the best. Have faith that every change is best for our lives.

Tuesday, June 05, 2007

When testing a multiple phase project

In some projects you have to continue with Phase 2 or 3 of it. But the final release of the latest phase should ensure the correct integration of features from the previous phases.

I can suggest the following as successful steps in assuring the functionalities of previous phases:

1) Study the SRS, CRs and any other important documents related to early phases
2) Study the Test Plan and UAT of the previous phases and execute them completely
3) Check for any sharing of resources by the features of multiple phases and identify the possible conflicting areas
4) There may be enhancements for some of the features of previous phases. Identify them and test for accuracy

Why Have Code Conventions?

The following is from Sun's "Code Conventions for the Java Programming Language" available at: http://java.sun.com/docs/codeconv/

  • 80% of the lifetime cost of a piece of software goes to maintenance.
  • Hardly any software is maintained for its whole life by the original author.
  • Code conventions improve the readability of the software, allowing engineers to understand new code more quickly and thoroughly.
  • If you ship your source code as a product, you need to make sure it is as well packaged and clean as any other product you create.

Monday, June 04, 2007

Opens and Source bash using one command

You may be updating your bash profile several times during testing.
Here is a way to open and source the .bash_profile file using one command.

Steps :
1) Create a directory bin in your home ($ mkdir ~/bin)
2) Create file openprofile inside bin directory ($ touch ~/bin/openprofile)
3) Add command to open profile in openprofile ($ echo "/usr/bin/vim ~/.bash_profile" > ~/bin/openprofile )
4) Create file sourceprofile inside bin directory ($ touch ~/bin/sourceprofile)
5) Add command to source profile in sourceprofile ( $ echo "source ~/.bash_profile" > ~/bin/sourceprofile)
6) Make the files executable ($ chmod +x ~/bin/* )

Now you can run sourceprofile and openprofile commands from anywhere

Save time for testing

Some Windows Tips

Rename multiple files at once
Say you have many files like c6_sabab.txt c6_adfafa.txt ... etc. etc. and you want to rename them to c5_sabab.txt, c5_adfafa.txt... etc. etc.

rename c6_*.txt c5_*.txt

does the trick.

CREATE RIGHT-CLICK OPTION TO OPEN COMMAND PROMPT WINDOW

If you're from the old school and still use the command prompt regularly, then this tip is for you. You can create a new right-click option to open a command prompt window from the directory you're currently working in.

1. Open your Registry using "RegEdit" (not "RegEdit32"), and find the key HKEY_CLASSES_ROOT\Directory\Shell.
2. Create a new sub key called "CommandPrompt" as in HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt.
3. Change the value of default within the key to equal the text you would like on the right-click menu, for example 'Open Command Prompt....'
4. Create another new subkey under the key you just created, and name this subkey "command" as in HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt\command.
5. Change the value of default within this key depending on your OS to equal either:
* Windows 9x : command.com /k cd "%1"
* Windows NT : cmd.exe /k cd "%1"
6. Now right-click a folder, and the new option of "Open Command Prompt..." should be available.

AUTO-COMPLETING DIRECTORY PATH NAMES

You can configure Windows NT to automatically complete long directory path names.

1. Begin by editing your computer's registry (run regedt32.exe).
2. Access the registry key HKEY_CURRENT_USER\Software\Microsoft\Command Prompt.
3. In the pane on the right, double-click on the "CompletionChar" value.
4. By changing "CompletionChar" from 0 to 9, you configure Windows NT to automatically complete paths for you in a Command Prompt window.

To try out your change, open a Command Prompt window. Type cd p, then press the TAB key. You should see that Windows NT automatically fills in the path for you with the first directory on your hard drive that begins with the letter "p."

Sunday, June 03, 2007

Main goal of human life

A plantain tree has a number of uses. The leaf can be used as a dinner plate, the flower is used in some recipes, the outer covering of the trunk can be used a good binding and packing string; but the main use of the tree is the bunch of bananas it yields. All the trouble that is taken for planting and growing the plantain tree is for its bananas, not its leaves, bark or flowers. So too, the main use of the human body is the realization of the Reality. The rest is all incidental.