Welcome!

Linux Authors: Sandi Mappic, Lori MacVittie, Roger Strukhoff, Elizabeth White, Esmeralda Swartz

Related Topics: Linux

Linux: Article

Automated Error Prevention for Linux

Protect the reliability and cost-effectiveness of Linux

Most organizations that use Linux as a business operating system are developing their own applications for Linux - perhaps in response to the current scarcity of packaged applications available on Linux. With so much internal development for Linux, it is critical that the IT groups building your Linux-based applications have a means to efficiently produce reliable code. If they don't, you will jeopardize the very reliability and cost-effectiveness that most organizations are trying to achieve by turning to Linux.

However, most development teams follow a development process that is far from efficient, and the applications they provide typically experience functionality problems and security weaknesses that require patches, updates, and redeployments. In fact, most IT organizations waste a great deal of their time, effort, and resources fixing what is essentially the same error. As a result, applications are not deployed on time and on budget, applications are not reliable, and/or the organization's developers are probably following the standard rule of 80% time spent debugging and 20% time spent writing new code. Here's why: traditional software testing methodology tries to control costs and improve quality by promoting the tactic of testing "early and often." If an error is detected at any time during the software life cycle, a bug report is filed, the responsible developer tries to reproduce and repair the problem, then testing must verify that the modification corrected the reported problem and did not introduce any new problems. This approach is not only time consuming and costly, but also inefficient because it doesn't do anything to prevent the same types of errors from happening again. Consequently, a single IT group probably wastes a significant amount of time, effort, and resources on the same types of errors thousands of times over.

With the error prevention knowledge and technology available today, an IT development team should never encounter the same type of software error twice. By applying a concept called Automated Error Prevention (AEP), you can ensure that any time an error is discovered, the development process is improved, and that error - along with entire classes of similar errors - is prevented from recurring. If this methodology is implemented throughout your organization's IT groups, the developers will have the infrastructure and process essential for efficiently producing applications that leverage the strengths of Linux.

What Is the Parasoft AEP Methodology?
The Parasoft AEP methodology defines the practices that apply the concept of AEP to the software life cycle, and describes how those practices can be used in a group environment. The concept of AEP advocates the automation of five specific procedures, which are combined to improve the development process and prevent software errors:

  1. Detect an error
  2. Isolate the cause of the error
  3. Locate the point in the process that created the error
  4. Implement practices to prevent the error from reoccurring
  5. Monitor for improvements
The key to AEP is that you should find a bug only once (or learn from someone else who has already found and analyzed that bug). The knowledge you gain from finding and analyzing bugs should be used to improve your process so that you never encounter repeat occurrences of bugs similar to those you have already found.

For example, imagine that you have an n-tier system that includes a client, middleware written in Java, and a database. Assume that load tests revealed that a heavy load stopped the system. After detailed analysis, you discovered the problem was caused by a resource leak from open connections to the database. Normally, you would simply identify and modify the code to close the connection.

However, if you were to approach this situation from the perspective of AEP, you would try to determine how to prevent the problem from recurring. After isolating the problem as an open connection, you would determine that the error was introduced because a developer wrote code to open - but not close - a connection. You might then try to stop this error from recurring by implementing a practice that ensures that code written to open a connection is always accompanied by code to close that connection.

One way to implement this practice is to establish a Java coding standard requiring that each class that opens a connection must have a finalize() method and the finally block to close the connection. If code follows this rule, the error won't reoccur. But how will you enforce this? You could try to enforce the practice by having the team conduct code reviews. However, this is inefficient because the team would need to manually review and analyze all of the code to determine whether all of the connections were closed.

A more efficient strategy is to use a static analysis tool that can analyze the code and automatically identify any violations of this guideline. The team can then prevent leaks by ensuring that all connections are closed.

This is the idea behind AEP. You found an error during load testing, then isolated the error's source as a resource leak from an open connection in the Java middleware. You found that the Java code was missing a finally block and finalize() method, defined a coding standard to specify how code should be written in the future, and automated the process to ensure that this standard is actually followed.

How Is AEP Implemented?
You implement AEP by defining error prevention practices - including coding standards, static analysis, unit testing, regression testing, load and stress testing, functional testing, integration testing, application testing, and monitoring - and integrating these practices into the software life cycle as shown in Figure 1.

 

Whenever an error is detected during a specific practice, you modify an earlier practice to prevent that error and all similar errors. For instance, in the example from the previous section, an error was identified during load testing, then the coding standard checking practice was modified to include a new coding standard.

