---
title: "Comment by Paddy McCarthy on \"How to write good code?\" | Hashnode"
description: "6} Choose correct Data Types If you restrict something then check that the value is within the assumed range. Many exploits might take advantage of giving value"
url: "https://hashnode.com/posts/how-to-write-good-code/5e060705010cc49d3c1e81b8/comment/5e19ca4e32d5fad159b6854f"
---

[Discussion](https://hashnode.com/posts/how-to-write-good-code/5e060705010cc49d3c1e81b8)

Comment [How to write good code?](https://hashnode.com/posts/how-to-write-good-code/5e060705010cc49d3c1e81b8)

[Paddy McCarthy](https://hashnode.com/@Paddy3118)

[Jan 11, 2020](https://hashnode.com/posts/how-to-write-good-code/5e060705010cc49d3c1e81b8/comment/5e19ca4e32d5fad159b6854f)

> 6} Choose correct Data Types If you restrict something then check that the value is within the assumed range.

Many exploits might take advantage of giving values outside what was once thought a reasonable range. As an aside, arbitrary string length in dynamic languages such as Perl can often help.

[Tanseer Saji](https://hashnode.com/@tanseersaji)

[Jan 16, 2020](https://hashnode.com/posts/how-to-write-good-code/5e060705010cc49d3c1e81b8/comment/5e19ca4e32d5fad159b6854f#reply-5e206aa07a1d3fcc5902babd)

Yes that's right
