Configuration – Basic Elements

Configuration Management(CM) is the discipline that ensures that the state of the software at any given time is known and reconstructable. CM comprises three basic elements: configuration identification (CID), configuration control (CC), and configuration accounting (CA). While each element may be invoked without the others, CM is incomplete in the absence of any of them.

CID provides a method for specifically and uniquely identifying each instance (e.g., release, version) of a given software product or set of products. By using a standard naming convention that allows for the identification of every instance of the product, each new draft of a document, each new compilation of a unit, or each new build can be specifically identified.

CC is the element that ensures that each change to an instance of the product is known, authorized, and documented. CC includes the activities of the change control board (CCB), which reviews and authorizes changes to the documents and code as increasingly formal control is placed on the developing software system. The software library may also be included as a function of CC.

CA serves to keep track of the status of each instance of the product. This becomes increasingly important as units and modules are integrated into subsystems and systems. It is obvious that the specific parts of a given system must be known so the system itself can be known. CA also assigns and tracks the status of each baseline of the requirements, test, design, code, and so on, as the software effort proceeds. Another growing requirement for CA is the case of a basic product that is adapted for use in multiple installations, each with slight variations in the total requirements set.

A Configuration Item (CI ) is any product of the software development process that is to be configuration managed. Each CI must have a unique identifier to differentiate it from all other software development products and other instances of the item itself.

Ultimate access to the Software Life Cycle(SLC) products, so that changes can be made, is through the software library, which is the repository of the official, approved issues of all documents and code. Changes to the products of the software development process come from two main sources: defect correction and enhancements. Without an effective change processing mechanism, the software can easily become unidentifiable and unmanageable.

Coordination of changes and their intercomponent effects is the task of the CCB. The CCB is responsible for determining that all effects of the proposed change have been anticipated and reconciled. Especially important is the control that the CCB exercises over the creation of new instances or versions of the various software system products. Once CM has been imposed on the project, it is the CCB that has the authority to approve changes and permit the updating of the various issues of the products. It is the responsibility of the software quality practitioner to monitor the functioning of the CCBs

Requirement Reviews — What they are?

Requirements reviews are intended to show that the problem to be solved is completely spelled out. Informal reviews are held during the preparation of the document. A formal review is appropriate prior to delivery of the document.

Requirements statements must meet a series of criteria if they are to be considered adequate to be used as the basis of the design of the system. Included in these criteria are the following:

• Necessity;
• Feasibility;
• Traceability;
• Absence of ambiguity;
• Correctness;
• Completeness;
• Clarity;
• Measurability;
• Testability.

A requirement is sometimes included simply because it seems like a good idea; it may add nothing useful to the overall system. The requirements review will assess the necessity of each requirement. In conjunction with the necessity of the requirement is the feasibility of that requirement. A requirement may be thought to be necessary, but if it is not achievable, some other approach will have to be taken or some other method found to address the requirement. The necessity of a requirement is most often demonstrated by its traceability back to the business problem or business need that initiated it.

Every requirement must be unambiguous. That is, every requirement should be written in such a way that the designer or tester need not try to interpret or guess what the writer meant. Terms like usually, sometimes, and under normal circumstances leave the door open to interpretation of what to do under unusual or abnormal circumstances. Failing to describe behavior in all possible cases leads to guessing on the part of readers, and Murphy’s Law suggests that the guess will be wrong a good portion of the time.

Completeness, correctness, and clarity are all criteria that address the way a given requirement is stated. A good requirement statement will present the requirement completely; that is, it will present all aspects of the requirement. A statement that correctly and completely states the requirement but cannot be understood by the designer is as useless as no statement at all. The language of the requirements should be simple, straightforward, and use no jargon. That also means that somewhere in the requirements document the terms and acronyms used are clearly defined.

Measurability and testability also go together. Every requirement will ultimately have to be demonstrated before the software can be considered complete. Requirements that have no definite measure or attribute that can be shown as present or absent cannot not be specifically tested.

The formal SRR is held at the end of the requirements phase. It is a demonstration that the requirements document is complete and meets the criteria previously stated. It also creates the first baseline for the software system. This is the approved basis for the commencement of the design efforts. All design components will be tracked back to this baseline for assurance that all requirements are addressed and that nothing not in the requirements appears in the design.

