Because so many people potentially “touch” software code, there is tremendous potential to create unanticipated problems when tradeoffs or fixes are implemented without proper knowledge or communications. Please describe a scenario or instance where this might happen or has happened to you within a job setting.
Discussion Forum 8
Name
Institution
Course
Instructor
Date
Discussion Forum 8
Example of a Software Code Mistake
As a computer science student, I worked with the Google team that created App Inventor, a program used by beginners to create Android apps. We opted to implement sprites, “an object with a 2D representation and the ability to move and interact with other program elements” (Spertus, 2019). The App Inventor was successfully implemented as an object-oriented in Java, meaning it is purely objects all the way down. Applying the behavioral similarity between balls and image sprites, an abstract Spriteclass with X, Y, Heading, and Speed as its properties were created. They all bounce off the edge of the screen for collision detection (Spertus, 2019).
The main difference between a ball and an image sprite is seen in terms of drawing – a bitmap or a filled-in circle. Since the image was placed on the enclosing canvas, the x- and y-coordinates naturally specified the upper-left corner of the image. However, having the x- and y-coordinates specify the upper-left corner of the bounding box containing the ball was a mistake because they should specify the center of the circle, as commonly done in mathematics (Spertus, 2019).
This mistake was so grave that it ended up affecting millions of App Inventor users, among whom were beginners in programming. They had to do extra work when creating an App using the ball component. We would later be able to patch the problem after ten years. Still, the problem was not fully fixed because “APIs are forever” (Spertus, 2019). This example portrays an error that had a far-reaching consequence.
References
Spertus, E. (2019). My Most Embarrassing Mistakes as a Programmer (so far). THE OVERFLOW. https://stackoverflow.blog/2019/10/29/my-most-embarrassing-mistakes-as-a-programmer-so-far/