Gracie I had a friend who was interested in becoming a teacher. In order to enroll in a teaching program at a local university, my friend had to take an entrance exam to prove that it was material.
When the friend tried to get his test results, the page glitched. Ever the resourceful Gracie, she offered to see if she could identify the problem. It’s possible that an ad blocker extension or something is breaking the script. However, after a few minutes of using my browser’s debugging tools, I discovered that the script was already broken.
if (result == '0.9')
alert("Your calculated average is : 49.0 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '1.0')
alert("Your calculated average is : 50.0 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '1.1')
alert("Your calculated average is : 52.3 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '1.2')
alert("Your calculated average is : 54.7 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '1.3')
alert("Your calculated average is : 57.0 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '1.4')
alert("Your calculated average is : 57.8 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '1.5')
alert("Your calculated average is : 58.5 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '1.6')
alert("Your calculated average is : 59.3 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '1.7')
alert("Your calculated average is : 60.0 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '1.8')
alert("Your calculated average is : 61.3 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '1.9')
alert("Your calculated average is : 62.7 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '2.0')
alert("Your calculated average is : 63.0 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '2.1')
alert("Your calculated average is : 64.3 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '2.2')
alert("Your calculated average is : 65.7 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '2.3')
alert("Your calculated average is : 67.0 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '2.4')
alert("Your calculated average is : 67.8 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '2.5')
alert("Your calculated average is : 68.5 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '2.6')
alert("Your calculated average is : 69.3 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '2.7')
alert("Your calculated average is : 70.0 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '2.8')
alert("Your calculated average is : 71.0 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '2.9')
alert("Your calculated average is : 72.0 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '3.0')
alert("Your calculated average is : 73.0 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '3.1')
alert("Your calculated average is : 74.3 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '3.2')
alert("Your calculated average is : 75.7 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '3.3')
alert("Your calculated average is : 77.0 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '3.4')
alert("Your calculated average is : 77.8 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '3.5')
alert("Your calculated average is : 78.5 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '3.6')
alert("Your calculated average is : 79.3 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '3.7')
alert("Your calculated average is : 80.0 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '3.8')
alert("Your calculated average is : 82.0 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '3.9')
alert("Your calculated average is : 83.3 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '4.0')
alert("Your calculated average is : 85.0 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '4.1')
alert("Your calculated average is : 90.0 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '4.2')
alert("Your calculated average is : 95.0 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
if (result == '4.3')
alert("Your calculated average is : 100.0 %nnTo be eligible for admission to the Teacher Education programs, you must have a minimum average of 68.0 %");
choice to use alert
“What year is this?” you wonder. What a terrible user experience choice. But the core logic itself seems to be the real problem.The function that maps results to percentages is obviously not strictly linear, but clearly be relationship.
My suspicion after seeing this is that this calculation started in a spreadsheet. Someone in the admissions office enters the test results into a spreadsheet and uses it to generate percentages. When an organization decided to put this on the web, they simply handed a spreadsheet to a developer and said, “Run this.” So…they did.
But in defense of the developer, teeth Have you done this calculation? This relationship has no real meaning. The steps between each point in the result are approximately random, with a maximum gap of 2.4 and a minimum gap of 0.7.
And this brings me to my second suspicion. The point is that the mapping of results to “percentages” is completely arbitrary. They know that a result of 2.5 is the cutoff point. Higher than this will allow you to participate in the program, lower than this will not allow you to participate. So they call it 68.5%, they set the bar at 68%, and everything else is just to make the numbers look good.
So this code could be better, but I’m not sure it’s as annoying as the business process in question.
Anyway, I wish they would hire some teachers for the programmers.
Continuously monitors server configuration changes and reports any configuration changes. Get started with Otter today!