The purpose of the requirements review, then, is to examine the statements of the requirements and determine if they adhere to the criteria for requirements. For the software quality practitioner, it may not be possible to determine the technical accuracy or correctness of the requirements, and this task will be delegated to those who have the specific technical expertise needed for this assessment. Software quality or its agent (perhaps an outside contractor or another group within the organization) will review the documents for the balance of the criteria.

Each nonconformance to a criterion will be recorded along with a suggested correction. These will be returned to the authors of the documents, and the correction of the nonconformances tracked. The software quality practitioner also reports the results of the review and the status of the corrective actions to management.

Gujarat’s 1st IT SEZ hires 800 engineers

L&T’s Rs500 cr Knowledge City began operations in January 2010

Gujarat’s first IT/ITeS special economic zone (SEZ) is now humming with activity, what with hundreds of engineers and others working in it. No, it is neither in Ahmedabad nor in Gandhinagar. Instead, engineering and construction major Larsen & Toubro’s ITeS SEZ, known as ‘L&T Knowledge City’ is located near Waghodia, in Vadodara.

It has a strength of about 800 engineers. With the beginning of its operations, L&T Knowledge City has become Gujarat’s first IT/ITeS SEZ among 17 notified IT/ITeS SEZs in the state.
The L&T Knowledge City is spread over 112 acres while its SEZ is spread in 10 hectares. The SEZ got approval from the Board of Approval (BoA) in November 2008. But, it could start its operations in mid-January this year after getting all necessary approvals from the Union government. The first phase of the knowledge city has been completed at an expenditure of Rs500 crore. It will meet the high-end design and engineering needs of the hydrocarbon and power sectors. “At present, we are in a transit mode – moving from STPI zone to SEZ. We started with 130 people and later around 700 engineers were recruited. Currently, we have 800 engineers in the Knowledge City,” said a source.

Apart from Vadodara, the company has six other facilities in the country. “We have two facilities each in Bangalore and Chennai and one each in Mysore, Mumbai and Vadodara,” he said.
He did not put a number to exports from Vadodara. “But, with seven facilities we have set a target of exports of $125 million in 2010-11,” he added.

GESIA president Nirav Shah said, “This SEZ has been developed for the company’s own use. But, yes, it has become the state’s first IT SEZ to start operations.”

The condition of other IT/ITeS SEZs is not exciting, says the director of STPI, Gandhinagar, Ajay Sharma. “L&T’s SEZ in Vadodara has been developed by the company, and not by any developer; hence, it could start its operations early compared to other SEZs in the state,” he said

L1 and L2 Visa information

Introduction
The L-1 Visa is a temporary visa enabling the worker to work in the United States for up to seven
years. L visa holders are exempted from the requirement of having to establish their continued non-immigrant intent, greatly smoothing the progress of the transition to an immigrant employment based visa, leading to a “green card”.

Eligibility

L-1 visas are available to a person (and L2 to his/her family), to transfer him/her to work in the United States for an employer, who has worked abroad for 1 continuous year within past 3 years in a related business entity in a manager/executive or specialized knowledge staff capacity. The applicant must be coming to the U.S. to continue providing services for this same employer. The worker does not need to be directly employed by the sponsor. It is OK even if he/she is paid through personnel service company or an agency, or even as independent consultant, as long as the sponsor had management and control over the worker during the qualifying year.

    Two types of employees may be sponsored for L1 Visa:

Manager/Executive: Generally, an executive or a manager should have supervisory responsibility for professional staff and/or for a key function, department or subdivision of the employer.
Persons in this category get an L1A visa. The initial petition will be approved for 3 years, and can be renewed twice for 2 years each for a total of 7 years.

Specialized Knowledge Staff: A person should have knowledge of the company’s management, proprietary techniques, products/services, research, systems or procedures.
Persons in this category get an L1B visa. The initial petition will be approved for 3 years, and can be renewed once for 2 years for a total of 5 years.

For each of these of types of L1 visa, on completing the maximum allowable period in L-1 status, the employee must be employed outside the United States for a minimum of one year before a new application is made for L or H status.
Please note that the times spent in L-1 status AND H status are added together and counted toward the total.

Qualifying Organization

There is no restriction on the types of business that can sponsor an L1 visa – corporations (S, C, LLC etc.),
partnerships, government-owned entities and non-profit organizations are all eligible. The sponsoring employer need not be U.S. owned or incorporated. There are four business entities in the United States that can offer employment to the alien – a parent company, a branch, a subsidiary, or an affiliate. Only if these entities are able to offer full proof that they meet the definition of a “qualifying organization” will the alien be granted temporary, nonimmigrant work status in the U.S. by the United States Citizenship and Immigration Service (USCIS).

