Free Starter Java Programming Lesson

First install a Compatible Java Development Kit and Eclipse

https://www.oracle.com/java/technologies/javase/jdk19-archive-downloads.html

https://www.eclipse.org/, Java EE version seems to work best for me these days

First open Eclipse after install, accept the default workspace or choose another location (this is where the example project will be created)

Go to File -> New -> Project

Select Java Project

Type TestProject in the Project Name, then hit Finish button

To the left there will be a TestProject under the Package Explorer view

Double clicking (Windows) on the TestProject folder will open and show the directory where there are two entries.

  • JRE System Library [JavaSE-19]
  • src

Double click on src folder if it is not already expanded. There should be a module-info.java, this is where we define required pieces of Java we need for compiling.

  1. Right click on src and select first option New -> Package
  2. Type in myTestPackage in the Name field.
  3. Click finish

Under the src folder there should now be a new package created (symbolized by a different icon) call myTestPackage

Right click on the package name and choose first option New -> Class

In the Name field type TestMain

Below there is an option under “Which method stubs would you like to create?”

Check the option box that is next to “public static void main(String[] args)”.

Now click Finish

Should have the following code showing

package myTestPackage;

public class TestMain {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}

Java is an Object oriented language. An object1 is like a particular Red Car. Another object2 is like a particular Blue Car. Both objects can be of the same Class Car. Thus if the class Car has a color property. object1.color!=object2.color

One of the built in objects in Java is System.out, it is a PrintStream that is attached to the system out output. Basically an object that is of type Class PrintStream, and unlike a car that might have a move function and is painted a different color, PrintStream has a println function that allows developers to print messages to output.

object1.move(50); // might be how you move a red car 50 miles

object2.move(50); // might be how you move a blue car 50 miles

System.out.println(“Never Say Die!”); // is how you get the built in Java PrintStream object to output to the console or command prompt (if you are running it outside of eclipse).

We can add this line to our code to print to the console, we also remove the comment that was added TODO, “//” allows those two characters and everything after them on the same line to be viewed as a comment. Developers used // TODO [design thoughts] to remind them to fill out functionality. Many times it is useful to generate methods and classes but the developer does not always have time to finish them in the same sitting. Thus the developer can search the codebase later to update the code with functionality.

package myTestPackage;

public class TestMain {

	public static void main(String[] args) {
		System.out.println("Never Say Die!");
	}

}

Code should now look like this, a small asterisk will be beside the TestMain file name at the top indicating the file has changed and has not been saved. Hit Ctrl+S to save the file. Getting familiar with hot keys can vastly speed up development time.

Right click on TestMain.java in PackageExplorer on the left part of the screen. About 3/4s the way down there is an option Debug as. Select that and select Java Application.

That should print in the console (lower part of the screen) the following

Never Say Die!

If you Right click on the Console Window there is an option to clear, which will reset the window. This is useful for running again. Clear the console and then look for the green bug shaped icon on the second to top bar there is a little down arrow next to it and if you hover your mouse over the down arrow it will show the text “Debug TestMain”.

Clicking on the down arrow next to the Debug Icon will give a list, likely at the top with be “TestMain”, click that

Again that should print

Never Say Die!

Computers can be a lot like printing presses. Why are printing presses useful? They can reproduce the same message many more times than once.

Computers given a set of instructions can repeat that set of instructions. Programming in Java and other languages utilizes this feature of computers via a system called loops.

Loops are kind of like a Ferris wheel, you go up to the top add some numbers at the tops then go back to the bottom and then do it all over again. Computers can go through loops many times very swiftly.

A simple loop in Java relies on a primitive type integer that is defined by the keyword int. Keywords are important words to the compiler that helps it know what it is looking at. Another keyword is double. Double allows storing numbers with decimal places and integers do not. Integers are whole numbers.

We define primitive variables by first giving the keyword with their type and then following it by a specific variable name we get to choose then followed by optional assignment and a semi colon to instruct and running of the current line.

double ratio=0.5; // this is a valid assignment of a double to 1/2 or 0.5

int wholeNumber=3; // this is a valid assignment of an integer to 3

Now these variables can be changed much like x or y in Algebra.

The “+=” operator as a value to the current value

ratio+=0.25; // This will make the ratio 0.75

wholeNumber+=4; // This will make wholeNumber to 7

If we are talking about whole pies like American Apple Pies that are baked. We can use an integer. If we want to share 0.25 of our Apple Pie then we can use a double to represent the 0.75 Apple Pie left over.

There is a concept in Java and other languages call a For loop. For loops specify a range from numbers say 0 to 10 or 0 to 1000 and specify how swiftly to move over that range. A short hand way of saying +=1 is ++. Thus if make a variable

int wholeNumber=3;

wholeNumber++; // Will set the value to 4

With for loops many times the increment value is 1 and the range is many times 0 to 1 less than the size. So if I was writing a loop to run ten times I would right the following

for (int i=0; i<10; i++) {
      System.out.println("Never Say Die! iteration "+i);
}

Adding this after our original println statement we get

package myTestPackage;

public class TestMain {

	public static void main(String[] args) {
		System.out.println("Never Say Die!");
		for (int i=0; i<10; i++) {
		      System.out.println("Never Say Die! iteration "+i);
		}
	}

}

If we then click the little arrow next to the Debug Icon, and click on TestMain again it should give the following in the console:

Never Say Die!
Never Say Die! iteration 0
Never Say Die! iteration 1
Never Say Die! iteration 2
Never Say Die! iteration 3
Never Say Die! iteration 4
Never Say Die! iteration 5
Never Say Die! iteration 6
Never Say Die! iteration 7
Never Say Die! iteration 8
Never Say Die! iteration 9

One can note the initial iteration of the loop shows as 0 and the last iteration shows as 9. Many times this is useful in accessing Java Arrays and Arrays in other languages as many times an array that is 10 elements is accessed by

int [] array = new int[10];

array[0]++; // Increments element

array[9]++; // Increments the last element

As we are not using an array we might want to display the value in a more user friendly manner. User Experience matters and many times it is upsold to less non ideally.

Thus since we know the user might like the list with numbers 1 through 10 more we can change our code to show 1 through 10 instead.

package myTestPackage;

public class TestMain {

	public static void main(String[] args) {
		System.out.println("Never Say Die!");
		int displayValue;
		for (int i=0; i<10; i++) {
			  displayValue=i+1;
		      System.out.println(displayValue+" Never Say Die!");
		}
	}

}

Rerunning using the small arrow next to Debug Icon and clicking TestMain we get the following output to console

Never Say Die!
1 Never Say Die!
2 Never Say Die!
3 Never Say Die!
4 Never Say Die!
5 Never Say Die!
6 Never Say Die!
7 Never Say Die!
8 Never Say Die!
9 Never Say Die!
10 Never Say Die!

There are many great Java Lessons on the Web that go into a More In-depth review of how to start programming. I hope this tutorial has been helpful.

TwoColorImage Java Class

I updated the Free Starter Class I have been working on to draw circles, Free Starter Java class MIT License

package graphics;

import data.BooleanMatrix;

public class TwoColorImage {
	BooleanMatrix pixels;
	
	public int getWidth() {
		return pixels.getWidth();
	}
	
