CSA Blog

Ian Wu

Final Interview

About Me

High School Junior with a passion for cybersecurity, computer science, linguistics, geography. I am particularly interested in the ways that technology, especially computer science, can improve our lives even in the most seemingly unrelated topics. I am interested paricularly in software development and algorithms.

I enjoy full stack development, working on projects that have helped develop skills with Java and Python APIs, database management, object-oriented programming, and frontend development. I enjoy creating tools to help the community with them, and I am always looking for ways to apply computer science to my interests.

Project Overview

Open Coding Society

ScreenQueue

ScreenQueue is part of Agile Toolkit, Open Coding Society’s toolkit to help support scrum based high school CS classrooms with a set of tools that enable student led teaching. ScreenQueue allows teachers and students to initiate live reviews, and for students to indicate they are ready from their seat with the click of a button. Teachers can view the status of the Queue, and screensharing is built in.

  • Developed Spring Boot API managing queues on backend, integrated seamlessly with assignment database.
  • SQLite data storage, permits students to enter queue as individual or group
  • Created frontend with HTML, Tailwind, Bootstrap, and JavaScript enabling queue management and view for students and teachers.

Video Pitch and Demonstration

Groups

Groups enables student accounts within Open Coding Society to be placed into groups. Groups can include any number of accounts and have attributes such as a period. Groups are utilized by several other Agile Toolkit features such as Assignments and ScreenQueue.

  • Spring Boot API with CRUD operations on groups.
  • Teacher management page built using HTML, MVC, and Bootstrap
  • Student management page built using HTML, JavaScript, and Tailwind

Video Pitch and Demonstration

Agile Toolkit

Diagrams and Relationships

Geography

Heatmap

Live Demonstration

Link

Unique Qualities

- Highly adaptable to different situations. After working with toolkit for a time, I transfered to working on person database because of a need there, and was able to work with team members there to create groups feature.
- Experience as team member (person/groups), scrum master (screenQueue), and project lead (P1 Tri 2). 
- ScreenQueue is one of the features most reliant on other features, relying on a multitude of others. Hence, when it has been broken by other features I have developed experience identifying the issues.
- For the same reasons as above, I have also become experienced in debugging code committed by the team and identifying where it has went wrong.
- Queue has so far been the most usage wise complex feature that needs to be explained in to the entire class, and through those explanations I have developed skills in explaining such a complex feature in both technical terms to people who need to work with it and simpler terms for users.

Data Structures

Homework Page
Homework Grade Spreadsheet

Calculator Enactment
Selection and Insertion Sort
Merge Sort 1 and 2
ML
Graphs - Taught

Homework Average: 0.9133

Project Usage and Showcase

N@tM

Night at the Museum was an amazing opportunity to be able to share our work for the past months, receive feedback, and see what other students work as well. I received feedback on my project, and from presenting it received ideas about a new potential place for it to be used and adapted to that I hadn’t considered before. Demonstrating its usage also revealed several elements of the project that might be intuitive to me as a developer but less so to a user. This feedback was highly valuable.

ScreenQueue is one of the features being actively utilized within the CSA classroom, despite relying on a multitude of other features such as Assignments, Submissions, Person, Login, and Groups. We have utilized the feature both as individuals and as groups, and while at first there were many errors (dreaded null), we fixed these errors over time, and now queue is being used for this very review.

Stats

stats

ML HW

// Load the dataset
Table wine = Table.read().csv("wine.csv");

// Part A: Display summary statistics
System.out.println("Summary Statistics:");
System.out.println(wine.summary());

// Part B: Create a histogram of wine quality distribution
Figure qualityHist = Histogram.create("Wine Quality Distribution", wine, "quality");
Plot.show(qualityHist);

// Part B continued: Create a scatter plot of alcohol vs quality
Figure alcoholScatter = ScatterPlot.create("Alcohol vs Quality", wine, "alcohol", "quality");
Plot.show(alcoholScatter);

// Provided: Group wines by quality level
Table qualityGroups = wine.summarize(
    "alcohol", AggregateFunctions.mean,
    "pH", AggregateFunctions.mean,
    "volatile acidity", AggregateFunctions.mean
).by("quality");
System.out.println("\nCharacteristics by quality level:");
System.out.println(qualityGroups);
// Assume `wine` is your Tablesaw Table already loaded.
Table wine = Table.read().csv("wine.csv");

