Do you look for large strings in code?

Updated by Brady Stroud [SSW] 1 year ago. See history

123
<introEmbed body={<> Long hard-coded strings in a codebase can be a sign of poor architecture. </>} />

To make hard-coded strings easier to find, consider highlighting them in your IDE. longstringbadexample.png Figure: Bad Example - The connection string is hard-coded and isn't easy to see in the IDE.Figure: Better Example - The connection string is still hard-coded, but at least it's very visible to the developers.longstringgood.pngFigure: Good Example - The connection string is now stored in configuration and we don't have a long hard-coded string in the code.

Acknowledgements

Adam Cogan
Damian Brady
Related rules

Need help?

SSW Consulting has over 30 years of experience developing awesome software solutions.

We open source.Loving SSW Rules? Star us on GitHub. Star