Post #9

Today, I will be summarizing an interesting article I found on www.softwaretestinghelp.com about software quality assurance and how to prevent defects in a timely fashion.  The article, entitled “Defect Prevention Methods and Techniques”, was last updated in October 2017, but the author is not credited.  I selected this article as a topic for a blog post because I found it interesting how it provided a definition to “quality assurance” as well as methods and techniques on how to prevent software defects during development.

The article begins by differentiating between quality assurance and quality control; quality assurance activities are targeted toward preventing and identifying defects while quality control activities are targeted toward finding defects after they’ve already happened.  The reason that the emphasis of this article is on quality assurance and defect prevention is because, according to the article, defects found during the testing phase or after release are costlier to find and fix.  Preventing defects motivates the staff and makes them more aware, improves customer satisfaction, increases reliability/manageability, and enhances continuous process improvement.  Taking measures to prevent defects, early on,not only improves the quality of the finished product but also helps companies achieve the highest Capability Maturity Model Integration Level (CMMI).

The process of preventing defects begins after implementation is complete and is comprised of four main stages:

Review and Inspection – Review of all work products
Walkthrough – Comare the system to its prototype
Defect Logging and Documentation – Key information; arguments/parameters that can be used to support the analysis of defects
Root Cause Analysis – Identifying the root cause of problems and prioritizing problem resolution for maximum impact

This process often requires the involvement of three critical groups within an organization, each with their own sets of roles and responsibilities;

Managers are responsible for:

  • Support in the form of resources, training, and tools
  • Definitions of appropriate policy and procedure
  • Promotion of discussion, distribution, and changes

Testers are responsible for:

  • Maintenance of the defect database
  • Planning implementation of changes

Clients are responsible for:

  • Providing feedback

The article concludes by emphasizing the importance of defect prevention and its effect on the final product.  I believe that actively participating in a process of avoiding defects  before the final stages and release of a product is good practice and should be followed just like any other beneficial development strategy.  The article certainly contributed to my repertoire of development techniques and I think I will refer to these concepts in the future.

 

From the blog CS@Worcester – by Ryan Marcelonis and used with permission of the author. All other rights reserved by the author.

Practical Application of Adapter Method

This week I chose to write about the adapter method because it is a great tool to have when working with incompatible interfaces and will help me in the future by creating more of an understanding about different types of frameworks. Since we are learning about 3 different design patterns, I figured adapter would be an interesting topic because can be compared to the porting of programs or video games to different types of hardware/ interfaces. Let’s first start off by talking about what the Adapter Pattern is. The adapter pattern works to allow two incompatible interfaces either work together or use attributes of one another. One example is a memory card reader in a laptop. When a memory card is plugged into the card reader so that the laptop can interpret the data. This article talks about how media devices can be adapted to play different formats.

This article explains the difficulties of porting or adapting a video game to other platforms because of the middle-ware or libraries that need to be used. For example, let’s say one game is built for a PC, however down the road the developers would like to adapt it to work on mobile phones or tablets. One struggle of this is that some developer tools are often built with closed sourced tools. This means that the game would need to be rebuilt from the ground-up because the libraries and tools needed are locked. Some game development tools are aware of this and actually include tools to directly adapt the libraries from one platform for another. Some optimization is still necessary by the developer, however it makes it so that these games and programs can run across multiple platforms. The reason I believe developers would want to make their products available across multiple platforms is because they want to maximize profits by adding more groups of users to their potentially interest list.

Performance is also an issue, sometimes it is more than code that can hinder the game. The actual hardware can greatly impact an adaptation of the game due to the fact of how it was built for another hardware architecture. The article says “The number one showstopper in game porting is the usage of closed-source tools, engines or libraries. Game developers should be aware of the technical decisions they are making, and how they will later affect portability of their game.”. This can create great issues and slow down for development time, especially if a deadline needs to be met.

One more important take from the article is language choice. From the article, “Is it going to properly compile in all platforms? Will it perform well? Beware of “too new” languages with super features (for example C++11) that might not be completely supported in all platforms (as we have painfully realized).” As we can see, there are many factors in adaptation of different types of software, and if we can create our programs with future adaptations in mind, adapter implementation can be organized in such a way to make the process easier.

 

Article: https://www.gamasutra.com/view/news/222363/What_exactly_goes_into_porting_a_video_game_BlitWorks_explains.php

 

