Magnify Studio

Behringer is part of my Studio thus I like to Magnify them

Java is also part of my Studio thus I like to Magnify them

Behringer might use Java, an unknown to me, Magnifying two different similar and useful systems can add value

Listened to some of the techno of this video on loop while working on the following Java Test Case

Test Classes can help refine code

Added two useful methods writing a test, thus I provide freely (MIT License)

package data;

import java.util.Vector;

public class VectorMatrix<T> {
	private Vector<Vector<T>> matrix;
	
	public int getWidth() {
		return matrix.size();
	}
	
	public int getHeight() {
		return matrix.get(0).size();
	}	
	
	public VectorMatrix(int width, int height, T defaultValue) {
		matrix = new Vector<>(width);
		for (int i=0; i<width; i++) {
			matrix.add(i,new Vector<T>(height));
			for (int j=0; j<height; j++) {
				matrix.get(i).add(defaultValue);
			}
		}
	}
	
	public T getElement(int i, int j) {
		return matrix.get(i).get(j);
	}
	
	public void setElement(int i, int j, T element) {
		matrix.get(i).set(j, element);
	}
	
	public boolean areAllRowsEqual() {
		boolean allRowsEqual=true;
		for (int i=0; i<getWidth(); i++) {
			for (int j=0; j<getWidth(); j++) {
				if (!matrix.get(i).equals(matrix.get(j))) {
					allRowsEqual=false;
				}
			}
		}
		return allRowsEqual;
	}
	
	public boolean areSomeRowsDifferent() {
		return !areAllRowsEqual();
	}
}

I created them while working on this test, also Free (MIT License)

package random;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import data.VectorMatrix;
import testing.TestCase;
import testing.TestResult;

public class RandomUtilTest extends TestCase {
	public RandomUtilTest() {
		super(RandomUtilTest.class.getName());
	}
	
	public TestResult testGetRandomList() {
		TestResult testResult = new TestResult("testGetRandomList");
		testResult.startTest();
		
		String choiceSet[] = {
				"Red",
				"Blue",
				"Green",
				"Orange",
				"Purple",			
				"Cyan",
				"Pink"
			};
			
		List<String> listOfStrings = Arrays.asList(choiceSet);
		
		// Purpose of method is to generate a shuffled list of up to n elements chosen from list that is provided
		// To test:
		// 1. Verify the list is of n size
		// 2. Verify the order is not always the same
		
		boolean isCorrectSize=false;
		
		// 1
		int size = 20;
		List<String> randomizedList = RandomUtil.getRandomList(new ArrayList<>(listOfStrings), size);
		
		if (size == randomizedList.size()) {
			isCorrectSize = true;
		} else {
			isCorrectSize = false;
		}
		
		// 2
		// generate 10 lists and verify order doesn't match
		
		VectorMatrix<String> resultsMatrix = new VectorMatrix<String>(10, 20, "");
		for (int i=0; i<10; i++) {
			randomizedList = RandomUtil.getRandomList(new ArrayList<>(listOfStrings), size);
			
			// Copy results elements to a matrix
			for (int j=0; j<20; j++) {
				resultsMatrix.setElement(i, j, randomizedList.get(i));
			}
		}
		
		boolean someRowsDifferent = resultsMatrix.areSomeRowsDifferent();
		
		if (isCorrectSize&&someRowsDifferent) {
			testResult.setTestSuccessful(true);
			logSuccess(testResult.getTestName()+" completed successfully");			
		} else {
			testResult.setTestSuccessful(false);
			if (!isCorrectSize) {
				logFailure("getRandomList is not generating the correct size array based on parameter");
			}
			if (someRowsDifferent) {
				logFailure("out of a 10 by 20 matrix All generated elements are the same for each row meaning the randomization is not occuring");
			}
		}
		
		testResult.stopTest();
		return testResult;
	}
	
