8 December, 2018. Checkpoint reflection

Checkpoint reflection on these past few weeks and the ASIJ competition: 

Building process:

We first see what problems we need to fix or deal with, then we come up with ideas that will fix these problems. At first this problem was to actually create a robot for the competition. After the vex competition at ASIJ we learned what we needed to do to make our robot better. One problem we realized was that many of our screws came loose after every match or even just testing the robot. So we are going to recreate our robot to make sure that nothing will come loose. This is what we have done repeatedly throughout our building process. Assess what needs work, come up with ideas to fix it, execute the final ideas.

What I’ve learned:

These past few weeks have taught me that communication between your team members is crucial to success. Our team struggled with communication at the beginning and it took a while to actually get work done. But, once we had developed a system that works and we listen to everyone on the team, we can effectively and efficiently build or do whatever we need to. I also learned that you can’t be successful without actually committing to your team and building your robot. Coming in after school is very important to our team because otherwise, we wouldn’t be able to complete everything we want to. Something I taught myself was how to get rid of stripped screws. This was very important for my team because we used hex screws, many of which became stripped so that you couldn’t just unscrew them with a screwdriver. When this happened I would have to get pliers and tightly grip the sides of the screw and twist it out. If we couldn’t do this, many parts of our robot would never have been fixed. Sometimes a screw wouldn’t be tight enough but was so stripped it couldn’t be tightened, or we would need to replace something but we couldn’t get rid of the screw that was in the way because it was stripped.

What I learned at ASIJ:

I also learned many things when I went on the trip to the competition at ASIJ. This being the first robotics competition I went to, I learned a lot. Some things that were team specific and some other, more general things. Because this was my first robotics competition, I didn’t really understand how alliances worked. Only after the competition was over did I realize how important having a good alliance is. We were going to pick Foshan A as our alliance, but because of a mishap, we didn’t ally with them. In one of the rounds, we spent much of our time saving our alliance because they got stuck. Then, when they were unstuck, they didn’t get any flags. After wasting time and our alliance not getting any points, we lost the round and were unable to move forward in the competition. Our original idea for an alliance, Foshan A, ended up getting to the tournament finals and winning the tournament. If we had allied with them, we might’ve had a chance to win the tournament. Another important thing in the competition was scouting. This goes hand in hand with alliances because if you don’t scout the teams, you won’t know who to ally with. Something I wasn’t prepared for was how often things go wrong during the tournament. After every round, something was wrong with our robot. Now, that may have just been our fault for not making our robot the best quality, but it still took some getting used to. Because our robot needed a lot of fixing, I had to learn how to very quickly identify any problems with the robot, and figure out how to quickly fix it. By the end of the tournament I had developed a kind of routine where I would check the parts that most often got broken, then I would check the other smaller parts of the robot. During this competition, I actually learned what washers are for and why you use them. After learning this we realized our robot needed way more washers than it had. Now we are rebuilding it with washers where we need washers.

The Design Thinking Process in our robot:

First, we had to empathize with the problem and see what we really needed to accomplish. The problem was that we needed a robot to be able to perform in this year’s vex game. Then we defined the solution and what we were gonna do. We decided to focus on shooting the flags, as that would get us the most points if that was all we did. We came up with multiple ideas to shoot the flags; a flywheel, a catapult, a slingshot type robot, a puncher, and other things. In the end, we decided to build a flywheel on our robot. To prototype, we had to CAD our whole robot before we could even begin building. Next, we built the robot and tested it many times to see what we could fix. After testing, coming up with ideas to make it better, and building those ideas, we had a fully functioning robot with a flywheel that could hit the flags.

15 November, 2018. Encryption Summative

I chose the Ceaser cipher method because I thought I could find a way to code this by myself and I did other than a few parts like how to convert a character to an integer or a character to a string. For those parts I used StackOverflow. The pros of the Ceaser cipher are that it is very simple to use and understand. a con of the Ceaser cipher is that because it is so simple, it is very easy to crack.



Ceaser Cipher Code: 

Main Method Code: https://github.com/ZW2828/Caeser-Cipher-Encryption/blob/master/ImitationGame.java

Cipher Code: https://github.com/ZW2828/Caeser-Cipher-Encryption/blob/master/Cipher.java

Decipher Code: https://github.com/ZW2828/Caeser-Cipher-Encryption/blob/master/Decipher.java

7 October, 2018. Digital Signal Processing

What are the differences between analog and digital signals?

Analog Signals:

  • Continuous
  • infinite range of values
  • more accurate
  • affected by noise
  • Sine waves
  • example: hand clock

Digital Signals:

  • Discrete
  • set range of values
  • less accurate
  • noise-immune
  • Square waves
  • example: digital clock