How Do I Implement AEP Practices?
The way that you implement AEP practices can determine whether AEP becomes an effective and sustainable part of the development process, or just another fad that sounded good in principle, but never produced the promised results. Each AEP practice implemented must satisfy three requirements for success. Each practice must be:

  1. Implemented as a group practice
  2. Embedded in the software life cycle
  3. Automated to ensure that it does not decay
All three requirements are critical for every practice, which is why I recommend that you implement each practice in a similar manner. The recommended group workflow for all practices is described in Figure 2.

 

To achieve automation, you ensure that each developer is equipped with the technology required to automate the practice. The technology might be scripts or programs developed internally, open source tools, or commercial tools.

To promote the necessary uniformity and enforce group behavior, you ensure that all team members are automating the practice in exactly the same way, and that only the team architect can modify the tool settings. Moreover, to maintain the integrity of the code base, you require that developers apply the practice to their code before they add that code to the source control system. Any practice violations must be remedied before the developers check in the code.

To verify that developers actually adhere to the required practices, you configure the technologies that automate the practice to run regularly scheduled batch mode tests on the code available in the source control system. No violations should occur at this point. If any do occur, the tools notify the architect and the developer; this notification serves as an invitation for a code review. During the code review, the architect and developer review the violation of the practice and determine whether this was an appropriate violation.

Information from the regularly scheduled batch mode tests should be collected in a central location (such as a relational database), and then analyzed to measure how well the practice is implemented. In addition, managers can use this information to better assess group productivity and project progress.

A Final Word
The software industry must mature, and there can be no maturation without effective error prevention and process improvement. We have no other options - we must do it. If we don't, we will pay dearly for it in functionality and security problems, excessively high development costs, and depressingly low productivity.

The Parasoft AEP Methodology
The Automated Error Prevention (AEP) Concept has been developed over the course of many years through close work with the software industry, Parasoft development personnel, and the personal dedication of Dr. Adam Kolawa, chairman and CEO of Parasoft Corporation. The AEP Concept addresses a basic need within the software industry, that of improving application quality through the automatic prevention of errors during the entire software development lifecycle. We believe that the AEP Concept is fundamental for improving the efficiency of the software industry and is critical for the software industry to mature.

Because the AEP Concept is so important, it must be shared with others in the industry. Therefore, Parasoft is pleased to place the Automated Error Prevention (AEP) Concept, the "five steps plus automation," into the Public Domain. Parasoft is very committed to the AEP Concept, and wishes to see it embraced by companies and organizations that want to improve their software manufacturing and development processes. We encourage others to adopt the Parasoft AEP Concept, to improve it or change it as needed, and build their own methodologies and products from it. To this end, Parasoft will soon unveil the AEP Consortium, a think-tank that will bring together software corporations and leaders to foster support and practical implementation techniques for the AEP Concept.

Parasoft AEP Methodology is a specific application of the AEP Concept to the software development life cycle. It defines how you place the automated procedures into the software life cycle and how you ensure that the development group works together to implement and maintain the practice. The Parasoft AEP Methodology is not a product. Rather, it is the definition and description of a process in which proven error prevention practices are automated for the software development industry.

We believe that there are other AEP Methodologies that are waiting to be discovered and applied to the software development life cycle, and we encourage others in the software industry to conduct research to facilitate the creation and dissemination of these additional methodologies. We have simply conducted the first phases of this research - there is still much more that can be done.

Parasoft AEP Solutions are specific implementations of the Parasoft AEP Methodology that combines tools, services, and know-how to support the full software life cycle. Companies such as IBM, Cisco, and Warner Music Group have adopted Parasoft AEP Solutions and are already reaping benefits throughout their entire software development programs.

More Stories By Adam Kolawa

Adam Kolawa is the co-founder and CEO of Parasoft, leading provider of solutions and services that deliver quality as a continuous process throughout the SDLC. In 1983, he came to the United States from Poland to pursue his PhD. In 1987, he and a group of fellow graduate students founded Parasoft to create value-added products that could significantly improve the software development process. Adam's years of experience with various software development processes has resulted in his unique insight into the high-tech industry and the uncanny ability to successfully identify technology trends. As a result, he has orchestrated the development of numerous successful commercial software products to meet growing industry needs to improve software quality - often before the trends have been widely accepted. Adam has been granted 10 patents for the technologies behind these innovative products.

Kolawa, co-author of Bulletproofing Web Applications (Hungry Minds 2001), has contributed to and written over 100 commentary pieces and technical articles for publications including The Wall Street Journal, Java Developer's Journal, SOA World Magazine, AJAXWorld Magazine; he has also authored numerous scientific papers on physics and parallel processing. His recent media engagements include CNN, CNBC, BBC, and NPR. Additionally he has presented on software quality, trends and development issues at various industry conferences. Kolawa holds a Ph.D. in theoretical physics from the California Institute of Technology. In 2001, Kolawa was awarded the Los Angeles Ernst & Young's Entrepreneur of the Year Award in the software category.