From the blog CS@Worcester – Amir Adelinia's Computer Science Blog by aadelinia1 and used with permission of the author. All other rights reserved by the author.

Blog 7: Error reserving enough space for object heap in Java response

In today’s blog, I read the blog by Java2Blog which is a blog about java problems and other java frameworks and techniques. This post by them talks about how you could get an error for not reserving enough space for an object heap in Java.

First they go over a cause of this error, obviously though the first cause is that you ran your Java program without specifying a heap size which will cause you to get an error. The error would say something along the lines of “Could not reserve enough space for object heap”. The blog also tells you that you will encounter this error more in 32 bit JVM (meaning Java Virtual Machine) than in 64 bit JVM. The blog goes over the reason of this error which is 32-bit Java needs contiguous free space in memory to run the program. Then the fix for this problem is by running Java with a lower heap size and then it gives you a line of code you could use.

The next cause of error is specifying too large memory with -Xmx option on 32-bit VM. The fix for this issue is just lowering the heap size with a single line of code said in the blog. Lastly, the last cause of this error is if you specify a large heap size more than physical memory available on either 64-bit or 32-bit. The way you fix this problem is by again running a single line of code provided in the blog post which I will leave a link to at the bottom for you to check out. The last part of the blog covers certain fixes for Linux and Windows and just a conclusion of the whole thing.

The reason I choose this blog is not only because it relates to Java programming but that it also may come up in my future while I’m working in computer science, who knows that if I’m in IT somewhere in the future or some other computer job that has this problem and I’m one of the only people to know how to fix it. That would probably get me a lot of brownie points at my job which is really nice. Also this blog was well written and straight to its point. Gives you three causes for a problem and gives you the solution to each of them which is really helpful to understand. Java is a very vast programming language and remembering everything about it is hard so getting little reminders of how everything works is always nice. They aren’t joking when they say “Java programming language” because it really is like a whole other language and so is the other programming languages, you got to know every little thing about them or you screw up and everything is wrong. That is my little sidetrack on programming languages but back to the blog, I remember hearing about heaps in my intro. to programming class freshman year and I think we did a little thing with them but not much but hey, the more you know can’t hurt when it comes to programming. Thank you for reading this weeks programming talk with me, come back next week for more.

Source: https://www.java2blog.com/could-not-reserve-enough-space-for-object-heap/

From the blog CS@Worcester – Benderson's Blog by bendersonsblog and used with permission of the author. All other rights reserved by the author.

Post #9

From the blog CS@Worcester – by Ryan Marcelonis and used with permission of the author. All other rights reserved by the author.

Observer Design Pattern

We have an assignment coming up where we have to choose a particular design pattern and write a tutorial about it. I chose the Observer Design Pattern because the whole concept, a “Subject” notifying its “Observers” of changes, looked quite useful to me in real-life situations. To learn more about this pattern, I found a great multimedia article entitled Observer Design Pattern Tutorial by Derek Banas.

Derek states that the observer pattern is comprised of a Subject and Observers. Based on his explanations, I feel this a great design to use when we need objects to continuously receive updates when something changes, such as another object. He uses the stock market as an example, where the Subject is the “publisher” sending information of various stocks to the Observers (“subscribers”). The Observers can choose which stocks to view and if any of these are updated by the Subject (“publisher”), the Observers are notified. Using this scenario as an example was helpful to me because it helped validate the “real-life” necessity and importance of this design.

Derek provides a video giving a step-by-step procedure of how to translate his “stock market” example into an “observer pattern” code implementation. I found it very easy to follow and his explanations of the code very informative. Based on his explanations, I will give my interpretation of the related classes created and used within his code:

Subject is an interface that handles registering, unregistering and notifying observers of any changes.  StockGrabber is a concrete class that implements Subject’s given methods, along with ways to set and update a few example stock prices.

Observer is an interface that provides an update method which is called whenever the Subject changes. StockObserver is a concrete class implementing Observer. It allows the ability to assign each observer with a unique ID as they are created. Furthermore, the constructor keeps track of the total number of observers. This allows the Subject to know how many “subscribers” (Observers) it has, and what stocks they are subscribed to. The importance of this is that the Subject (“publisher”) must know which observers it should send updates to when necessary, and what updates it should send.

Finally, there is a main class GetTheStock that puts the above classes to use in such a way that we can see what the Observer pattern code is doing.

