Two-Fer exercise recommends against input validation.
See original GitHub issueMy solution to the Two-Fer exercise included a test for isinstance(name, str)
, and the analyzer states that conditionals are used unnecessarily. This could be a completely preferential thing and I’m just over-engineering, but I feel like input validation shouldn’t be considered “unnecessary.”
If I’m wrong about this, at least I’ll have learned something haha
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Two-Fer exercise recommends against input validation. issue ...
My solution to the Two-Fer exercise included a test for isinstance(name, str) , and the analyzer states that conditionals are used unnecessarily.
Read more >Community solutions for Two Fer in F# on Exercism
Explore other people's solutions to Two Fer in F#, and learn how others have solved the exercise.
Read more >exercism/problem-specifications: Shared metadata ... - GitHub
Repository for practice exercises to be used across tracks. This includes both problem statements available as markdown and test data as JSON described...
Read more >Input Validation - OWASP Cheat Sheet Series
This article is focused on providing clear, simple, actionable guidance for providing Input Validation security functionality in your applications.
Read more >NHSCR REGISTRY REPORT - Geisel School of Medicine
validation and completeness on year 2017 cases. The validation component ... to use it as the basis for the NHSCR Data Collection Manual....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think that should do it; I appreciate the info and quick response!
@piccoloser
You are most welcome!. And all that being said – I can clearly see why you’d want to be suspicious if you were taking in “random” user input. (users are creative and terrible engines of chaos!). Certainly something to think through if this was part of a larger program or was a method designed to interact with an entry screen. Also something to really think through if the string you are building and passing back is intended for a downstream process to act on. That recent log4J bug is no joke – and neither are un-sanitized DB inputs. 😉
When I used to mentor this problem a lot, I would refer to this post on Real Python, I love how he breaks down the reasoning behind the different string formatting options and goes over benefits and pitfalls.
Thanks again for logging this. I will keep it open for a bit and then close – unless you have other questions or issues?