What are some of the techniques that you seasoned veterans used in order to approach any given problem even if the inputs or the requirements are not known to you? I am currently trying to create a login system in php and I became curious because I do not know exactly what and where things should go. Thank you!
1 Answers
Quick answer: find a chunk of PHP that does a login. This is called research. The more general answer: Step 1). Broadest view ?is it even a computer issue??? Step 2) wish list ( in your case "I want a login") Step 3) requirements (in your case "using PHP") Step 4) specifications (the exact details) Steps 5,6,7,... Design, code, debug, test, release, support. This is called the "waterfall model". In actual practice, we generally have to repeat various steps: in any case, get the habit of documenting as you go. Research what you or someone else has already created that does it. In your case, carefully follow the detailed steps that you used to login to SO. Another model: input->process->output. View 1: input= user name, password or passcode; process= validate both items against something (such as a list, a file, a database, win32 reg entries...); Output= logged in user OR failed login. View 2 to nth: progressively add details [example name of password file then rules about legal passwords, user names, what to do about duplicates, the usual rules about creating, adding to, deleting, modifying the password file]. Myself, I constantly ask the question what is the desired output(s): is it (are they) contained in inputs+process? I frequently review for normal operation and for boundary condition (in your case, what about zero length user name and/or password, upper vs lower case, either too long, malformed, or illegal characters.) These questions are useful for gradual discovery of the necessary requirements, specs, design and rules. Once one has been doing this awhile, this flashes through one's mind. Now it becomes fairly easy to ask for enough information to do the job and or see what needs further research and think time. See also : books on software engineering, probably more detail than you want...

- 19
- 3
-
It is the perfect amount. Thank you so much. – iiulian8 Aug 17 '20 at 20:35