I have a few ideas of how I could implement my own version of the Observer pattern. Right now I am thinking of using this design pattern to keep track of the creation and updates of blog entries. For example, perhaps I will have a “BlogPublisherSubject” notify each “SubscriberObserver” whenever a blog entry has been updated.

Based on what I have learned reading Derek’s article and watching his provided video, I feel I have a solid understanding of the Observer pattern, which will surely help me in my upcoming project. I am confident that I will frequently implement this design pattern during my professional career as well.

From the blog CS@Worcester – Jason Knowles by Jason Knowles and used with permission of the author. All other rights reserved by the author.

Thoughts on “Top Ten Factors to Consider When Choosing a Testing Technique”.

In this article, Manoj Verma describes (in his own words) “an exhaustive list of factors to consider” in the choice of testing technique.

But let’s back up a bit.

I chose this article to write about (and this topic) because in our work last week we were tasked with testing a small play problem; and shortly after starting I realized that for all of my practice with different testing methods, I didn’t know where to begin.  So when I went to write my weekly blog post, that’s where I looked.

Verma’s list of factors is as follows:

  1. Risk assessment — how tolerant to failure is the product?
  2. Client requirements — did the client specify a testing technique?
  3. Time/budget constraints — how long do we have to test?  How much money can we spend on testing?
  4. Industry guidelines — does the product need to fit into some kind of regulation? Which ones?
  5. Documentation — does documentation for the product exist?  Does it contain testing history?  Does it contain logical constructions such as decision tables or state graphs?
  6. Objective of test — what are we testing for?  What does the product need to do, or need to never do?
  7. Software development lifecycle — how is the development process managed?
  8. Models used to develop the system — how was the software system built?  Are there logical models that can be adapted into testing techniques or cases?
  9. Tester experience — how experienced is the tester?  How accurate is their assessment likely to be?
  10. Flexibility — does the devlopment process model involve a lot of flexibility?

Verma also concludes that choosing the right technique “is not child’s play”.  It isn’t easy, and he doesn’t offer hard metrics, but his guidelines serve as a way for me to ask myself a series of questions and discover the method that may work the best.

My search for answers, as it turns out, did not give me any that are truly satisfying.  It led me to more questions.  Software testing in general can be seen as the act of asking questions of both the design and implementation.  It seems natural that software testing techniques and methods should also be subject to questioning; in fact, software testers should subject themselves to similar questions.

So what can I take away from this?  How can it help me move past the brand-new-problem paralysis?  That I should start by asking questions of the problem I’ve been presented with, and of myself and my own testing experience.

Article link.

From the blog CS@Worcester – orscsblog by orscsblog and used with permission of the author. All other rights reserved by the author.

Thoughts on “Top Ten Factors to Consider When Choosing a Testing Technique”.

In this article, Manoj Verma describes (in his own words) “an exhaustive list of factors to consider” in the choice of testing technique.

But let’s back up a bit.

I chose this article to write about (and this topic) because in our work last week we were tasked with testing a small play problem; and shortly after starting I realized that for all of my practice with different testing methods, I didn’t know where to begin.  So when I went to write my weekly blog post, that’s where I looked.

Verma’s list of factors is as follows:

  1. Risk assessment — how tolerant to failure is the product?
  2. Client requirements — did the client specify a testing technique?
  3. Time/budget constraints — how long do we have to test?  How much money can we spend on testing?
  4. Industry guidelines — does the product need to fit into some kind of regulation? Which ones?
  5. Documentation — does documentation for the product exist?  Does it contain testing history?  Does it contain logical constructions such as decision tables or state graphs?
  6. Objective of test — what are we testing for?  What does the product need to do, or need to never do?
  7. Software development lifecycle — how is the development process managed?
  8. Models used to develop the system — how was the software system built?  Are there logical models that can be adapted into testing techniques or cases?
  9. Tester experience — how experienced is the tester?  How accurate is their assessment likely to be?
  10. Flexibility — does the devlopment process model involve a lot of flexibility?

Verma also concludes that choosing the right technique “is not child’s play”.  It isn’t easy, and he doesn’t offer hard metrics, but his guidelines serve as a way for me to ask myself a series of questions and discover the method that may work the best.

My search for answers, as it turns out, did not give me any that are truly satisfying.  It led me to more questions.  Software testing in general can be seen as the act of asking questions of both the design and implementation.  It seems natural that software testing techniques and methods should also be subject to questioning; in fact, software testers should subject themselves to similar questions.