	public TestResult testGetRandomElementInListOfStrings() {
		TestResult testResult = new TestResult("testGetRandomElementInListOfStrings");
		testResult.startTest();
		
		String choiceSet[] = {
			"Red",
			"Blue",
			"Green",
			"Orange",
			"Purple",			
			"Cyan",
			"Pink"
		};
		
		List<String> listOfStrings = Arrays.asList(choiceSet);
		
		// Produce 100 result choices and confirm
		//    1. they are all in the list
		//    2. they are not all matching (low probability)
		String result = null;
		String lastResult = null;
		boolean resultIsChanging=false;
		boolean isInList=false;
		
		for (int i=0; i<100; i++) {
			if (null!=result) {
				lastResult = result;
			}
			result = RandomUtil.getRandomElementInListOfStrings(new ArrayList<>(listOfStrings));
			if (result!=lastResult) {
				resultIsChanging = true;
			}
			final String resultToMatch = result;
			if (listOfStrings.stream().anyMatch(element -> element.compareTo(resultToMatch)==0)) { 
				isInList=true;
			} else {
				isInList=false;
				break;
			}
		}
		
		if (resultIsChanging&&isInList) {
			testResult.setTestSuccessful(true);
			logSuccess(testResult.getTestName()+" completed successfully");			
		} else {
			testResult.setTestSuccessful(false);
			if (!resultIsChanging) {
				logFailure("Result is not changing");
			}
			if (isInList) {
				logFailure("Providing elements that are not in the list");
			}
		}
		
		testResult.stopTest();
		
		return testResult;	
	}
	
	public TestResult testGetRandomNumber() {
		TestResult testResult = new TestResult("testGetRandomNumber");
		testResult.startTest();
		
		boolean isChanging=false;
		boolean isInRange=true;
		int result;
		int lastResult=-1;
		
		int lowerBound = 0;
		int upperBound = 10;
		
		for (int i=0; i<100; i++) {			
			result = RandomUtil.getRandomNumber(lowerBound, upperBound);
			if (result<lowerBound && result>=upperBound) {
				isInRange=false;
			}
			
			if (result!=lastResult) {
				isChanging=true;
				lastResult=result;
			}			
		}
		
		if (isChanging&&isInRange) {
			testResult.setTestSuccessful(true);
			logSuccess(testResult.getTestName()+" completed successfully");
		} else {
			testResult.setTestSuccessful(false);
			if (!isChanging) {
				logFailure("Result is not changing");
			}
			if (!isInRange) {
				logFailure("Result is giving values outside of range");
			}			
		}
		
		testResult.stopTest();
		return testResult;
	}
	
	public static void main(String args[]) {
		RandomUtilTest randomUtilTest = new RandomUtilTest();
		TestResult result1 = randomUtilTest.testGetRandomElementInListOfStrings();	
		TestResult result2 = randomUtilTest.testGetRandomNumber();
		TestResult result3 = randomUtilTest.testGetRandomList();
	}
}

I have provided some of the other classes these rely upon on my vlog, writing test cases for randomized data is a useful practice exercise.

Randomization is a useful tool for creating variance and helping amplify support

Following was generated using RandomUtil that relies upon Java’s Random package.

>>> generateSupport()

There is hope in a New Day, Small changes do add up, You can do it!, Possible has yet to be defined, Past activation energy can be clear sailing, Others do not get to claim ground on what you can and cannot do, Possible has yet to be defined, Never Say Die!, The future has yet to be written, The future has yet to be written, Encouragement Throughput has yet to be maximized, The future has yet to be written, Small changes do add up, Possible has yet to be defined, Customer Experience and Quality can be Improved.

Customer Experience and Quality can be Improved, Customer Experience and Quality can be Improved, Possible has yet to be defined, Customer Experience and Quality can be Improved, Past activation energy can be clear sailing, You can do it!, Never Say Die!, Customer Experience and Quality can be Improved, You can do it!, There is hope in a New Day, Customer Experience and Quality can be Improved, Never Say Die!, Possible is Power, Nsdtp! Never Say Die Throughput!, You will Prevail!.

