language agnostic - Which should one code first, functionality or validity checks? -


When coding, say, a registration form from scratch, whether it is understood to work with previously required input Comes in, and then go back and catch unexpected inputs and deal with errors?

The process of alternative input, inspect to check any obstacles and control them properly, and then the normal use case is working correctly.

Is one way better for another, and if so why? Apart from this, is there an alternative way to go about this kind of two-part work?

To clarify , by validity, I mean just data verification, including business rules, such as "More than X people can not register for this event "

My opinion to work best, is to work a decent first edition which is all unexpected cases Can not be completely tackled, but wisely and modular, then you can return Education can and logic can correct that passed your test.

In the real world, this method is closed because you are likely to be productive and interested when some condo, rather than trying to understand all the shore cases in your head, rather than start Deal with them in


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -