Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. All This For A MessageBox??

All This For A MessageBox??

Scheduled Pinned Locked Moved The Lounge
helptutorialquestion
17 Posts 13 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kevin Marois
    wrote on last edited by
    #1

    Navigator.PrepareMessageBox(TheApp.Messages.ErrorWarningMessages.StateProceduresMenuVM_MsgboxBody_OpenStateProcedureWithLock_2, stateProcedure.StateDescription, t.Result.LockMessage).UseButtons(MessageBoxOptions.OK).Show();

    I've been working at this place about a month now, and EVERYTHING is way too abstracted out... This is a classic example of over-coding something.. makes we want to find the guy who wrote and shake him violently.

    If it's not broken, fix it until it is

    L Sander RosselS RaviBeeR S W 11 Replies Last reply
    0
    • K Kevin Marois

      Navigator.PrepareMessageBox(TheApp.Messages.ErrorWarningMessages.StateProceduresMenuVM_MsgboxBody_OpenStateProcedureWithLock_2, stateProcedure.StateDescription, t.Result.LockMessage).UseButtons(MessageBoxOptions.OK).Show();

      I've been working at this place about a month now, and EVERYTHING is way too abstracted out... This is a classic example of over-coding something.. makes we want to find the guy who wrote and shake him violently.

      If it's not broken, fix it until it is

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      It does not add any obvious value over the standard way. It does add the obvious disadvantage that it is different from those in all the textbooks and online examples. It would also incur an overhead, introduce the chance of bugs, and increase overall complexity. But does it actually show a real MessageBox? Or is it something similar, with additional stuff? What does t.Result.LockMessage contain? Whotsitstype? If it is simply the Windows MessageBox, then it is adding more costs than value :)

      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

      K 1 Reply Last reply
      0
      • K Kevin Marois

        Navigator.PrepareMessageBox(TheApp.Messages.ErrorWarningMessages.StateProceduresMenuVM_MsgboxBody_OpenStateProcedureWithLock_2, stateProcedure.StateDescription, t.Result.LockMessage).UseButtons(MessageBoxOptions.OK).Show();

        I've been working at this place about a month now, and EVERYTHING is way too abstracted out... This is a classic example of over-coding something.. makes we want to find the guy who wrote and shake him violently.

        If it's not broken, fix it until it is

        Sander RosselS Offline
        Sander RosselS Offline
        Sander Rossel
        wrote on last edited by
        #3

        What a fool. Everyone knows you should use ShowDialog() on MessageBoxes :)

        Visit my blog at Sander's bits - Writing the code you need. Or read my articles at my CodeProject profile.

        Simplicity is prerequisite for reliability. — Edsger W. Dijkstra

        Regards, Sander

        1 Reply Last reply
        0
        • L Lost User

          It does not add any obvious value over the standard way. It does add the obvious disadvantage that it is different from those in all the textbooks and online examples. It would also incur an overhead, introduce the chance of bugs, and increase overall complexity. But does it actually show a real MessageBox? Or is it something similar, with additional stuff? What does t.Result.LockMessage contain? Whotsitstype? If it is simply the Windows MessageBox, then it is adding more costs than value :)

          Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

          K Offline
          K Offline
          Kevin Marois
          wrote on last edited by
          #4

          My point exactly... plus, they use the Fluent design (method chaining) EVERYWHERE. I agree - there's not a whole lot of added value, IMHO.

          If it's not broken, fix it until it is

          1 Reply Last reply
          0
          • K Kevin Marois

            Navigator.PrepareMessageBox(TheApp.Messages.ErrorWarningMessages.StateProceduresMenuVM_MsgboxBody_OpenStateProcedureWithLock_2, stateProcedure.StateDescription, t.Result.LockMessage).UseButtons(MessageBoxOptions.OK).Show();

            I've been working at this place about a month now, and EVERYTHING is way too abstracted out... This is a classic example of over-coding something.. makes we want to find the guy who wrote and shake him violently.

            If it's not broken, fix it until it is

            RaviBeeR Offline
            RaviBeeR Offline
            RaviBee
            wrote on last edited by
            #5

            That's awful.  Much easier to just write (and faster to execute) as:

            MessageBox (hWnd,
            (LPCTSTR) "Warning"
            (LPCTSTR) "Please open the state procedure with a lock."
            MB_ICONINFORMATION | MB_OK);

            The heck with localization. /ravi

            My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

            G 1 Reply Last reply
            0
            • K Kevin Marois

              Navigator.PrepareMessageBox(TheApp.Messages.ErrorWarningMessages.StateProceduresMenuVM_MsgboxBody_OpenStateProcedureWithLock_2, stateProcedure.StateDescription, t.Result.LockMessage).UseButtons(MessageBoxOptions.OK).Show();

              I've been working at this place about a month now, and EVERYTHING is way too abstracted out... This is a classic example of over-coding something.. makes we want to find the guy who wrote and shake him violently.

              If it's not broken, fix it until it is

              S Offline
              S Offline
              Slacker007
              wrote on last edited by
              #6

              Coder For Hire wrote:

              I've been working at this place about a month now, and EVERYTHING is way too abstracted out...

              Are you being required to write shit like that, too? If so, then leave.

              K 1 Reply Last reply
              0
              • S Slacker007

                Coder For Hire wrote:

                I've been working at this place about a month now, and EVERYTHING is way too abstracted out...

                Are you being required to write shit like that, too? If so, then leave.

                K Offline
                K Offline
                Kevin Marois
                wrote on last edited by
                #7

                Already looking

                If it's not broken, fix it until it is

                1 Reply Last reply
                0
                • K Kevin Marois

                  Navigator.PrepareMessageBox(TheApp.Messages.ErrorWarningMessages.StateProceduresMenuVM_MsgboxBody_OpenStateProcedureWithLock_2, stateProcedure.StateDescription, t.Result.LockMessage).UseButtons(MessageBoxOptions.OK).Show();

                  I've been working at this place about a month now, and EVERYTHING is way too abstracted out... This is a classic example of over-coding something.. makes we want to find the guy who wrote and shake him violently.

                  If it's not broken, fix it until it is

                  W Offline
                  W Offline
                  wout de zeeuw
                  wrote on last edited by
                  #8

                  You're put off pretty quickly I have to say, this is really just superficial. Looks like the messages are localized, but other than that doesn't seem unnecessarily verbose.

                  Wout

                  K E 2 Replies Last reply
                  0
                  • W wout de zeeuw

                    You're put off pretty quickly I have to say, this is really just superficial. Looks like the messages are localized, but other than that doesn't seem unnecessarily verbose.

                    Wout

                    K Offline
                    K Offline
                    Kevin Marois
                    wrote on last edited by
                    #9

                    There is no good reason to code a messagebox like that. I'm put off because, like I said, EVERYTHING in this app is way over cooked. It takes FOREVERY to find something, and then FOREVER to make a small change.

                    If it's not broken, fix it until it is

                    1 Reply Last reply
                    0
                    • K Kevin Marois

                      Navigator.PrepareMessageBox(TheApp.Messages.ErrorWarningMessages.StateProceduresMenuVM_MsgboxBody_OpenStateProcedureWithLock_2, stateProcedure.StateDescription, t.Result.LockMessage).UseButtons(MessageBoxOptions.OK).Show();

                      I've been working at this place about a month now, and EVERYTHING is way too abstracted out... This is a classic example of over-coding something.. makes we want to find the guy who wrote and shake him violently.

                      If it's not broken, fix it until it is

                      P Offline
                      P Offline
                      PIEBALDconsult
                      wrote on last edited by
                      #10

                      You think that's bad, how about working with a class named VirtualEthernetCardDistributedVirtualPortBackingInfo ?

                      1 Reply Last reply
                      0
                      • K Kevin Marois

                        Navigator.PrepareMessageBox(TheApp.Messages.ErrorWarningMessages.StateProceduresMenuVM_MsgboxBody_OpenStateProcedureWithLock_2, stateProcedure.StateDescription, t.Result.LockMessage).UseButtons(MessageBoxOptions.OK).Show();

                        I've been working at this place about a month now, and EVERYTHING is way too abstracted out... This is a classic example of over-coding something.. makes we want to find the guy who wrote and shake him violently.

                        If it's not broken, fix it until it is

                        S Offline
                        S Offline
                        Shao Voon Wong
                        wrote on last edited by
                        #11

                        This reminds me of my current workplace. All the C++ class are heavily templated(The one I am working on, 20 data members are generic), even integer type are templated(can use int32 or int64). Very versatile but very difficult to find and read code because intellisense is not working as it does not know the type used; F12 is not working. Development time is impacted. PITA everyday!

                        1 Reply Last reply
                        0
                        • K Kevin Marois

                          Navigator.PrepareMessageBox(TheApp.Messages.ErrorWarningMessages.StateProceduresMenuVM_MsgboxBody_OpenStateProcedureWithLock_2, stateProcedure.StateDescription, t.Result.LockMessage).UseButtons(MessageBoxOptions.OK).Show();

                          I've been working at this place about a month now, and EVERYTHING is way too abstracted out... This is a classic example of over-coding something.. makes we want to find the guy who wrote and shake him violently.

                          If it's not broken, fix it until it is

                          A Offline
                          A Offline
                          Albert Holguin
                          wrote on last edited by
                          #12

                          Yeah that's pretty horrible. I hate people over-abstracting... nooooooooooo point.

                          1 Reply Last reply
                          0
                          • K Kevin Marois

                            Navigator.PrepareMessageBox(TheApp.Messages.ErrorWarningMessages.StateProceduresMenuVM_MsgboxBody_OpenStateProcedureWithLock_2, stateProcedure.StateDescription, t.Result.LockMessage).UseButtons(MessageBoxOptions.OK).Show();

                            I've been working at this place about a month now, and EVERYTHING is way too abstracted out... This is a classic example of over-coding something.. makes we want to find the guy who wrote and shake him violently.

                            If it's not broken, fix it until it is

                            M Offline
                            M Offline
                            MirageCoder
                            wrote on last edited by
                            #13

                            Navigator
                            .PrepareMessageBox(
                            TheApp
                            .Messages
                            .ErrorWarningMessages
                            .StateProceduresMenuVM_MsgboxBody_OpenStateProcedureWithLock_2,
                            stateProcedure.StateDescription,
                            t.Result.LockMessage
                            )
                            .UseButtons(MessageBoxOptions.OK).Show();

                            If I were to deal with code like this, the first thing I would do is sprinkle newlines *everywhere*...

                            1 Reply Last reply
                            0
                            • RaviBeeR RaviBee

                              That's awful.  Much easier to just write (and faster to execute) as:

                              MessageBox (hWnd,
                              (LPCTSTR) "Warning"
                              (LPCTSTR) "Please open the state procedure with a lock."
                              MB_ICONINFORMATION | MB_OK);

                              The heck with localization. /ravi

                              My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

                              G Offline
                              G Offline
                              Gary R Wheeler
                              wrote on last edited by
                              #14

                              Ravi Bhavnani wrote:

                              The heck with localization.

                              Yes, but it's so much fun, Ravi... Been there, done that, got the UNICODE/UTF-8 scars to prove it.

                              Software Zen: delete this;

                              1 Reply Last reply
                              0
                              • K Kevin Marois

                                Navigator.PrepareMessageBox(TheApp.Messages.ErrorWarningMessages.StateProceduresMenuVM_MsgboxBody_OpenStateProcedureWithLock_2, stateProcedure.StateDescription, t.Result.LockMessage).UseButtons(MessageBoxOptions.OK).Show();

                                I've been working at this place about a month now, and EVERYTHING is way too abstracted out... This is a classic example of over-coding something.. makes we want to find the guy who wrote and shake him violently.

                                If it's not broken, fix it until it is

                                G Offline
                                G Offline
                                Gary R Wheeler
                                wrote on last edited by
                                #15

                                Is this guy channelling Salvador Dali or what?

                                Software Zen: delete this;

                                1 Reply Last reply
                                0
                                • K Kevin Marois

                                  Navigator.PrepareMessageBox(TheApp.Messages.ErrorWarningMessages.StateProceduresMenuVM_MsgboxBody_OpenStateProcedureWithLock_2, stateProcedure.StateDescription, t.Result.LockMessage).UseButtons(MessageBoxOptions.OK).Show();

                                  I've been working at this place about a month now, and EVERYTHING is way too abstracted out... This is a classic example of over-coding something.. makes we want to find the guy who wrote and shake him violently.

                                  If it's not broken, fix it until it is

                                  C Offline
                                  C Offline
                                  ClockMeister
                                  wrote on last edited by
                                  #16

                                  But ... but it's so FLEXIBLE! ;)

                                  1 Reply Last reply
                                  0
                                  • W wout de zeeuw

                                    You're put off pretty quickly I have to say, this is really just superficial. Looks like the messages are localized, but other than that doesn't seem unnecessarily verbose.

                                    Wout

                                    E Offline
                                    E Offline
                                    englebart
                                    wrote on last edited by
                                    #17

                                    Maybe they can switch one compile time flag or library and... Voila! it works on Mac or Linux? Create your own wrapper/adpater on any vendor specific API.

                                    1 Reply Last reply
                                    0
                                    Reply
                                    • Reply as topic
                                    Log in to reply
                                    • Oldest to Newest
                                    • Newest to Oldest
                                    • Most Votes


                                    • Login

                                    • Don't have an account? Register

                                    • Login or register to search.
                                    • First post
                                      Last post
                                    0
                                    • Categories
                                    • Recent
                                    • Tags
                                    • Popular
                                    • World
                                    • Users
                                    • Groups