Possible is Power, Initial conditions can mean a lot, Past activation energy can be clear sailing, Others do not get to claim ground on what you can and cannot do, Small changes do add up, Possible has yet to be defined, There is hope in a New Day, Encouragement Throughput has yet to be maximized, Customer Experience and Quality can be Improved, Customer Experience and Quality can be Improved, There is hope in a New Day, Don’t forget an extra bottle of water can change a lot, Don’t forget an extra bottle of water can change a lot, You can do it!, The future has yet to be written.

Small changes do add up, Don’t forget an extra bottle of water can change a lot, Small changes do add up, There is hope in a New Day, Nsdtp! Never Say Die Throughput!, Possible is Power, Never Say Die!, Never Say Die!, Small changes do add up, There is hope in a New Day, You will Prevail!, Possible is Power, Never Say Die!, Possible is Power, The future has yet to be written.

Don’t forget an extra bottle of water can change a lot, Never Say Die!, Never Say Die!, Small changes do add up, You will Prevail!, Encouragement Throughput has yet to be maximized, Small changes do add up, Possible is Power, Small changes do add up, Customer Experience and Quality can be Improved, Possible is Power, Encouragement Throughput has yet to be maximized, Encouragement Throughput has yet to be maximized, Encouragement Throughput has yet to be maximized, Others do not get to claim ground on what you can and cannot do.

Small changes do add up, Past activation energy can be clear sailing, You can do it!, There is hope in a New Day, Others do not get to claim ground on what you can and cannot do, The future has yet to be written, Past activation energy can be clear sailing, Others do not get to claim ground on what you can and cannot do, You can do it!, Small changes do add up, You can do it!, Initial conditions can mean a lot, Never Say Die!, Initial conditions can mean a lot, Past activation energy can be clear sailing.

Never Say Die!, You will Prevail!, Possible has yet to be defined, There is hope in a New Day, Others do not get to claim ground on what you can and cannot do, There is hope in a New Day, Others do not get to claim ground on what you can and cannot do, You will Prevail!, There is hope in a New Day, Never Say Die!, Possible is Power, Nsdtp! Never Say Die Throughput!, You will Prevail!, You will Prevail!, Possible is Power.

Possible has yet to be defined, Initial conditions can mean a lot, You will Prevail!, Small changes do add up, Nsdtp! Never Say Die Throughput!, Past activation energy can be clear sailing, The future has yet to be written, Encouragement Throughput has yet to be maximized, Encouragement Throughput has yet to be maximized, Small changes do add up, Past activation energy can be clear sailing, Customer Experience and Quality can be Improved, Don’t forget an extra bottle of water can change a lot, Possible has yet to be defined, You will Prevail!.

Past activation energy can be clear sailing, The future has yet to be written, Customer Experience and Quality can be Improved, The future has yet to be written, You will Prevail!, There is hope in a New Day, You will Prevail!, Don’t forget an extra bottle of water can change a lot, Past activation energy can be clear sailing, Small changes do add up, Possible is Power, Possible has yet to be defined, Nsdtp! Never Say Die Throughput!, Encouragement Throughput has yet to be maximized, Customer Experience and Quality can be Improved.

Don’t forget an extra bottle of water can change a lot, Never Say Die!, Customer Experience and Quality can be Improved, Past activation energy can be clear sailing, Customer Experience and Quality can be Improved, Others do not get to claim ground on what you can and cannot do, Don’t forget an extra bottle of water can change a lot, You can do it!, The future has yet to be written, Small changes do add up, Possible has yet to be defined, You will Prevail!, You will Prevail!, Possible has yet to be defined, Small changes do add up.