	public int getHeight() {
		return pixels.getHeight();
	}

	public TwoColorImage(int width, int height) {
		pixels = new BooleanMatrix(width, height, false);
	}
	
	public TwoColorImage(BooleanMatrix pixels) {
		this.pixels = pixels;
	}
	
	public BooleanMatrix getPixels() {
		return pixels;
	}
	
	public void turnPixelOn(int x, int y) {
		if (x<pixels.getWidth() && y<pixels.getHeight()) {
			pixels.setElement(x, y, true);
		}
	}
	
	public void turnPixelOff(int x, int y) {
		if (x<pixels.getWidth() && y<pixels.getHeight()) {
			pixels.setElement(x, y, false);
		}
	}
	
	public void drawLine(int x1, int y1, int x2, int y2) {
		int yDifference = y2-y1;
		int xDifference = x2-x1;
		
		if (xDifference<0) {
			// Switch points, draw left to right
			int x1Temp=x1;
			int x2Temp=x2;
			int y1Temp=y1;
			int y2Temp=y2;
			
			x1=x2Temp;
			y1=y2Temp;
			x2=x1Temp;
			y2=y1Temp;
			
			xDifference = x2-x1;
		}
		
		if (x2>getWidth()-1) {
			x2=getWidth()-1;
		}
		
		if (y2>getHeight()-1) {
			y2=getHeight()-1;
		}
		
		double riseOverRun = (double) yDifference/xDifference;
		double b = y1-(riseOverRun*x1);
		
		turnPixelOn(x1, y1); // Draw start point
		
		if (y1==y2) {
			for (int x=x1+1; x<x2-1; x++) {
				turnPixelOn(x, y1);
			}
		} else if (x1==x2) {
			for (int y=y1+1; y<y2-1; y++) {
				turnPixelOn(x1, y);
			}
	    } else if (y1<y2){		
			double computedY;
			double integerY;
			double usedXs=x1;
			double usedYs=y1;
			for (int x=x1; x<x2; x++) {
				computedY = (riseOverRun*x)+b;
				integerY = (int) computedY;
				
				if (x>usedXs) {
					turnPixelOn((int)x, (int)integerY);
					usedXs=x;
				}					
			}
		} else if (y2<y1) {
			double computedY;
			double integerY;
			double usedXs=x1;
			double usedYs=y1;
			for (double x=x1; x<x2; x+=1) {
				computedY = (riseOverRun*x)+b;
				computedY = Math.abs(computedY);
				integerY = (int) computedY;
				integerY = Math.abs(integerY);
				
				if (x>usedXs) {
					turnPixelOn((int) x, (int) integerY);
					usedXs=x;
				}					
			}			
		}
		
		turnPixelOn(x2, y2); // Draw end point		
	}
	
	public void drawCircle(double x, double y, double radius) {
		double xPosition;
		double yPosition;
		double modLevel;
		
		if (radius<200) {
			modLevel=0.01;
		} else if (radius<600) {
			modLevel=0.005;
		} else {
			modLevel=0.001;
		}
		
		for (double radians=0; radians<6.28; radians+=modLevel) {
			xPosition=y+(radius*Math.cos(radians));
			yPosition=y+(radius*Math.sin(radians));
			turnPixelOn((int) xPosition, (int) yPosition);
		}
	}
	
	public void drawRectangeCoordinates(int x1, int y1, int x2, int y2) {
		for (int x=x1; x<=x2; x++) {
			for (int y=y1; y<=y2; y++) {
				if (x==x1 || x==x2 || y==y1 || y==y2) {
					turnPixelOn(x, y);
				}
			}
		}
	}
	
	public void drawRectangeFilledCoordinates(int x1, int y1, int x2, int y2) {
		for (int x=x1; x<=x2; x++) {
			for (int y=y1; y<=y2; y++) {
				turnPixelOn(x, y);
			}
		}
	}
}

I remembered from past lessons and training x = radius cos radiansAngle and y = radius sin radiansAngle

Also remembered from memory pi=3.14 that I multiplied in advance to equal 6.28 (2 pi for a full circle on the graph)

Rounding can increase Throughput

Understanding that rounding can lead to bugs can reduce errors, errors that lead to less Throughput

I would provide a Free Starter Lesson on Java if my YouTube account was re-enabled.

WordPress supports Java Developers therefor I will invest here.

Java TextFlow

TextFlow does not seem to respect style choices, specifically with a black background.

https://docs.oracle.com/javase/8/javafx/api/javafx/scene/text/TextFlow.html

10,000 Text Objects freezes up rendering

10,000 Lines of Logging is not unreasonable

Fit for a purpose matters, able to store and display logging and logs in useful encouraging way factors into ability to debug

JavaFX needs better tools, controls, and components by default. Seems to be a tool that kind of enables you part of the way then leaves you high and dry so to speak

Lots of work arounds, can use a TextFlow for selectable so try Labels, labels not selectable, so use a TextArea, now TextArea doesn’t respect background CSS. The combination is feeling of not really ready for prime time.

Where people spend their time matters, and system gives feeling of encourages time wasted

Fixing the same problems in 2023 as 2010? Gives feeling of bad deal.

TwoColorImage Java Class

I am working on a 2D TwoColorImage class, might be useful to someone out there thus I provide the following classes freely, MIT License

package graphics;

import data.BooleanMatrix;

public class TwoColorImage {
	BooleanMatrix pixels;
	
	public int getWidth() {
		return pixels.getWidth();
	}
	
	public int getHeight() {
		return pixels.getHeight();
	}

	public TwoColorImage(int width, int height) {
		pixels = new BooleanMatrix(width, height, false);
	}
	
	public TwoColorImage(BooleanMatrix pixels) {
		this.pixels = pixels;
	}
	
	public BooleanMatrix getPixels() {
		return pixels;
	}
	
	public void turnPixelOn(int x, int y) {
		pixels.setElement(x, y, true);
	}
	
	public void turnPixelOff(int x, int y) {
		pixels.setElement(x, y, false);
	}
	
	public void drawLine(int x1, int y1, int x2, int y2) {
		int yDifference = y2-y1;
		int xDifference = x2-x1;
		
		if (xDifference<0) {
			// Switch points, draw left to right
			int x1Temp=x1;
			int x2Temp=x2;
			int y1Temp=y1;
			int y2Temp=y2;
			
			x1=x2Temp;
			y1=y2Temp;
			x2=x1Temp;
			y2=y1Temp;
			
			xDifference = x2-x1;
		}
		
		double riseOverRun = (double) yDifference/xDifference;
		double b = y1-(riseOverRun*x1);
		
		turnPixelOn(x1, y1); // Draw start point
		
		if (y1==y2) {
			for (int x=x1+1; x<x2-1; x++) {
				turnPixelOn(x, y1);
			}
		} else if (x1==x2) {
			for (int y=y1+1; y<y2-1; y++) {
				turnPixelOn(x1, y);
			}
	    } else if (y1<y2){		
			double computedY;
			int integerY;
			int usedXs=x1;
			int usedYs=y1;
			for (int x=x1; x<x2; x++) {
				computedY = (riseOverRun*x)+b;
				integerY = (int) computedY;
				
				if (computedY>usedYs && x>usedXs) {
					turnPixelOn(x, integerY);
					usedXs=x;
					usedYs=integerY;
				}					
			}
		} else if (y2<y1) {
			double computedY;
			int integerY;
			int usedXs=x1;
			int usedYs=y1;
			for (int x=x1; x<x2; x++) {
				computedY = (riseOverRun*x)+b;
				computedY = Math.abs(computedY);
				integerY = (int) computedY;
				integerY = Math.abs(integerY);
				
				if (computedY<usedYs && x>usedXs) {
					turnPixelOn(x, integerY);
					usedXs=x;
					usedYs=integerY;
				}					
			}			
		}
		
		turnPixelOn(x2, y2); // Draw end point		
	}
	