// Convert Tablesaw table to SMILE DataFrame
String[] colNames = wine.columnNames().toArray(String[]::new);
double[][] data = wine.as().doubleMatrix();
DataFrame df = DataFrame.of(data, colNames);

// Convert quality to IntVector (classification target)
IntVector quality = IntVector.of("quality", df.doubleVector("quality").stream()
    .mapToInt(d -> (int) d)
    .toArray());
df = df.drop("quality").merge(quality);

// Split data into training and test sets (80/20 split)
int n = df.nrows();
int[] indices = IntStream.range(0, n).toArray();
MathEx.permutate(indices);
int splitIndex = (int)(n * 0.8);

DataFrame trainDf = df.slice(0, splitIndex);
DataFrame testDf = df.slice(splitIndex, n);

// Part A: Train a Random Forest model using SMILE
int[] yTrain = trainDf.intVector("quality").toIntArray();
double[][] xTrain = trainDf.drop("quality").toArray();

RandomForest rf = RandomForest.fit(xTrain, yTrain);

// Part B: Calculate and display model accuracy
int[] yTrue = testDf.intVector("quality").toIntArray();
double[][] xTest = testDf.drop("quality").toArray();

int[] yPred = rf.predict(xTest);
double accuracy = Accuracy.of(yTrue, yPred);

System.out.printf("SMILE Random Forest Accuracy: %.2f%%\n", accuracy * 100);
Table wine = Table.read().csv("wine.csv");

// Convert to Weka format
ArrayList<Attribute> attributes = new ArrayList<>();
for (String col : wine.columnNames()) {
    if (!col.equals("quality")) {
        attributes.add(new Attribute(col));
    }
}

IntColumn qualityCol = (IntColumn) wine.intColumn("quality");
int minQuality = (int) qualityCol.min();
int maxQuality = (int) qualityCol.max();
ArrayList<String> qualityVals = new ArrayList<>();
for (int i = minQuality; i <= maxQuality; i++) {
    qualityVals.add(String.valueOf(i));
}
attributes.add(new Attribute("quality", qualityVals));

Instances wData = new Instances("Wine", attributes, wine.rowCount());
wData.setClassIndex(wData.numAttributes() - 1);

for (int i = 0; i < wine.rowCount(); i++) {
    double[] vals = new double[wData.numAttributes()];
    for (int j = 0; j < wine.columnCount() - 1; j++) {
        vals[j] = ((NumberColumn<?, ?>) wine.column(j)).getDouble(i);
    }
    vals[wData.numAttributes() - 1] = qualityVals.indexOf(String.valueOf(qualityCol.get(i)));
    wData.add(new DenseInstance(1.0, vals));
}

// Split data
int trainSize = (int) Math.round(wData.numInstances() * 0.8);
Instances train = new Instances(wData, 0, trainSize);
Instances test = new Instances(wData, trainSize, wData.numInstances() - trainSize);

// Train Weka Random Forest and calculate accuracy
RandomForest wekaRf = new RandomForest();

try {
    wekaRf.buildClassifier(train);

    Evaluation eval = new Evaluation(train);
    eval.evaluateModel(wekaRf, test);

    System.out.printf("Weka Random Forest Accuracy: %.2f%%\n", eval.pctCorrect());

    // Compare models
    System.out.println("\nModel Comparison Complete!");
    System.out.println("Which model performed better? Analyze the results above.");

} catch (Exception e) {
    e.printStackTrace();
}

AP Review Summary

AP Exam Review

Summary of efforts to prepare for the AP Exam. Blog category compiles these efforts.

Jekyll MCQ Reviewer

  • Jekyll based MCQ review tool
  • Same structure as Infograph
  • Contains all missed MCQs from past

Jekyll MCQ Reviewer

MCQ contains all missed questions from past MCs. Corrections have been done in the past, but these are bulky and difficult to test if problem has been fixed. This makes easy use and allows for a quick check to see if things have been improved.

FRQ 'Easy Points' Checklist

  • Created 'Easy Points' for classes team teach early in year
  • Created pattern list for any that were not done
  • Compiled the patterns for each FRQ type

FRQ 'Easy Points' Checklist

Easy Points list for classes FRQ were very effective during presentation. Our team teach was first to have, so I recompiled one with every FRQ that I can easily review again before the AP test.

Review MCQ and Custom Quiz

  • 110 MCQ and FRQ
  • Too much public `void doSomething(int number)`
  • List of reminder for test

Review MCQ and Custom Quiz

