Faculty of Engineering and Mathematical Sciences 
Not logged in (login)


This forum is provided to promote discussion amongst students enrolled in Open Source Tools and Scripting (CITS4407).
RSS cloud
Jump to:

Assignment 1 Task 1 quick question

1 of 390 articles shown, currently no other people reading this forum.
From: Lee dB.
Date: Fri 17th Apr, 8:55am


"Christopher McDonald" <ch*i*.*c*o*a*[email protected]*a*e*u*a*> wrote:

> "David May" <17*1*2*[email protected]*u*e*t*u*a*e*u*a*> wrote:
> > 90% of my code is carefully validating the inputs. Only one line does the actual work.
> > I hope that is not a problem.
> It won't be a problem (provided it works).
> I don't wish to have to diagnose any problems if your validating code, itself, doesn't work.

I’ve been debating myself whether to validate or not, and have tended towards only performing minimal 
validation, and relying on utilities like date to perform the validation and trapping any errors. I’m 
not sure if this is the right approach (and probably isn’t really defensive programming), but I feel 
like it contributes to more compact, readable code - and given that these are small utilities, seems 
like the right philosophical approach. 

What are your thoughts on this, Chris?

Related articles

Assignment 1 Task 1 quick question (all 6) RSS
├─ original   Wed 15th Apr, 9:07pm, Ryan O.
├─ reply 1   Thu 16th Apr, 4:31am, Christopher M.
├─ reply 2   Thu 16th Apr, 10:21am, Ryan O.  O.P.
├─ reply 3   Thu 16th Apr, 12:20pm, David M.
├─ reply 4   Thu 16th Apr, 12:24pm, Christopher M.
└─ THIS   Fri 17th Apr, 8:55am, Lee dB.
This Page

Program written by: [email protected]
Feedback welcome
Last modified:  3:57pm Aug 06 2020