Comments (1)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


@ThingsExpo Stories
The Internet of Things will greatly expand the opportunities for data collection and new business models driven off of that data. In her session at Internet of @ThingsExpo, Esmeralda Swartz, CMO of MetraTech, will discuss how for this to be effective you not only need to have infrastructure and operational models capable of utilizing this new phenomenon, but increasingly service providers will need to convince a skeptical public to participate. Get ready to show them the money! Speaker Bio: Esmeralda Swartz, CMO of MetraTech, has spent 16 years as a marketing, product management, and busin...
Samsung VP Jacopo Lenzi, who headed the company's recent SmartThings acquisition under the auspices of Samsung's Open Innovaction Center (OIC), answered a few questions we had about the deal. This interview was in conjunction with our interview with SmartThings CEO Alex Hawkinson. IoT Journal: SmartThings was developed in an open, standards-agnostic platform, and will now be part of Samsung's Open Innovation Center. Can you elaborate on your commitment to keep the platform open? Jacopo Lenzi: Samsung recognizes that true, accelerated innovation cannot be driven from one source, but requires a...
SYS-CON Events announced today that Red Hat, the world's leading provider of open source solutions, will exhibit at Internet of @ThingsExpo, which will take place on November 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA. Red Hat is the world's leading provider of open source software solutions, using a community-powered approach to reliable and high-performing cloud, Linux, middleware, storage and virtualization technologies. Red Hat also offers award-winning support, training, and consulting services. As the connective hub in a global network of enterprises, partners, a...
P2P RTC will impact the landscape of communications, shifting from traditional telephony style communications models to OTT (Over-The-Top) cloud assisted & PaaS (Platform as a Service) communication services. The P2P shift will impact many areas of our lives, from mobile communication, human interactive web services, RTC and telephony infrastructure, user federation, security and privacy implications, business costs, and scalability. In his session at Internet of @ThingsExpo, Robin Raymond, Chief Architect at Hookflash Inc., will walk through the shifting landscape of traditional telephone a...
BSQUARE is a global leader of embedded software solutions. We enable smart connected systems at the device level and beyond that millions use every day and provide actionable data solutions for the growing Internet of Things (IoT) market. We empower our world-class customers with our products, services and solutions to achieve innovation and success. For more information, visit www.bsquare.com.
SYS-CON Events announced today that Matrix.org has been named “Silver Sponsor” of Internet of @ThingsExpo, which will take place on November 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA. Matrix is an ambitious new open standard for open, distributed, real-time communication over IP. It defines a new approach for interoperable Instant Messaging and VoIP based on pragmatic HTTP APIs and WebRTC, and provides open source reference implementations to showcase and bootstrap the new standard. Our focus is on simplicity, security, and supporting the fullest feature set.
How do APIs and IoT relate? The answer is not as simple as merely adding an API on top of a dumb device, but rather about understanding the architectural patterns for implementing an IoT fabric. There are typically two or three trends: Exposing the device to a management framework Exposing that management framework to a business centric logic • Exposing that business layer and data to end users. This last trend is the IoT stack, which involves a new shift in the separation of what stuff happens, where data lives and where the interface lies. For instance, it’s a mix of architectural style...
SYS-CON Events announced today that SOA Software, an API management leader, will exhibit at SYS-CON's 15th International Cloud Expo®, which will take place on November 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA. SOA Software is a leading provider of API Management and SOA Governance products that equip business to deliver APIs and SOA together to drive their company to meet its business strategy quickly and effectively. SOA Software’s technology helps businesses to accelerate their digital channels with APIs, drive partner adoption, monetize their assets, and achieve a...
From a software development perspective IoT is about programming "things," about connecting them with each other or integrating them with existing applications. In his session at @ThingsExpo, Yakov Fain, co-founder of Farata Systems and SuranceBay, will show you how small IoT-enabled devices from multiple manufacturers can be integrated into the workflow of an enterprise application. This is a practical demo of building a framework and components in HTML/Java/Mobile technologies to serve as a platform that can integrate new devices as they become available on the market.
SYS-CON Events announced today that Utimaco will exhibit at SYS-CON's 15th International Cloud Expo®, which will take place on November 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA. Utimaco is a leading manufacturer of hardware based security solutions that provide the root of trust to keep cryptographic keys safe, secure critical digital infrastructures and protect high value data assets. Only Utimaco delivers a general-purpose hardware security module (HSM) as a customizable platform to easily integrate into existing software solutions, embed business logic and build s...
Connected devices are changing the way we go about our everyday life, from wearables to driverless cars, to smart grids and entire industries revolutionizing business opportunities through smart objects, capable of two-way communication. But what happens when objects are given an IP-address, and we rely on that connection, sometimes with our lives? How do we secure those vast data infrastructures and safe-keep the privacy of sensitive information? This session will outline how each and every connected device can uphold a core root of trust via a unique cryptographic signature – a “bir...
Internet of @ThingsExpo Silicon Valley announced on Thursday its first 12 all-star speakers and sessions for its upcoming event, which will take place November 4-6, 2014, at the Santa Clara Convention Center in California. @ThingsExpo, the first and largest IoT event in the world, debuted at the Javits Center in New York City in June 10-12, 2014 with over 6,000 delegates attending the conference. Among the first 12 announced world class speakers, IBM will present two highly popular IoT sessions, which will take place November 4-6, 2014 at the Santa Clara Convention Center in Santa Clara, Calif...
Almost everyone sees the potential of Internet of Things but how can businesses truly unlock that potential. The key will be in the ability to discover business insight in the midst of an ocean of Big Data generated from billions of embedded devices via Systems of Discover. Businesses will also need to ensure that they can sustain that insight by leveraging the cloud for global reach, scale and elasticity.
WebRTC defines no default signaling protocol, causing fragmentation between WebRTC silos. SIP and XMPP provide possibilities, but come with considerable complexity and are not designed for use in a web environment. In his session at Internet of @ThingsExpo, Matthew Hodgson, technical co-founder of the Matrix.org, will discuss how Matrix is a new non-profit Open Source Project that defines both a new HTTP-based standard for VoIP & IM signaling and provides reference implementations.

