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. Bad designed software.

Bad designed software.

Scheduled Pinned Locked Moved The Lounge
csharpquestiondesign
19 Posts 12 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.
  • L Offline
    L Offline
    LucianPopescu
    wrote on last edited by
    #1

    i'm now in charge of a new project in VB.Net which was built by someone who didn't know much about programming, design patterns or programming practices and my boss (project manager or whatever he is) ask me to further develop this project without changing the 'structure' or redesigning the application. Me being a programmer with strong background in C# and having a strong opinion on structured applications and clear and efficient written code. The fact that i have to build good code over the bad designed (from the beginning) application that already exist there and cannot change any bad written code, annoys me... and i feel kinda disgusted every time i have to touch that code... What to do ? How can i survive ???... does anyone have similar experiences ?

    D R S D M 9 Replies Last reply
    0
    • L LucianPopescu

      i'm now in charge of a new project in VB.Net which was built by someone who didn't know much about programming, design patterns or programming practices and my boss (project manager or whatever he is) ask me to further develop this project without changing the 'structure' or redesigning the application. Me being a programmer with strong background in C# and having a strong opinion on structured applications and clear and efficient written code. The fact that i have to build good code over the bad designed (from the beginning) application that already exist there and cannot change any bad written code, annoys me... and i feel kinda disgusted every time i have to touch that code... What to do ? How can i survive ???... does anyone have similar experiences ?

      D Offline
      D Offline
      Dalek Dave
      wrote on last edited by
      #2

      You should ask JSOP, he is the resident VB.Net Expert now! [David Ducks for cover and hides under a desk]

      ------------------------------------ In science, 'fact' can only mean 'confirmed to such a degree that it would be perverse to withhold provisional assent.' I suppose that apples might start to rise tomorrow, but the possibility does not merit equal time in physics classrooms. Stephen J Gould

      1 Reply Last reply
      0
      • L LucianPopescu

        i'm now in charge of a new project in VB.Net which was built by someone who didn't know much about programming, design patterns or programming practices and my boss (project manager or whatever he is) ask me to further develop this project without changing the 'structure' or redesigning the application. Me being a programmer with strong background in C# and having a strong opinion on structured applications and clear and efficient written code. The fact that i have to build good code over the bad designed (from the beginning) application that already exist there and cannot change any bad written code, annoys me... and i feel kinda disgusted every time i have to touch that code... What to do ? How can i survive ???... does anyone have similar experiences ?

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

        Do what you're told and STFU.

        .45 ACP - because shooting twice is just silly
        -----
        "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." - J. Jystad, 2001

        J 1 Reply Last reply
        0
        • L LucianPopescu

          i'm now in charge of a new project in VB.Net which was built by someone who didn't know much about programming, design patterns or programming practices and my boss (project manager or whatever he is) ask me to further develop this project without changing the 'structure' or redesigning the application. Me being a programmer with strong background in C# and having a strong opinion on structured applications and clear and efficient written code. The fact that i have to build good code over the bad designed (from the beginning) application that already exist there and cannot change any bad written code, annoys me... and i feel kinda disgusted every time i have to touch that code... What to do ? How can i survive ???... does anyone have similar experiences ?

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

          It's called legacy code. Yes, most projects I've done involved some of it. I have an app in my current job where the UI is still in VB6. My policy is don't re-write for the sake of it, but write everything new to conform to current standards and good design patterns. As necessary the business logic and data access code sections have been extended with C#. Don't consider your own work to be so great that others won't describe it the same way in years to come. All code seems great when you write it.

          Simon

          D 1 Reply Last reply
          0
          • L LucianPopescu

            i'm now in charge of a new project in VB.Net which was built by someone who didn't know much about programming, design patterns or programming practices and my boss (project manager or whatever he is) ask me to further develop this project without changing the 'structure' or redesigning the application. Me being a programmer with strong background in C# and having a strong opinion on structured applications and clear and efficient written code. The fact that i have to build good code over the bad designed (from the beginning) application that already exist there and cannot change any bad written code, annoys me... and i feel kinda disgusted every time i have to touch that code... What to do ? How can i survive ???... does anyone have similar experiences ?

            D Offline
            D Offline
            Dave Parker
            wrote on last edited by
            #5

            Lucian-aSterX wrote:

            does anyone have similar experiences ?

            all the f***ing time but my pet peeve at the moment is functionality being developed in a release branch for several releases in the future as it's not approved for any of the next 2 releases, and features being developed out of this functionality in the same branches and then at the last minute someone decides they want it going into the next release due tomorrow. It keeps happening and always results in a variety of interesting merge errors.

            1 Reply Last reply
            0
            • S Simon P Stevens

              It's called legacy code. Yes, most projects I've done involved some of it. I have an app in my current job where the UI is still in VB6. My policy is don't re-write for the sake of it, but write everything new to conform to current standards and good design patterns. As necessary the business logic and data access code sections have been extended with C#. Don't consider your own work to be so great that others won't describe it the same way in years to come. All code seems great when you write it.

              Simon

              D Offline
              D Offline
              Dave Parker
              wrote on last edited by
              #6

              Simon Stevens wrote:

              Don't consider your own work to be so great that others won't describe it the same way in years to come. All code seems great when you write it.

              That's true, but from what I've seen most VB6 coders seem to end up using the same set of standards which always results in a mess.... - All variables should be global. Local variables in a function are no no. - If you do use local variables, make sure you set them to Nothing at the end of the function to avoid memory leaks. Also never use Option Explicit as it leads to the need to use the Dim statement which slows your program down. - Variable names must be a maximum of 3 characters. Longer names will slow the computer down. - If a variable is only used within one form, consider storing it the Caption property of a hidden label on the form instead. - Every function should start with "On Error Resume Next" in order to avoid runtime errors. - Never use the built-in date/time functions or the Date datatype. Generic code is bad - write your own date/time functions that are specific to what you are trying to develop.

              D L 2 Replies Last reply
              0
              • L LucianPopescu

                i'm now in charge of a new project in VB.Net which was built by someone who didn't know much about programming, design patterns or programming practices and my boss (project manager or whatever he is) ask me to further develop this project without changing the 'structure' or redesigning the application. Me being a programmer with strong background in C# and having a strong opinion on structured applications and clear and efficient written code. The fact that i have to build good code over the bad designed (from the beginning) application that already exist there and cannot change any bad written code, annoys me... and i feel kinda disgusted every time i have to touch that code... What to do ? How can i survive ???... does anyone have similar experiences ?

                M Offline
                M Offline
                Mark_Wallace
                wrote on last edited by
                #7

                Legacy code is always a major pain, no matter what language it's written in, or who it was written by -- and the fact that you have "strong opinions" means that you are unlikely to be happy with code written by almost anyone else. Look at it this way: You're getting paid to do what you do well. What more do you want?

                I wanna be a eunuchs developer! Pass me a bread knife!

                1 Reply Last reply
                0
                • L LucianPopescu

                  i'm now in charge of a new project in VB.Net which was built by someone who didn't know much about programming, design patterns or programming practices and my boss (project manager or whatever he is) ask me to further develop this project without changing the 'structure' or redesigning the application. Me being a programmer with strong background in C# and having a strong opinion on structured applications and clear and efficient written code. The fact that i have to build good code over the bad designed (from the beginning) application that already exist there and cannot change any bad written code, annoys me... and i feel kinda disgusted every time i have to touch that code... What to do ? How can i survive ???... does anyone have similar experiences ?

                  D Offline
                  D Offline
                  Distind
                  wrote on last edited by
                  #8

                  I walked into a situation loosely similar twice. My first coop(internship basically), I was hired explicitly to fix some bugs in a bit of program by their 'Genius programmer', who wrote a random (and important) app in C# rather than VB the Engineers turned programmers knew how to handle and had since left. After about two days it occurred to me that he was literally playing with everything he could fit into the application, without regard to if something made sense to be used there or not, because he was exploring the language. Now, I'm two weeks in to the job, an intern, and this is the legacy of their 'best' programmer, I can't just say it's crap and needs to be replaced. I took a bit of time, translated what he was doing into a pseudo VB/English bit for my boss. Being a bit of a programmer he was every bit as confused as I was, I outlined a basic approach to cleaning it up and how that'd make working on it easier in the future, and got his approval. This became a theme fairly quickly, and to this day I want to meet this programmer to see what exactly doublize(function which we never determined a legitimate use) means. My real job, nearing my first year here at the moment, I was hired to replace some contractors who were price gouging and delivering late. Well, on top of that they were doing things in some of the most inefficient ways imaginable. There was a particular bit of page load logic which had the potential for N^3 database connections to be fired off, every load, and it was about 1/3rd the content of the page. They didn't hire me to fix that, they hired me to finish up some work they needed done ASAP, so I mentioned it and ignored it until they made a related request. Once touching any bit of it was back on the table I reminded them of the N^3 connections, and stated I could do it in 2(not N^2, TWO) as well as adding the new features they wanted, as well as reducing the time to implement any other features in the future if I could re-write the entire chunk. I quantified the differences in load time, detailed the reduction in resource utilization, tossed a few more buzzwords and statistics in the right directions and they approved it. What's the point of all that? Show them why it would benefit them if it changes, you need to learn the system before you can alter it anyway, note the problem sections, note any improvements you can make off the top of your head, and find a way to quantify the improvement in the software that they'd see. Execution time, maintenance costs/time, and development time h

                  M L 2 Replies Last reply
                  0
                  • D Dave Parker

                    Simon Stevens wrote:

                    Don't consider your own work to be so great that others won't describe it the same way in years to come. All code seems great when you write it.

                    That's true, but from what I've seen most VB6 coders seem to end up using the same set of standards which always results in a mess.... - All variables should be global. Local variables in a function are no no. - If you do use local variables, make sure you set them to Nothing at the end of the function to avoid memory leaks. Also never use Option Explicit as it leads to the need to use the Dim statement which slows your program down. - Variable names must be a maximum of 3 characters. Longer names will slow the computer down. - If a variable is only used within one form, consider storing it the Caption property of a hidden label on the form instead. - Every function should start with "On Error Resume Next" in order to avoid runtime errors. - Never use the built-in date/time functions or the Date datatype. Generic code is bad - write your own date/time functions that are specific to what you are trying to develop.

                    D Offline
                    D Offline
                    Dalek Dave
                    wrote on last edited by
                    #9

                    Dave Parker wrote:

                    - Variable names must be a maximum of 3 characters.

                    I remember when it was Single Character for variables!, Three would be glorious!

                    Dave Parker wrote:

                    - Every function should start with "On Error Resume Next" in order to avoid runtime errors.

                    Seems ok to me, in a test situation anyway, not it final code though. BUT...

                    Dave Parker wrote:

                    - All variables should be global. Local variables in a function are no no.

                    Oh dear, I have been guilty of this and had some horror stories in order to, er, correct it with 'similar' variable names. I have since learnt my lesson :)

                    ------------------------------------ In science, 'fact' can only mean 'confirmed to such a degree that it would be perverse to withhold provisional assent.' I suppose that apples might start to rise tomorrow, but the possibility does not merit equal time in physics classrooms. Stephen J Gould

                    1 Reply Last reply
                    0
                    • D Distind

                      I walked into a situation loosely similar twice. My first coop(internship basically), I was hired explicitly to fix some bugs in a bit of program by their 'Genius programmer', who wrote a random (and important) app in C# rather than VB the Engineers turned programmers knew how to handle and had since left. After about two days it occurred to me that he was literally playing with everything he could fit into the application, without regard to if something made sense to be used there or not, because he was exploring the language. Now, I'm two weeks in to the job, an intern, and this is the legacy of their 'best' programmer, I can't just say it's crap and needs to be replaced. I took a bit of time, translated what he was doing into a pseudo VB/English bit for my boss. Being a bit of a programmer he was every bit as confused as I was, I outlined a basic approach to cleaning it up and how that'd make working on it easier in the future, and got his approval. This became a theme fairly quickly, and to this day I want to meet this programmer to see what exactly doublize(function which we never determined a legitimate use) means. My real job, nearing my first year here at the moment, I was hired to replace some contractors who were price gouging and delivering late. Well, on top of that they were doing things in some of the most inefficient ways imaginable. There was a particular bit of page load logic which had the potential for N^3 database connections to be fired off, every load, and it was about 1/3rd the content of the page. They didn't hire me to fix that, they hired me to finish up some work they needed done ASAP, so I mentioned it and ignored it until they made a related request. Once touching any bit of it was back on the table I reminded them of the N^3 connections, and stated I could do it in 2(not N^2, TWO) as well as adding the new features they wanted, as well as reducing the time to implement any other features in the future if I could re-write the entire chunk. I quantified the differences in load time, detailed the reduction in resource utilization, tossed a few more buzzwords and statistics in the right directions and they approved it. What's the point of all that? Show them why it would benefit them if it changes, you need to learn the system before you can alter it anyway, note the problem sections, note any improvements you can make off the top of your head, and find a way to quantify the improvement in the software that they'd see. Execution time, maintenance costs/time, and development time h

                      M Offline
                      M Offline
                      Mark_Wallace
                      wrote on last edited by
                      #10

                      Distind wrote:

                      to this day I want to meet this programmer to see what exactly doublize(function which we never determined a legitimate use) means

                      It means "wear glasses". HTH.

                      I wanna be a eunuchs developer! Pass me a bread knife!

                      1 Reply Last reply
                      0
                      • L LucianPopescu

                        i'm now in charge of a new project in VB.Net which was built by someone who didn't know much about programming, design patterns or programming practices and my boss (project manager or whatever he is) ask me to further develop this project without changing the 'structure' or redesigning the application. Me being a programmer with strong background in C# and having a strong opinion on structured applications and clear and efficient written code. The fact that i have to build good code over the bad designed (from the beginning) application that already exist there and cannot change any bad written code, annoys me... and i feel kinda disgusted every time i have to touch that code... What to do ? How can i survive ???... does anyone have similar experiences ?

                        N Offline
                        N Offline
                        Nemanja Trifunovic
                        wrote on last edited by
                        #11

                        Lucian-aSterX wrote:

                        and my boss (project manager or whatever he is) ask me to further develop this project without changing the 'structure' or redesigning the application

                        To be fair, what did you expect? He is not going to let every new programmer rewrite the project from scratch just because they don't like the code base. I *never* liked the code base I had to work with (for different reasons and to a different degree). And if even you start a new project, count on the next guy hating it. Such is life :)

                        utf8-cpp

                        D 1 Reply Last reply
                        0
                        • L LucianPopescu

                          i'm now in charge of a new project in VB.Net which was built by someone who didn't know much about programming, design patterns or programming practices and my boss (project manager or whatever he is) ask me to further develop this project without changing the 'structure' or redesigning the application. Me being a programmer with strong background in C# and having a strong opinion on structured applications and clear and efficient written code. The fact that i have to build good code over the bad designed (from the beginning) application that already exist there and cannot change any bad written code, annoys me... and i feel kinda disgusted every time i have to touch that code... What to do ? How can i survive ???... does anyone have similar experiences ?

                          C Offline
                          C Offline
                          Chris Meech
                          wrote on last edited by
                          #12

                          I'd recommend re-factor. It's slow, tedious and causes bruising on the brain. But if applied consistently, you could end up with a much better code base that includes testing and documentation. :)

                          Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]

                          L 1 Reply Last reply
                          0
                          • N Nemanja Trifunovic

                            Lucian-aSterX wrote:

                            and my boss (project manager or whatever he is) ask me to further develop this project without changing the 'structure' or redesigning the application

                            To be fair, what did you expect? He is not going to let every new programmer rewrite the project from scratch just because they don't like the code base. I *never* liked the code base I had to work with (for different reasons and to a different degree). And if even you start a new project, count on the next guy hating it. Such is life :)

                            utf8-cpp

                            D Offline
                            D Offline
                            David Knechtges
                            wrote on last edited by
                            #13

                            Ah yes, been in this business since 89 - always hated the previous person's work for various reasons. Surely, they have hated mine too when someone would come in and work on my code base too. But, my current job, I took over a project being developed from scratch from a guy who had left the company. The software was so well designed and written, that I understood exactly what he was doing, and had to change VERY little of it (mostly to add features to it that he hadn't thought of). So, there are cases where the person coming in does like the previous person's software, but admittedly they are very rare.

                            1 Reply Last reply
                            0
                            • D Dave Parker

                              Simon Stevens wrote:

                              Don't consider your own work to be so great that others won't describe it the same way in years to come. All code seems great when you write it.

                              That's true, but from what I've seen most VB6 coders seem to end up using the same set of standards which always results in a mess.... - All variables should be global. Local variables in a function are no no. - If you do use local variables, make sure you set them to Nothing at the end of the function to avoid memory leaks. Also never use Option Explicit as it leads to the need to use the Dim statement which slows your program down. - Variable names must be a maximum of 3 characters. Longer names will slow the computer down. - If a variable is only used within one form, consider storing it the Caption property of a hidden label on the form instead. - Every function should start with "On Error Resume Next" in order to avoid runtime errors. - Never use the built-in date/time functions or the Date datatype. Generic code is bad - write your own date/time functions that are specific to what you are trying to develop.

                              L Offline
                              L Offline
                              LucianPopescu
                              wrote on last edited by
                              #14

                              Dave Parker wrote:

                              Variable names must be a maximum of 3 characters.

                              check this [^] out.

                              D 1 Reply Last reply
                              0
                              • D Distind

                                I walked into a situation loosely similar twice. My first coop(internship basically), I was hired explicitly to fix some bugs in a bit of program by their 'Genius programmer', who wrote a random (and important) app in C# rather than VB the Engineers turned programmers knew how to handle and had since left. After about two days it occurred to me that he was literally playing with everything he could fit into the application, without regard to if something made sense to be used there or not, because he was exploring the language. Now, I'm two weeks in to the job, an intern, and this is the legacy of their 'best' programmer, I can't just say it's crap and needs to be replaced. I took a bit of time, translated what he was doing into a pseudo VB/English bit for my boss. Being a bit of a programmer he was every bit as confused as I was, I outlined a basic approach to cleaning it up and how that'd make working on it easier in the future, and got his approval. This became a theme fairly quickly, and to this day I want to meet this programmer to see what exactly doublize(function which we never determined a legitimate use) means. My real job, nearing my first year here at the moment, I was hired to replace some contractors who were price gouging and delivering late. Well, on top of that they were doing things in some of the most inefficient ways imaginable. There was a particular bit of page load logic which had the potential for N^3 database connections to be fired off, every load, and it was about 1/3rd the content of the page. They didn't hire me to fix that, they hired me to finish up some work they needed done ASAP, so I mentioned it and ignored it until they made a related request. Once touching any bit of it was back on the table I reminded them of the N^3 connections, and stated I could do it in 2(not N^2, TWO) as well as adding the new features they wanted, as well as reducing the time to implement any other features in the future if I could re-write the entire chunk. I quantified the differences in load time, detailed the reduction in resource utilization, tossed a few more buzzwords and statistics in the right directions and they approved it. What's the point of all that? Show them why it would benefit them if it changes, you need to learn the system before you can alter it anyway, note the problem sections, note any improvements you can make off the top of your head, and find a way to quantify the improvement in the software that they'd see. Execution time, maintenance costs/time, and development time h

                                L Offline
                                L Offline
                                LucianPopescu
                                wrote on last edited by
                                #15

                                This is my first time happening something like this. The good side is that the manager admits i know better than him and he thinks i'm a good asset. He says that if it works like it is, why change ? :doh: anyway. Now i know what i have to do ;)

                                1 Reply Last reply
                                0
                                • C Chris Meech

                                  I'd recommend re-factor. It's slow, tedious and causes bruising on the brain. But if applied consistently, you could end up with a much better code base that includes testing and documentation. :)

                                  Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]

                                  L Offline
                                  L Offline
                                  LucianPopescu
                                  wrote on last edited by
                                  #16

                                  very good advice. thanks :)

                                  1 Reply Last reply
                                  0
                                  • L LucianPopescu

                                    Dave Parker wrote:

                                    Variable names must be a maximum of 3 characters.

                                    check this [^] out.

                                    D Offline
                                    D Offline
                                    Dave Parker
                                    wrote on last edited by
                                    #17

                                    Eek - yes that'd get annoying. Imagine it without intellisense!

                                    1 Reply Last reply
                                    0
                                    • L LucianPopescu

                                      i'm now in charge of a new project in VB.Net which was built by someone who didn't know much about programming, design patterns or programming practices and my boss (project manager or whatever he is) ask me to further develop this project without changing the 'structure' or redesigning the application. Me being a programmer with strong background in C# and having a strong opinion on structured applications and clear and efficient written code. The fact that i have to build good code over the bad designed (from the beginning) application that already exist there and cannot change any bad written code, annoys me... and i feel kinda disgusted every time i have to touch that code... What to do ? How can i survive ???... does anyone have similar experiences ?

                                      J Offline
                                      J Offline
                                      Joe Woodbury
                                      wrote on last edited by
                                      #18

                                      I won't touch VB.Net, but I've become somewhat of a specialist in taking over crap. The first thing to remember is to not break what works. Some bad applications started out good, but went bad over the years or may look horrible, but do solve the problem. The second thing is to be EXTREMELY aware of the politics--I have gotten into huge trouble by fixing code I wasn't supposed to even suggest wasn't working right. (Essentially got fired early in my career when the CEO discovered I'd redesigned "his" app and rewritten much of "his" code [which wasn't crap, but wasn't great either--very utilitarian]. I thought that's why I'd been hired and the VP of R&D knew I was doing it so defended me. Eventually I was "laid" off with a good severance package when that VP was out-of-town [and out-of-sorts with the CEO].) As has been suggested, start small. One thing this really helps in is understanding the code. Quite often the code does work, but isn't very good because the engineer isn't a good programmer and/or, in my case since I only work on Windows, doesn't keep up with the Win32 API. But, the code DOES work and breaking what works is very, very bad. You'll also find that despite the mess, there often is a style, however perverse, that will be very helpful when making changes.

                                      1 Reply Last reply
                                      0
                                      • R realJSOP

                                        Do what you're told and STFU.

                                        .45 ACP - because shooting twice is just silly
                                        -----
                                        "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." - J. Jystad, 2001

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

                                        ...and forever be someone's bitch.

                                        -- Kein Mitleid Für Die Mehrheit

                                        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