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. Did you ever...

Did you ever...

Scheduled Pinned Locked Moved The Lounge
debuggingquestion
38 Posts 20 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.
  • S Offline
    S Offline
    Star Vega
    wrote on last edited by
    #1

    Did you ever felt the need to put controls on top of each other? So you can set them visible/invisible depending on the situation? This project I have to 'debug' is full of it... You have a button over a textbox over a panel over a groupbox and so on ! The guys here wonder why I do not like this practice. Can you tell me why you wouldn't do this, so I can offer them a LIST of reasons... ;)

    R D R S F 14 Replies Last reply
    0
    • S Star Vega

      Did you ever felt the need to put controls on top of each other? So you can set them visible/invisible depending on the situation? This project I have to 'debug' is full of it... You have a button over a textbox over a panel over a groupbox and so on ! The guys here wonder why I do not like this practice. Can you tell me why you wouldn't do this, so I can offer them a LIST of reasons... ;)

      R Offline
      R Offline
      Rajesh R Subramanian
      wrote on last edited by
      #2

      Placing control over control over co... I wouldn't do it, because that is the mark of an asshole.

      Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche .·´¯`·->Rajesh<-·´¯`·. [Microsoft MVP - Visual C++]

      J 1 Reply Last reply
      0
      • S Star Vega

        Did you ever felt the need to put controls on top of each other? So you can set them visible/invisible depending on the situation? This project I have to 'debug' is full of it... You have a button over a textbox over a panel over a groupbox and so on ! The guys here wonder why I do not like this practice. Can you tell me why you wouldn't do this, so I can offer them a LIST of reasons... ;)

        D Offline
        D Offline
        DaveyM69
        wrote on last edited by
        #3

        Because you can't see at first glance WTF is actually there! It'd be better to see nothing than that. Surely this is a good case for a panel or other container control - or better still, controls that are created dynamically so the overhead is vastly reduced.

        Dave
        BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
        Expect everything to be hard and then enjoy the things that come easy. (code-frog)

        1 Reply Last reply
        0
        • S Star Vega

          Did you ever felt the need to put controls on top of each other? So you can set them visible/invisible depending on the situation? This project I have to 'debug' is full of it... You have a button over a textbox over a panel over a groupbox and so on ! The guys here wonder why I do not like this practice. Can you tell me why you wouldn't do this, so I can offer them a LIST of reasons... ;)

          R Offline
          R Offline
          Rage
          wrote on last edited by
          #4

          Yeah, someone did not notice the tab control.

          1 Reply Last reply
          0
          • S Star Vega

            Did you ever felt the need to put controls on top of each other? So you can set them visible/invisible depending on the situation? This project I have to 'debug' is full of it... You have a button over a textbox over a panel over a groupbox and so on ! The guys here wonder why I do not like this practice. Can you tell me why you wouldn't do this, so I can offer them a LIST of reasons... ;)

            S Offline
            S Offline
            Steve Thresher
            wrote on last edited by
            #5

            We do that all the time. What's the problem? When you're catering for users that run 800x600 you have to use the screen as efficiently as possible.

            S 1 Reply Last reply
            0
            • S Steve Thresher

              We do that all the time. What's the problem? When you're catering for users that run 800x600 you have to use the screen as efficiently as possible.

              S Offline
              S Offline
              Star Vega
              wrote on last edited by
              #6

              What about a panel? a tabcontrol? a usercontrol? run-time controls?

              R S 2 Replies Last reply
              0
              • S Star Vega

                What about a panel? a tabcontrol? a usercontrol? run-time controls?

                R Offline
                R Offline
                Rajesh R Subramanian
                wrote on last edited by
                #7

                Is he working with you on the same project and you guys are taking up this fight at CP? :~

                Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche .·´¯`·->Rajesh<-·´¯`·. [Microsoft MVP - Visual C++]

                S 1 Reply Last reply
                0
                • R Rajesh R Subramanian

                  Is he working with you on the same project and you guys are taking up this fight at CP? :~

                  Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche .·´¯`·->Rajesh<-·´¯`·. [Microsoft MVP - Visual C++]

                  S Offline
                  S Offline
                  Star Vega
                  wrote on last edited by
                  #8

                  :laugh: If he likes working on classes of 47 000 lines of code, this might be the case!

                  R F 2 Replies Last reply
                  0
                  • S Star Vega

                    :laugh: If he likes working on classes of 47 000 lines of code, this might be the case!

                    R Offline
                    R Offline
                    Rajesh R Subramanian
                    wrote on last edited by
                    #9

                    Star Vega wrote:

                    If he likes working on classes of 47 000 lines of code, this might be the case!

                    Reminds me of my previous project, which was an absolute nightmare. Google for "Nightly session drop".

                    Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche .·´¯`·->Rajesh<-·´¯`·. [Microsoft MVP - Visual C++]

                    S 1 Reply Last reply
                    0
                    • S Star Vega

                      Did you ever felt the need to put controls on top of each other? So you can set them visible/invisible depending on the situation? This project I have to 'debug' is full of it... You have a button over a textbox over a panel over a groupbox and so on ! The guys here wonder why I do not like this practice. Can you tell me why you wouldn't do this, so I can offer them a LIST of reasons... ;)

                      F Offline
                      F Offline
                      ftw melvin
                      wrote on last edited by
                      #10

                      I guess this approach is designed to make the initial load heavier - but then the running of the app faster (as flicking visibility on/off is lighter than instantiating). Adv: Faster app. speed Dis: More complex coding Longer dev. cycles Bug incidents more likely (due to complexity) Longer initial load speed More memory needed when using the application Expert friendly Instead of a list you might want to recode a particularly complex screen/page/whatever and then calculate some metrics: memory usage application speed load speed LoC etc. So if you are right you would be able to say: 'Rewriting this ____ has made it much less complex to maintain as there is 50% less code, which will mean less bugs. The load speed is 40% better and the memory usage is 60% down. The impact to application speed has been negligible.'

                      "If you reward everyone, there will not be enough to go around, so you offer a reward to one in order to encourage everyone." Mei Yaochen in the 'Doing Battle' section of Sun Tzu's: Art of War. .

                      1 Reply Last reply
                      0
                      • S Star Vega

                        What about a panel? a tabcontrol? a usercontrol? run-time controls?

                        S Offline
                        S Offline
                        Steve Thresher
                        wrote on last edited by
                        #11

                        What about them? Panel - CBuilder or Delphi custom control I think so no use to me as we only use Win32 API. Tabcontrol - Use them all the time but around a dialog not emebedded into it as an embedded tab control takes up at least one lines worth of space that could be used for other controls. We already switch from multi-line tab controls to single line when running on a low desktop resolution. Usercontrol - Not sure what you mean. I've written an equivilent of the listview that handles an undefined number of items whilst only loading enought items to fill the window. When dealing with a client/server app it's important to keep network traffic at a minimum. Run-time controls - Again, not sure what you mean. All of our controls are dynamically created and enabled/disabled at runtime based on our own dialog template library.

                        1 Reply Last reply
                        0
                        • R Rajesh R Subramanian

                          Star Vega wrote:

                          If he likes working on classes of 47 000 lines of code, this might be the case!

                          Reminds me of my previous project, which was an absolute nightmare. Google for "Nightly session drop".

                          Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche .·´¯`·->Rajesh<-·´¯`·. [Microsoft MVP - Visual C++]

                          S Offline
                          S Offline
                          Star Vega
                          wrote on last edited by
                          #12

                          Yep, a good comparison indeed - I'm in the middle of it! Did this 'Monster' experience bring something good for you? Or is it just an enormous waste of time? (I go for the second option)

                          R 1 Reply Last reply
                          0
                          • S Star Vega

                            :laugh: If he likes working on classes of 47 000 lines of code, this might be the case!

                            F Offline
                            F Offline
                            ftw melvin
                            wrote on last edited by
                            #13

                            Donate a copy of Fowler's 'Refactoring' to the team and your 47KLoC classes will melt away!

                            "If you reward everyone, there will not be enough to go around, so you offer a reward to one in order to encourage everyone." Mei Yaochen in the 'Doing Battle' section of Sun Tzu's: Art of War. .

                            S 2 Replies Last reply
                            0
                            • F ftw melvin

                              Donate a copy of Fowler's 'Refactoring' to the team and your 47KLoC classes will melt away!

                              "If you reward everyone, there will not be enough to go around, so you offer a reward to one in order to encourage everyone." Mei Yaochen in the 'Doing Battle' section of Sun Tzu's: Art of War. .

                              S Offline
                              S Offline
                              Star Vega
                              wrote on last edited by
                              #14

                              Fowler who? :) I guess they never heard of patterns any way :zzz:

                              1 Reply Last reply
                              0
                              • F ftw melvin

                                Donate a copy of Fowler's 'Refactoring' to the team and your 47KLoC classes will melt away!

                                "If you reward everyone, there will not be enough to go around, so you offer a reward to one in order to encourage everyone." Mei Yaochen in the 'Doing Battle' section of Sun Tzu's: Art of War. .

                                S Offline
                                S Offline
                                Star Vega
                                wrote on last edited by
                                #15

                                BTW, the 'team' is a group of three: me (for the time being), someone who 'learned C# in two weeks', and someone who knows a bit of VB. WTF am I doing here? (in case you would wonder) You don't want to know how 'big' this app is, and how many sales depends on it. It is a very big company I'm working for, isn't that a laugh! :omg:

                                F 1 Reply Last reply
                                0
                                • S Star Vega

                                  BTW, the 'team' is a group of three: me (for the time being), someone who 'learned C# in two weeks', and someone who knows a bit of VB. WTF am I doing here? (in case you would wonder) You don't want to know how 'big' this app is, and how many sales depends on it. It is a very big company I'm working for, isn't that a laugh! :omg:

                                  F Offline
                                  F Offline
                                  ftw melvin
                                  wrote on last edited by
                                  #16

                                  Good luck man, as the economy struggles there could be a lot of people who get stuck for a while. If you are thinking of bailing make sure that you have rock solid reasons!

                                  "If you reward everyone, there will not be enough to go around, so you offer a reward to one in order to encourage everyone." Mei Yaochen in the 'Doing Battle' section of Sun Tzu's: Art of War. .

                                  1 Reply Last reply
                                  0
                                  • S Star Vega

                                    Did you ever felt the need to put controls on top of each other? So you can set them visible/invisible depending on the situation? This project I have to 'debug' is full of it... You have a button over a textbox over a panel over a groupbox and so on ! The guys here wonder why I do not like this practice. Can you tell me why you wouldn't do this, so I can offer them a LIST of reasons... ;)

                                    M Offline
                                    M Offline
                                    Marc Clifton
                                    wrote on last edited by
                                    #17

                                    Rarely. The most recent example is a form that can be used for both adding and updating a record, so I put the "Add" and "Update" buttons on top of each other. Changing the text wouldn't have worked, because I'd also have needed to rewire the events. Reading the other comments, I've come to realize that a custom 2 state button would have been better, with separate add/update events and a state flag that, when changed, would change the text and also fire the correct event when the button was clicked. Hmmm.... Marc

                                    Thyme In The Country Interacx My Blog

                                    J S 2 Replies Last reply
                                    0
                                    • M Marc Clifton

                                      Rarely. The most recent example is a form that can be used for both adding and updating a record, so I put the "Add" and "Update" buttons on top of each other. Changing the text wouldn't have worked, because I'd also have needed to rewire the events. Reading the other comments, I've come to realize that a custom 2 state button would have been better, with separate add/update events and a state flag that, when changed, would change the text and also fire the correct event when the button was clicked. Hmmm.... Marc

                                      Thyme In The Country Interacx My Blog

                                      J Offline
                                      J Offline
                                      Jorgen Sigvardsson
                                      wrote on last edited by
                                      #18

                                      Marc Clifton wrote:

                                      Hmmm....

                                      Go on Marc! I know you want to! It's just a few lines of code...

                                      -- Kein Mitleid Für Die Mehrheit

                                      1 Reply Last reply
                                      0
                                      • S Star Vega

                                        Yep, a good comparison indeed - I'm in the middle of it! Did this 'Monster' experience bring something good for you? Or is it just an enormous waste of time? (I go for the second option)

                                        R Offline
                                        R Offline
                                        Rajesh R Subramanian
                                        wrote on last edited by
                                        #19

                                        Some time was wasted in that, but I wouldn't say it was a total waste. I learned a few goodies by working on that project. But nevertheless, a total nightmare.

                                        Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche .·´¯`·->Rajesh<-·´¯`·. [Microsoft MVP - Visual C++]

                                        1 Reply Last reply
                                        0
                                        • M Marc Clifton

                                          Rarely. The most recent example is a form that can be used for both adding and updating a record, so I put the "Add" and "Update" buttons on top of each other. Changing the text wouldn't have worked, because I'd also have needed to rewire the events. Reading the other comments, I've come to realize that a custom 2 state button would have been better, with separate add/update events and a state flag that, when changed, would change the text and also fire the correct event when the button was clicked. Hmmm.... Marc

                                          Thyme In The Country Interacx My Blog

                                          S Offline
                                          S Offline
                                          Simon P Stevens
                                          wrote on last edited by
                                          #20

                                          Marc Clifton wrote:

                                          I've come to realize that a custom 2 state button would have been better, with separate add/update events and a state flag that, when changed, would change the text and also fire the correct event when the button was clicked.

                                          Nice. I like that idea.

                                          Simon

                                          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