It's UWAweek 48


This forum is provided to promote discussion amongst students enrolled in Open Source Tools and Scripting.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

How do I ask a good question?
Displaying selected article
Showing 1 of 564 articles.
Currently 2 other people reading this forum.

 UWA week 16 (1st semester, non-teaching week) ↓
SVG not supported

Login to reply

8:13pm Wed 20th Apr, Michael W.

> Hi Michael, > > With regards to task 2, suppose the integer supplied (e.g. common_words -nth 10000000000000 textfiles) is larger than the number of unique words found in a text, do you want us to: > > 1. Use the word with the lowest frequency > > 2. Make the program "fall over" via anti-bugging and output an appropriate error message (e.g. integer supplied is larger than total number of unique words. Please try a smaller number.) > > 3. ignore that text if -nth is larger than number of unique words. > > If option 3 is preferred, do we then need to output an error message if all texts in the directory are ignored?
Hi, I think we can agree that you can't simply do nothing. So, with all potential errors, the first requirement is that you spot the error and let the user know that something is not right. If you can sensibly proceed, then let the user know that that is what you're doing and get on with it; OTOH, if it is not sensible to process, having let the user know of problem, exit. In short, it is a judgement call to some extent, but the circumstances with pretty much dictate which path you choose. In short, do something sensible. Cheers MichaelW

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  1:17AM Sep 14 2022
Privacy policy