	public void drawRectangeCoordinates(int x1, int y1, int x2, int y2) {
		for (int x=x1; x<=x2; x++) {
			for (int y=y1; y<=y2; y++) {
				if (x==x1 || x==x2 || y==y1 || y==y2) {
					turnPixelOn(x, y);
				}
			}
		}
	}
	
	public void drawRectangeFilledCoordinates(int x1, int y1, int x2, int y2) {
		for (int x=x1; x<=x2; x++) {
			for (int y=y1; y<=y2; y++) {
				turnPixelOn(x, y);
			}
		}
	}
}

I switched it to an object for BooleanMatrix to test the Vector API

package data;

public class BooleanMatrix {
    boolean matrix[][];
	
	public int getWidth() {
		return matrix.length;
	}
	
	public int getHeight() {
		return matrix[0].length;
	}	
	
	public BooleanMatrix(int width, int height, boolean defaultValue) {
		matrix = new boolean[width][height];
	}
	
	public boolean getElement(int i, int j) {
		return matrix[i][j];
	}
	
	public void setElement(int i, int j, boolean element) {
		matrix[i][j]=element;
	}
}

Did not seem to see performance increases via vector API over boolean primitive matrices

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);
	}
}

Might be a trick to it and with extra performance data and options for testing likely can tailor hardware for performance gains in Java too

TwoColorImages have the potential to be very cheap from a Throughput standpoint, thoughts of Nintendo’s Virtual Boy

1 bit vs 32 bit or 64 bit colors per pixel? Potential for very fast throughput

March 20th, 2023

>>> test
Unsupported command… try supportedCommands()

>>> supportedCommands()
generateSupport()
generateStoryOutline()
Audio.playC()
Audio.playD()
Audio.playE()
Audio.playFarandolePhrase1()
Audio.playFarandolePhrase2()
supportedCommands()

>>> Audio.playC()
Playing Middle C Frequency
>>> generateSupport
Unsupported command… try supportedCommands()

>> generateSupport()

Free Starter Support Creative Inspiration

Possible is Power, 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, Nsdtp! Never Say Die Throughput!, You can do it!, Nsdtp! Never Say Die Throughput!, Possible is Power, You can do it!, Never Say Die!, Possible has yet to be defined, Nsdtp! Never Say Die Throughput!, You can do it!, You can do it!, Possible has yet to be defined, The future has yet to be written.

Initial conditions can mean a lot, Customer Experience and Quality can be Improved, Initial conditions can mean a lot, Past activation energy can be clear sailing, Don’t forget an extra bottle of water can change a lot, Possible is Power, Others do not get to claim ground on what you can and cannot do, You can do it!, Possible has yet to be defined, Possible has yet to be defined, You will Prevail!, Don’t forget an extra bottle of water can change a lot, Don’t forget an extra bottle of water can change a lot, Never Say Die!, Nsdtp! Never Say Die Throughput!.

Past activation energy can be clear sailing, Possible has yet to be defined, You will Prevail!, There is hope in a New Day, Don’t forget an extra bottle of water can change a lot, Possible is Power, Possible has yet to be defined, You can do it!, Possible has yet to be defined, Past activation energy can be clear sailing, You can do it!, Past activation energy can be clear sailing, Others do not get to claim ground on what you can and cannot do, Nsdtp! Never Say Die Throughput!, You will Prevail!.

Initial conditions can mean a lot, There is hope in a New Day, The future has yet to be written, Don’t forget an extra bottle of water can change a lot, Customer Experience and Quality can be Improved, Don’t forget an extra bottle of water can change a lot, Nsdtp! Never Say Die Throughput!, Nsdtp! Never Say Die Throughput!, Possible has yet to be defined, There is hope in a New Day, Customer Experience and Quality can be Improved, Don’t forget an extra bottle of water can change a lot, You will Prevail!, 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!, Possible has yet to be defined, Never Say Die!, There is hope in a New Day, There is hope in a New Day, Initial conditions can mean a lot, Encouragement Throughput has yet to be maximized, Small changes do add up, There is hope in a New Day, You will Prevail!, Others do not get to claim ground on what you can and cannot do, You will Prevail!, You will Prevail!, Others do not get to claim ground on what you can and cannot do.

The future has yet to be written, Never Say Die!, Encouragement Throughput has yet to be maximized, The future has yet to be written, You can do it!, Small changes do add up, Nsdtp! Never Say Die Throughput!, Initial conditions can mean a lot, Encouragement Throughput has yet to be maximized, Small changes do add up, The future has yet to be written, The future has yet to be written, Possible has yet to be defined, Initial conditions can mean a lot, You will Prevail!.

You can do it!, There is hope in a New Day, Small changes do add up, Small changes do add up, The future has yet to be written, Possible has yet to be defined, Customer Experience and Quality can be Improved, Others do not get to claim ground on what you can and cannot do, Possible has yet to be defined, You can do it!, You will Prevail!, You will Prevail!, Possible has yet to be defined, There is hope in a New Day, There is hope in a New Day.

Nsdtp! Never Say Die Throughput!, You can do it!, You will Prevail!, Past activation energy can be clear sailing, Possible is Power, Initial conditions can mean a lot, Possible has yet to be defined, Small changes do add up, Past activation energy can be clear sailing, Small changes do add up, Past activation energy can be clear sailing, Customer Experience and Quality can be Improved, Small changes do add up, There is hope in a New Day, Encouragement Throughput has yet to be maximized.

Possible has yet to be defined, Don’t forget an extra bottle of water can change a lot, You can do it!, Nsdtp! Never Say Die Throughput!, Possible has yet to be defined, Never Say Die!, Encouragement Throughput has yet to be maximized, Possible has yet to be defined, Possible is Power, Past activation energy can be clear sailing, Never Say Die!, Never Say Die!, Possible has yet to be defined, Nsdtp! Never Say Die Throughput!, Small changes do add up.

Encouragement Throughput has yet to be maximized, Small changes do add up, Encouragement Throughput has yet to be maximized, You will Prevail!, Never Say Die!, Customer Experience and Quality can be Improved, Nsdtp! Never Say Die Throughput!, 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, Initial conditions can mean a lot, There is hope in a New Day, Possible is Power, Others do not get to claim ground on what you can and cannot do, Encouragement Throughput has yet to be maximized, Possible has yet to be defined.