There are four tests to determine if the U.S. and foreign entities are of the same qualifying organization:
1. that business is executed in the U.S. during the entire stay of the L-1 Visa recipient;
2. that business is transacted in another country while the L-1 Visa recipient is working in the U.S.;
3. that there is more than just an agent’s office in either the U.S. or abroad. It is really doing business;
4. that there is evidence of a systematic and continuous flow of goods or services within the context of a
structured business with a business plan. However, it is not necessary that international trade be taking
place. Therefore, it is acceptable if the company produces goods or services in the U.S. that will be used entirely within the U.S.

L1 for opening new office in the U.S.

It is possible for a manager or executive to come to the U.S. for opening a new office, provided evidence for
following are produced:
• Sufficient real estate space has been secured to operate a new office
• The beneficiary has been employed for one continuous year in the three year period preceding the filing of the petition in an executive or managerial capacity and that the proposed employment involves executive or managerial authority over the new operation; and
• The intended United States operation, within one year of the approval of the petition, will support an executive or managerial position, supported by information regarding:
o The proposed nature of the office describing the scope of the entity, its organizational structure, and its financial goals;
o The size of the United States investment;
o The financial ability of the foreign entity to remunerate the beneficiary and to commence doing business in the United States; and
o The organizational structure of the foreign entity.

Blanket L1 Petition
Organizations which have been doing business in the United States for a minimum of one year and:
• Are engaged in commercial trade or services (i.e. no charitable or non-profit organizations);
• Have at least 3 offices in the U.S. and overseas; and Have either:
o Sponsored at least 10 successful individual L1 petitions in the last 12 months;
o U.S. annual sales exceeding $25,000,000; or
o A U.S. work force of at least 1000 employees.
can include an unlimited number of qualifying foreign parents, subsidiaries, affiliates or branch offices in a ‘blanket’ petition.

L-1 Process
The filing of Form I-129[3] and the special L supplement[3] that accompanies Form I-129[3] is the first
requirement to be sent directly to the USCIS Service Center in the same jurisdiction as the place of employment.
By filing Form I-129[3], the petitioner is applying for a temporary, nonimmigrant work visa that will authorize the employee, the right to work in the United States.
It should show that the prior education and training make the applicant of significantly greater value to the national labor pool than the hiring of a U.S. citizen.
A letter from the U.S. employer describing both the applicant’s prior duties abroad and the duties to be performed in the U.S. will be necessary for the USCIS to rule that this position may not be filled by a U.S. national. This letter must also prove that both entities are themselves meeting the guidelines of a qualifying organization. Letters must be submitted by both the foreign and U.S. entities, confirming that the applicant has met the one-year in three years requirement.
The filing fee for I-129 L is $185.00. Additionally, a $500 Fraud Prevention and Detection fee must be paid. This is only for the initial petition or change of employer. Extension with same employer is not subject to this fee. In case of blanket L petition, $500 for blanket petition and $500 for each L1 employee under blanket L petition.

L2 Visa for Dependents
The petitioning company sponsors the employee for an L-1 visa for temporary employment in the U.S., but the employee’s spouse and dependent minors will receive an L-2 Visa. The spouse of an L-1 visa holder (not dependent children) can get employment authorization that allows them to work freely (high tech, grocery store or restaurant or whichever legal business they want to work in.) For more information, please see E & L Spouse Employment Authorization[4].

Parent Information from:

http://immihelp.com/visas/l1/

Links:
[1] http://immihelp.com/directory/usconsulates.jsp
[2] http://immihelp.com/gc/employment/labor/
[3] http://immihelp.com/forms/showform.do?form=i-129
[4] http://immihelp.com/immigration/employment-authorization-document.html

Wipro employee commits $4 Million fraud

Wednesday,17 February 2010

Bangalore: IT major Wipro has tightened internal control in the finance division after it was noticed that one of its employees embezzled crores of rupees in the last three years. The employee, who was working in the ‘controllership’ division within the finance department in the last three years, stole a password and transferred funds from Wipro’s account at a bank, reports M.V. Ramsurya and Pankaj Mishra of Economic Times.

