It's UWAweek 47

help3007

This forum is provided to promote discussion amongst students enrolled in CITS3007 Secure Coding. If posting a question, it's suggested you check first whether your question is answered in the unit Frequently Asked Questions (FAQ) list, and use the search box (on the right) to see if an answer to your question has already been posted.

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.

Note that any posts must comply with the UWA Code of Conduct and the UWA Academic Conduct Policy. That means you should (a) treat everyone with respect and courtesy, and (b) not post your solutions to an assessment that's in progress.

If asking a programming question, it's recommended you read How do I ask a good question? If reporting or troubleshooting a bug in software used in the unit, it's recommend you read How to report bugs effectively.
Displaying selected article
Showing 1 of 170 articles.
Currently 30 other people reading this forum.


 UWA week 19 (1st semester, week 10) ↓
SVG not supported

Login to reply

👍?
helpful
3:27pm Tue 7th May, Arran S.

Hi,

Just to clarify, my suggestion was that you come up with (ideally multiple) ways the apparent contradiction might be resolved – the idea here is for students to actively engage with the project specification, and think about how project requirements work and can be clarified in the real world. I encourage that sort of discussion on the forum!

You have proposed that "Using a simple if statement instead of assert() would be better then", but there are a few problems with that. Firstly, I'm not sure I see how that resolves the problem – it doesn't clarify what's going to be done when the if conditional evaluates to true. Secondly, assert statements are already conditional, effectively – they only have an effect if the condition they assert evaluates as false – so it's not clear to me why you think an if statement would be any better. Lastly, I'll gently remind students that it's a good idea to explain your reasoning (this is a good principle to bear in mind for assessments, on the discussion forum, and in the workplace), and when asking questions on the forum, to explain what you've already thought of or tried, and why it hasn't worked. A one-sentence conclusion doesn't really do that.

At any rate: rather than me trying to guess at what you mean and why you said it, I'm going to recommend you take this query to lectures and/or to your labs for discussion with me, other students and/or your lab facilitator. There are still multiple labs and lecture slots available to discuss your questions before the project is due. (Tomorrow's lecture will be particularly appropriate, though, as we'll be discussing API design.)

You also could read in your C textbook about what the purpose of the assert() macro is, and how it's used in development. If the textbook you've chosen doesn't have much discussion of this, then you could take a look at the Seacord Effective C text, which has a reasonable discussion of it in a chapter dedicated to testing and debugging.

I hope that helps. Feel free to email me directly if anything is unclear.

Cheers,

Arran

ANONYMOUS wrote:

Using a simple if statement instead of assert() would be better then.

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  8:08AM Aug 25 2024
Privacy policy