The Manchester Machine Makers #16221 and the Bennington Cookie Clickers#18650 met last week and drafted a press release for the Bennington Banner and the Manchester Journal. Their coopertition resulted in a nice article in both newspapers!

Current team happenings and events.
The Manchester Machine Makers #16221 and the Bennington Cookie Clickers#18650 met last week and drafted a press release for the Bennington Banner and the Manchester Journal. Their coopertition resulted in a nice article in both newspapers!


Happy New Year from the Manchester Machine Makers! Below is what the team has been working on:









This fall we applied for the Vermont Academy of Science and Engineering (VASE) Hands-On Science and Technology (HOST) Grants program. The VASE HOST grants are given yearly and are primarily intended for science, technology, and robotic clubs/teams in Vermont. Typically about 10 grants are awarded ranging from $500-1,000.

This year the Manchester Machine Makers has been awarded a grant of $1,000 to create two Programming Boards. In the past we borrowed school programming boards so it will be helpful to finally have our own. For those who don’t know what a Programming Board is, it’s basically the necessary hardware needed for a programmer to test and develop code (see photo below). Interested? Check out our programming board page to see how to make your own!

We have gotten to work on our robot! Here is what the team has been doing this fall:











However, this is just what we have done so far!
This is a repost from our previous blog platform.
Jun 2, 2021 • Aleks Rutins
First of all, this is the first time I’ve ever written a blog post. My apologies if the organization makes no sense.
Reflection in programming is the act of using code to write or read itself. For example, in Java, getting the name of a class or method at runtime is reflection.
In Java, most of the reflection classes and methods are in the java.lang.reflect package, and tools for dealing with annotations are in java.lang.annotation.
To get started, create a directory to hold files for this tutorial. Create a new basic Java file, and call it Basic.java:
import java.lang.reflect.*;
import java.lang.annotation.*;
public class Basic {
public static void main(String[] args) {
System.out.println("Hello Java Reflection");
}
}
If you don’t know what that does, a comprehensive tutorial is here.
Run it with java Basic.java. You should see the output:
$ java Basic.java
Hello Java Reflection
Great! Your Java installation works. If it doesn’t, go ask the Oracle. Or ask OpenJDK, if you’re on Linux.
Now, let’s do some reflection! Add some lines to main:
import java.lang.reflect.*;
import java.lang.annotation.*;
public class Basic {
public static void main(String[] args) {
System.out.println("Hello Java Reflection");
Class<?> cls = Basic.class;
System.out.println("The class's name is " + cls.getName());
}
}
Run it again, and you should see this:
$ java Basic.java
Hello Java Reflection
The class's name is Basic
Whoa! How’d it know that? Let’s see.
First, take a look at this line:
Class<?> cls = Basic.class;
First of all, the ? in Class<?> tells the Java compiler to auto-detect the type argument. In this case, it could also have been written as Class<Basic>, but that would be more typing. I could also use var, which tells it to completely auto-detect the type:
var cls = Basic.class;
However, var is not supported in JDK 7, which is what FTC uses. If you have JDK 9 or higher, you can use var, though.
Next, Basic.class tells it to get the Class<T> (T is a type argument) instance for Basic. Class<T> is core for reflection. So essential, in fact, that it is included in java.lang.
On to the next line:
System.out.println("The class's name is " + cls.getName());
Everybody should be familiar with System.out.println. If not, I urge you once again to check out this tutorial. However, cls.getName() should be new. If not, I urge you to skip to the next heading, wait for part 2 (annotations), or seek out a more advanced tutorial.
getName is a method on Class<T> that gets the qualified name. For example, if Basic were in the com.not.a.domain package, cls.getName() would return "com.not.a.domain.Basic". Since Basic is not in a package, it just returns "Basic". If you need an unqualified name, without the package, use Class.getSimpleName.
To access methods, we use the Method type, which is in java.lang.reflect. Methods can be accessed using Class.getMethod or Class.getMethods, which return a specific method or a list of all methods in the class, respectively.
Add a method to Basic:
public void doSomething(String whatever) {
System.out.println("Doing something very interesting...");
System.out.println("Whatever is " + whatever);
}
Now, just to make sure it exists, create an instance in main and try it:
Basic basic = new Basic();
basic.doSomething("whatever");
Run it, and the whole output should be:
$ java Basic.java
Hello Java Reflection
The class's name is Basic
Doing something very interesting...
Whatever is whatever
It works! Now, let’s get a Method instance for that method. Remember, cls is Basic.class. The try block is necessary because getMethod can throw a NoSuchMethodException if the method was not found.
try {
Method doSomething = cls.getMethod("doSomething", String.class);
} catch(NoSuchMethodException e) {
System.out.println("A whatsit happened: " + e.toString());
}
Now, let’s look at the interesting line:
Method doSomething = cls.getMethod("doSomething", String.class);
If you look at the description for Class.getMethod, you can see that the first argument is the name of the method, and any remaining arguments are parameter types, as Class<T> instances. In this case, since the method is called doSomething and it takes one String argument, the first argument is "doSomething" and the second argument is String.class.
Now that we have the Method instance, it’s easy enough to get the name (inside the try block):
System.out.println("The method's name is " + doSomething.getName());
Now, the output should be:
$ java Basic.java
Hello Java Reflection
The class's name is Basic
Doing something very interesting...
Whatever is whatever
The method's name is doSomething
It worked!
If something went wrong, here’s the full code of Basic.java (organized into sections):
import java.lang.reflect.*;
import java.lang.annotation.*;
public class Basic {
public static void main(String[] args) {
// SETUP //
System.out.println("Hello Java Reflection");
// GETTING THE NAME OF A CLASS //
Class<?> cls = Basic.class;
System.out.println("The class's name is " + cls.getName());
// GETTING THE NAME OF A METHOD //
Basic basic = new Basic();
basic.doSomething("whatever");
try {
Method doSomething = cls.getMethod("doSomething", String.class);
System.out.println("The method's name is " + doSomething.getName());
} catch(NoSuchMethodException e) {
System.out.println("A whatsit happened: " + e.toString());
}
}
public void doSomething(String whatever) {
System.out.println("Doing something very interesting...");
System.out.println("Whatever is " + whatever);
}
}
See you in Part 2, which will go over annotations!
Basic in a package, and see what getName returns. Then, try to get the name without the package name.java command-line tool, as used above, can also compile files on-the-fly. If you experience problems, you can use the longer version:$ javac Basic.java$ java Basic ...
FTC Team #16221, The Manchester Machine Makers 4-H Club, is pleased to announce that Engineered Printing Solutions in East Dorset VT has joined us in a partnership of support and mentoring. Additionally, they will offer an internship program to team members for the 2021-2022 FIRST Tech Challenge Season. EPS is committed to inspiring our young roboticists, building a community of scientists and engineers here in Northshire.
The competition theme this year is “Freight Frenzy” and the team is busy designing and building a robot to accomplish the tasks outlined by the FIRST organization (www.firstinspires.org). FIRST was founded in 1987 by innovator and inventor Dean Kamen to promote STEM advancement for young people, and is continued and supported by thousands of volunteers and mentors around the world.
The Manchester Machine Makers is a 4-H Club with members in grades 7-12 from all over Bennington County. For more information about the team and Engineered Printing Solutions visit www.manchestermachinemakers.org and www.epsvt.com. Additionally, see EPS’ blog post on the topic at https://epsvt.com/eps-donates-manchester-machine-makers/.
The Manchester Machine Makers are gearing up for the upcoming season. The team currently has nine members who are students at Burr and Burton Academy, Long Trail, Dorset, and Arlington Memorial Middle School. That includes the team’s four new members that have joined this spring: David, Piper, Finn, and Katie.
We are all excited for the FIRST Tech Challenge announcement this fall, on the 18th of September, revealing this year’s robotics challenge. In the meantime, the Manchester Machine Makers are preparing the best we can for the upcoming season.
Since the team frequently uses MATLAB and Solidworks as we build and design robots, new members have been learning and practicing how to use this software over the summer.
As time draws nearer to the FIRST Tech Challenge kick off, we are working hard to prepare for the upcoming season so we can hit the ground running!