Improved Medical Tech, Reduced Villain Level Contrast Training, Improved Optics, Improved Microscopes, Problem Solving, Glass of Water, Improved English Support, Electrical Safety, Cancer Research, Improved Hospitals, Improved Math Support, Improved Hospitals, Geneva Convention, Improved Fire Codes, Criminal Defense Law, Habitat for Humanity, Habitat for Humanity, Carbon Monoxide Detectors, Disaster Risk Reduction, Defensive Driving, Improved Medical Research, Problem Solving, Improved Learning, Respect, Improved Fire Codes

Improved Math Support, Improved Battery Power, Water Desalination Plants, Improved Fire Codes, Improved Architectural Blueprints, Improved Fire Codes, Reduced Cognitive Biases Training, Improved Learning, Diversity Training, Electrical Safety, Geneva Convention, Focus, Electrical Safety, More Peace building, Diversity Training, Improved Hospitals, Disaster Risk Reduction, Improved Telescopes, Problem Solving, Water Bottles, More Peace building, Teacher Training, Child Car Safety, Improved Fire Codes, Improved Chemical Showers for Labs

More Peacemaking, Improved Network Throughput and Reach, Improved Optics, Human Rights, More Peacekeeping, Reduced Oppression, Improved Architectural Blueprints, Diversity Training, Teacher Appreciation, Reduced Oppression, Encouragement, Less Burning Buildings, Problem Solving, Electrical Safety, Time Management, Improved Chemical Showers for Labs, Improved Chemical Showers for Labs, Time Management, Cancer Research, Improved Math Support, Ethics, Cancer Research, Human Rights, Diversity Training, More Peacemaking

More Peace building, Electrical Safety, Validation, Improved Chemical Showers for Labs, Teacher Training, Validation, Improved Science Support, Improved Medical Tech, Teacher Appreciation, Improved Medical Tech, Focus, Water Desalination Plants, Criminal Defense Law, Improved Learning, Geneva Convention, Diversity Training, Improved English Support, Teacher Appreciation, Linguistics Training, Reduced Miscommunication, Improved Battery Power, Water Well Drilling, Reduced Villain Level Contrast Training, Improved Architectural Blueprints, Improved English Support

Teacher Training, Rescue Blankets, Improved Science Support, Linguistics Training, Carbon Monoxide Detectors, Linguistics Training, Defensive Driving, Habitat for Humanity, Improved Science Support, More Peacekeeping, Glass of Water, Improved Research Ethics, Water Well Drilling, Seat Belts, Improved International Relations, Improved Medical Research, Habitat for Humanity, Critical Thinking, Improved Battery Power, Habitat for Humanity, Improved Medical Research, Improved English Support, Improved Optics, Improved Fire Codes, Improved Architectural Blueprints

More Peace building, Motorcycle Helmets, Child Car Safety, Improved Science Support, More Peacekeeping, Human Rights, Water Well Drilling, Glass of Water, Improved Learning, Problem Solving, Criminal Defense Law, Focus, Habitat for Humanity, Improved Learning, Reduced Child Labor, Improved English Support, Improved Battery Power, Rescue Blankets, Improved Magnify Studio, Reduced Child Labor, Improved Medical Tech, Seat Belts, Improved Research Ethics, Habitat for Humanity, Improved Battery Power

Respect, Improved Optics, Water Bottles, Critical Thinking, Improved Hospitals, Improved Optics, Improved Optics, Water Desalination Plants, Water Bottles, More Peace building, Water Bottles, Improved Science Support, Improved Telescopes, Electrical Safety, Rescue Blankets, Child Car Safety, Time Management, Reduced Cognitive Biases Training, Throughput, Improved Science Support, Reduced Miscommunication, Improved Science Support, Defensive Driving, Reduced Villain Level Contrast Training, Disaster Risk Reduction

Clean Water Support, Water Bottles, Water Well Drilling, Improved Microscopes, Improved Math Support, Improved Medical Research, Improved Medical Research, Teacher Appreciation, Improved Medical Tech, Diversity Training, Improved Magnify Studio, Improved Microscopes, Improved Microscopes, Disaster Risk Reduction, Improved Telescopes, Improved Telescopes, Improved Learning, Reduced Oppression, More Peace, Improved Hospitals, More Peacemaking, More Peacekeeping, Power Efficiency, Criminal Defense Law, Improved Hospitals

Water Well Drilling, Improved Architectural Blueprints, Validation, Improved Fire Codes, Water Well Drilling, Water Well Drilling, Improved Medical Tech, Validation, Improved Fire Codes, Improved Battery Power, Improved Microscopes, Glass of Water, Reduced Miscommunication, Seat Belts, Child Car Safety, Seat Belts, Improved Fire Codes, Human Rights, Geneva Convention, Carbon Monoxide Detectors, Child Car Safety, Reduced Villain Level Contrast Training, Linguistics Training, Diversity Training, Improved Research Ethics

Teacher Training, Reduced Child Labor, Focus, Improved Optics, Linguistics Training, Child Car Safety, Reduced Oppression, Improved Learning, Throughput, Teacher Appreciation, Improved Fire Codes, Criminal Defense Law, Carbon Monoxide Detectors, Linguistics Training, Improved Research Ethics, Improved Research Ethics, Seat Belts, Validation, Teacher Training, More Peacemaking, Improved Science Support, Ethics, Disaster Risk Reduction, Improved Architectural Blueprints, More Peace building

Do the dishes, Eat your vegetables, Hug a kittenGo pick up some important documents from work, Clean your room, Hug a kittenAlways be safe in the lab, Clean your room, you hug the lovable dictatorEat your vegetables, Go pick up some important documents from work, Never Say Die!Go pick up some important documents from work, Go pick up some important documents from work, Hug a kittenDo the dishes, Clean your room, Hug a kittenGo pick up some important documents from work, Eat your vegetables, you hug the lovable dictatorEat your vegetables, Eat your vegetables, The prettiest flowers have the most leavesEat your vegetables, Clean your room, The prettiest flowers have the most leavesGo pick up some important documents from work, Go pick up some important documents from work, you hug the lovable dictator

Coffee, Dental Care, Possible, Precedent, Tone, Value Creation, Shortest Path, Validation, Feedback, Dental Care, Snow, Impossible, Availability, Slippery Slope, Normal, Entropy, Impedance, Ethics, Normal, Oranges, Competition, Oxygen, Camouflage, Defense Law, Mood

Fuel, Research Ethics, Variety, Conductivity, Geothermal Power, Illogical, Acronyms, Unreasonable, Practical Problem Solving, Entropy, Red Herring, Linear, Historic Context, Questions, Plot, Irreversible Process, Magnetism, Insulation, Speed of Electricity (Not the speed of light), Strong Hypothesis, Hail, Radiation, Linguistics, Valence, Resistance

Compression, Directional Max Profit, Drag, Trajectories, Drought, Macroeconomics, Snow, Experience, Mangos, Stress, Historic Context, Respect, Wind Power, Theme, Flood Zone, Directed Power, Insulation, Open Loop Systems, Stress, Ability to Change Path, Direction, Drilling Water Wells, Weak Hypothesis, Charming, Carbon Monoxide, Microeconomics

Obfuscated Truth, Osmosis, Associations, Pineapples, Puzzles, Law, Coffee, Small Contributions Appreciated, Velocity, Surface Area, Morally Wrong, Accessibility, Logical Fallacies, Entropy, Peaches, Value, Drilling Water Wells, Miscommunication, Superposition, Questions, Categorize and Classify, Trajectories, Bugs, Hypotheticals, Reliability