Suresh C Senapaty, Wipro’s CFO has also confirmed the incident. “This has been a case of embezzlement, which we discovered in December, and it’s very unfortunate that this person succumbed to this,” he said. According to him, the company has carried out an investigation and is undertaking actions with respect to stricter adherence to processes.

Following this, Wipro has disbanded the controllership unit. Wipro officials have succeeded in recovering about half the money, but will still face a loss of about $2 million. The CFO said the incident did not involve more than one Wipro employee. “Our investigations have revealed that only this employee was involved, and nobody else in the team had any clue,” Senapaty said.

Apart from setting up an internal investigation team, Wipro has also taken help from external auditors and investigation experts who will vet its processes and certify the soundness of its controls. Wipro has always taken pride in the sound work ethics of its employees and in the strictness of its controls. “We have to be more alert in monitoring, and we need to tighten the processes for ensuring an early warning system and make it tougher,” Senapaty said.

Now, Wipro plans to make it compulsory for its employees to sign an undertaking about sharing of passwords and any unauthorized transactions. The company is also planning to frequently rotate its employees, who are working in sensitive functions within the finance department. Currently, employees in such functions spend around three years before a transfer.

Posted in News. Tags: , . Leave a Comment »

Gujarat well-positioned for IT Boom

In the next two years, the city is expected to create thousands of jobs in the service and manufacturing sector that could trigger a boom in demand for residential properties, mainly in and around a radius of 15-km of the city towards Gandhinagar in the north and Nano town Sanand in the west.

The last five months have seen a spurt of construction activity in information technology (IT), IT Enabled Services (ITES) and knowledge centres in this stretch.

These include Gujarat International Financial Tec (GIFT) city and the Rs 1,200-crore Mindspace IT SEZ near Raisan village to be operational in July this year.

Western region head of K Raheja Corp, Pankaj Kotak, says, “The first phase of Mindspace IT SEZ would create jobs for 50,000 in the coming years. Residential demand is increasing for those working in the service sector”. The city is expected to create at least 70,000 direct and indirect jobs by 2012, say speculators.

Read the rest of this entry »

Gloom a boom for Guj IT exports

source:TNN

Information technology in Gujarat was always seen as a marginalised industry, thanks to the absence of large companies. But when major IT hubs of the country were reeling under a slowdown in the West in 2009, Gujarat’s disadvantage turned into an edge. IT exports from the state have grown by an impressive 72% year-on-year in 2008-09.
Data available with Software Technology Park of India (STPI), a nodal agency set up by the Central government to promote software exports, indicates that while exports from Gujarat have consistently grown over the past three years by over 20 per cent, during recession-hit 2008-09, it skyrocketed from Rs 740 crore in 2007-2008 to Rs 1,270 crore in 2008-9, a jump of over 70 per cent.
“The meltdown helped Gujaratbased small players as many US companies chose to outsource work to reduce costs. These companies preferred smaller companies over biggies due to competitive rates offered by them. Most IT firms in Gujarat are SMEs,” said Ravi Saxena, principal secretary, science & technology. Exports have already crossed Rs 1,000 crore in the first three quarters of the current fiscal, says Ajay Sharma, director, STPI (Gujarat).
Large companies like TCS expanded their footprint in the state, which further augmented outsourcing business, said Nirav Shah, president of Gujarat Electronics & Software Industry Association.
And, it were not just firms in the space of Business Process Outsourcing, Knowledge Process Outsourcing and call centres that gained. “Gujarat companies are building good reputation in the field of Engineering Design Software (EDS),” said Chirag Mehta, managing director of a software company. A chunk of EDS business came from Australia, USA and UK companies.
Software export from Gujarat was mere Rs. 4.75 crore in 1996 and until 2000 exports remained below Rs 10 crore. “Software exports crossed Rs 450 crore in 2004-05 due to improved infrastructure, ” said Sharma. Small US companies offshore more
Beneficiaries Are Mid-Size IT Vendors Sujit John | TNN
Bangalore: Despite Barack Obama’s efforts to discourage offshoring by US companies, there is some evidence to suggest that now even smaller companies in the country are increasingly looking at outsourcing to regions like India to cut costs. And given that smaller companies would prefer to deal with smaller vendors to get the attention they seek, the beneficiaries are expected to be mid-size IT companies in India.
Aditi Technologies, which focuses on providing software services to companies with revenues of between $50 million and $2 billion, has seen a 300% increase in its sales pipeline in the past two months, compared to the four months prior to that. The company said it had closed “multiple high potential deals” in these months.
Sonata Software recently won an order from a $50 million, 400-people company in Muncie in Indiana, US, the first time that this 25-year-old company has offshored work. B Ramaswamy, MD of Sonata, told TOI in November that he expected many more deals like this.
Sunil Gupta, VP in ITC Infotech, a company that has a greater focus on Europe, said more and more mid-size companies in that continent too are becoming first time outsourcers. “As of now, we have seen evidence in terms of enquiries. The budgets are still in the approval stage. We’ll get a better picture in the second quarter of this calendar year,” Gupta said. Divyabh Mishra, director-marketing in Aditi, too added a caveat: “I’m not sure if the better pipeline now is a reflection of a new trend, or simply the end of the recession.”
But some independent analysts believe the trend of smaller companies outsourcing will gain momentum this year. Investment advisory and research firm Tholons said the primary reasons for this were cost optimization and better synergy between core competence and market requirements. “These businesses will find that not offshoring may well translate into competitive threat. If one firm offshores, which helps to increase its margin from say 8% to 20%, then it immediately gains a huge advantage over others in the business,” says Avinash Vashistha, CEO of Tholons.
Mid-size IT vendors in India are expected to be the biggest beneficiaries of such a trend. “To use a clinched term, they would not like to be a small fish in a big pond,” said Gupta. The ability of a midsize vendor to give individual attention and its willingness to cede more control to the client is seen to give more comfort to the small outsourcer.
Vashistha predicts that 2010 will see service providers gearing up to enhance their capabilities to assist SMEs through the entire lifecycle of outsourcing, “as these businesses are still largely immature in offshoring”.

