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. Dealing with bad-code

Dealing with bad-code

Scheduled Pinned Locked Moved The Lounge
sysadminquestionjavascriptphpdatabase
43 Posts 31 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
    Lost User
    wrote on last edited by
    #1

    I get paid well to do my programming tasks (as an FTE)- But there is a lot of bad code in the project that I get to work on - so bad that it frustrates me and makes me almost write a resignation like - "I give up bcoz of your code"... Few in the team acknowledge that its bad code, most dont. And those who agree consider it a "way of life" - And they are not even motivated to improve - or should I say they have "accepted that way of life". (These folks are the one working in that co since more than 5 yrs.) And I tried - and got crucified more than once. Then, once, I wrote bad code intentionally - and got appreciated .. Then I did nothing and some "blah blah" - and got appreciated again ...wtf.... how do I deal with the team? (considering leaving as the last option) What I mean by that "bad" code here - its 2001ish code created in 2010 with heavy htmls rendered and javascript generated everytime on server (in a php type language) with sql queries somwhere in between and merged with some backend classes that generate javascript arrays and javascript via string concats (and for some odd reason dislike json)... and many times missing caching. Customers have complained on performance - but hey "thats the network issue" - or "its that javascript library" :(

    B N M N D 22 Replies Last reply
    0
    • L Lost User

      I get paid well to do my programming tasks (as an FTE)- But there is a lot of bad code in the project that I get to work on - so bad that it frustrates me and makes me almost write a resignation like - "I give up bcoz of your code"... Few in the team acknowledge that its bad code, most dont. And those who agree consider it a "way of life" - And they are not even motivated to improve - or should I say they have "accepted that way of life". (These folks are the one working in that co since more than 5 yrs.) And I tried - and got crucified more than once. Then, once, I wrote bad code intentionally - and got appreciated .. Then I did nothing and some "blah blah" - and got appreciated again ...wtf.... how do I deal with the team? (considering leaving as the last option) What I mean by that "bad" code here - its 2001ish code created in 2010 with heavy htmls rendered and javascript generated everytime on server (in a php type language) with sql queries somwhere in between and merged with some backend classes that generate javascript arrays and javascript via string concats (and for some odd reason dislike json)... and many times missing caching. Customers have complained on performance - but hey "thats the network issue" - or "its that javascript library" :(

      B Offline
      B Offline
      BobJanova
      wrote on last edited by
      #2

      There's 'bad' and then there's 'you don't like it'. Be careful not to conflate the two. There's nothing intrinsically wrong with constructing markup (including page scripts) explicitly in server code; your ASP.net server page is doing exactly that, it's just hiding under five levels of abstraction where you don't see it unless you look really hard. Though in general large sections of script should be in .js files so web caches can deal with them ... but you can't do that if you've got page instance specific data in your script. The only thing you said which is actually arguably bad instead of just in a style you don't like is mixing data access and rendering. If you come to your co-workers with a good argument for why a particular thing is bad, then you might have some traction.

      1 Reply Last reply
      0
      • L Lost User

        I get paid well to do my programming tasks (as an FTE)- But there is a lot of bad code in the project that I get to work on - so bad that it frustrates me and makes me almost write a resignation like - "I give up bcoz of your code"... Few in the team acknowledge that its bad code, most dont. And those who agree consider it a "way of life" - And they are not even motivated to improve - or should I say they have "accepted that way of life". (These folks are the one working in that co since more than 5 yrs.) And I tried - and got crucified more than once. Then, once, I wrote bad code intentionally - and got appreciated .. Then I did nothing and some "blah blah" - and got appreciated again ...wtf.... how do I deal with the team? (considering leaving as the last option) What I mean by that "bad" code here - its 2001ish code created in 2010 with heavy htmls rendered and javascript generated everytime on server (in a php type language) with sql queries somwhere in between and merged with some backend classes that generate javascript arrays and javascript via string concats (and for some odd reason dislike json)... and many times missing caching. Customers have complained on performance - but hey "thats the network issue" - or "its that javascript library" :(

        N Offline
        N Offline
        Nagy Vilmos
        wrote on last edited by
        #3

        The best way to improve a bad code is not to add to it. If there is a large amount of work already in the project, it sounds like it is, then it is impractical to just restart from scratch. But what should be considered is a better way - not just the way you want but a better way agreed by all - and then implement all new stuff using the new technology. That way the old stuff can be degraded gracefully and you get a new puppy come annual review.

        Reality is an illusion caused by a lack of alcohol

        B 1 Reply Last reply
        0
        • L Lost User

          I get paid well to do my programming tasks (as an FTE)- But there is a lot of bad code in the project that I get to work on - so bad that it frustrates me and makes me almost write a resignation like - "I give up bcoz of your code"... Few in the team acknowledge that its bad code, most dont. And those who agree consider it a "way of life" - And they are not even motivated to improve - or should I say they have "accepted that way of life". (These folks are the one working in that co since more than 5 yrs.) And I tried - and got crucified more than once. Then, once, I wrote bad code intentionally - and got appreciated .. Then I did nothing and some "blah blah" - and got appreciated again ...wtf.... how do I deal with the team? (considering leaving as the last option) What I mean by that "bad" code here - its 2001ish code created in 2010 with heavy htmls rendered and javascript generated everytime on server (in a php type language) with sql queries somwhere in between and merged with some backend classes that generate javascript arrays and javascript via string concats (and for some odd reason dislike json)... and many times missing caching. Customers have complained on performance - but hey "thats the network issue" - or "its that javascript library" :(

          M Offline
          M Offline
          Maximilien
          wrote on last edited by
          #4

          ( :rolleyes: ) <trolling> html is not coding. </trolling> Seriously, you just have to prove them (your immediate boss in the hierarchy) wrong. Show them that good coding practice will save them money in short, medium and long term by increasing the quality of the code, by reducing the number of bugs and problems that are found by users and not developers or internal QA. Start writing down a simple list of good coding practice with (if possible) beneficial effects on performance, portability and maintability. Good coding practice == money saving. Also, remember that the grass is not always greener elsewhere (if you ever decide to change employer). good luck. p.s. I'm working on a system with C code that is at some place more than 20 years old, and while it is far from being perfect with today's standards, it was made with the standards and good practice of the time and it works just fine.

          Nihil obstat

          1 Reply Last reply
          0
          • L Lost User

            I get paid well to do my programming tasks (as an FTE)- But there is a lot of bad code in the project that I get to work on - so bad that it frustrates me and makes me almost write a resignation like - "I give up bcoz of your code"... Few in the team acknowledge that its bad code, most dont. And those who agree consider it a "way of life" - And they are not even motivated to improve - or should I say they have "accepted that way of life". (These folks are the one working in that co since more than 5 yrs.) And I tried - and got crucified more than once. Then, once, I wrote bad code intentionally - and got appreciated .. Then I did nothing and some "blah blah" - and got appreciated again ...wtf.... how do I deal with the team? (considering leaving as the last option) What I mean by that "bad" code here - its 2001ish code created in 2010 with heavy htmls rendered and javascript generated everytime on server (in a php type language) with sql queries somwhere in between and merged with some backend classes that generate javascript arrays and javascript via string concats (and for some odd reason dislike json)... and many times missing caching. Customers have complained on performance - but hey "thats the network issue" - or "its that javascript library" :(

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

            Anup Shinde wrote:

            But there is a lot of bad code in the project that I get to work on - so bad that it frustrates me and makes me almost write a resignation like - "I give up bcoz of your code"...

            Won't help you at all. If you find another job, you'll discover bad code there as well. In fact, the only good code I've ever seen is in some books.

            utf8-cpp

            S B O T 4 Replies Last reply
            0
            • N Nemanja Trifunovic

              Anup Shinde wrote:

              But there is a lot of bad code in the project that I get to work on - so bad that it frustrates me and makes me almost write a resignation like - "I give up bcoz of your code"...

              Won't help you at all. If you find another job, you'll discover bad code there as well. In fact, the only good code I've ever seen is in some books.

              utf8-cpp

              S Offline
              S Offline
              Single Step Debugger
              wrote on last edited by
              #6

              Nemanja Trifunovic wrote:

              In fact, the only good code I've ever seen is in some books.

              If you show me yours, I’ll show you mine.

              There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.

              1 Reply Last reply
              0
              • L Lost User

                I get paid well to do my programming tasks (as an FTE)- But there is a lot of bad code in the project that I get to work on - so bad that it frustrates me and makes me almost write a resignation like - "I give up bcoz of your code"... Few in the team acknowledge that its bad code, most dont. And those who agree consider it a "way of life" - And they are not even motivated to improve - or should I say they have "accepted that way of life". (These folks are the one working in that co since more than 5 yrs.) And I tried - and got crucified more than once. Then, once, I wrote bad code intentionally - and got appreciated .. Then I did nothing and some "blah blah" - and got appreciated again ...wtf.... how do I deal with the team? (considering leaving as the last option) What I mean by that "bad" code here - its 2001ish code created in 2010 with heavy htmls rendered and javascript generated everytime on server (in a php type language) with sql queries somwhere in between and merged with some backend classes that generate javascript arrays and javascript via string concats (and for some odd reason dislike json)... and many times missing caching. Customers have complained on performance - but hey "thats the network issue" - or "its that javascript library" :(

                D Offline
                D Offline
                David Crow
                wrote on last edited by
                #7

                Anup Shinde wrote:

                But there is a lot of bad code in the project that I get to work on - so bad...

                But does it do what it needs to do? If so, then it's just a personal preference/style issue that pits yours against others. Otherwise, if it indeed does not work, personal likes/dislikes are irrelevant and it needs to be fixed. Metrics are on your side.

                "One man's wage rise is another man's price increase." - Harold Wilson

                "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

                L B 2 Replies Last reply
                0
                • N Nemanja Trifunovic

                  Anup Shinde wrote:

                  But there is a lot of bad code in the project that I get to work on - so bad that it frustrates me and makes me almost write a resignation like - "I give up bcoz of your code"...

                  Won't help you at all. If you find another job, you'll discover bad code there as well. In fact, the only good code I've ever seen is in some books.

                  utf8-cpp

                  B Offline
                  B Offline
                  BobJanova
                  wrote on last edited by
                  #8

                  That is true. I work for a really good company full of bright guys who are generally good coders. However, we still have to deal with stuff left lying around by previous contractors, code written under previous paradigms, temporary code that never got replaced, stuff we wrote when we were having a bad day and so on. There is no programming job in the world where you won't have to deal with bad code.

                  1 Reply Last reply
                  0
                  • D David Crow

                    Anup Shinde wrote:

                    But there is a lot of bad code in the project that I get to work on - so bad...

                    But does it do what it needs to do? If so, then it's just a personal preference/style issue that pits yours against others. Otherwise, if it indeed does not work, personal likes/dislikes are irrelevant and it needs to be fixed. Metrics are on your side.

                    "One man's wage rise is another man's price increase." - Harold Wilson

                    "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                    "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

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

                    We have a pretty strong manual-QA cycle before releases and most bugs are found and fixed due to that. So yes, it does work most of the time... One aspect it does not work is - "performance" - And most performance issues cannot be fixed post delivery to QA - reason is "its bad code" - it would need a significant rewrite to fix the performance issues (like it taks 5-10 seconds to load a form) Just to give an example:

                    if(varX=="case") { do this } // and multiple methods use varX=="case" instead of a constant for "case"

                    And then, something like below when we have good json libs available for the purpose - (I am not placing the real code for obvious reasons)

                    //javascript generation
                    var arr = []
                    var i = 0;
                    <% for each string x in names %> // Where server side code in <% %>, "names" is a code-behind property
                    arr[i] = x;
                    i++;
                    <% endfor %>

                    1 Reply Last reply
                    0
                    • L Lost User

                      I get paid well to do my programming tasks (as an FTE)- But there is a lot of bad code in the project that I get to work on - so bad that it frustrates me and makes me almost write a resignation like - "I give up bcoz of your code"... Few in the team acknowledge that its bad code, most dont. And those who agree consider it a "way of life" - And they are not even motivated to improve - or should I say they have "accepted that way of life". (These folks are the one working in that co since more than 5 yrs.) And I tried - and got crucified more than once. Then, once, I wrote bad code intentionally - and got appreciated .. Then I did nothing and some "blah blah" - and got appreciated again ...wtf.... how do I deal with the team? (considering leaving as the last option) What I mean by that "bad" code here - its 2001ish code created in 2010 with heavy htmls rendered and javascript generated everytime on server (in a php type language) with sql queries somwhere in between and merged with some backend classes that generate javascript arrays and javascript via string concats (and for some odd reason dislike json)... and many times missing caching. Customers have complained on performance - but hey "thats the network issue" - or "its that javascript library" :(

                      J Offline
                      J Offline
                      jschell
                      wrote on last edited by
                      #10

                      Anup Shinde wrote:

                      I get paid well to do my programming tasks...And they are not even motivated to improve

                      Does money in your paycheck come from how good your code is or how many customers the company has? If the latter then you might note that one might cliam that refactoring would be cost effective but objectively demonstrating that is impossible in the vast majority of software shops. Because of that any such change is just a subjective preference.

                      Anup Shinde wrote:

                      What I mean by that "bad" code here...odd reason dislike json

                      At least some of that is in fact subjective preferences and has nothing to do with objective technical merits. But since worker morale has been demonstrated to have an impact on costs one can make an argument that keeping the workers happy can be a reason for making technical changes. However that is a rather tenuous stance.

                      Anup Shinde wrote:

                      Customers have complained on performance

                      Customers can complain about many things. Doesn't much matter as long as they continue to be customers. There is of course the customer support cost but often the customers complaints are subjective preferences anyways and a good attitude from the support person might fix that where a technical change won't.

                      L 1 Reply Last reply
                      0
                      • J jschell

                        Anup Shinde wrote:

                        I get paid well to do my programming tasks...And they are not even motivated to improve

                        Does money in your paycheck come from how good your code is or how many customers the company has? If the latter then you might note that one might cliam that refactoring would be cost effective but objectively demonstrating that is impossible in the vast majority of software shops. Because of that any such change is just a subjective preference.

                        Anup Shinde wrote:

                        What I mean by that "bad" code here...odd reason dislike json

                        At least some of that is in fact subjective preferences and has nothing to do with objective technical merits. But since worker morale has been demonstrated to have an impact on costs one can make an argument that keeping the workers happy can be a reason for making technical changes. However that is a rather tenuous stance.

                        Anup Shinde wrote:

                        Customers have complained on performance

                        Customers can complain about many things. Doesn't much matter as long as they continue to be customers. There is of course the customer support cost but often the customers complaints are subjective preferences anyways and a good attitude from the support person might fix that where a technical change won't.

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

                        :thumbsup: I like what you said

                        1 Reply Last reply
                        0
                        • L Lost User

                          I get paid well to do my programming tasks (as an FTE)- But there is a lot of bad code in the project that I get to work on - so bad that it frustrates me and makes me almost write a resignation like - "I give up bcoz of your code"... Few in the team acknowledge that its bad code, most dont. And those who agree consider it a "way of life" - And they are not even motivated to improve - or should I say they have "accepted that way of life". (These folks are the one working in that co since more than 5 yrs.) And I tried - and got crucified more than once. Then, once, I wrote bad code intentionally - and got appreciated .. Then I did nothing and some "blah blah" - and got appreciated again ...wtf.... how do I deal with the team? (considering leaving as the last option) What I mean by that "bad" code here - its 2001ish code created in 2010 with heavy htmls rendered and javascript generated everytime on server (in a php type language) with sql queries somwhere in between and merged with some backend classes that generate javascript arrays and javascript via string concats (and for some odd reason dislike json)... and many times missing caching. Customers have complained on performance - but hey "thats the network issue" - or "its that javascript library" :(

                          D Offline
                          D Offline
                          dazfuller
                          wrote on last edited by
                          #12

                          Look at automation tools. By this I mean have a look for tools which run static code analysis and enforce style guidelines. In the .NET world these would be tools like ReSharper. These can be sold along the following lines to management: - Warns to some common mistakes meaning that there are potentially fewer bugs released to production systems - Automates all or part of your code reviews, so less time is spent doing those and more time is spent coding - Enforcing a common coding style means that new starters don't have to get use to peoples different ways of doing things You can probably come up with a few more as well. Just keep in mind that you may end up writing code that you don't like, but at least it shouldn't be bad code

                          Eagles may soar, but weasels don't get sucked into jet engines

                          1 Reply Last reply
                          0
                          • N Nemanja Trifunovic

                            Anup Shinde wrote:

                            But there is a lot of bad code in the project that I get to work on - so bad that it frustrates me and makes me almost write a resignation like - "I give up bcoz of your code"...

                            Won't help you at all. If you find another job, you'll discover bad code there as well. In fact, the only good code I've ever seen is in some books.

                            utf8-cpp

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

                            Nemanja Trifunovic wrote:

                            the only good code I've ever seen is in some books.

                            Yeah, and unfortunately there are so many (not so cheap) books with flawed code.

                            Mislim, dakle jeo sam.

                            N 1 Reply Last reply
                            0
                            • L Lost User

                              I get paid well to do my programming tasks (as an FTE)- But there is a lot of bad code in the project that I get to work on - so bad that it frustrates me and makes me almost write a resignation like - "I give up bcoz of your code"... Few in the team acknowledge that its bad code, most dont. And those who agree consider it a "way of life" - And they are not even motivated to improve - or should I say they have "accepted that way of life". (These folks are the one working in that co since more than 5 yrs.) And I tried - and got crucified more than once. Then, once, I wrote bad code intentionally - and got appreciated .. Then I did nothing and some "blah blah" - and got appreciated again ...wtf.... how do I deal with the team? (considering leaving as the last option) What I mean by that "bad" code here - its 2001ish code created in 2010 with heavy htmls rendered and javascript generated everytime on server (in a php type language) with sql queries somwhere in between and merged with some backend classes that generate javascript arrays and javascript via string concats (and for some odd reason dislike json)... and many times missing caching. Customers have complained on performance - but hey "thats the network issue" - or "its that javascript library" :(

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

                              If you can disguise some code improvements by selling it to your colleagues as a speed increase or better functionality then you might get somewhere. But you'll probably have to demonstrate it working in some kind of test case to even get them interested. Bear in mind that making it easy to integrate into the existing code is a key factor. You could, for example, create some kind of caching component that speeds up spewing out those javascript arrays, that would probably have a big effect with a small amount of effort.

                              1 Reply Last reply
                              0
                              • L Lost User

                                I get paid well to do my programming tasks (as an FTE)- But there is a lot of bad code in the project that I get to work on - so bad that it frustrates me and makes me almost write a resignation like - "I give up bcoz of your code"... Few in the team acknowledge that its bad code, most dont. And those who agree consider it a "way of life" - And they are not even motivated to improve - or should I say they have "accepted that way of life". (These folks are the one working in that co since more than 5 yrs.) And I tried - and got crucified more than once. Then, once, I wrote bad code intentionally - and got appreciated .. Then I did nothing and some "blah blah" - and got appreciated again ...wtf.... how do I deal with the team? (considering leaving as the last option) What I mean by that "bad" code here - its 2001ish code created in 2010 with heavy htmls rendered and javascript generated everytime on server (in a php type language) with sql queries somwhere in between and merged with some backend classes that generate javascript arrays and javascript via string concats (and for some odd reason dislike json)... and many times missing caching. Customers have complained on performance - but hey "thats the network issue" - or "its that javascript library" :(

                                K Offline
                                K Offline
                                K2DaC2
                                wrote on last edited by
                                #15

                                I'm not a web-developer, but we use "gerrit" for code reviews, and it helped a lot to get the code quality better.(android, iOS and GRails) When people know that someone will really look at their code, the start to think twice if they write bad code. We also have forced our code rules with this. You can reject commits in gerrit or down vote them, force people to submit patches for their commits and have better code in the end. Of course it takes some time to do this. But i wouldn't want to code without code review anymore.

                                1 Reply Last reply
                                0
                                • L Lost User

                                  I get paid well to do my programming tasks (as an FTE)- But there is a lot of bad code in the project that I get to work on - so bad that it frustrates me and makes me almost write a resignation like - "I give up bcoz of your code"... Few in the team acknowledge that its bad code, most dont. And those who agree consider it a "way of life" - And they are not even motivated to improve - or should I say they have "accepted that way of life". (These folks are the one working in that co since more than 5 yrs.) And I tried - and got crucified more than once. Then, once, I wrote bad code intentionally - and got appreciated .. Then I did nothing and some "blah blah" - and got appreciated again ...wtf.... how do I deal with the team? (considering leaving as the last option) What I mean by that "bad" code here - its 2001ish code created in 2010 with heavy htmls rendered and javascript generated everytime on server (in a php type language) with sql queries somwhere in between and merged with some backend classes that generate javascript arrays and javascript via string concats (and for some odd reason dislike json)... and many times missing caching. Customers have complained on performance - but hey "thats the network issue" - or "its that javascript library" :(

                                  N Offline
                                  N Offline
                                  NAANsoft
                                  wrote on last edited by
                                  #16

                                  Well, you may be a bit of a whiner, IMHO ... ;P There are 2 rules to remember here: 1. Don't !! 2. Wait !!! Thing is: In 2001 this is how we wrote that kind of code that you're complaining about. So there may be a large / huge amount of legacy-code that (fair enough) would have been so much nicer with the newer ways of doing it. But the code may actually work, as it is. Thus rule 1 above: 1. Don't == If It Ain't Broke Don't Fix It If the code does not work, then you must fix the problems, and in doing that you can do whatever is best But whait might be that you want to demonstrate better practies. No harm in that - just remember rule 2: 2. Wait == Do not do it yet, but wait to the proper time... Rule no. 2 is for experts only! The proper time could be a stand-alone project, or an isolated routine / module.

                                  1 Reply Last reply
                                  0
                                  • L Lost User

                                    I get paid well to do my programming tasks (as an FTE)- But there is a lot of bad code in the project that I get to work on - so bad that it frustrates me and makes me almost write a resignation like - "I give up bcoz of your code"... Few in the team acknowledge that its bad code, most dont. And those who agree consider it a "way of life" - And they are not even motivated to improve - or should I say they have "accepted that way of life". (These folks are the one working in that co since more than 5 yrs.) And I tried - and got crucified more than once. Then, once, I wrote bad code intentionally - and got appreciated .. Then I did nothing and some "blah blah" - and got appreciated again ...wtf.... how do I deal with the team? (considering leaving as the last option) What I mean by that "bad" code here - its 2001ish code created in 2010 with heavy htmls rendered and javascript generated everytime on server (in a php type language) with sql queries somwhere in between and merged with some backend classes that generate javascript arrays and javascript via string concats (and for some odd reason dislike json)... and many times missing caching. Customers have complained on performance - but hey "thats the network issue" - or "its that javascript library" :(

                                    F Offline
                                    F Offline
                                    Fran Porretto
                                    wrote on last edited by
                                    #17

                                    Bad code -- objectively bad, as in fragile, illegible, and effectively un-maintainable -- is sometimes a consequence of the task one has been asked to perform.

                                    At the moment I'm working on some really bad code: a huge C# program written by a gaggle of mid-level and junior engineers who, from the evidence, must have hated one another too much to converse. This team was told to produce a program that I would have budgeted about four man-years for and assigned to an all-seniors team. (Yes, it was honestly that tough a job.) These poor schmucks were given far less time than they needed even to design the **BLEEP!**ing thing. So it came out bad. Mind you, it works, for persons mindful of its limitations and within the extremely narrowly defined conditions required of it, but outside those conditions it crashes and burns.

                                    Here's the kicker: The user community for which that program was originally intended has persuaded other persons that that program:

                                    • Is exactly what they need;
                                    • "Should" be easily convertible to handle their circumstances and conditions.

                                    (Have I mentioned how much I despise people who say "should" -- especially when the subject is one on which they're abysmally ignorant?)

                                    My original intention was to "lift up the windshield wiper and slide a whole new airplane underneath." I made the mistake of mentioning that intention to someone who ought not to have heard it, and was immediately thereafter forbidden to do any such thing. So here I am, very quietly rewriting the greater part of a 250,000 line program that my management assures me "should be a snap for you, Fran."

                                    Yet another demonstration of the managers' maxim: "Everything is easy for the man who doesn't have to do it himself."

                                    (This message is programming you in ways you cannot detect. Be afraid.)

                                    M 1 Reply Last reply
                                    0
                                    • L Lost User

                                      I get paid well to do my programming tasks (as an FTE)- But there is a lot of bad code in the project that I get to work on - so bad that it frustrates me and makes me almost write a resignation like - "I give up bcoz of your code"... Few in the team acknowledge that its bad code, most dont. And those who agree consider it a "way of life" - And they are not even motivated to improve - or should I say they have "accepted that way of life". (These folks are the one working in that co since more than 5 yrs.) And I tried - and got crucified more than once. Then, once, I wrote bad code intentionally - and got appreciated .. Then I did nothing and some "blah blah" - and got appreciated again ...wtf.... how do I deal with the team? (considering leaving as the last option) What I mean by that "bad" code here - its 2001ish code created in 2010 with heavy htmls rendered and javascript generated everytime on server (in a php type language) with sql queries somwhere in between and merged with some backend classes that generate javascript arrays and javascript via string concats (and for some odd reason dislike json)... and many times missing caching. Customers have complained on performance - but hey "thats the network issue" - or "its that javascript library" :(

                                      F Offline
                                      F Offline
                                      Fabio Franco
                                      wrote on last edited by
                                      #18

                                      Well, for one, don't fix what it's not broken because in that process you may and probably will create bugs and get bashed for it. Then, if this is stressing you out, then you should: 1 - Get over it, becoming too attached can get you in trouble by saying more than you should (Been there). 2 - Start a movement to standardize practices in your company. It may start on your team and later spread to the rest of the company. If this is not an option, then goto 3 3 - Leave the company for another that is known for having skilled programmers and good practices. Loosing your hair over this stuff will get you a heart attack someday. It's not worth it.

                                      To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson ---- Our heads are round so our thoughts can change direction - Francis Picabia

                                      C 1 Reply Last reply
                                      0
                                      • L Lost User

                                        I get paid well to do my programming tasks (as an FTE)- But there is a lot of bad code in the project that I get to work on - so bad that it frustrates me and makes me almost write a resignation like - "I give up bcoz of your code"... Few in the team acknowledge that its bad code, most dont. And those who agree consider it a "way of life" - And they are not even motivated to improve - or should I say they have "accepted that way of life". (These folks are the one working in that co since more than 5 yrs.) And I tried - and got crucified more than once. Then, once, I wrote bad code intentionally - and got appreciated .. Then I did nothing and some "blah blah" - and got appreciated again ...wtf.... how do I deal with the team? (considering leaving as the last option) What I mean by that "bad" code here - its 2001ish code created in 2010 with heavy htmls rendered and javascript generated everytime on server (in a php type language) with sql queries somwhere in between and merged with some backend classes that generate javascript arrays and javascript via string concats (and for some odd reason dislike json)... and many times missing caching. Customers have complained on performance - but hey "thats the network issue" - or "its that javascript library" :(

                                        M Offline
                                        M Offline
                                        Member 8697068
                                        wrote on last edited by
                                        #19

                                        Been there, Done that! Lay out available options and take action. 1. Stay and keep quiet. (could be job security) 2. Stick around until something better comes along. 3. Make your own list of options. I would be willing to bet the programmers that wrote the code have been promoted into management and are running the project. In that case you are in a political situation. Hansen's Theorem 1 : If a situation is not logical, it is political

                                        E 1 Reply Last reply
                                        0
                                        • F Fran Porretto

                                          Bad code -- objectively bad, as in fragile, illegible, and effectively un-maintainable -- is sometimes a consequence of the task one has been asked to perform.

                                          At the moment I'm working on some really bad code: a huge C# program written by a gaggle of mid-level and junior engineers who, from the evidence, must have hated one another too much to converse. This team was told to produce a program that I would have budgeted about four man-years for and assigned to an all-seniors team. (Yes, it was honestly that tough a job.) These poor schmucks were given far less time than they needed even to design the **BLEEP!**ing thing. So it came out bad. Mind you, it works, for persons mindful of its limitations and within the extremely narrowly defined conditions required of it, but outside those conditions it crashes and burns.

                                          Here's the kicker: The user community for which that program was originally intended has persuaded other persons that that program:

                                          • Is exactly what they need;
                                          • "Should" be easily convertible to handle their circumstances and conditions.

                                          (Have I mentioned how much I despise people who say "should" -- especially when the subject is one on which they're abysmally ignorant?)

                                          My original intention was to "lift up the windshield wiper and slide a whole new airplane underneath." I made the mistake of mentioning that intention to someone who ought not to have heard it, and was immediately thereafter forbidden to do any such thing. So here I am, very quietly rewriting the greater part of a 250,000 line program that my management assures me "should be a snap for you, Fran."

                                          Yet another demonstration of the managers' maxim: "Everything is easy for the man who doesn't have to do it himself."

                                          (This message is programming you in ways you cannot detect. Be afraid.)

                                          M Offline
                                          M Offline
                                          Moykn
                                          wrote on last edited by
                                          #20

                                          Fran Porretto wrote:

                                          "Everything is easy for the man who doesn't have to do it himself."

                                          Good for a signature. Do you mind? I have seen this happen. Some years ago i worked in a system that have to produce reports to a specific client, so, one day a sales person come to us and said that we have to add a lot of new data to the report and so she told us: "This is easy, you just have to do a select grouping everything. I DON'T KNOW HOW TO DO THIS, BUT IT'S EASY"

                                          Sorry, my english is bad!

                                          L F 2 Replies 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