Criminal Defense Law, Improved Medical Tech, Improved Hospitals, Glass of Water, Reduced Miscommunication, Linguistics Training, Improved Learning, Respect, Improved Magnify Studio, Seat Belts, Child Car Safety, Reduced Cognitive Biases Training, Disaster Risk Reduction, Improved Math Support, Improved Architectural Blueprints, Throughput, Time Management, Less Burning Buildings, Improved Learning, Improved Magnify Studio, Clean Water Support, Cancer Research, Focus, Critical Thinking, Cancer Research Rescue Blankets, Improved Chemical Showers for Labs, Focus, Ethics, Habitat for Humanity, Water Bottles, Throughput, Ethics, Focus, Disaster Risk Reduction, Water Bottles, Improved Optics, Respect, Encouragement, Glass of Water, Improved Fire Codes, Problem Solving, Improved Optics, More Peace, Water Bottles, Throughput, Teacher Appreciation, Focus, Improved Medical Tech, Improved Research Ethics More Peacekeeping, Ethics, Reduced Villain Level Contrast Training, Improved Science Support, Teacher Training, Defensive Driving, Water Bottles, Critical Thinking, Improved Medical Tech, Improved Battery Power, Critical Thinking, Water Well Drilling, More Peacemaking, Improved Optics, Teacher Training, Reduced Child Labor, Improved Network Throughput and Reach, Ethics, Seat Belts, Linguistics Training, Cancer Research, Improved Science Support, Child Car Safety, Encouragement, Improved Battery Power Carbon Monoxide Detectors, Criminal Defense Law, Throughput, Teacher Appreciation, Ethics, Reduced Miscommunication, More Peacekeeping, Clean Water Support, Human Rights, Improved Chemical Showers for Labs, Focus, Less Burning Buildings, Improved Telescopes, Seat Belts, Improved Chemical Showers for Labs, Improved Telescopes, Water Bottles, Throughput, Focus, Child Car Safety, Improved Network Throughput and Reach, Improved Math Support, Improved Microscopes, Teacher Training, Human Rights More Peacekeeping, Reduced Child Labor, Reduced Villain Level Contrast Training, Improved Telescopes, More Peace building, Problem Solving, Improved Hospitals, Improved Optics, Geneva Convention, Problem Solving, Improved Science Support, Focus, Improved International Relations, Improved Medical Tech, More Peacemaking, Improved Telescopes, More Peacekeeping, Child Car Safety, Throughput, Improved Chemical Showers for Labs, Seat Belts, Water Desalination Plants, Water Well Drilling, Clean Water Support, Water Well Drilling Improved Hospitals, Improved Magnify Studio, Electrical Safety, Water Bottles, Problem Solving, Improved Battery Power, Electrical Safety, Improved Chemical Showers for Labs, Improved Medical Tech, Water Bottles, Time Management, Improved Medical Research, Diversity Training, Clean Water Support, More Peacemaking, Improved Telescopes, Habitat for Humanity, Improved Network Throughput and Reach, Ethics, Improved Telescopes, Improved Math Support, Ethics, Linguistics Training, Improved Telescopes, Improved Optics Improved Research Ethics, Water Bottles, More Peace, Improved Network Throughput and Reach, Improved Math Support, Reduced Cognitive Biases Training, More Peacemaking, Focus, Improved English Support, Water Bottles, Disaster Risk Reduction, Improved Battery Power, Cancer Research, Geneva Convention, Improved Microscopes, Cancer Research, Improved Microscopes, Linguistics Training, Improved Fire Codes, Improved Learning, Improved Fire Codes, Cancer Research, More Peacemaking, More Peace building, Improved Math Support Improved Chemical Showers for Labs, Habitat for Humanity, Habitat for Humanity, Improved Telescopes, Motorcycle Helmets, Improved Medical Research, Seat Belts, Improved Magnify Studio, Power Efficiency, Improved Hospitals, Time Management, More Peacekeeping, Teacher Appreciation, Criminal Defense Law, Improved Learning, Human Rights, Water Well Drilling, Human Rights, Reduced Cognitive Biases Training, Improved Learning, Respect, More Peacemaking, Teacher Appreciation, More Peacekeeping, Diversity Training Electrical Safety, Ethics, Water Bottles, Improved Math Support, Carbon Monoxide Detectors, Improved Math Support, Improved Medical Tech, Respect, Improved Network Throughput and Reach, Motorcycle Helmets, Seat Belts, Reduced Child Labor, Improved Optics, Critical Thinking, Improved Optics, Seat Belts, Improved Network Throughput and Reach, Time Management, Improved Math Support, Improved Architectural Blueprints, Improved Chemical Showers for Labs, Habitat for Humanity, Improved International Relations, Improved Medical Tech, Validation Improved Science Support, Improved Research Ethics, Ethics, Power Efficiency, Carbon Monoxide Detectors, Defensive Driving, Improved Learning, Geneva Convention, Power Efficiency, Problem Solving, Seat Belts, Clean Water Support, Respect, Child Car Safety, Throughput, Improved Learning, Seat Belts, Clean Water Support, Less Burning Buildings, Water Desalination Plants, Validation, Encouragement, Critical Thinking, Improved Science Support, Respect Clean your room, Do the dishes, Never Say Die!Always be safe in the lab, Go pick up some important documents from work, The prettiest flowers have the most leavesAlways be safe in the lab, Clean your room, Never Say Die!Do the dishes, Eat your vegetables, The prettiest flowers have the most leavesAlways be safe in the lab, Do the dishes, you hug the lovable dictatorClean your room, Clean your room, The prettiest flowers have the most leavesClean your room, Eat your vegetables, The prettiest flowers have the most leavesClean your room, Go pick up some important documents from work, Never Say Die!Clean your room, Always be safe in the lab, you hug the lovable dictatorGo pick up some important documents from work, Always be safe in the lab, Never Say Die!