So what can I take away from this?  How can it help me move past the brand-new-problem paralysis?  That I should start by asking questions of the problem I’ve been presented with, and of myself and my own testing experience.

Article link.

From the blog CS@Worcester – orscsblog by orscsblog and used with permission of the author. All other rights reserved by the author.

Post #8

From the blog CS@Worcester – by Ryan Marcelonis and used with permission of the author. All other rights reserved by the author.

Decorator

The decorator pattern is used to “decorate” or extend objects with added functionality at run-time. This gives developers the ability to compose objects that are purpose driven for the current demands of their users.

In the blog post How the Decorator Pattern Saved My Day on CodeFX, Nicolai Parlog gives a real life example of how the decorator pattern was useful. He describes a scenario that involves a UI that triggers many different responses depending on the user’s interaction with it. However, different panes may have slightly different responses or needs. He then describes several different ways to implement this:

  • Using one class which activates and deactivates different responses with flags
  • Using inheritance
  • Using the decorator pattern

In the first scenario you would end up with a behemoth of a class that would be hard to write, test, understand, and modify.

The second scenario is a better solution than the first one, however all it did was simulate flexibility, making it seem like you can pick and choose but you couldn’t. When he was trying to replace JEditorPane with FX’ WebView, he realized that WebView automatically triggered some of the responses that were implemented in the second scenario. This caused the whole system of classes to collapse. So he refactored the previous implementation to use the decorator pattern, replacing the original classes with the right combination of decorators. By using decorators instead of inheritance, the classes are easier to understand, it’s easier to test because there are fewer things happening in each unit, and it made the code reader for future changes. Instead of having to figure out where to put new functionality, all you need to do is create a decorator and add it where it’s needed.

The reason I chose this blog is because I have an assignment coming up on this particular design pattern and I didn’t really know what the decorator pattern was and what it was used for in a real world scenario. So I went to search for an example. This blog helped me understand when the pattern should be used and the benefits of using it over other methods like inheritance.  It also reminded me that just because you’re using a pattern doesn’t mean that your code is going to be cleaner or more efficient, but that you have to remember to only use it when necessary, which you can only do if you understand it.

Source: https://blog.codefx.org/design/patterns/decorator-pattern-saved-my-day/

From the blog CS@Worcester – Andy Pham by apham1 and used with permission of the author. All other rights reserved by the author.

Decorator

The decorator pattern is used to “decorate” or extend objects with added functionality at run-time. This gives developers the ability to compose objects that are purpose driven for the current demands of their users.

In the blog post How the Decorator Pattern Saved My Day on CodeFX, Nicolai Parlog gives a real life example of how the decorator pattern was useful. He describes a scenario that involves a UI that triggers many different responses depending on the user’s interaction with it. However, different panes may have slightly different responses or needs. He then describes several different ways to implement this:

  • Using one class which activates and deactivates different responses with flags
  • Using inheritance
  • Using the decorator pattern

In the first scenario you would end up with a behemoth of a class that would be hard to write, test, understand, and modify.

The second scenario is a better solution than the first one, however all it did was simulate flexibility, making it seem like you can pick and choose but you couldn’t. When he was trying to replace JEditorPane with FX’ WebView, he realized that WebView automatically triggered some of the responses that were implemented in the second scenario. This caused the whole system of classes to collapse. So he refactored the previous implementation to use the decorator pattern, replacing the original classes with the right combination of decorators. By using decorators instead of inheritance, the classes are easier to understand, it’s easier to test because there are fewer things happening in each unit, and it made the code reader for future changes. Instead of having to figure out where to put new functionality, all you need to do is create a decorator and add it where it’s needed.

The reason I chose this blog is because I have an assignment coming up on this particular design pattern and I didn’t really know what the decorator pattern was and what it was used for in a real world scenario. So I went to search for an example. This blog helped me understand when the pattern should be used and the benefits of using it over other methods like inheritance.  It also reminded me that just because you’re using a pattern doesn’t mean that your code is going to be cleaner or more efficient, but that you have to remember to only use it when necessary, which you can only do if you understand it.

Source: https://blog.codefx.org/design/patterns/decorator-pattern-saved-my-day/

From the blog CS@Worcester – Andy Pham by apham1 and used with permission of the author. All other rights reserved by the author.