Urgent.News

What's breaking now, across thousands of outlets.

Tech

The Answer Checker Explains the Missing Question

Our practice page grades answers with one line: parse ( $( '#practice-answer' ) . value ) . eq ( answer ) If answer is undefined , that line throws. Not "marks it wrong" — throws, Cannot read properties of undefined (reading 'n') . That one line is why our question bank has no vertical-line question, and why three of our articles teach a case the tool will never test. I found it by running the…

The practice page grades answer submissions with a single line of code: parse($( #practice-answer ).value).eq(answer). If answer is undefined, the line throws an error, instead of marking the answer as incorrect. This code is responsible for the absence of vertical lines (undefined slope) in the question bank, as well as three of the 43 blog articles that explain this concept.

The author discovered this issue by feeding the question bank into the site's own function, rather than reading through the code. The investigation involved copying the question array from two JavaScript files (38,731 bytes and 9,985 bytes) and testing the slope() function with both regular and vertical pairs of points. The grader's parse().eq() chain was also tested with eight inputs, revealing that a vertical pair would cause the function to throw an error instead of returning an undefined slope.

The practice set contains ten questions, eight of which have distinct answers, meaning that two answers make up 20% of the bank each. This distribution could be problematic for students who struggle with understanding the sign rule, as they might guess the correct answer based on round numbers, rather than understanding the concept.

The question bank is limited to two distinct sets of five questions, cycling through them indefinitely, which means that a student who practices twice has seen every question. The source code contains 151 comment lines in Chinese, which is unusual for an English-language site. Additionally, the page is not strictly thin, as it has five questions, a hint button, a show-answer button, and a score display.

The author suggests that fixing the issue of missing vertical lines would require updating the grader to recognize undefined slopes, which would necessitate changing the answer type.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

maven could not transfer artifact ci, not a missing jar

A maven could not transfer artifact ci failure means the resolver tried to move bytes and could not, which is a different failure from the repository telling Maven the artifact is not there.

  • "Could not transfer artifact" message differs from "Could not resolve dependencies"
  • Cached failure related to "not-found" issue, not retry property
  • Timeout of 30 minutes often triggers job kill before error appears

What we write down after every database restore drill

A restore drill that passes tells you that one backup restored on one day. That's worth knowing, but most of what drills can teach you only shows up when you compare them: restore times that creep up…

  • Restore drill logs record date, person, backup, target environment, and restore time.
  • Logs check success, table counts, row counts, app connectivity, and file integrity.
  • Key insight: dump size doesn't predict restore time; custom-format includes index rebuild.

Docker failed to calculate checksum of ref, in CI

Docker failed to calculate checksum of ref is BuildKit naming the content reference it was hashing when a path under it could not be read.

  • Docker fails to calculate checksum of ref during build
  • Error occurs when referenced path is missing or excluded
  • Check error message for path to identify missing file or stage

I built 154 PDF and video tools that run entirely in the browser: how, and how to check

Most free online PDF tools work the same way: you upload your file, a server processes it, and you download the result. For a passport scan or a bank statement, that is a lot to ask of a stranger's…

  • Stayput Tools processes data directly in user's browser, eliminating file uploads.
  • Utilizes various browser technologies: PDF-lib, pdf.js, OCR, WebCodecs, ONNX Runtime.
  • Verification methods: inspect Network tab, check byte counts, observe Content-Security-Policy.

More from Sunday 15 November →