QA Graphic

Yagni

You Aren't Gonna Need It

Yagni is an abbreviation for "You Aren't Gonna Need It," referring to code that does not add functionality to pass tests or meet requirements.

YAGNI

Four Reasons QA Should Be Aware of Yagni

Makes Code Hard to Read - Developers may leave unused code - perhaps for their testing or design process. When someone else picks up the code it could cause confusion as to what the functionality is doing. This is true for QA as sometimes they need to read the code review to understand how to unique exploratory testing around the functionality.

Removed QA-Only Code - Developers may add code to help QA validate certain functionality. This should get removed from the code, not commented out. This way the code doesn't accidentally get activated.

Adds Risk to the Code - If it's not part of the feature, then there's no reason it should go out in production. Keeping Yagni code in could open a back door to your application.

Applies to QA Test Plan - Check your test case repository. Are there tests that fit into the Yagni principle? Why are they are part of your test plan? Clear it out so that your tests don't look so overwhelming.

Interesting Side-Note

According to Google translate Yagni is Turkish for "That is."

 

Comments

Add Comments

Name:
Comment:

 

About

Weekly Tips and tricks for Quality Assurance engineers and managers. All reviews are unbiased and are based on personal use. No money or services were exchanged for the reviews posted.

Schedule

WednesdaySnagIt for QA
ThursdayPython
FridayMacintosh
SaturdayInternet Tools
SundayOpen Topic
Monday Media Monday
TuesdayQA