Compare and Contrast the nature and use of I2C, SPI, and UART. 


  • I2c has master and slave
  • master sets SCL
  • SDA transfers data
  • starts with a start bit and hex address
  • match slave device to transfer
  • the master device reads or writes slave
  • receives ACK from slave


  • SPI also has masters and slaves
  • master sets SCLK
  • send and receive info every tick
  • uses MOSI and MISO pins
  • Faster than I2C
  • SS tells slave whether or not to communicate with the master


  • Data line for transmitting
  • Data line for receiving
  • start bit, 8 data bits, stop bits
  • high to low communication is UART
  • microcontrollers agree on the bit-rate
  • only have start bit to sync

Explore the use of such Digital Signal Processing in Raspberry Pi. 

I2C in Raspberry Pi:

  • simple because it only has 2 wires
  • slower that SPI
  • useful for projects with lots of different outputs
  • LCD is a good example of I2C use
  • needs up to 16 pins to work I2C makes it 4

SPI in Raspberry Pi:

  • SPI allows the Raspberry Pi to use 100 peripherals
  • Raspberry Pi is the master
  • Faster than I2C
  • RFID reader is a project that uses SPI peripherals


29 August, 2018. Multiple class program

Today in class I learned how to create a class that you can use in another class. I used this other class to create an instance of an object. In other words, I created a custom variable that I could call and use whenever I wanted. When making this class I learned that you should use private variables when you need to in case you need to use that variable name somewhere else. For example, if you had two scores in your code instead of having score1 and score2 and trying to remember which is which, you can just have a private variable named score. This would allow you to use the variable name score in more than one method or class. I also learned how to create a function/method to get a variable from that class, and how to create a function/method that could set that variable to something else.


Multiple class program video:

27 August, 2018. Design Toolkits


2.1 was the introduction to the section and it talks about how to create a project. It says that having a strategy to complete any project is absolutely essential.


2.2 talks about having a mission and staying true to that mission without getting off task. It says you should take a step back and see if you are on task or not.


2.3 talks about choosing people with skills that complement each other so that they can work best together.



  • plan the project first
  • make good management system
  • get project manager
  • clear definition of project and project goals
  • use effective communication channels
  • make the project into a bunch of smaller goals
  • set realistic goals and deadlines and milestons
  • keep detailed records of the project and how it is going
  • develop and track the project budget
  • saftey is most important, make it top priority

21 August, 2018. HelloWorld in BlueJ

Did you learn something new about computer science/programming in this class? What are the things you have learned?

I have learned how to write a very simple program that prints out whatever text you want it to. I learned how to use the proper syntax in Java to write this program because otherwise, you can’t code the program. I also learned what the String[] args meant in the code we wrote for the HelloWorld program; it is an array of strings called args where you input the elements as parameters after you run the program. I also learned how to use the basics of BlueJ to create a project, a class, and how to run a program that you programmed.
Did you find it difficult? Compare writing the program in the terminal with the IDE, which one do you prefer?

I did not find the programming difficult as it wasn’t something very complicated. The most challenging part of coding this program was just knowing the syntax to create the program. It is much easier to write and run the code in the IDE. This is because in the terminal you need to know the command line codes and you need to open the terminal everytime you want to run the program that you wrote. And you can’t write the code in the terminal so you need to find the folder and open the .java file in textedit. The IDE made this a lot simpler and you just needed to open BlueJ and create the class and you could run it from there.


The video for the BlueJ program: 

APCSP Final Project

The Google Chrome extension, Tasks 1-6:

Task 1: Research (Class: May 15 & 17)

In class on May 15 I had trouble finding a client at first, so I sent an email to some adults that I thought could be potential clients. My dad was the only one to respond to the email, but he actually had a solid idea for a project and how I could do it. He wanted an app or something where users could see how long they were spending on a certain website, that amount of time would then be the amount of time that they could use whatever website they wanted ie. facebook, Instagram, etc. I thought that a better way to do a similar task was to have users input tasks they needed to complete, then after 5 or however many tasks, they could browse whatever website they wanted. Then I created a questionnaire that I sent to some students at HKIS to see what they thought of this idea and how I should go about doing it. With this idea with requirements my dad gave me and feedback from the community for what I should do with it, I was ready to start planning this app.

Task 2: Planning (Class: May 18-20)

Based on feedback I had received from the community, I knew what I was going to do for my project. I was going to make a Google Chrome extension because many people thought that this would be the easiest way for them to access this tool. I found out that Chrome extensions used the HTML, CSS, & Javascript programming languages. I then created two flowcharts for the two main functions of my extension: Blocking websites & unblocking websites after something is accomplished.


Task 3: Implementation (May 20-27)

When I learned that Google Chrome extensions used HTML, CSS, & Javascript, I thought that It wouldn’t be that hard because I already had a background in these languages. What I learned after that was that although HTML and CSS would work normally, Javascript in Chrome extensions was actually very different. This was because you needed to incorporate some of Chrome’s APIs for it to work, and you couldn’t use regular in-line commands like onclick.

After a long time of researching, I eventually figured out how to code this particular program. It took me a while to get used to the different syntax and how I would implement simple things like functions which became much harder when programming this extension.