US cos tell Modi to lift prohibition

source: TNNGandhinagar:

A high-level delegation of American multinationals has asked Chief Minister Narendra Modi to lift prohibition in the interest of business development in Gujarat.
A presentation by top consultancy firm KPMG before Modi, made on behalf of the American Chamber of Commerce in India (AMCHAM) on Wednesday, mentioned this is one of the “key concerns” for improving American investment prospects.

KPMG has also served as a key consultant of the Gujarat government for Vibrant Gujarat investors’ summits every alternative year since 2003.
During the interaction with Modi, at least two members of the delegation also asked the CM to move towards lifting prohibition. They believed it would improve American business prospects in Gujarat and generate high revenues for the state government.

MNC representatives at the meeting were led by Tejpreet Singh Chopra, president and CEO, General Electrics (GE) India, who is also the AMCHAM chairman. Representatives from Boeing International, Quaker Chemical, Deloitte Touche Tohmatsu India, Marriott Hotel, Brown Forman Worldwide, Crown Worldwide Movers, Cognizant Technology Solutions, DuPont, Exxon Mobil, Monsanto, PricewaterhouseCoop ers, Coca-Cola and Intel.

GE showed keen interest in setting up a nuclear power plant in Gujarat. The Coca-Cola representative informed Modi about the company’s decision to double the capacity of its Goblaj plant with an additional investment of Rs 100 crore.

Monsanto, a key factor in the sharp rise in Bt Cotton output in Gujarat, as also DuPont, showed interest in value addition in farm produce. “They wanted to enter into developing biotechnology devices, drought proofing and weed control,” a senior official said.

Modi, on his part, invited MNCs to invest in environmentally safe technologies, health and education in Gujarat. Though he has been denied a US visa, he wanted American presence in Gujarat to further go up.

Amidst protests from some quarters, the Gujarat government partially relaxed the prohibition policy for economic zones (SEZs), national and international conventions and business and academic meets in 2006. Anybody living in an SEZ is entitled to get a `liquor card’ for a duration of three years on payment of Rs 500. There is a provision of granting a `group permit’ for major events.

Optimizing JavaScript code

Authors: Gregory Baker, Software Engineer on GMail & Erik Arvidsson, Software Engineer on Google Chrome
Recommended experience: Working knowledge of JavaScript

Client-side scripting can make your application dynamic and active, but the browser’s interpretation of this code can itself introduce inefficiencies, and the performance of different constructs varies from client to client. Here we discuss a few tips and best practices to optimize your JavaScript code.