Completed both MCQs available. Custom Quiz was better about doSomething()s. Based on mistakes, created list to review and made sure learned those will. Will check with MCQ Review before.

Units 1-10 and FRQ Homework

  • Past class lessons for units 1-10 and FRQ types, complete with homework
  • Homework review, polish of harder units (inheritance)
  • Too bulky for last minute review (see MCQ quiz)

Units 1-10 and FRQ Homework

After these units and team teaches earlier in year, stated inheritance was weakest. Now, Inheritance was fine on MCQ. Lessons are too bulky for last minute, will use MCQ instead.

MCQ - Review and Missed Questions

Multiple Choice Quiz

  1. integer vs float w/ decimal point, cast correctly
  2. functions with same name and different parameter types are OK
  3. check for null: cannot call equals on thing that doesn’t exist
  4. .add(POS, VALUE)
  5. substring “01234” can take 5 because does not include 5
  6. polymorphic variables
  7. int[3][4] has a list of 3 lists of 4 elements
  8. implements
  9. == compares references → “hello” == “hello” but “hello” != new String(“hello”)
  10. .equals compares content
  11. call to statement must be first in constructor
  12. ((Dog) animal2).getBreed() not (Dog) animal2.getBreed()
  13. single quotes for char
  14. x.0 for floats and doubles

Collections

public static ArrayList<Integer> a(ArrayList<Integer> a) {

    ArrayList<Integer> b = new ArrayList<>();

    for (int d = 0; d < a.size(); d++) {
        int c = a.get(d);
        if (c % 2 == 0) {
            b.add(c);
        }
    }

    return b;
}

ArrayList<Integer> a = new ArrayList<>();
a.add(1);
a.add(2);
a.add(3);
a.add(4);
a.add(5);
a.add(6);

ArrayList<Integer> b = a(a);
System.out.println("Even numbers: " + b);
Even numbers: [2, 4, 6]
import java.util.HashSet;
import java.util.Set;

Set<Integer> i(Set<Integer> a, Set<Integer> b) {
    Set<Integer> r = new HashSet<>();
    for (Integer x : a) {
        if (b.contains(x)) {
            r.add(x);
        }
    }
    return r;
}

Set<Integer> a = new HashSet<>();
a.add(1);
a.add(2);
a.add(3);

Set<Integer> b = new HashSet<>();
b.add(2);
b.add(3);
b.add(4);

Set<Integer> r = i(a, b);
System.out.println(r);
[2, 3]
import java.util.ArrayDeque;
import java.util.Deque;

Deque<String>  = new ArrayDeque<>();

.addLast("Alice");
.addLast("Bob");
.addLast("Charlie");

.addFirst("VIP");

.removeFirst();

System.out.println("Front: " + .peekFirst());
System.out.println("Back: " + .peekLast());
System.out.println("Size: " + .size());

Front: Alice
Back: Charlie
Size: 3

HashSet. It contains the fastest check for if the HashSet contains something, and naturally contains duplicates. Example below

import java.util.HashSet;
import java.util.Random;
import java.util.Set;

Set<Integer> s = new HashSet<>();
Random r = new Random();

while (s.size() < 10) {
    int i = 1900000 + r.nextInt(100000);
    s.add(i);
}

System.out.println("IDs: " + s);

int x = 1901234;
System.out.println("Has " + x + "? " + s.contains(x));
IDs: [1967583, 1997452, 1907982, 1964585, 1984184, 1988119, 1972836, 1968002, 1910498, 1948338]
Has 1901234? false
int a = 1;

public void increment(int b) {
    b += 1;
}

increment(a);
System.out.println(a); // will print out 1
1
import org.knowm.xchart.*;
import org.knowm.xchart.BitmapEncoder.BitmapFormat;
import java.util.*;
import java.io.*;

// Sample data
List<Integer> xData = Arrays.asList(0, 1, 2, 3, 4);
List<Double> yData = Arrays.asList(2.0, 1.5, 3.0, 2.5, 4.0);

// Create chart
XYChart chart = new XYChartBuilder().width(600).height(400).title("Sample Line Chart").xAxisTitle("X").yAxisTitle("Y").build();
chart.addSeries("My Data", xData, yData);

// Save to byte array output stream
ByteArrayOutputStream baos = new ByteArrayOutputStream();
BitmapEncoder.saveBitmap(chart, baos, BitmapFormat.PNG);

// Return the image bytes for the notebook to display inline
baos.toByteArray();

[B@65d1326a