Stress, Pressure, Apples, Precision and Accuracy, Directional Max Profit, Risk Mitigation Strategies, Speed of Light, Water, The Problem of Evil, Frame of Reference, Lab Safety, Trust, Drilling Water Wells, Hurricane, Psychology, Buy In, Obfuscation as Value Creation, Heat transfer, Macroeconomics, Adequate Support, Morally Wrong, Hope, Orbits, Greed, Fries

Truth as Relative, Hurricane, Weak Hypothesis, Theoretical Problem Solving, Magnetism, Positive Momentum, Heat transfer, Cover, Acronyms, Memory, Imperfect System upsold to Perfect in Very Non Ideal Ways, Motion, Speed of Heat Conductivity, Activation Energy, Limits, Health Care, Carbon, Anxiety, Socialism, Normal, Speed of Light, Watts, Variance, Joules, Lab Safety

Enthalpy, Sea Shells, Impossible, Disaster Risk Reduction, Symbolism, Acceleration, Pineapples, Puns, Active Volcano, Plumbs, Cantelope, Rounding, Frame of Reference, Force, Fast Choice, Fries, Speed of Heat Conductivity, Variance, Subset Profits from Systemic Changes and Additions, Rain, Reasonable, Availability, Teams, Resistance, Carbon Monoxide Detector

Anger Management, Gravity, Green Energy, Imperfect System upsold to Perfect in Very Non Ideal Ways, Rate of Change, Inequality, Positive Momentum, Obfuscated Truth, Scientific Method, Directional Max Profit, Health, Fuses, Camouflage, Story, Equal and Opposite Forces, Radiation, Precision and Accuracy, Adequate Support, Riddles, Measurement, Atom, “Allegory of the Cave” – Plato, Cantelope, Illogical, Inadequate Support

Disrespect, Challenged in Positive Direction, Speed of Light, Kinetic Energy, Fast Choice, Osmosis, Capitalism, Psychology, Motion, Useful Work, Plot, Imagination, Drought, Availability, Drag, Soda, Accessibility, Water, Practical Problem Solving, Normal, Precedent, Health Care, Context Clues, Knowns upsold to Unknowns, Unreasonable

Story, Feedback, Red Herring, Quantum Entanglement, Obfuscated Truth, Neutron, Associations, Charming, Typhoon, Small Contributions Appreciated, Inadequate Support, Communism, Trajectories, Plot, Greed, Riddles, Resistance, Sales, Soda, Justice, Communism, Stress, “To be is to be perceived” – David Hume, “To be is to be perceived” – David Hume, Projections