Working with strings
String concatenation causes major problems with Internet Explorer 6 and 7 garbage collection performance. Although these issues have been addressed in Internet Explorer 8 — concatenating is actually slightly more efficient on IE8 and other non-IE browsers such as Chrome — if a significant portion of your user population uses Internet Explorer 6 or 7, you should pay serious attention to the way you build your strings.

Consider this example:

var veryLongMessage =
‘This is a long string that due to our strict line length limit of’ +
maxCharsPerLine +
‘ characters per line must be wrapped. ‘ +
percentWhoDislike +
‘% of engineers dislike this rule. The line length limit is for ‘ +
‘ style purposes, but we don’t want it to have a performance impact.’ +
‘ So the question is how should we do the wrapping?’;
Instead of concatenation, try using a join:

var veryLongMessage =
['This is a long string that due to our strict line length limit of',
maxCharsPerLine,
' characters per line must be wrapped. ',
percentWhoDislike,
'% of engineers dislike this rule. The line length limit is for ',
' style purposes, but we don't want it to have a performance impact.',
' So the question is how should we do the wrapping?'
].join();
Similarly, building up a string across conditional statements and/or loops by using concatenation can be very inefficient. The wrong way:

var fibonacciStr = ‘First 20 Fibonacci Numbers
‘;
for (var i = 0; i < 20; i++) {
fibonacciStr += i + ' = ' + fibonacci(i) + '
';
}
The right way:

var strBuilder = ['First 20 fibonacci numbers:'];
for (var i = 0; i < 20; i++) {
strBuilder.push(i, ' = ', fibonacci(i));
}
var fibonacciStr = strBuilder.join('');

Building strings with portions coming from helper functions
Build up long strings by passing string builders (either an array or a helper class) into functions, to avoid temporary result strings.

For example, assuming buildMenuItemHtml_ needs to build up a string from literals and variables and would use a string builder internally, instead of using:

var strBuilder = [];
for (var i = 0; i < menuItems.length; i++) {
strBuilder.push(this.buildMenuItemHtml_(menuItems[i]));
}
var menuHtml = strBuilder.join();
Use:

var strBuilder = [];
for (var i = 0; i < menuItems.length; i++) {
this.buildMenuItem_(menuItems[i], strBuilder);
}
var menuHtml = strBuilder.join();

Defining class methods
The following is inefficient, as each time a instance of baz.Bar is constructed, a new function and closure is created for foo:

baz.Bar = function() {
// constructor body
this.foo = function() {
// method body
};
}
The preferred approach is:

baz.Bar = function() {
// constructor body
};

baz.Bar.prototype.foo = function() {
// method body
};
With this approach, no matter how many instances of baz.Bar are constructed, only a single function is ever created for foo, and no closures are created.

Initializing instance variables
Place instance variable declaration/initialization on the prototype for instance variables with value type (rather than reference type) initialization values (i.e. values of type number, Boolean, null, undefined, or string). This avoids unnecessarily running the initialization code each time the constructor is called. (This can’t be done for instance variables whose initial value is dependent on arguments to the constructor, or some other state at time of construction.)

For example, instead of:

foo.Bar = function() {
this.prop1_ = 4;
this.prop2_ = true;
this.prop3_ = [];
this.prop4_ = ‘blah’;
};
Use:

foo.Bar = function() {
this.prop3_ = [];
};

foo.Bar.prototype.prop1_ = 4;

foo.Bar.prototype.prop2_ = true;

foo.Bar.prototype.prop4_ = ‘blah’;

Avoiding pitfalls with closures
Closures are a powerful and useful feature of JavaScript; however, they have several drawbacks, including:

•They are the most common source of memory leaks.
•Creating a closure is significantly slower then creating an inner function without a closure, and much slower than reusing a static function. For example:

function setupAlertTimeout() {
var msg = ‘Message to alert’;
window.setTimeout(function() { alert(msg); }, 100);
}
is slower than:

function setupAlertTimeout() {
window.setTimeout(function() {
var msg = ‘Message to alert’;
alert(msg);
}, 100);
}
which is slower than:

function alertMsg() {
var msg = ‘Message to alert’;
alert(msg);
}

function setupAlertTimeout() {
window.setTimeout(alertMsg, 100);
}
•They add a level to the scope chain. When the browser resolves properties, each level of the scope chain must be checked. In the following example:

var a = ‘a’;

function createFunctionWithClosure() {
var b = ‘b’;
return function () {
var c = ‘c’;
a;
b;
c;
};
}

