• Ron Fox (google)

    Throws and exception frist time, everytime.

  • Nicholas "LB" Braden (github) in reply to Ron Fox

    AndException extends GrammarException?

  • Guesty1337 (unregistered)

    If it throws an error every time RoleExists is called, the for loop can count until the universe ends because it's never called...

  • Mason Wheeler (unregistered)

    The for loop in the middle is an incredibly special snowflake.

    Apparently the poor dumb developer has never heard of string.Join()

  • Ex-lurker (unregistered)

    Today's WTF aside, am I the only one facing a scrollbar that can't be dragged underneath the code? When I try to drag it it reacts as if it was an image instead. Who the hell created that piece of junk?

  • JiffyPop (unregistered)

    I love how being a member of Level1 prevents you from being added to Level10 or Level100

  • Geoff (unregistered) in reply to JiffyPop

    That isn't always wrong, there are cases where say having the role 'Approve' means you should NOT be allowed to also have the role 'DataEntry'

  • TenshiNo (unregistered) in reply to Geoff

    While true, that should not be based solely on some arbitrary string value. There will always end up being some scenario somewhere down the line where the "rule" has an exception, and then you end up having to rewrite everything. Or worse, start "duplicating" role permissions so that two roles with identical permissions can have different naming conventions, just to get around this initial bad design.

  • (nodebb) in reply to Mason Wheeler

    Apparently the poor dumb developer has never heard of string.Join()

    There's many things wrong with it, and that's the least of them. In particular, backwards! Without separator. WTFlyingF were they thinking?

    But it's saved by the bell of never actually being run. Yay!

  • (nodebb)

    It's really too bad their provider doesn't use RoleExists. With a million or few users in the system, it'd be fun to watch this load string[] userroles.

  • trailmax (unregistered)

    In this day and age, TRWTF is using MembershipProvider in the first place

  • NotBugItsFeature (unregistered)

    I am trying to figure out why you would want to create a role that doesn't exist for a new user. Sounds like trouble waiting to happen.

  • Anonymous (unregistered) in reply to Ex-lurker

    am I the only one facing a scrollbar that can't be dragged underneath the code?

    Blakeyrat, is that you?

    Yes, you're the only one. It scrolls fine for me.

Leave a comment on “Trained Developer”

Log In or post as a guest

Replying to comment #:

« Return to Article