Appreciation, Variety, Ability to Change Path, Direction, Nitrogen, Pressure, Low Pressure, Normal, Bagels, Reliability, Theoretical Problem Solving, Camouflage, Accessibility, Communism, Rain, Exponential, Real Change, Knowns upsold to Unknowns, Logical Fallacies, Ability to Change Path, Direction, Sociology, Health Care, Cover, Adequate Support, Disrespect, Obfuscation as Value Creation

Compressive Forces, Logical Fallacies, Pestilence, BTUs, Blizzard, Green Energy, Anger Management, Puns, Acronyms, GCFI Outlets, Limits, Thermodynamics, Puzzles, Valence, High Pressure, Trajectories, Feedback, Categorize and Classify, Liquidity, Greed, Fries, Weak Hypothesis, Value, Symbolism, Experience

Accessibility, Pattern Matching, Atom, Adequate Support, Sociology, Proton, Resistance, Logic, Frame of Reference, Liquidity, Proton, “I think therefore I am” – Rene Descarte, Disease, Plot, Camouflage, Lab Safety, Chain Thougts, Hurricane, Multiple Dimensions, Customer Service, Joules, Customer Service, Enthalpy, Metaphors, Point of View

Low Pressure, Subset Profits from Systemic Changes and Additions, Ethics, Speed of Sound, Speed of Heat Conductivity, Distance, Impossible, Morally Right, Resistance, Practical Problem Solving, The Problem of Evil, Story, Tone, Precision and Accuracy, Unreasonable, Potential Energy, Mangos, Green Energy, Linguistics, Green Energy, Scientific Notation, Discouragement, Point of View, Real Change, Excited State

Further

generateStoryOutline()
Random THEME – Love conquers all
Random PLOT – Tragedy
Foreshadowing Imagery Flashback Simile Imagery Onomatopoeia Euphemism Formal Diction Informal Diction Onomatopoeia
Random Villain Gas Leak
Unstable Future Tech Poltergeist Tyrannical King Tornado Dragon Hurricane Famine Warlock Famine Kraken Riot Fire Elemental Demon Swarm Necromancer Big Brother System Lich Witch Giant Kraken

Descriptive Writing Amps

  1. [resonant, delightful, magnificent] marmoset evaded
  2. [towering, diminished, blue] neutron blocked
  3. [harmonious, violet, black] emerald gnashed
  4. [biased, towering, colossal] parrot accelerated
  5. [gargantuan, efficient, smooth] cable relayed
  6. [loud, proper, calm] castle opened
  7. [soft, soft, minuscule] bridge opened
  8. [brilliant, happy, orange] watts encouraged
  9. [glittering, saturated, biased] angel wrote
  10. [resonant, toned, blue] bird evoked

Random Hero – Wizard

And But Therefore Event Sets

  1. [Hero] is attacked by [Monster] but they get there early therefore they travel to a new area
  2. Dramatic Dialogue with subtext but they get there early therefore they travel to a new area
  3. Dramatic Dialogue with subtext but [monster] shows up therefore they decide to learn more
  4. [Hero] is given assistance from [side character] but [Side character] shows up therefore they travel to a new area
  5. [Hero] gets on train but they are delayed therefore they decide to learn more
  6. fight a [monster] but [monster] shows up therefore they decide to learn more
  7. [Hero] gets in supercar but it rains therefore they decide to learn more
  8. Narration highlights allegory that amplifies key details worthy of memory but they are delayed therefore they decide to learn more
  9. Narration highlights allegory that amplifies key details worthy of memory but [monster] challenges [Hero] with hurtful scary words therefore they decide to learn more
  10. Comet cuts across the sky but they get there early therefore they seek assistance with [side character]

Published by techinfodebug

Flex and Java Developer, Christian, Art, Music, Video, and Vlogging

Leave a comment