Hope, Symbolism, Pestilence, Contamination, Tube Amps, Surface Area, Carbon Monoxide, Obfuscation as Value Creation, Weakest Link, Measurement, Distrust, Positive Momentum, Directed Power, Gravity, Nitrogen, The Problem of Evil, Weakest Link, Stress, “To be is to be perceived” – David Hume, Gross Domestic Product, Don’t push against a brick wall, Snow, Compare and Contrast, Low Pressure, Red Herring

Ethics, Water, GCFI Outlets, Practical, Charming, Plumbs, Cheesecake, Respect, Small Contributions Appreciated, Availability, Law, Active Volcano, Energy, Snow, Impedance, Relevance, Pressure, Entropy, Variety, Interesting, Osmosis, Gravity, Slippery Slope, Sea Shells, Symbolism

Potential Energy, Ethics, Greed, Momentum, GCFI Outlets, The Problem of Evil, Puns, Water, Slippery Slope, Reliability, Practical Problem Solving, Compressive Forces, Electron, Useful Twists, Quantum Entanglement, Reliability, Magnetism, Fuel, GCFI Outlets, Precision and Accuracy, Carbon Monoxide Detector, Cocunut, Electron, Distrust, Camouflage

Reasonable, Obfuscation as Value Creation, Cocunut, Plot, Morally Right, Watts, Limits, Health Care, Buy In, Blizzard, Positive Momentum, Atmosphere, Velocity, Respect, Directional Max Profit, Theoretical Problem Solving, Cake, Inadequate Support, Scientific Method, Value, Trust, Macroeconomics, Acronyms, Corporate Image, Atom

Tube Amps, Imperfect System upsold to Perfect in Very Non Ideal Ways, Water, Mosquitos, Atmosphere, Conductivity, Interesting, Forms – Aristotle, Relevance, Resistance, Respect, Flood, Tornado, Sea Shells, Risk Mitigation Strategies, Time, Frame of Reference, Sea Shells, Surface Area, Scale, Solar Power, Magnetism, Resources, Truth as Relative, Flood

Compare and Contrast, Acceleration, Obfuscation as Value Creation, Statistical Anomaly, Inadequate Support, Fuses, Metaphors, Linguistics, Bagels, Strong Hypothesis, Apples, Puzzles, Disaster Risk Reduction, Low Pressure, Variance, Anger Management, Miscommunication, Hurricane, Schrodinger’s Cat, Shortest Path, Speed of Light, Gravity, Contamination, Challenged in Positive Direction, High Pressure

 


Free Starter Story Outline

generateStoryOutline()
Random THEME – Oppression is wrong
Random PLOT – Quest
Tone Simile Imagery Colloquialism Colloquialism Juxtaposition Flashback Metaphor Formal Diction Juxtaposition
Random Villain Tornado
Giant Spider Artificial Intelligence Corrupt Politician Necromancer Famine Dragon Fire Elemental Big Brother System Poltergeist Bandit Earthquake Kraken Tornado Vampire Plague Gang Demon Kraken Mislead Revolutionary Artificial Intelligence

Descriptive Writing Amps

[gargantuan, colossal, vibrant] puzzle shouted
[fluffy, shaded, red] water dodged
[placid, purple, sweet] beach evoked
[sweet, efficient, efficient] spectrum infused
[happy, brilliant, biased] spectrum halted
[purple, rough, orange] aluminum encouraged
[blue, sweet, joyful] neon evoked
[pink, microscopic, delicate] mountain painted
[diminished, critical, critical] forest dodged
[delicate, harmonious, green] water communicated

Random Hero – Wizard
And But Therefore Event Sets
[Hero] gets in supercar but [monster] shows up therefore they fight the [monster]
fight a [monster] but [monster] shows up therefore they fight the [monster]
[Hero] gets in spaceship but it rains therefore they fight the [monster]
fight a [monster] but [monster] shows up therefore they seek assistance with [side character]
[Hero] gets in spaceship but it rains therefore they decide to learn more
Dramatic Dialogue with subtext but they are delayed therefore they seek assistance with [side character]
[Hero] gets in spaceship but [Side character] shows up therefore they travel to a new area
Comet cuts across the sky but it rains therefore they decide to learn more
[Hero] is attacked by [Monster] but they get there early therefore they travel to a new area
[Hero] is Inspired and Encouraged by [side character] but [monster] challenges [Hero] with hurtful scary words therefore they decide to learn more

Bug in Eclipse 2023-03 (4.27.0)

Eclipse IDE for Enterprise Java and Web Developers (includes Incubating components)
Version: 2023-03 (4.27.0)
Build id: 20230309-1520
OS: Windows 11, v.10.0, x86_64 / win32
Java vendor: Oracle Corporation
Java runtime version: 19.0.1+10-21
Java version: 19.0.1

I am changing the Source directory from src to src/main/java and when I do that I can still compile but java autocomplete on imports stops working.

Greater Throughput can lead to Faster Processing Cycles, More Processing Cycles for Cancer Research

https://www.eclipse.org/setups/donate/

Redirecting Java System Out to JavaFX

Having an issue where Logger doesn’t use system out for output stream

Free Starter Code, MIT License

package testing;

import java.util.logging.Logger;

import color.AsciiColorUtil;

public class TestLogger {
	private Logger logger;
	
	public TestLogger(final Logger logger) {
		this.logger=logger;
	}
	
	public void logSuccess() {		
		System.out.println(AsciiColorUtil.GREEN+"Test completed successfully"+AsciiColorUtil.DEFAULT);
	}
	
	public void logSuccess(String message) {
		System.out.println(AsciiColorUtil.GREEN+message+AsciiColorUtil.DEFAULT);
	}
	
	public void info(String message) {
		System.out.println(message);
	}
	
	public void severe(String message) {
		System.err.println(message);
	}
	
	public void logFailure(String message) {
		System.err.println(AsciiColorUtil.RED+message+AsciiColorUtil.DEFAULT);
	}
}

The solution doesn’t feel right, but the right solution wastes time.

package application.controller;

import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.util.HashMap;

import graphicsView.components.ViewComponentUtil;
import javafx.application.Application;
import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.TextArea;
import javafx.stage.Stage;
import math.AdditionUtilTest;
import multithreading.ThreadUtil;

public class AppController {
	Application application;
	Scene scene;
	Stage primaryStage;
	int width;
	int height;
	
	Parent root;
	HashMap<String, Node> idMap;
	
	public Parent getRoot() {
		return root;
	}

	public void setRoot(Parent root) {
		this.root = root;
		idMap=ViewComponentUtil.getIdNodeMap(root);
	}	
	
