[Humor] Code Optimization

Discussion created by theOtter on Apr 19, 2016
Latest reply on Apr 19, 2016 by theOtter

It’s always fun to inherit a system and see what previous developers (especially nontechnical “developers”) have done, but today I came across a snippet that was too good not to share:


Original code:

If(Contact Type="Client"; "Yes"; If(Contact Type="Printer"; "Yes"; If(Contact Type="Internal"; "Yes"; If(Contact Type="Vendor"; "Yes"; If(Contact Type="Studio"; "Yes"; If(Contact Type="Engraver"; "Yes";"Yes"))))))

My optimized version: