5

Prod code. The legacy codebases never fail to shock me just when think you've seen it all.

Comments
  • 0
    ASP is great isn't it
  • 4
    @kescherRant

    Agreed, but ASP isn't the problem here. Everything in that snippet is wrong.

    Defining ints as strings then cast to ints. Why not just us a fucking int?

    Evaluating NewContributes to empty doesn't account for possible null values. String.IsNullOrEmpty would be prefered.

    NewContributes isn't validated, so it's more than viable Convert.ToInt could exception out. Int.TryParse would be prefered.

    Use of random literals. Could do with introducing some constants.
Add Comment