As I was creating this program, I had just started learning how to code. I knew the basics but wanted to use it more creatively to solve real-world problems. I have always thought about the idea of “balancing” out an object to see if I was able to see better but I had thought it was something too simple to create. However, with my new coding knowledge, I was eager to create something impactful.
Using JavaScript, I first started out with the elements of the program, adding the buttons, slider, drop-down menu, colors, and image. For each element, using CODE.org’s modification features, I was able to chose consistent colors and maintain text size. After creating a simple program that had a slider to move horizontally, I coded the program which moved the image back in forth using a near-infinite loop statement. After experimenting with the loops and the “set position” function built into code.org, I had to precisely find the “normal” position of the image to ensure that it oscillates at the same distance and speed back and forth. After getting that code to work, I created a variable which, when the speed slider is changed, changes how fast or slow the image oscillates. After getting the oscillation to work with horizontal Nystagmus, I added the feature to allow it to work for vertical Nystagmus as well.
This year, I have added a feature which allows custom images to be set aside from the default eye test chart. To create it, I had to allow the user to type in the URL of the image and when the back button is pressed, the image is instantly replaced. Creating a new function which incorporates both the vertical and horizontal oscillation, I have also added a feature to account for rarer conditions which individuals have both horizontal and vertical Nystagmus.