var f = createFunctionWithClosure();
f();
when f is invoked, referencing a is slower than referencing b, which is slower than referencing c.

Avoiding with
Avoid using with in your code. It has a negative impact on performance, as it modifies the scope chain, making it more expensive to look up variables in other scopes.

Avoiding browser memory leaks
Memory leaks are an all too common problem with web applications, and can result in huge performance hits. As the memory usage of the browser grows, your web application, along with the rest of the user’s system, slows down. The most common memory leaks for web applications involve circular references between the JavaScript script engine and the browsers’ C++ objects’ implementing the DOM (e.g. between the JavaScript script engine and Internet Explorer’s COM infrastructure, or between the JavaScript engine and Firefox XPCOM infrastructure).

Here are some rules of thumb for avoiding memory leaks:

Use an event system for attaching event handlers
The most common circular reference pattern [ DOM element --> event handler --> closure scope --> DOM ] element is discussed in this MSDN blog post. To avoid this problem, use one of the well-tested event systems for attaching event handlers, such as those in Google doctype, Dojo, or JQuery.

In addition, using inline event handlers can lead to another kind of leak in IE. This is not the common circular reference type leak, but rather a leak of an internal temporary anonymous script object. For details, see the section on “DOM Insertion Order Leak Model” in Understanding and Solving Internet Explorer Leak Patterns and and an example in this JavaScript Kit tutorial.

Avoid expando properties
Expando properties are arbitrary JavaScript properties on DOM elements and are a common source of circular references. You can use expando properties without introducing memory leaks, but it is pretty easy to introduce one by accident. The leak pattern here is [ DOM element --> via expando--> intermediary object --> DOM element ]. The best thing to do is to just avoid using them. If you do use them, only use values with primitive types. If you do use non-primitive values, nullify the expando property when it is no longer needed. See the section on “Circular References” in Understanding and Solving Internet Explorer Leak Patterns.

Make your Site Faster with Help of Google Code

There are plenty of ways to make websites run faster. In this section, you can discover performance best practices that real web professionals employ in their everyday work. These practices have improved the user experience for millions of users and we hope they are going to be useful for other web developers.
1-CSS: Using every declaration just once
Using every CSS declaration only once is an effective way to reduce file size of style sheets. It’s not a trivial optimization technique though: Watch over the cascade and adjust your editing workflow.
2-How gzip compression works
This article first explains how gzip compression works in a transaction between a web server and a web browser. Then, we look into what gzip actually compresses, so that you can leverage compression in your markup.
3-HTTP caching
Web pages can load much faster on repeated visits if the resources come from the cache. Learn about two groups of HTTP headers that make all the difference.
4-Improving website performance with Page Speed
It is often possible to make the contents of a web page take fewer bytes without changing the appearance or function of the page. Reducing the number of bytes a client has to download makes the page load faster. In this tutorial we look at three ways to reduce the size of web content.
5-Minimizing browser reflow
Reflow is a CPU-intensive and user-blocking part of the browser rendering process. This article discusses some coding best practices to minimize reflow for your web pages.
6-Optimizing JavaScript code
JavaScript can make your webapps dynamic and active, but the interpretation on the client can introduce its own inefficiencies. Here we discuss some tips to optimize your JavaScript.
7-Optimizing web graphics
Optimizing your web illustrations, icons, and graphics is one of the simplest yet most effective ways to decrease your page load time. In this tutorial, we discuss image file formats and optimize some real Google graphics for faster download on the web.
8-PHP performance tips
This article provides a few easy tips that can help you to speed up your existing PHP scripts by making some simple changes.
9-Prefetching resources
In some cases, it makes sense to download files before they are necessary, so that they are instantly available once requested. When the resources required for a page can be loaded in advance, the user-perceived network latency for that page can be significantly reduced or even eliminated.
10-Properly including stylesheets and scripts
Correctly ordering external stylesheets and external and inline scripts enables better parallelization of downloads and speeds up browser rendering time.
11-Reducing the file size of HTML documents
HTML has some tags that are optional and can thus be omitted. In HTML 5, a shorter DOCTYPE and a few other techniques help reducing file size and load time of your HTML documents too.
12-UI messaging and perceived latency
To the typical user, speed doesn’t only mean performance – it means the ability to use your website efficiently. Learn how to deliver effective UI messaging, a crucial part of keeping your users engaged and productive.

Follow

Get every new post delivered to your Inbox.