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. Second Guessing

Second Guessing

Scheduled Pinned Locked Moved The Lounge
graphicsdockerhelptutorialquestion
26 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.
  • R realJSOP

    After wrestling with a programming problem for a couple of days and finally coming up with a solution, have you ever leaned back and wondered if there was a more correct way to do it? I got done with some code just like that today, that when seen from the viewpoint of the user, it's not all that impressive, but when looking at it with a developer's eye, you wonder a) how the hell it even works, and b) could you work a little longer and maybe come up with that "more correct" solution. I'm actually afraid to write an article based on this code because I'm sure it would get torn to shreds with "experts" sharing their wisdom with me. Right now, if anyone were to dare suggest an alternative to anything I've written in the last two days, I'm afraid Chris would have to shut the site down. Just in case you're curious, I started an app on Tuesday that has two stacked splitter views, one of which is horizontally split and contains two panel controls, each of which contains a treeview. One of those panels also sports a image-only menu strip and a separate button that collapses the left-most pane of the underlying vertical split container, and creates a vertical text label (sorta - it's not really a label, but a bitmap with rendered text that's twisted sideways). The whole thing kinda/sorta looks like Outlook 2007 when the splitter is collapsed. The biggest pain in the ass was a) figuring out how to turn a label sideways, and b)figuring out how to make it show up with all the other considerations that had to be - ummm, considered. And this is just a prototype... :)

    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
    -----
    "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

    E Offline
    E Offline
    Ennis Ray Lynch Jr
    wrote on last edited by
    #8

    I don't do any WPF work but turning a label sideways is trivial with it. Btw, I constantly rewrite my crap. While a lot of developers develop a tool box of old code to use in new situations I always prefer to start over with a fresh slate. To be honest I am always improving based on this. The rewrite is really an important part of the process. One last thing I keep in mind ... UI's are expensive and time consuming to develop. I imagine the outlook interface cost MS 7 digits easy and you have only worked on yours for about a week. As such, no matter what it looks like it is probably a pretty darn good job.

    Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
    Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
    Most of this sig is for Google, not ego.

    1 Reply Last reply
    0
    • R realJSOP

      After wrestling with a programming problem for a couple of days and finally coming up with a solution, have you ever leaned back and wondered if there was a more correct way to do it? I got done with some code just like that today, that when seen from the viewpoint of the user, it's not all that impressive, but when looking at it with a developer's eye, you wonder a) how the hell it even works, and b) could you work a little longer and maybe come up with that "more correct" solution. I'm actually afraid to write an article based on this code because I'm sure it would get torn to shreds with "experts" sharing their wisdom with me. Right now, if anyone were to dare suggest an alternative to anything I've written in the last two days, I'm afraid Chris would have to shut the site down. Just in case you're curious, I started an app on Tuesday that has two stacked splitter views, one of which is horizontally split and contains two panel controls, each of which contains a treeview. One of those panels also sports a image-only menu strip and a separate button that collapses the left-most pane of the underlying vertical split container, and creates a vertical text label (sorta - it's not really a label, but a bitmap with rendered text that's twisted sideways). The whole thing kinda/sorta looks like Outlook 2007 when the splitter is collapsed. The biggest pain in the ass was a) figuring out how to turn a label sideways, and b)figuring out how to make it show up with all the other considerations that had to be - ummm, considered. And this is just a prototype... :)

      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
      -----
      "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

      C Offline
      C Offline
      cmk
      wrote on last edited by
      #9

      Strangely, my first reaction is ... I gotta have more cowbell.

      ...cmk The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying. - John Carmack

      R 1 Reply Last reply
      0
      • R realJSOP

        After wrestling with a programming problem for a couple of days and finally coming up with a solution, have you ever leaned back and wondered if there was a more correct way to do it? I got done with some code just like that today, that when seen from the viewpoint of the user, it's not all that impressive, but when looking at it with a developer's eye, you wonder a) how the hell it even works, and b) could you work a little longer and maybe come up with that "more correct" solution. I'm actually afraid to write an article based on this code because I'm sure it would get torn to shreds with "experts" sharing their wisdom with me. Right now, if anyone were to dare suggest an alternative to anything I've written in the last two days, I'm afraid Chris would have to shut the site down. Just in case you're curious, I started an app on Tuesday that has two stacked splitter views, one of which is horizontally split and contains two panel controls, each of which contains a treeview. One of those panels also sports a image-only menu strip and a separate button that collapses the left-most pane of the underlying vertical split container, and creates a vertical text label (sorta - it's not really a label, but a bitmap with rendered text that's twisted sideways). The whole thing kinda/sorta looks like Outlook 2007 when the splitter is collapsed. The biggest pain in the ass was a) figuring out how to turn a label sideways, and b)figuring out how to make it show up with all the other considerations that had to be - ummm, considered. And this is just a prototype... :)

        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
        -----
        "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

        E Offline
        E Offline
        El Corazon
        wrote on last edited by
        #10

        > After wrestling with a programming problem for a couple of days and finally coming up with a solution, have you ever leaned back and wondered if there was a more correct way to do it? as chris said. When have you not. NASA comes to my desk to ask advice, but my opponents are quick to point out that I have made errors or done things that are not always the most efficient the first time out. Before any of us were programmers we were human. No matter how asocial or geekish we have become, we are still human. I've even got a friend who claims to be a cyborg because of the electronics inside him. He's still human and talented in visual arts he still understands little outside his field. I specialize in 3D graphics but I do not know everything in the world about the subject. But in C# and other technologies, I am still learning. When I do find something better I apply it as I get the chance. Inside my area of expertise I cannot publish and outside my area I am nowhere near talented enough to write an article. In either case you already have one upped me. You have written articles. I say write it, and ignore the critics. If someone shows you a better way, use it. :)

        _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb) John Andrew Holmes "It is well to remember that the entire universe, with one trifling exception, is composed of others."

        R 1 Reply Last reply
        0
        • C Chris Maunder

          "Have you ever written code and wondered if you could do it better?" Developers? A bunch of semi-OCD perfectionists? Nooo! Not us! The interesting question would be "Have you ever not thought this". But then some wag in the audience would suggest asking this in the VB forums and then it would all just go downhill from there.

          cheers, Chris Maunder

          CodeProject.com : C++ MVP

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

          Chris Maunder wrote:

          some wag

          Are you sure that's how you spell it? I thought it had two syllables ;)

          Life is like a pubic hair on the toilet seat... ...sometimes, you just get pissed off. .\\axxx (That's an 'M')

          1 Reply Last reply
          0
          • R realJSOP

            After wrestling with a programming problem for a couple of days and finally coming up with a solution, have you ever leaned back and wondered if there was a more correct way to do it? I got done with some code just like that today, that when seen from the viewpoint of the user, it's not all that impressive, but when looking at it with a developer's eye, you wonder a) how the hell it even works, and b) could you work a little longer and maybe come up with that "more correct" solution. I'm actually afraid to write an article based on this code because I'm sure it would get torn to shreds with "experts" sharing their wisdom with me. Right now, if anyone were to dare suggest an alternative to anything I've written in the last two days, I'm afraid Chris would have to shut the site down. Just in case you're curious, I started an app on Tuesday that has two stacked splitter views, one of which is horizontally split and contains two panel controls, each of which contains a treeview. One of those panels also sports a image-only menu strip and a separate button that collapses the left-most pane of the underlying vertical split container, and creates a vertical text label (sorta - it's not really a label, but a bitmap with rendered text that's twisted sideways). The whole thing kinda/sorta looks like Outlook 2007 when the splitter is collapsed. The biggest pain in the ass was a) figuring out how to turn a label sideways, and b)figuring out how to make it show up with all the other considerations that had to be - ummm, considered. And this is just a prototype... :)

            "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
            -----
            "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

            S Offline
            S Offline
            swjam
            wrote on last edited by
            #12

            John Simmons / outlaw programmer wrote:

            I'm actually afraid to write an article based on this code because I'm sure it would get torn to shreds with "experts" sharing their wisdom with me. Right now, if anyone were to dare suggest an alternative to anything I've written in the last two days, I'm afraid Chris would have to shut the site down.

            :laugh:

            ---------------------------------------------------------- "unzip; strip; touch; finger; mount; fsck; more; yes; unmount; sleep" - my daily unix command list

            1 Reply Last reply
            0
            • E El Corazon

              > After wrestling with a programming problem for a couple of days and finally coming up with a solution, have you ever leaned back and wondered if there was a more correct way to do it? as chris said. When have you not. NASA comes to my desk to ask advice, but my opponents are quick to point out that I have made errors or done things that are not always the most efficient the first time out. Before any of us were programmers we were human. No matter how asocial or geekish we have become, we are still human. I've even got a friend who claims to be a cyborg because of the electronics inside him. He's still human and talented in visual arts he still understands little outside his field. I specialize in 3D graphics but I do not know everything in the world about the subject. But in C# and other technologies, I am still learning. When I do find something better I apply it as I get the chance. Inside my area of expertise I cannot publish and outside my area I am nowhere near talented enough to write an article. In either case you already have one upped me. You have written articles. I say write it, and ignore the critics. If someone shows you a better way, use it. :)

              _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb) John Andrew Holmes "It is well to remember that the entire universe, with one trifling exception, is composed of others."

              R Offline
              R Offline
              Roger Wright
              wrote on last edited by
              #13

              El Corazon wrote:

              I specialize in 3D graphics

              Do you happen to know how to use ESRI ArcInfo to project cuts and fills for levelling a lot? I've got 3D Analyst, but have no idea how to use it. We have a tribal land grant of 5 acres and need to level it, but I have no idea how to lay out the grading plan or stake the lot for the operator. I can get the GIS office to make me a 1' contour layer, but haven't a clue what to do with it. Any expertise in that area?

              "A Journey of a Thousand Rest Stops Begins with a Single Movement"

              E 1 Reply Last reply
              0
              • L Lost User

                What about http://www.codeproject.com/KB/miscctrl/Vertical_Label_Control.aspx[^] I see you've seen it - isn't that what you wanted it to do?

                Life is like a pubic hair on the toilet seat... ...sometimes, you just get pissed off. .\\axxx (That's an 'M')

                R Offline
                R Offline
                realJSOP
                wrote on last edited by
                #14

                Been there, tried it, didn't work, don't know why. I ended up using part of this article (that I wrote)[^], and created a bitmap that I added to a PictureBox control, and then I rotate the bitmap in the OnPaint handler for the PictureBox.

                "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                -----
                "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                1 Reply Last reply
                0
                • C cmk

                  Strangely, my first reaction is ... I gotta have more cowbell.

                  ...cmk The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying. - John Carmack

                  R Offline
                  R Offline
                  realJSOP
                  wrote on last edited by
                  #15

                  LOL! MORE COW BELL! That was a damn funny sketch. :)

                  "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                  -----
                  "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                  1 Reply Last reply
                  0
                  • R realJSOP

                    After wrestling with a programming problem for a couple of days and finally coming up with a solution, have you ever leaned back and wondered if there was a more correct way to do it? I got done with some code just like that today, that when seen from the viewpoint of the user, it's not all that impressive, but when looking at it with a developer's eye, you wonder a) how the hell it even works, and b) could you work a little longer and maybe come up with that "more correct" solution. I'm actually afraid to write an article based on this code because I'm sure it would get torn to shreds with "experts" sharing their wisdom with me. Right now, if anyone were to dare suggest an alternative to anything I've written in the last two days, I'm afraid Chris would have to shut the site down. Just in case you're curious, I started an app on Tuesday that has two stacked splitter views, one of which is horizontally split and contains two panel controls, each of which contains a treeview. One of those panels also sports a image-only menu strip and a separate button that collapses the left-most pane of the underlying vertical split container, and creates a vertical text label (sorta - it's not really a label, but a bitmap with rendered text that's twisted sideways). The whole thing kinda/sorta looks like Outlook 2007 when the splitter is collapsed. The biggest pain in the ass was a) figuring out how to turn a label sideways, and b)figuring out how to make it show up with all the other considerations that had to be - ummm, considered. And this is just a prototype... :)

                    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                    -----
                    "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                    M Offline
                    M Offline
                    macu
                    wrote on last edited by
                    #16

                    Definitely. And this is more pronounced the harder the problem is. Sometimes I feel I'm getting lost in a problem for weeks and when I come out the other side with a working piece of code I think that no-one else in the universe will ever fully understand what I've done. I think there's a few things to say about this: 1. Walk away from the problem and come back to it. Your brain will somehow make sense of what you've been doing and things will seem clearer after a break. 2. Use a structured design methodology. I wish I could recommend you one, I've been playing with a few for years but nothing seems to get over the issue of getting lost in a piece of code or a programming problem. Of course you can do all the standard OO stuff, use patterns, follow the code complete bible, etc. but you'll probably still end up looking at a blank class/function that needs writing. 3. Know your options. Maybe somebody has already done what you're trying to do, maybe there's a library or framework that'll speed things up, etc. Sometimes you can search for stuff like this, sometimes you just get lucky and find it whilst doing something else. It's worth spending some of your day/week playing with new stuff for this reason. 4. Know that there will always be another way to do it! There might be 10,000 other ways, but if yours works, is quick enough and is robust then stop worrying! God knows how many programmer hours are wasted on finding the "best" solution.

                    1 Reply Last reply
                    0
                    • R realJSOP

                      After wrestling with a programming problem for a couple of days and finally coming up with a solution, have you ever leaned back and wondered if there was a more correct way to do it? I got done with some code just like that today, that when seen from the viewpoint of the user, it's not all that impressive, but when looking at it with a developer's eye, you wonder a) how the hell it even works, and b) could you work a little longer and maybe come up with that "more correct" solution. I'm actually afraid to write an article based on this code because I'm sure it would get torn to shreds with "experts" sharing their wisdom with me. Right now, if anyone were to dare suggest an alternative to anything I've written in the last two days, I'm afraid Chris would have to shut the site down. Just in case you're curious, I started an app on Tuesday that has two stacked splitter views, one of which is horizontally split and contains two panel controls, each of which contains a treeview. One of those panels also sports a image-only menu strip and a separate button that collapses the left-most pane of the underlying vertical split container, and creates a vertical text label (sorta - it's not really a label, but a bitmap with rendered text that's twisted sideways). The whole thing kinda/sorta looks like Outlook 2007 when the splitter is collapsed. The biggest pain in the ass was a) figuring out how to turn a label sideways, and b)figuring out how to make it show up with all the other considerations that had to be - ummm, considered. And this is just a prototype... :)

                      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                      -----
                      "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                      O Offline
                      O Offline
                      Oshtri Deka
                      wrote on last edited by
                      #17

                      John Simmons / outlaw programmer wrote:

                      After wrestling with a programming problem for a couple of days and finally coming up with a solution, have you ever leaned back and wondered if there was a more correct way to do it? I got done with some code just like that today, that when seen from the viewpoint of the user, it's not all that impressive, but when looking at it with a developer's eye, you wonder a) how the hell it even works, and b) could you work a little longer and maybe come up with that "more correct" solution.

                      Almost on a daily basis. Perfectionism with not so big experience sometimes results with slow output, especially when I am (re)designing components. :~

                      1 Reply Last reply
                      0
                      • R realJSOP

                        After wrestling with a programming problem for a couple of days and finally coming up with a solution, have you ever leaned back and wondered if there was a more correct way to do it? I got done with some code just like that today, that when seen from the viewpoint of the user, it's not all that impressive, but when looking at it with a developer's eye, you wonder a) how the hell it even works, and b) could you work a little longer and maybe come up with that "more correct" solution. I'm actually afraid to write an article based on this code because I'm sure it would get torn to shreds with "experts" sharing their wisdom with me. Right now, if anyone were to dare suggest an alternative to anything I've written in the last two days, I'm afraid Chris would have to shut the site down. Just in case you're curious, I started an app on Tuesday that has two stacked splitter views, one of which is horizontally split and contains two panel controls, each of which contains a treeview. One of those panels also sports a image-only menu strip and a separate button that collapses the left-most pane of the underlying vertical split container, and creates a vertical text label (sorta - it's not really a label, but a bitmap with rendered text that's twisted sideways). The whole thing kinda/sorta looks like Outlook 2007 when the splitter is collapsed. The biggest pain in the ass was a) figuring out how to turn a label sideways, and b)figuring out how to make it show up with all the other considerations that had to be - ummm, considered. And this is just a prototype... :)

                        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                        -----
                        "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                        G Offline
                        G Offline
                        grgran
                        wrote on last edited by
                        #18

                        John Simmons / outlaw programmer wrote:

                        The biggest pain in the ass was a) figuring out how to turn a label sideways

                        Use xaml :-) <Expander Height="Auto" Width="Auto" ExpandDirection="Right" IsExpanded="True" BorderBrush="CornflowerBlue" Margin="5"> <Expander.Resources> **_<RotateTransform x:Key="Rotate90" Angle="90" />_** </Expander.Resources> <Expander.Header> **_<TextBlock Text="Elements" LayoutTransform="{StaticResource Rotate90}"> </TextBlock>_** </Expander.Header>This is contained in an Expander, but you can also use a label or button as a container. G

                        1 Reply Last reply
                        0
                        • R realJSOP

                          After wrestling with a programming problem for a couple of days and finally coming up with a solution, have you ever leaned back and wondered if there was a more correct way to do it? I got done with some code just like that today, that when seen from the viewpoint of the user, it's not all that impressive, but when looking at it with a developer's eye, you wonder a) how the hell it even works, and b) could you work a little longer and maybe come up with that "more correct" solution. I'm actually afraid to write an article based on this code because I'm sure it would get torn to shreds with "experts" sharing their wisdom with me. Right now, if anyone were to dare suggest an alternative to anything I've written in the last two days, I'm afraid Chris would have to shut the site down. Just in case you're curious, I started an app on Tuesday that has two stacked splitter views, one of which is horizontally split and contains two panel controls, each of which contains a treeview. One of those panels also sports a image-only menu strip and a separate button that collapses the left-most pane of the underlying vertical split container, and creates a vertical text label (sorta - it's not really a label, but a bitmap with rendered text that's twisted sideways). The whole thing kinda/sorta looks like Outlook 2007 when the splitter is collapsed. The biggest pain in the ass was a) figuring out how to turn a label sideways, and b)figuring out how to make it show up with all the other considerations that had to be - ummm, considered. And this is just a prototype... :)

                          "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                          -----
                          "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                          S Offline
                          S Offline
                          Stonkie
                          wrote on last edited by
                          #19

                          I wrote this a year ago, it's the content of the Paint event handler on a custom control that handles both vertical text and a background image with rounded corners... Just thought about it when I read your post. Hope it helps you out!

                          Rectangle imageBounds = new Rectangle(new Point(0, 0), this.Size);

                          // Background
                          if (this.BackgroundImage != null) {
                          Bitmap image = new Bitmap(this.Width, this.Height);
                          GraphicsPath path =
                          UtilityDrawing.GetRoundRectanglePath(imageBounds, roundCornerRadius);

                          Graphics graphics = Graphics.FromImage(image);
                          graphics.Clip = new Region(path);
                          
                          graphics.DrawImage(this.BackgroundImage, imageBounds);
                          
                          graphics.Dispose();
                          
                          e.Graphics.DrawImage(image, imageBounds);
                          

                          }

                          // Text
                          StringFormat txtFormat = new StringFormat();
                          txtFormat.FormatFlags = StringFormatFlags.DirectionVertical;
                          txtFormat.LineAlignment = StringAlignment.Near;
                          txtFormat.Alignment = StringAlignment.Center;

                          e.Graphics.TranslateTransform(this.Width, this.Height);
                          e.Graphics.RotateTransform(180);

                          e.Graphics.DrawString(this.Text, this.Font,
                          new SolidBrush(this.ForeColor), imageBounds, txtFormat);

                          By the way, just reading that old code makes me go :confused: too. But the thing's working, the control even shows right in the designer so I'm happy and so is my boss! :cool: The magic trick is the RotateTranform! And UtilityDrawing.GetRoundRectanglePath gets a GraphicsPath for a rectangle with rounded corner of a given radius. To remove the rounded corner, set the radius to zero, but I think you can skip that part for your requirements...

                          1 Reply Last reply
                          0
                          • R realJSOP

                            After wrestling with a programming problem for a couple of days and finally coming up with a solution, have you ever leaned back and wondered if there was a more correct way to do it? I got done with some code just like that today, that when seen from the viewpoint of the user, it's not all that impressive, but when looking at it with a developer's eye, you wonder a) how the hell it even works, and b) could you work a little longer and maybe come up with that "more correct" solution. I'm actually afraid to write an article based on this code because I'm sure it would get torn to shreds with "experts" sharing their wisdom with me. Right now, if anyone were to dare suggest an alternative to anything I've written in the last two days, I'm afraid Chris would have to shut the site down. Just in case you're curious, I started an app on Tuesday that has two stacked splitter views, one of which is horizontally split and contains two panel controls, each of which contains a treeview. One of those panels also sports a image-only menu strip and a separate button that collapses the left-most pane of the underlying vertical split container, and creates a vertical text label (sorta - it's not really a label, but a bitmap with rendered text that's twisted sideways). The whole thing kinda/sorta looks like Outlook 2007 when the splitter is collapsed. The biggest pain in the ass was a) figuring out how to turn a label sideways, and b)figuring out how to make it show up with all the other considerations that had to be - ummm, considered. And this is just a prototype... :)

                            "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                            -----
                            "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                            P Offline
                            P Offline
                            patbob
                            wrote on last edited by
                            #20

                            Been there, done that, sometimes even came up with the better way myself just a few weeks after I moved on to another task. Its bad enough, but when the folks working under you that haven't been doing this for as many years ask "why didn't you just do it this way?", well, that's worse :). I've learned that there isn't enough time to know everything or to think every problem through to the ultimate, best possible solution. BTW, if its throwaway demo code, cut all corners to get there fastest. If its not throwaway demo code, then its production code with management's wishful thinking that if they call it a demo it'll somehow get done faster.

                            patbob

                            1 Reply Last reply
                            0
                            • R Roger Wright

                              El Corazon wrote:

                              I specialize in 3D graphics

                              Do you happen to know how to use ESRI ArcInfo to project cuts and fills for levelling a lot? I've got 3D Analyst, but have no idea how to use it. We have a tribal land grant of 5 acres and need to level it, but I have no idea how to lay out the grading plan or stake the lot for the operator. I can get the GIS office to make me a 1' contour layer, but haven't a clue what to do with it. Any expertise in that area?

                              "A Journey of a Thousand Rest Stops Begins with a Single Movement"

                              E Offline
                              E Offline
                              El Corazon
                              wrote on last edited by
                              #21

                              Roger Wright wrote:

                              Any expertise in that area?

                              Nope sorry... There is a few people here from the GIS field though. Here is the first that comes to mind: http://www.codeproject.com/Lounge.aspx?msg=1964126#xx1964126xx[^]

                              _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb) John Andrew Holmes "It is well to remember that the entire universe, with one trifling exception, is composed of others."

                              1 Reply Last reply
                              0
                              • R realJSOP

                                After wrestling with a programming problem for a couple of days and finally coming up with a solution, have you ever leaned back and wondered if there was a more correct way to do it? I got done with some code just like that today, that when seen from the viewpoint of the user, it's not all that impressive, but when looking at it with a developer's eye, you wonder a) how the hell it even works, and b) could you work a little longer and maybe come up with that "more correct" solution. I'm actually afraid to write an article based on this code because I'm sure it would get torn to shreds with "experts" sharing their wisdom with me. Right now, if anyone were to dare suggest an alternative to anything I've written in the last two days, I'm afraid Chris would have to shut the site down. Just in case you're curious, I started an app on Tuesday that has two stacked splitter views, one of which is horizontally split and contains two panel controls, each of which contains a treeview. One of those panels also sports a image-only menu strip and a separate button that collapses the left-most pane of the underlying vertical split container, and creates a vertical text label (sorta - it's not really a label, but a bitmap with rendered text that's twisted sideways). The whole thing kinda/sorta looks like Outlook 2007 when the splitter is collapsed. The biggest pain in the ass was a) figuring out how to turn a label sideways, and b)figuring out how to make it show up with all the other considerations that had to be - ummm, considered. And this is just a prototype... :)

                                "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                -----
                                "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                                O Offline
                                O Offline
                                Old Ed
                                wrote on last edited by
                                #22

                                It doesn't matter that there might be a more "correct" solution. Especially when working under pressure you should start out believing that you will deliver a working solution. After the smoke has cleared you may well see that your solution can be improved. Then again, it may be flawless. But it's important not to second-guess yourself at every turn. If your solution "works" then that's all that really matters. Trust your current knowledge and continually expand your knowledge. Also, don't feel that if your initial ideas don't work that you've somehow failed. Take a break. Your mind will continue to work in the background and you'll come back with something new. I can't count the number of times a solution has appeared to me while taking a shower.

                                1 Reply Last reply
                                0
                                • R realJSOP

                                  After wrestling with a programming problem for a couple of days and finally coming up with a solution, have you ever leaned back and wondered if there was a more correct way to do it? I got done with some code just like that today, that when seen from the viewpoint of the user, it's not all that impressive, but when looking at it with a developer's eye, you wonder a) how the hell it even works, and b) could you work a little longer and maybe come up with that "more correct" solution. I'm actually afraid to write an article based on this code because I'm sure it would get torn to shreds with "experts" sharing their wisdom with me. Right now, if anyone were to dare suggest an alternative to anything I've written in the last two days, I'm afraid Chris would have to shut the site down. Just in case you're curious, I started an app on Tuesday that has two stacked splitter views, one of which is horizontally split and contains two panel controls, each of which contains a treeview. One of those panels also sports a image-only menu strip and a separate button that collapses the left-most pane of the underlying vertical split container, and creates a vertical text label (sorta - it's not really a label, but a bitmap with rendered text that's twisted sideways). The whole thing kinda/sorta looks like Outlook 2007 when the splitter is collapsed. The biggest pain in the ass was a) figuring out how to turn a label sideways, and b)figuring out how to make it show up with all the other considerations that had to be - ummm, considered. And this is just a prototype... :)

                                  "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                  -----
                                  "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                                  C Offline
                                  C Offline
                                  cpkilekofp
                                  wrote on last edited by
                                  #23

                                  After having spent years maintaining code I originally wrote, I have to say that now, every time I write code, I expect to find some way in the future to do it better. Sometimes the future is later that afternoon :laugh: This is especially true when I'm prototyping something, because all I want when prototyping is to get BASIC FUNCTIONALITY working, then refactor it for maintenance, robustness, and performance later.

                                  1 Reply Last reply
                                  0
                                  • R realJSOP

                                    After wrestling with a programming problem for a couple of days and finally coming up with a solution, have you ever leaned back and wondered if there was a more correct way to do it? I got done with some code just like that today, that when seen from the viewpoint of the user, it's not all that impressive, but when looking at it with a developer's eye, you wonder a) how the hell it even works, and b) could you work a little longer and maybe come up with that "more correct" solution. I'm actually afraid to write an article based on this code because I'm sure it would get torn to shreds with "experts" sharing their wisdom with me. Right now, if anyone were to dare suggest an alternative to anything I've written in the last two days, I'm afraid Chris would have to shut the site down. Just in case you're curious, I started an app on Tuesday that has two stacked splitter views, one of which is horizontally split and contains two panel controls, each of which contains a treeview. One of those panels also sports a image-only menu strip and a separate button that collapses the left-most pane of the underlying vertical split container, and creates a vertical text label (sorta - it's not really a label, but a bitmap with rendered text that's twisted sideways). The whole thing kinda/sorta looks like Outlook 2007 when the splitter is collapsed. The biggest pain in the ass was a) figuring out how to turn a label sideways, and b)figuring out how to make it show up with all the other considerations that had to be - ummm, considered. And this is just a prototype... :)

                                    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                    -----
                                    "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                                    B Offline
                                    B Offline
                                    BillWoodruff
                                    wrote on last edited by
                                    #24

                                    An excellent topic to raise ! For me the most difficult point is when I suddenly see a new "architectural" design for the solution as a "whole" that requires significant re-working of many interacting modules. Now this occurs, for me, in prototyping most frequently. Translating the "moment of insight" of a new design into the previous solution requires, for me, a lot of concentration (preceded, of course, by careful preservation of the previous solution). best, Bill

                                    "The greater the social and cultural distances between people, the more magical the light that can spring from their contact." Milan Kundera in Testaments Trahis

                                    1 Reply Last reply
                                    0
                                    • R realJSOP

                                      After wrestling with a programming problem for a couple of days and finally coming up with a solution, have you ever leaned back and wondered if there was a more correct way to do it? I got done with some code just like that today, that when seen from the viewpoint of the user, it's not all that impressive, but when looking at it with a developer's eye, you wonder a) how the hell it even works, and b) could you work a little longer and maybe come up with that "more correct" solution. I'm actually afraid to write an article based on this code because I'm sure it would get torn to shreds with "experts" sharing their wisdom with me. Right now, if anyone were to dare suggest an alternative to anything I've written in the last two days, I'm afraid Chris would have to shut the site down. Just in case you're curious, I started an app on Tuesday that has two stacked splitter views, one of which is horizontally split and contains two panel controls, each of which contains a treeview. One of those panels also sports a image-only menu strip and a separate button that collapses the left-most pane of the underlying vertical split container, and creates a vertical text label (sorta - it's not really a label, but a bitmap with rendered text that's twisted sideways). The whole thing kinda/sorta looks like Outlook 2007 when the splitter is collapsed. The biggest pain in the ass was a) figuring out how to turn a label sideways, and b)figuring out how to make it show up with all the other considerations that had to be - ummm, considered. And this is just a prototype... :)

                                      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                      -----
                                      "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                                      C Offline
                                      C Offline
                                      Cabbage93
                                      wrote on last edited by
                                      #25

                                      It's a neat question because my answer is both yes and no. I used to lean back and wonder, but now I am certain that no matter how perfect for the task it was, there's better code that could be created. I operate in this weird sort of metaphysics, in which the impossible can be achieved given enough time and revisions. There are just too many combinations of 1s and 0s for me to believe otherwise. And that huge huge number is growing all the time as storage and mips increase. Programmers are stuck in the middle between business (where time is money, get it out the door so we can bill) and technology (where quality is time, anything less than excellence is not fulfilling at best, and irreparably defective at worst). There is almost always a better way. When there isn't, there is at least a more elegant proof that a better way does not exist. It's the nature of the beast. If you seek it, second, triple and quadruple guess 'til your heart's content and you have pride in what you've done. If you don't seek it, then call it completed. It has more to do with non-technical constraints than with your ability as a programmer which you choose. I always think of prototypes like sand castles. They expose all the architectural issues, and once they're all exposed they can be analyzed and re-factored. Suck out the basic marrow of the problem, wipe the sand clean and rebuild with what you've learned. As an added bonus, I'll encourage you to mix metaphors like a mofo as well.. ;)

                                      1 Reply Last reply
                                      0
                                      • R realJSOP

                                        After wrestling with a programming problem for a couple of days and finally coming up with a solution, have you ever leaned back and wondered if there was a more correct way to do it? I got done with some code just like that today, that when seen from the viewpoint of the user, it's not all that impressive, but when looking at it with a developer's eye, you wonder a) how the hell it even works, and b) could you work a little longer and maybe come up with that "more correct" solution. I'm actually afraid to write an article based on this code because I'm sure it would get torn to shreds with "experts" sharing their wisdom with me. Right now, if anyone were to dare suggest an alternative to anything I've written in the last two days, I'm afraid Chris would have to shut the site down. Just in case you're curious, I started an app on Tuesday that has two stacked splitter views, one of which is horizontally split and contains two panel controls, each of which contains a treeview. One of those panels also sports a image-only menu strip and a separate button that collapses the left-most pane of the underlying vertical split container, and creates a vertical text label (sorta - it's not really a label, but a bitmap with rendered text that's twisted sideways). The whole thing kinda/sorta looks like Outlook 2007 when the splitter is collapsed. The biggest pain in the ass was a) figuring out how to turn a label sideways, and b)figuring out how to make it show up with all the other considerations that had to be - ummm, considered. And this is just a prototype... :)

                                        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                        -----
                                        "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                                        R Offline
                                        R Offline
                                        Richard D Santowski
                                        wrote on last edited by
                                        #26

                                        "Better is the enemy of Good Enough." --- old Russian proverb that Admiral Gorskov is said to have had posted on the wall of his office for very many years.

                                        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