One thing I realized during the time of programming the extension, I realized that parts of it would be completely useless. The part where users would input a task would be completely useless. Users could just put empty tasks or tasks that were incredibly simple to do like “keep breathing” or something like that.

To make a more useful app I decided to scrap this idea of tasks and replace it with a timer. A user can set a timer for how long they can’t use a website. Then they can’t access that website for that chosen amount of time. In case they made an error, I put a way to override the timer and just delete that website from the blocked website list. This password would be set at the installation of the Chrome extension and couldn’t be changed after.


The way I collaborated with others varied a lot. I got many of my classmates to test my program and give me feedback if they thought something could be done better. I think I collaborated the most with Rishab and Brandon because if Rishab needed help with his code then I would help him and then he would help me test or give small amounts of feedback as to how the extension could be used better. Brandon helped me quite a bit because he was the one who gave me the idea to replace the tasks with a timer. I had just realized that the tasks would be useless and was trying to come up with an alternative solution when Brandon came up with the idea to make the countdown to when they could browse the blocked websites again.

Task 4 Testing (Happened during Task 3)
– Testing document*:  https://docs.google.com/document/d/104kUkGwBp88wQSUz8homaGSeLBFMJ-QiBeBEVtJlCLs/edit?usp=sharing

*2 pages long, page 1: classmates & I testing, page 2: client testing.

Task 5 (May 30)

Video of the extension working link: https://youtu.be/LU4jCTKerMw


Task 6 (May 30)

Github Code: https://github.com/ZW2828/apcsp-chrome-extension/tree/master/APCSP%20extension



18 January, 2018. Card Tricks




  1. Shuffle the deck
  2. with the deck face down count the top 9 cards
  3. flip the top 9 cards and ask them to choose one and remember it
  4. Flip the 9 cards to be face down then put the chosen card on top
  5. put the rest of the deck on top of these 9 cards
  6. then count down from 10 and put down one card when you count. If the card matches what number you were saying then stop. If none of the cards match what number you were saying then stop at one then put a card face down on it
  7. do this so that you have 4 piles of cards
  8. add up the top card on each of the open-faced piles
  9. count this number on the rest of the deck
  10. the last card should be the one that they chose

Me doing the card trick:

10 January, 2018. Classes

We learned about classes in python. Classes can be used to create a general idea of something where you can change the specifics. For example, you can create a class called cars where you have general information about the cars like the way the engine works and other things. The specifics could be changed like the type of engine, car color, the speed, the kilometers per liter of gas. This is just one example of how classes work. Instead of creating different things and recoding the whole thing you just need to code it once then change the different variables.

November 12, 2017. APCSP (S) – AT&T Field Trip Reflection

The only thing that I knew about AT&T before the field trip was that it was a telecommunications company that happens to be the biggest one in the United States of America. I knew that it was a company similar to something like CSL in Hong Kong. What I didn’t know was that AT&T was international and not only in the USA. During the talk Mr. Mulligan told us that AT&T was in Hong Kong because it was the headquarters of the Asia division. He said that in Asia, AT&T helps startup companies and the most important thing for companies to do was to learn how to use Big Data to their advantage. Big Data is simply just analyzing large quantities of data. He taught us that there are multiple types of Big Data, unstructured and structured. Unstructured data are things like images, video, audio and other data from the real world. Structured data are things like excel spreadsheets where everything is nicely organized.

One example of AT&T using Big Data was when he told us about one of AT&T’s partners: Redbull. Redbull uses an IOT chip created by AT&T to receive live data about a racecar. When racing there were lots of engineers. I think there were something like 30 on-track engineers and 60 engineers back in the UK. They used all of this data to try to improve the car and see what is wrong with it. I found this really interesting because I always thought that racecar driving was simple. A driver drove the car as fast as he could to the finish line and if there were problems then they would go to the pit stop. This showed me that pretty much everything nowadays is being digitized, even something like racecar driving.

An example of other companies using Big Data taught me that I don’t own any of my free accounts to any services. He taught us that companies like Facebook and Google that are free to use actually own the account that I use, they just let me borrow it. These companies can sell this data to advertisers so that there are things like targeted ads. Advertisers uses this data to see things that you have previously searched, liked, commented on, and visited. This then goes through their programs to show you ads that pertain to these things you have previously seen. For example if I was looking at Nike Air Jordans, then Google could sell this data to advertisers and then the next ads I would see would be about Nike Air Jordans.

Some other interesting things I learned were about cloud computing and digital security. I had heard of these terms before the trip but never really learned about them in depth. Although Mr. Mulligan didn’t go in depth with either of these topics, I still thought that these were things I could learn more in depth about outside of class and I could broaden my scopes in regards to computer science. Overall I found this trip to be an amazing experience where I learned many things about a topic that I had no idea even existed until about a week ago. Now I am interested in many more things than just programming simple things. I’ve learned about IOT chips, digital security, cloud computing, and Big Data. All of these things can spark a new passion for computers and the growing digital part of this world.