	public int getWidth() {
		return width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public int getHeight() {
		return height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public Application getApplication() {
		return application;
	}

	public void setApplication(Application application) {
		this.application = application;
	}

	public Scene getScene() {
		return scene;
	}

	public void setScene(Scene scene) {
		this.scene = scene;
	}

	public Stage getPrimaryStage() {
		return primaryStage;
	}

	public void setPrimaryStage(Stage primaryStage) {
		this.primaryStage = primaryStage;
	}
	
	TextArea textAreaOutput;
	
	public void launchStartupSequence() {
		scene = new Scene(root,width,height);
		
		LoadCssCommand loadCssComand = new LoadCssCommand(application,scene);
		loadCssComand.run();
		
		primaryStage.setScene(scene);
		primaryStage.show();
		textAreaOutput = (TextArea) idMap.get("textAreaOutputConsole");
		redirectSystemOutToTextArea();
	}
	
	public void redirectSystemOutToTextArea() {
		ByteArrayOutputStream baos = new ByteArrayOutputStream();
	    PrintStream ps = new PrintStream(System.out) {
	    	PrintStream baosPrintStream = new PrintStream(baos);
	    	
	    	public void println(String message) {
	    		baosPrintStream.println(message);
	    		super.println(message);
	    	}
	    };
	    System.setOut(ps);
	    
	    PrintStream err = new PrintStream(System.err) {
	    	PrintStream baosPrintStream = new PrintStream(baos);
	    	
	    	public void println(String message) {
	    		baosPrintStream.println(message);
	    		super.println(message);
	    	}
	    };	    
	    System.setErr(err);
	    
	    
	    var object = new Object() { int count = 0; };
	    ThreadUtil.addTask(() -> {
		    while (true) {
		    	object.count++;
		    	if (object.count%30==0) {
		    		System.err.println("Stay Alive Message "+object.count);
		    	}
		    	textAreaOutput.setText(baos.toString());
		    	
		    	try {
		    		Thread.sleep(100);
		    	} catch (InterruptedException e) {
		    		
		    	}
		    }
	    });
	    
	    runTestCases();
	}
	
	public static void runTestCases() {
		AdditionUtilTest additionUtilTest = new AdditionUtilTest();
		additionUtilTest.testSumListOfIntegers();
	}
}

When I call System.out I get the value that I can redirect to a window, when I use logger class for some reason it still sends to system.err yet bypasses System.err, might use another method than println(), tried another method and seemed to be a problem.

Updated to attach directly to Global Logger

	TextArea textAreaOutput;
	
	public void launchStartupSequence() {
		scene = new Scene(root,width,height);
		
		LoadCssCommand loadCssComand = new LoadCssCommand(application,scene);
		loadCssComand.run();
		
		primaryStage.setScene(scene);
		primaryStage.show();
		textAreaOutput = (TextArea) idMap.get("textAreaOutputConsole");
		redirectSystemOutToTextArea();
	}
	
	public void redirectSystemOutToTextArea() {
		Logger.getLogger("").addHandler(new Handler() {
			
			@Override
			public void publish(LogRecord record) {
				// TODO Auto-generated method stub
				textAreaOutput.setText(textAreaOutput.getText()+record.getMessage()+"\n");
			}

			@Override
			public void flush() {
				// TODO Auto-generated method stub
				
			}

			@Override
			public void close() throws SecurityException {
				// TODO Auto-generated method stub
				
			}
		});
	    
	    runTestCases();
	}

Kind of odd if you use “” for Logger it adds handler to Global Logger yet if you add Logger.GLOBAL_LOGGER_NAME instead it does not work.

Concurrent Programming

Computer Systems in 2023 like the many years before rely upon multithreading and multiprocessing. Numbers Matter and Numbers are subject to obfuscation in sales.

A higher number in computing used to sale a product might not always, and many times does not always lead to better performance. Better performance is generally just in one area. Gains are less simplistic than one would like. A car that can move at 30mph is half as fast as a car that can move a 60mph. If you give either of those cars a bad document with incorrect data there will still be a problem.

Performance gains can be Powerful, performance gains and Throughput are far from guaranteed from being Powerful. Faster numbers that can’t be trusted can lead to less belief due diligence has been added. Due diligence more enabled does not always equal Trust more enabled.

Concurrent processing increases complexity. Has the potential to create extra conditions that were not always available before. Imagine you could drive 4 different cars at 60mph with the perfect four pieces of that document to the right people.

1/4 of that document might have errors. Delivered to the right people potential for 75% of the document delivered to others to be more enabling for Throughput. No guarantee as 75% might depend greatly on 25%.

Tools factor into ability for Software Programmers and Developers to be able to deliver performant, stable, multithreaded applications. Increased ability for Integrated Development Environments (IDE) like Eclipse, Xcode, Microsoft Visual Studio, Clion, and IntelliJ can make the process of verification and testing performance easier, or harder.

If performance is made harder to gauge there is more potential for claims being made about performance that do not deliver. Specifics matter greatly, and I for one am tired of seeing claimed performance in Engineering without delivered performance.

Zero to 60 with speed in a pinch that you can rely upon or takes too long and you get hit by the semi next to the on ramp? Speed can be very enabling at the right times. 30 minutes in front of a storm vs 5 minutes in front of a storm matters.

There are hard problems in Concurrency and Google limiting my YouTube account factors into losses of Comprehension for the World and Supercomputers that has high potential for filtering into losses in Throughput and Processing Speed for their own company.

Google seen as does not step on their toes, can be trusted with Multiprocessing of the future likely not true value added. Speed at which things are re-enabled factors into World Throughput.

Or lack there of. Wonder why your gaming rig doesn’t run with twice the FPS? Ask the Google CEOs why they shut off a Texan’s YouTube account.

Invest in Google Go when they are limiting? Swift might be more likely to lead to gains.

Double the price on all corporate deals for Google’s purchases until account reenabled? Reduced Throughput has potential to lead to Reduced Throughput?

Potentially some at the top trying to sink the ship

On another point Apple limiting access to installs to those that have money in their accounts kind of gives feeling of very bad deal. Kind of limits the effectiveness of Java. Companies that hold purchases hostage are not long term enablers of support.

Factors into Throughput.

Throughput of Faster Java.

May God enable faster throughput of Java for companies that actually protect their developers, that actually value throughput gains. Kind of built in that way. Fast Java that delivers, a more fair playing field that allows companies some flexibilities or companies that have your pipeline held hostage.

A system allowed to thrive while null costing value subtracted from lives in Texas.

Apple and Google Not held accountable high potential for the CEOs that originally created the problem to be replaced by corrupted power in the future. VP’s installing decision not potential for seeing their own writing on the wall in a couple years time?

Want to see real Throughput Gains in Concurrent Multiprocessing computing? Remove the oppression that leads to losses. War lags chip manufacturing. War can lead to gains does not equal those gains will always be for you.

Better to enable better Throughput in Advance.

Consumer protection seems like a joke in 2023.

Can writers learn something from multithreaded programming? Weaving separate subplots together over time to help facilitate Theme and Plot delivered? Four processing cores with different names? Different characters in the story that act and react differently to new developments of knowns and unknowns?

A faster result does not guarantee a correct result.

More CPU cores working on a problem does not guarantee a correct result.

More CPU cores working on a problem does not guarantee a faster result than less CPU cores working on a problem. Complexity can add value, is far from guaranteed to add value.

Chasing down complicated bugs with underfunded poorly inspired tools can lead to downtime at critical times. A vending machine that requires access to one bank or one that requires access to 4 different banks. Parallel processing can lead to faster, not guaranteed to faster delivery of life saving water and nutrients.

A passive aggressive system of power allowing to be amped is like someone with a remote control saying require their vending machine calls to take 4 times as long. A little delay can lead to feeling of all the more earned?

Power mistreating me today sets precedent for the world, for future generations about what is right and what is wrong. What the world can get away with and what it cannot.

Better tests can be highly enabling for Concurrency. What bugs are not factors into throughput for ability to track down nasty concurrency bugs that do not always present themselves. Greater confidence of what something is not factors into throughput for find what a bug is. Less bugs equals potential for Much Greater Throughput.

https://junit.org/junit5/

Not sure I like the open source testing framework tide so closely to a corporate profit system. Might need some further clarification.

https://gradle.org/

Maven has been reliable for me

https://maven.apache.org/

Google a major investor in Gradle and has been more than a limiter and enabler of Oppression

A system that delivers or a system that is leveraged by a corrupt authority matters

Test Framework highjacked reduces desire to want to invest in JUnit, potential for rolling own

Trust factors into adoption of technologies

Bigger corporations with greater leverage on smaller corporations with nothing to keep the bigger corporations in check

Building your own wheels can be greater than buying broken wheels from oppression

180 pages of lag time to get going with a testing framework? Potential for early divests.

Inflection, Reflection, Annotations, and Code Magic can be Powerful, can reduce the straightforwardness of an application. Straightforward matters for Emphasis and tracking down bugs? Yes

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.junit.jupiter.api.Tag;
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Tag("fast")
public @interface Fast {
}

Code excerpt from JUnit document. Doesn’t really Inspire write me for every method in the app. Non Null Time Costs can be increased that reduce ability to test? That reduce emphasis and clarity?

The following excerpt is a bit more promising

import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.DisplayNameGeneration;
import org.junit.jupiter.api.DisplayNameGenerator;
import org.junit.jupiter.api.IndicativeSentencesGeneration;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
class DisplayNameGeneratorDemo {
  @Nested
  @DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class)
  class A_year_is_not_supported {
  @Test
  void if_it_is_zero() {
  }
  @DisplayName("A negative value for year is not supported by the leap year
computation.")
  @ParameterizedTest(name = "For example, year {0} is not supported.")
  @ValueSource(ints = { -1, -4 })
  void if_it_is_negative(int year) {
  }
  }
  @Nested
  @IndicativeSentencesGeneration(separator = " -> ", generator =
DisplayNameGenerator.ReplaceUnderscores.class)
  class A_year_is_a_leap_year {
  @Test
  void if_it_is_divisible_by_4_but_not_by_100() {
  }
  @ParameterizedTest(name = "Year {0} is a leap year.")
  @ValueSource(ints = { 2016, 2020, 2048 })
  void if_it_is_one_of_the_following_years(int year) {
  }
  }
}

I think the idea is keep the metadata about the test close to the code though I think having it rely upon annotation processing has potential for non ideals. Changes dimensionality. Potential for the same document processed in more than one way.

Thoughts of fit for a single purpose

int add(a,b) {
     return a+b;
}

vs

int addOrSubtract(a,b, boolean subtract) {
     if (!subtract)
         return a+b;
     else
         return a-b;
}

Both methods able to add, though one method has potential to increase complexity. Complexity can be value added and somethings can be not valued added. Programmer calling addOrSubtract now has potential to set the boolean flag subtract incorrectly.

vs

int add(a,b) {
     return a+b;
}

vs

int subtract(a,b) {
         return a-b;
}

Both have potential for working the same way, simpler can enable faster comprehension. Faster comprehension can equal increased Throughput.

Add in multithreading, having one core adding a set of data and one core subtracting a set of data. Factor in debug lines and break points, knowing which thread is calling add and which one is calling subtract is now enabled by the debugger.

Reduced Surface area for what a method does can be a lot of power for enabling better testing that factors into more testable, more bugs reduced.

Small pieces testable factor into slightly bigger pieces that are testable that have potential for the larger system as a whole for being more testable and verifiable.

Complexity, what does it gain me, what does it cost me. Costs me, likely to cost others as well. Time protected and enabled, far from guaranteed.

Microservices can operate in similar ways.

If you have one set of documents that adds numbers.

And you have another set of documents that subtract numbers.

Creating one service for processing the add documents and creating another service for processing the subtract documents can be a lot of power.

Now the add service can be load balanced and scaled with hardware that is designed specially for adding and the subtract service can be load balanced and scaled with hardware that is designed specially for subtracting.

Also an important reminder that granularity of data matters. A processor required to call to a server every time it wants to add, and to another server every time it wants to subtract can lead to wasted time.

How long things take to process is being reduced continuously. If processing takes 100 milliseconds that used to take an hour. Calling a server for processing for the hour could free up computational resources. At 100 ms call to the server likely to be more costly than running the processing locally.

Further servers can be non ideally leveraged in way that decrease security and viability of data. Each Network call fully appreciated as something with potential for gain and something with potential for loss?

Future enabled can be powerful. Single purpose reusable tried and true method has potential for moving from server closer to client processing. 10 years forward the same processing done on those addition and subtraction documents now likely can be done in much less time on client hardware without increased cost via network calls.

Will those additions have been made in a way that can be enabled by the future, or dredged in complexity and strong coupling?

A testing framework is powerful, should be a core feature of a language. If it is not built into the language potential for leveraged in non ideal ways. The language itself could be leveraged in non ideal ways as well. Trying to increase more solid ground in software is useful. I realize software is far from ideal solid ground.

A method written as a circuit? This circuit adds. That is all this circuit does. I can rely upon it to add is power. Single purpose high throughput is power. What something does and what something does not do understood is power. Less ability to comprehend like invisible systems (High Voltage for one) makes working with systems tougher.

Imagine two mechanical machines. One with intricate magnets used and one without intricate magnets used. Grandfather clock with gears, vs Grandfather clock with multiple stages with magnets that change orbits on gears in ways not easy to fully comprehend?

A gear turns or a gear turns in relation to how a magnet on another gear turns?

More dependencies increases complexity and increased complexity does not always enable corporate throughput

Dependencies are a bit of a requirement in this world, able to work with them effectively not always simple

Working on a startup then a new company shows up on the scene potential for having to integrate their new service with your service dependent upon business and investor constraints.

Companies that can adapt swiftly have higher potential for being around long term.

Section 4 of following document highly valuable in my opinion https://www.baeldung.com/java-lambda-effectively-final-local-variables

From what I read on StackExchange the wrappers can also be useful since a class object reference can be final and still allow modification to its member data.

The following code is free to use, MIT License

package math;

import java.util.ArrayList;
import java.util.logging.Logger;

public class AdditionUtil {
	private static Logger logger = Logger.getLogger(AdditionUtil.class.getName());
	
	public static int sumListOfIntegers(ArrayList<Integer> list) {
		int sum=0;
		sum = list.stream().mapToInt(value -> value).sum();		
		return sum;
	}
	
	private static void testSumListOfIntegers() {
		int validValue = 10;
		
		ArrayList<Integer> listOfIntegers = new ArrayList<>();
		listOfIntegers.add(1);
		listOfIntegers.add(2);
		listOfIntegers.add(3);
		listOfIntegers.add(4);
		int computedSum = sumListOfIntegers(listOfIntegers);
		logger.info("Computed sum = "+computedSum+" for list "+listOfIntegers);
		if (validValue==computedSum) {
			logger.info("Test completed successfully");
		} else {
			logger.severe("Test failed");
		}
	}
	
	public static void main(String args[]) {
		testSumListOfIntegers();
	}
}

Simple code, thoughts on readability and lambdas, originally was going for

int sum=0;
list.forEach((value) -> {
    sum+=value;
});
return value;

This will not compile due to local variables required to be final

This convolutes the code in my opinion

	public static int sumListOfIntegers2(ArrayList<Integer> list) {
		logger.info("Running method with wrapper");
		var object = new Object() { int sum=0; };
		list.forEach((value) -> {
			object.sum+=value;
		});
		return object.sum;
	}	

Requirement to wrap local variables in wrapper classes can create divestment from using the forEach API

	public static int sumListOfIntegers3(ArrayList<Integer> list) {
		logger.info("Running method 3");
		
		int sum=0;
		for (int i=0; i<list.size(); i++) {
			sum+=list.get(i);
		}
		
		return sum;
	}	

Access to local variables can be reduced has potential for changing things likely in some ways that creates and advantage and some ways that creates problems as seen with the final keyword and the divestment due to inability to work on same data set as calling method easily.

Java does not ideally group Warnings, it would be nice to have a way to group the warnings about this variable or method is not used. Sometimes variables and methods are added as framework for future development, always being warned that extra words are in the document is not all amplification of those words used at a later date.

A problem differentiating, could be an error that the developer forgot to assign, or remove a variable that is not used. Could be an error, gets set to Warning. Future development set as a warning does not give a feeling of reassurance. Trust and Positive Spin factors into what is Emphasized.

Imagine an organization flagged as Definitely an Oppression Enabler

Or a company that does not let employees go home before 5 o’clock PM set to a potential Oppression Enabler

Stuck inside all day, not enough sun light, potential for considered as similar to Vampire? Walks like a Vampire, takes time like a Vampire, not classify as Vampire?

Categorize and Classify Work and looking at screens all day as less than all Sunroom in?

Nearly 40, do I feel like my Hard work as an Engineer in the world has been Rewarded? No

System that is long term disrespect for hard workers in has high potential for less than ideal throughput amped over time.

Added following to my pom.xml

  <dependencies>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-engine</artifactId>
        <version>5.9.1</version>
        <scope>test</scope>
    </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-api</artifactId>
        <version>5.9.1</version>
        <scope>test</scope>
    </dependency>    
  </dependencies>

Still not finding the dependency.

https://maven.apache.org/surefire/maven-surefire-plugin/examples/junit-platform.html

[[1;34mINFO[m] [1;31mBUILD FAILURE[m
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;34mINFO[m] Total time:  1.469 s
[[1;34mINFO[m] Finished at: 2023-03-20T08:40:20-05:00
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;31mERROR[m] Failed to execute goal [32morg.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile[m [1m(default-compile)[m on project [36mFileUtilityLibrary[m: [1;31mCompilation failure[m: Compilation failure: 
[[1;31mERROR[m] /C:/Users/jason/eclipse-workspace3/FileUtilityLibrary/src/module-info.java:[11,35] module not found: org.junit.jupiter.api
[[1;31mERROR[m] /C:/Users/jason/eclipse-workspace3/FileUtilityLibrary/src/module-info.java:[12,31] module not found: org.junit.jupiter.engine

Appears my dependency is there, would be nice to have a nicer way to easily see which dependencies are in the local repository locally

C:\Users\jason\.m2\repository\org\junit\jupiter\junit-jupiter-api\5.9.1

Removing <test> from my pom.xml allowed me to compile

  <dependencies>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-engine</artifactId>
        <version>5.9.1</version>
    </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-api</artifactId>
        <version>5.9.1</version>
    </dependency>    
  </dependencies>

Trying to run test first time

java.lang.IllegalAccessError: class org.junit.platform.launcher.core.ServiceLoaderRegistry (in unnamed module @0x4cb2c100) cannot access class org.junit.platform.commons.logging.LoggerFactory (in module org.junit.platform.commons) because module org.junit.platform.commons does not export org.junit.platform.commons.logging to unnamed module @0x4cb2c100
	at org.junit.platform.launcher.core.ServiceLoaderRegistry.<clinit>(ServiceLoaderRegistry.java:27)
	at org.junit.platform.launcher.core.LauncherFactory.<clinit>(LauncherFactory.java:66)
	at org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.<init>(JUnit5TestLoader.java:37)
	at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:67)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
	at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128)
	at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:306)
	at java.base/java.lang.Class.newInstance(Class.java:684)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.createRawTestLoader(RemoteTestRunner.java:371)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.createLoader(RemoteTestRunner.java:366)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.defaultInit(RemoteTestRunner.java:310)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.init(RemoteTestRunner.java:225)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)

With code (MIT License)

package math;

import static org.junit.jupiter.api.Assertions.assertEquals;

import org.junit.jupiter.api.Test;

import testing.TestLogger;

import java.util.ArrayList;
import java.util.logging.Logger;

public class AdditionUtilTest {
	private static TestLogger logger = new TestLogger(Logger.getLogger(AdditionUtil.class.getName()));	
	
	@Test
	private static void testSumListOfIntegers() {
		int validValue = 10;
		
		ArrayList<Integer> listOfIntegers = new ArrayList<>();
		listOfIntegers.add(1);
		listOfIntegers.add(2);
		listOfIntegers.add(3);
		listOfIntegers.add(4);
		
		int computedSum = AdditionUtil.sumListOfIntegers1(listOfIntegers);		
		logger.info("Computed sum = "+computedSum+" for list "+listOfIntegers);
		if (validValue==computedSum) {
			logger.logSuccess("Test succeed for method 1");
		} else {
			logger.logFailure("Test failed for method 1");
		}
		
		computedSum = 0;
		computedSum = AdditionUtil.sumListOfIntegers2(listOfIntegers);		
		logger.info("Computed sum = "+computedSum+" for list "+listOfIntegers);
		if (validValue==computedSum) {
			logger.logSuccess("Test succeed for method 2");
		} else {
			logger.logFailure("Test failed for method 2");
		}
		
		computedSum = 0;
		computedSum = AdditionUtil.sumListOfIntegers3(listOfIntegers);		
		logger.info("Computed sum = "+computedSum+" for list "+listOfIntegers);
		if (validValue==computedSum) {
			logger.logSuccess("Test succeed for method 3");
		} else {
			logger.logFailure("Test failed for method 3");
		}		
	}
}

https://github.com/junit-team/junit5/issues/2147

How many esoteric hoops required to jump through to be able to utilize a testing framework limits bugs fixed

How many lost developer hours spent on errors related to JUnit? World Wide?

Versus if corporations had their own test frameworks they know can build and don’t shift without knowledge? Reliance and Dependence, specially for Testing frameworks more useful in a Peaceful Harmonized World.

World of Max Profit? Not All Peace and Harmony Amped

Maybe will try JUnit in 5 months? When JUnit worked great in 2015?

Oppressive leverage and reliance does not always amp ideally.

They depend on that can easily be turned into they can’t