Article 5TQH5 CodeSOD: Well Trained

CodeSOD: Well Trained

by
Remy Porter
from The Daily WTF on (#5TQH5)

Mandatory compliance training is a thing. The reasons behind it range from companies trying to reduce civil liabilities to actual legal mandates which require the training. The quality of mandatory training ranges from "useless" to "actively awful", and it's mostly PowerPoint-style slides interspersed with quizzes to make sure you were "paying attention". The worse ones will usually have timers on the slides so you can't just click past, and have to actually idle to "force" you to read it.

Also, since legal compliance tends to move slower than technology, training built years ago is frequently still relevant. So, for example, Duncan's company built training back when you could reasonably expect Flash to run in the browser. Building the training and the content cost money, so once Flash got deprecated, they weren't just going to throw that money away- they found a contractor who'd convert it to "HTML5".

Now, this means that the code quality is garbage, which is fine. We can't really fault the tool. But there are some assumptions about the very use of the tool that render these quizzes even more useless than the usual fare:

function checkQuestions( bFeedback, bForce ) { if( !bForce )if( bFeedback && !forceCheckQuestions() ) return 0; var ans_VarQuestion_05 = VarQuestion_05.getValue() if( bFeedback && currFeedbackIdx == 0 && !qu84909.hasBeenProcessed) { if( ans_VarQuestion_05 == 'A. ' ) { settings = 'height=300,width=400,top='+(screen.height-300)/2+',left='+(screen.width-400)/2 if( is.ns ) settings += ",modal=yes,dialog=yes" trivWndFeedback = new jsDlgBox( '84909', '20013', 'page81719.html', function(){ trivWndFeedback=null; setTimeout( 'checkLeavePage()', 100); }, 400, 300 ); trivWndFeedback.create(); return 0; } else if( ans_VarQuestion_05 == 'B. ' ) { settings = 'height=300,width=400,top='+(screen.height-300)/2+',left='+(screen.width-400)/2 if( is.ns ) settings += ",modal=yes,dialog=yes" trivWndFeedback = new jsDlgBox( '84909', '20013', 'page81714.html', function(){ trivWndFeedback=null; setTimeout( 'checkLeavePage()', 100); }, 400, 300 ); trivWndFeedback.create(); return 0; } else if( ans_VarQuestion_05 == 'C. ' ) { settings = 'height=300,width=400,top='+(screen.height-300)/2+',left='+(screen.width-400)/2 if( is.ns ) settings += ",modal=yes,dialog=yes" trivWndFeedback = new jsDlgBox( '84909', '20013', 'page81719.html', function(){ trivWndFeedback=null; setTimeout( 'checkLeavePage()', 100); }, 400, 300 ); trivWndFeedback.create(); return 0; } else if( ans_VarQuestion_05 == 'D. ' ) { settings = 'height=300,width=400,top='+(screen.height-300)/2+',left='+(screen.width-400)/2 if( is.ns ) settings += ",modal=yes,dialog=yes" trivWndFeedback = new jsDlgBox( '84909', '20013', 'page81719.html', function(){ trivWndFeedback=null; setTimeout( 'checkLeavePage()', 100); }, 400, 300 ); trivWndFeedback.create(); return 0; } } if( !bFeedback ) currFeedbackIdx = 1; return 1}

Now, the page quite "securely" disabled right click, so it was "impossible" to open debugging tools or view source, short of knowing how to navigate menus or use keyboard shortcuts.

If one reads the code carefully, we know that B. is the correct answer- the other three answers all go to the same page, but B. is the odd one out.

Now, is this actually easier than just using common sense, because these trainings aren't designed to actually test people and instead just provide a veneer of plausible "we made them take a quiz" logic?

Probably not. But at least Duncan was more entertained than he would be by actually doing the training.

otter-icon.png [Advertisement] Otter - Provision your servers automatically without ever needing to log-in to a command prompt. Get started today! TheDailyWtf?d=yIl2AUoC8zA
External Content
Source RSS or Atom Feed
Feed Location http://syndication.thedailywtf.com/TheDailyWtf
Feed Title The Daily WTF
Feed Link http://thedailywtf.com/
Reply 0 comments