SUNNYVALE, Calif., Oct. 20, 2014 /PRNewswire/ -- Spansion Inc. (NYSE: CODE), a global leader in embedded systems, today added 96 new products to the Spansion® FM4 Family of flexible microcontrollers (MCUs). Based on the ARM® Cortex®-M4F core, the new MCUs boast a 200 MHz operating frequency and support a diverse set of on-chip peripherals for enhanced human machine interfaces (HMIs) and machine-to-machine (M2M) communications. The rich set of periphera...

SYS-CON Events announced today that Aria Systems, the recurring revenue expert, has been named "Bronze Sponsor" of SYS-CON's 15th International Cloud Expo®, which will take place on November 4-6, 2014, at the Santa Clara Convention Center in Santa Clara, CA. Aria Systems helps leading businesses connect their customers with the products and services they love. Industry leaders like Pitney Bowes, Experian, AAA NCNU, VMware, HootSuite and many others choose Aria to power their recurring revenue business and deliver exceptional experiences to their customers.
The Internet of Things (IoT) is going to require a new way of thinking and of developing software for speed, security and innovation. This requires IT leaders to balance business as usual while anticipating for the next market and technology trends. Cloud provides the right IT asset portfolio to help today’s IT leaders manage the old and prepare for the new. Today the cloud conversation is evolving from private and public to hybrid. This session will provide use cases and insights to reinforce the value of the network in helping organizations to maximize their company’s cloud experience.
The Internet of Things (IoT) is making everything it touches smarter – smart devices, smart cars and smart cities. And lucky us, we’re just beginning to reap the benefits as we work toward a networked society. However, this technology-driven innovation is impacting more than just individuals. The IoT has an environmental impact as well, which brings us to the theme of this month’s #IoTuesday Twitter chat. The ability to remove inefficiencies through connected objects is driving change throughout every sector, including waste management. BigBelly Solar, located just outside of Boston, is trans...
SYS-CON Events announced today that Matrix.org has been named “Silver Sponsor” of Internet of @ThingsExpo, which will take place on November 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA. Matrix is an ambitious new open standard for open, distributed, real-time communication over IP. It defines a new approach for interoperable Instant Messaging and VoIP based on pragmatic HTTP APIs and WebRTC, and provides open source reference implementations to showcase and bootstrap the new standard. Our focus is on simplicity, security, and supporting the fullest feature set.
Predicted by Gartner to add $1.9 trillion to the global economy by 2020, the Internet of Everything (IoE) is based on the idea that devices, systems and services will connect in simple, transparent ways, enabling seamless interactions among devices across brands and sectors. As this vision unfolds, it is clear that no single company can accomplish the level of interoperability required to support the horizontal aspects of the IoE. The AllSeen Alliance, announced in December 2013, was formed with the goal to advance IoE adoption and innovation in the connected home, healthcare, education, aut...