Slashdot Mirror


Ask Slashdot: What Do You Do If You're Given a Broken Project?

X10 writes "Suppose you're assigned to a project that someone else has created. It's an app, you'll work on it alone. You think 'how hard can it be,' you don't check out the source code before you accept the assignment. But then, it turns out the code is not robust. You create a small new feature, and the app breaks down in unexpected ways. You fix a bug, and new bugs pop up all over the place. The person who worked on the project before you is well respected in the company, and you are 'just a contractor,' hired a few months ago. The easy way out is to just quit, as there's plenty of jobs you can take. But that doesn't feel right. What else can you do?"

308 comments

  1. Enjoy your Death March by pegr · · Score: 5, Informative
    1. Re:Enjoy your Death March by Agares · · Score: 2

      I wish I had points to mod you up. I have seen this way to often.

    2. Re:Enjoy your Death March by 0p7imu5_P2im3 · · Score: 5, Insightful

      It's not that bad. Results are more important than intraoffice politics, if your superiors enjoy making money.

      I have been in this specific situation. In my case, the ultimate answer was to rewrite the portion of the program that was worst, mostly from scratch. We had some proprietary libraries for which we had obtained the source code. Going through said source showed that the flaws (in this case, performance drag) were well entrenched, so I decided it would be necessary to write our own code from scratch to replace it. There were no political ramifications because we no longer had a business relationship with the original company, as it had gone bankrupt, and the original code was now owned by our customer. It was on my head to succeed, and succeed I did. The performance of our software went well into the useful range and I had impressed my superiors immensely. Not only that, but about two weeks later, the other customer of our software had canceled their project, so this project that I had just brought to fruition was now the only project using our software. I saved 20+ jobs and was now in charge of our group's only project. I was a hero.

      That's when politics begin to matter. Another group in the company had lost all it's customers at the same time as our group lost our other customer. That group's manager needed a project at which to work, so after arranging a public shaming of my group's manager and taking over my group, he had me moved to the basement in another building... literally... He had to replace me with 3 managers and 2 programmers and 4 operators, but then, he was able to charge the customer for 9 employees' time instead of just 1 employee's time. Now he looked like the hero and I was looking for another job. If not for charging time spent to the customer, he probably would have lost that fight.

      The moral of the story is: Do your absolute best and, if money is more important in your company than politics, you will be rewarded.

      --
      Resistance is futile. Your technological distinctiveness will be added to our own. You will become one with the morgue
    3. Re:Enjoy your Death March by Anonymous Coward · · Score: 5, Insightful

      So you were demoted to a basement position and someone else, who had no part in the software you wrote, reaped the benefits and became the company hero for your work. How exactly were you rewarded?

    4. Re:Enjoy your Death March by Infestedkudzu · · Score: 1

      +1 Right, Insightful This is an accurate perspective and how you should look at it. I need my mod points to last longer . they always seem to show up when i don't have a reply i wanna mod

    5. Re:Enjoy your Death March by Anonymous Coward · · Score: 2

      So you were demoted to a basement position and someone else, who had no part in the software you wrote, reaped the benefits and became the company hero for your work. How exactly were you rewarded?

      He eventually got his red Swingline stapler back. Isn't that enough for anyone?

    6. Re:Enjoy your Death March by Gr8Apes · · Score: 2

      The moral of the story is: Do your absolute best and, if money is more important in your company than politics, you will be rewarded.

      He knows he got screwed in his case, as politics were more important in his company. I can relate to his position, and am sorry to say that I have yet to see a company that doesn't have politics play an important role. You must be willing to play politics in addition to being productive, or you will get used and tossed.

      --
      The cesspool just got a check and balance.
    7. Re:Enjoy your Death March by jellomizer · · Score: 4, Insightful

      Here is the problem.
      1. The poster is judging the person by his code. We all write code, and in a few years we look back and go, what the heck was I thinking.
      2. Most home grown programs grow organically, so there isn't a strong strong infrastructure to it. This doesn't mean the maker was unskilled, or a bad programmer.
      3. It was a learning process at the time.

      So this is what you need to do.
      1. Add what you feel is a good infrastructure to the project. It isn't that his code is bad, but we now have a newer way to do this, so it more manageable.
      2. Look for what is good. Even in bad code there is often a lot of good parts to it. Take advantage of it, and be sure to keep it.
      3. Document your changes, and explain them.

      The guy is well respected in the organization, that is fine, you should respect him too. Being that you have been hired to maintain his code, means he doesn't want or cannot be bothered with it any more. That said, it is your baby now and you will need to raise it your way.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    8. Re:Enjoy your Death March by nosfucious · · Score: 4, Insightful

      Success is not defeating the trap, it's getting the cheese.

      No cheese, ergo, no success.

      Go read some Machiavelli.

      --
      Q:I was listening to a CD in Grip and it sounded horrible! What's up? A:Perhaps you are listening to country music
    9. Re:Enjoy your Death March by sunderland56 · · Score: 4, Insightful

      Summary of your story: Do your best, and you'll get screwed over by politics anyway.

      To the original question: If you rewrite the code and make it a huge success, the original author will get all the credit. If you fail because the code is a stinking pile of crap, you'll be blamed, not him. Welcome to the corporate world.

    10. Re:Enjoy your Death March by mwehle · · Score: 2

      Success is not defeating the trap, it's getting the cheese.

      No cheese, ergo, no success.

      Exactly. Like other engineers too often I find myself focused on fixing code which sometimes can't be fixed in the allotted time, or trying to explain to management why the thing is broken. Success may involve "managing up" and diplomatically extricating yourself from blame for the situation, more than finding a way to make the project work.

      --
      Wir sind geboren, um frei zu sein - Rio Reiser
    11. Re:Enjoy your Death March by Anonymous Coward · · Score: 0

      1. The poster is judging the person by his code. We all write code, and in a few years we look back and go, what the heck was I thinking.

      The code, as you point out, will always suck. That's the universal not-my-code phenomenon. The engineering discipline will survive. There's code that I wrote 10 years ago that I bet I'd do the point-and-laugh thing with and call the author an idiot. But it had ~80% test coverage, so I could work with it today without fear of breaking things in the way that the story author is breaking his project.

      The answer for me is always the same. If there are no tests, start writing them. Without tests, significant code changes will always cause regressions. They're also an easy way to point out the deficiencies in code. If you have regressions and you blame them on the crap quality of the star engineer's code, it will reflect badly on you. If you have regressions and you blame it on the lack of tests to protect you from your ignorance of the code, it can only reflect badly on the original author.

    12. Re:Enjoy your Death March by hondo77 · · Score: 1

      I was a hero.

      No. In business, as you found out, a hero ain't nothin' but a sandwich.

      --
      I live ze unknown. I love ze unknown. I am ze unknown.
    13. Re:Enjoy your Death March by Anonymous Coward · · Score: 0

      the company gets all the credit. You will get none, nor does the first author.

    14. Re:Enjoy your Death March by complete+loony · · Score: 2

      1. Start writing new automated tests for the existing features of the application.

      2. Run them against the original, unmodified code.

      3. When your changes break the tests, work out what *you* did wrong, before you commit your changes.

      How can you get anything done if you don't find out quickly that you broke something?

      --
      09F91102 no, 455FE104 nope, F190A1E8 uh-uh, 7A5F8A09 that's not it, C87294CE no. Ah! 452F6E403CDF10714E41DFAA257D313F.
    15. Re:Enjoy your Death March by Matheus · · Score: 1

      Thanks for the fairly sane post :-)

      I've been handed "failed" projects numerous times... I'm good at taking them at fixing them. (and because of that it's a regularly offered job to me) One thing that hasn't been mentioned is initial code analysis. A well crafted, *objective (no slandering the original developer), review of the code in advance can go a long way towards easing tensions later. When you demonstrate the issues you are about to fix and *then fix them you are more likely to get the credit you deserve.

      Another note: if the original code was written by your *single well respected member of the company then if it is truly terrible then there should be very little stopping you from taking the re-write route (assuming the intended product isn't infeasible). You are better off designing the product properly from scratch anyway instead of trying to piece-meal repair something as terrible as you imply.

      Anecdotal: 1 contract job I was given they literally gave me the entire source repository in advance of the interview and asked me to check it out (project that was WAY over budget and over schedule). They wanted me to "finish up a few features" and deliver. I wrote a long plain text email review of the code telling them how bad the entire situation was and the job was given to me (with orders of magnitude larger budget) before I even went in.

    16. Re:Enjoy your Death March by Anonymous Coward · · Score: 0

      ...unless you don't care about the cheese, in which case defeating the trap is its own reward.

    17. Re:Enjoy your Death March by Hognoxious · · Score: 4, Interesting

      The poster is judging the person by his code.

      No shit. The person is employed as a coder. Would you judge a surgeon by his poetry?

      We all write code, and in a few years we look back and go, what the heck was I thinking.

      We might do that in the first year of our career, or maybe six months into a new language, platform or type of app. If you're doing it regularly at a later stage you're an utter flid and should go and do something else.

      The guy is well respected in the organization, that is fine, you should respect him too.

      I should respect someone because he knows the right butts to kiss? Don't think so. I've cleared up a fair few messes made by "well respected" people, and part of that process was resetting their reputations to something more aligned with reality.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    18. Re:Enjoy your Death March by JeffAtl · · Score: 1

      I completely agree with your post, but many employers will not perceive writing tests as productive.

      In this case, the manager would probably see them as a waste of time since the application is already perceived as a success. Any tests that found deficiencies would be branded as flawed.

      In too many cases, managers "just want the app to work" - they don't care about details and the OP would be seen as inflexible and suitable for a "fast paced work environment."

    19. Re:Enjoy your Death March by luis_a_espinal · · Score: 1

      So you were demoted to a basement position and someone else, who had no part in the software you wrote, reaped the benefits and became the company hero for your work. How exactly were you rewarded?

      He got paid, and instead of being fired/let go (or forced to quit by attrition), he got moved to a basement without being significantly harassed out of his marble (and still got paid.) And he got the experience that he can take anywhere else (that is more valuable than gold.)

      Even if he was demoted, he still retains his reputation (even if only under wraps) and his paycheck. That is the gift that keeps on giving if you know how to play your cards.

      That's good reward for me. It's all about the cheese, the continuous flow of cheese. Being a hero is not the reward. In fact, it is bullshit (read "48 Laws of Power" or "Machiavelli"). Don't seek public recognition. Seek the cheese and establish a reputation, even if begrudgingly by your bosses (who won't ever be able to get rid of you unless they want to go Pyrrhic.)

      That is your reward. That is how you play the game.

    20. Re:Enjoy your Death March by Anonymous Coward · · Score: 1

      I'll take "things that would be a problem if engineering jobs insanely plentiful right now" for $600, Alex.

      If management doesn't understand the value of automated regression tests, it's not a place where you want to work. It's an item, along with things like version control, that's on the set of the minimum required engineering discipline that an employer must observe for me to work there. As developers, we have the ability to be very picky these days...we should be taking advantage of that.

      True story: My coworker and I were out at lunch having a technical discussion about the recent Stripe CTF event. We discussed how we'd solved various levels and other approaches we'd tried that hadn't worked. As we were getting up to leave, someone who'd overheard much of our conversation stopped us and offered us a job on the spot. It would seem that, at least in San Francisco, the contents of a lunch discussion can now satisfy the interview requirements at some startups.

    21. Re:Enjoy your Death March by Anrego · · Score: 1

      Indeed.

      I'd add, most previous posts seem to assume the submitter knows what he's doing and the code really is awful.

      This could well be the case, but at the same time, this reaction is very typical of people fresh out of university who have never worked on real code. The lack of "I'm considering doing a rewrite" in the post is encouraging, but the "I introduced code and broke stuff" indicates not fully understanding the scope of his impact (even in really terrible code it's usually possible though tedious to get an idea of what something is going to do, at least to the point of knowing it might break something) which is something you see in new coders.

      As to whether to stay or run, the biggest things I'd look at are:

      - Is there any hope of the project succeeding in the timeline (if not, run, you are about to be the fall guy)
      - Is the political environment there such that you will be able to fix the project in the timeline (if not, run, you are about to get an ulcer, then become the fall guy)
      - Are you actually capable of fixing the problem (always hard to know, but you should have a good grasp of your capabilities by now)

      Taking a pile of shit and making it awesome is a great thing, both career wise and emotionally. Riding a burning wreck is a terrible thing career wise and emotionally.

    22. Re:Enjoy your Death March by Grishnakh · · Score: 1

      As best as I can tell, he got a good paycheck for a while, got a successful project to put on his resume, and probably now has a manager who he can use for a reference in the future. Also, he may have been a contractor (he said "I have been in this specific situation", and TFS refers to an employee who is a contractor); when you're a contractor, things are different. You don't really care much about your long-term "success" in the company, since you're just there for a paycheck during your 6-month or 12-month tenure there. Unless you're using the gig as a temp-to-perm, you're really only there to make money and to build some experience before moving on. If that's what this guy's attitude was, then his experience could be counted as a "success".

    23. Re:Enjoy your Death March by Grishnakh · · Score: 1

      No, it doesn't. The company doesn't get "credit" for some software project that's only used inside the company.

    24. Re:Enjoy your Death March by 0p7imu5_P2im3 · · Score: 1

      You only think you're laughing now.

      I bought red Swingline staplers for everyone with which I had worked at the company. I labeled each "Property of <my name>" so they'd remember me.

      --
      Resistance is futile. Your technological distinctiveness will be added to our own. You will become one with the morgue
    25. Re:Enjoy your Death March by 0p7imu5_P2im3 · · Score: 1

      I salute you, anonymous coward, for you brought an evil grin to my face... even if only momentarily.

      --
      Resistance is futile. Your technological distinctiveness will be added to our own. You will become one with the morgue
    26. Re:Enjoy your Death March by 0p7imu5_P2im3 · · Score: 1

      I think you mean "gyro" ... but the argument is sound.

      --
      Resistance is futile. Your technological distinctiveness will be added to our own. You will become one with the morgue
    27. Re:Enjoy your Death March by Xest · · Score: 1

      He found out the company was shit and got the kick up the arse he needed to move to a better job?

      What better reward is there than that?

    28. Re:Enjoy your Death March by Xest · · Score: 2

      Depends if you just sit their quietly.

      Personally I grew tired of doing that and nowadays I'm just blunt to management. If something is shit, I tell them it's shit, and I use the word shit. If they don't like that I can go work elsewhere where they actually want to know if something is shit so they can act on it. Nine times out of ten though, they are okay with being told the cold hard truth, providing you can justify your reasoning as to why you think it's shit and offer them a solution as to what needs to be done.

      On projects where I've been in this exact situation I've pointed out that I've taken over for example, in one case, a project that was missing enough features to be 3 months behind schedule and still managed to deliver on time. I showed the directors what was missing even though the previous owner had said it was complete to that milestone and they accepted that I was right. Then when I got it all sorted, fixed the project up including all the missing components and delivered on time I got praised for delivering on time and was given max bonus.

      It's only an issue if you keep quiet about it or aren't blunt. It's easy to think someone is respected but you'd be surprised, there will be people with their suspicions that something isn't right and when you bring that to the forefront they'll be happy to have their suspicions confirmed, and the golden boy can rapidly become a pariah if he's 100% talk, 0% walk and you can prove that.

      Highlighting incompetence and time wasters in a convincing manner is in itself a skill that is particularly prominent for contractors to learn. You just need to provide evidence and a persuasive argument as to why something is wrong/bad.

      Of course, a lot of people think something is bad just because they don't have the pre-requisite knowledge to understand what they're doing or why something is the way it is. I'm not saying this is the case here, but when that happens people seem surprised that it blows up in their face when they make a fuss and fail to justify themselves because they're wrong. You have to be pretty fucking sure you're right that it is crap, and that you're not just out of your depth with the project you've been handed.

    29. Re:Enjoy your Death March by Anonymous Coward · · Score: 0

      The guy is well respected in the organization, that is fine, you should respect him too.

      I should respect someone because he knows the right butts to kiss? Don't think so. I've cleared up a fair few messes made by "well respected" people, and part of that process was resetting their reputations to something more aligned with reality.

      My guess is that the guy is respected as a coder because he does one thing well: deliver. That's usually the most important thing in a company. Other people might make cleaner and better structured code, but they would take a lot longer to get to the same place.

    30. Re:Enjoy your Death March by AmiMoJo · · Score: 1

      you're an utter flid

      I don't know if you realize this but that is actually a pretty offensive thing to say. "Flid" comes from thalidomide, a medicine that was given to mothers to alleviate morning sickness but which caused their children to be horrible deformed and disabled.

      I'm assuming you didn't know that, not disagreeing with your point.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    31. Re:Enjoy your Death March by UnderCoverPenguin · · Score: 1

      He knows he got screwed in his case, as politics were more important in his company. I can relate to his position, and am sorry to say that I have yet to see a company that doesn't have politics play an important role. You must be willing to play politics in addition to being productive, or you will get used and tossed.

      Sounds like his manager failed to successfully play politics.

      --
      Don't try to out wierd me, three-eyes. I get stranger things than you, free with my breakfast cereal. --Zaphod Beeblebr
    32. Re:Enjoy your Death March by jellomizer · · Score: 1

      Judging someone by his code, isn't a good judgement at all of their skill. They could be under intense pressure to get it done, or they meant it to be one time throwaway code, which then got added to. There is a slew of stuff that could happen to make it not the authors best work.

      The idea that your coding style will peak in 6 months, is very scary to me, that means you are not open to learning or expanding your skills. The reason why your code may suck, is the fact you were not under the idea of the final usage of the project. Well lets hard code that variable or function Lets say a Converting Inches to Feet, only to have the company switch to metric or have it split after a few years. Or your method to do something was done before a new type of security break in method was discovered. I remember back when the buffer overflow hack was discovered, it was actually a radical approach at the time to break into software, and caused a lot of software to be rewritten because before the buffer overflow would just create an error, and the program expected a normal input. Also sometimes if you have a new algorithm you may not have been in the most optimal mind set at the time, trying to expand your code for changes that would never happen. Tones of stuff that can happen that will cause you to look back and go what was I thinking.

      You should respect or at least treat him with respect, because causing a conflict with him will not be productive. If he is still there, he could be a resource to help comprehend something that is off. Also if the guy who is respected at the company doesn't like you, his word will have more pull then yours.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    33. Re:Enjoy your Death March by Anonymous Coward · · Score: 0

      Politics (office variety and otherwise) is a different game than software engineering. The parent post solved the engineering problem, but failed the political problem. You can succeed at both-- first you need to sell how bad the software is. It is better to show than tell, and some subtlety may be involved in order to avoid alienating any of the existing stakeholders.

      As a young engineer, I scoffed at the political "bullshit", but I eventually came to realize that it is the important part. Just about anything worth doing is going to involve more than one person, and thus, necessarily, some politics. My advice would be to spend some time and personal resources figuring out how to be successful in that arena as well.

    34. Re:Enjoy your Death March by Anonymous Coward · · Score: 0

      This.

      Get out.

  2. Short answer: Run. by korbulon · · Score: 4, Funny

    Long answer: Run real fast.

    1. Re:Short answer: Run. by jones_supa · · Score: 1

      He says in the summary that quitting does not "feel right".

    2. Re:Short answer: Run. by mrchaotica · · Score: 3, Insightful

      Get over it?

      --

      "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

    3. Re:Short answer: Run. by TWiTfan · · Score: 1

      Agreed. Run, Forrest, Run!!

      --
      The cow says "Moo." The dog says "Woof." The Timothy says "Thanks, valued customer. We appreciate your input."
    4. Re:Short answer: Run. by TWiTfan · · Score: 4, Insightful

      It's going to feel a lot less right when the project collapses and everyone points the finger at the fall-guy contractor.

      --
      The cow says "Moo." The dog says "Woof." The Timothy says "Thanks, valued customer. We appreciate your input."
    5. Re:Short answer: Run. by korbulon · · Score: 3, Insightful

      He says in the summary that quitting does not "feel right".

      If I conducted my business based on what I deemed to "feel right", I would probably never leave my house.

    6. Re:Short answer: Run. by Anonymous Coward · · Score: 5, Insightful

      If you're not going to wimp out and run, then man up, confront the situation, and fix it. Regardless of whether the original author is well-respected, you need to expose the problem. You don't have to be an ass about it, just go to the original author and ask him why its in the state that it is, more often than not he was under deadline to get it finished and cut corners. Worst case scenario, he thinks he's a rock star and can't believe they hired a dunce (you) to replace a genius (him). Or just tell your boss that the existing state of the code is hindering progress and things need to change, don't even mention the original author. Figure out what you have, what it needs to be, and plot a course to make he necessary changes to get it there. Inflate estimates to adjust for the added complexity and if anyone questions your estimates, tell them exactly why it will take you that long (which may include "I haven't touched that code yet and am not familiar with the potential side-effects" or "the architecture is so fubar'd that I'm going to have to refactor").

      But whatever you do, absolutely *do not* bitch and whine about it. No one likes a whiner and it will just make you look like an amateur. Always remember, the problems of writing and maintaining software are hard and not always technical, you're paid to solve them. There are already too many amateurs making good money to create more problems than they solve, don't be one of them. And always remember that no matter how smarter you are than everyone that came before you, cleaning up their shit is ultimately your job. Deal with it.

    7. Re:Short answer: Run. by Anonymous Coward · · Score: 0

      As always we can look to the doctor for advise

      Message follows. "Run. For God's sake, run. No way is safe. The Library has sealed itself, we can't... Oh, they're here. Arg. Slarg. Snick." Message ends.

    8. Re:Short answer: Run. by TWX · · Score: 4, Insightful

      And worse, that could directly impact the contractor's future work prospects, if they cite how bad a job the contractor has done, even though it wasn't his fault in the first place.

      You don't work for that company directly. Your decline to take on their project will probably have more positive effect for that company, in the long run, than your attempting to salvage it and shooting your foot off. They'll be forced to either make the existing employee work on it or will be forced to scrap it and ask hard questions of the existing employee in the process.

      --
      Do not look into laser with remaining eye.
    9. Re:Short answer: Run. by dreamchaser · · Score: 2

      That plus some advice. Do your due diligence first. Blindly accepting a coding project without at least taking a cursory look at the code isn't very wise.

    10. Re:Short answer: Run. by JoeMerchant · · Score: 2

      Recode from the ground up, congratulate the well respected member of the permanent team on taking the app as far as he did - explain the time required to add the requested functionality - if they don't like your time estimates, find another job.

      If you add your signature to the broken code, the steaming pile becomes your legacy, not his.

      If you provide a good replacement without trumpeting what an incompetent ass the previous author was, nobody is really going to know or care that you ditched all his code and replaced it.

    11. Re:Short answer: Run. by SirGarlon · · Score: 1

      True dat. But, as they say, "fool me once, shame on you; fool me twice, shame on me." This is the sort of lesson so many people learn the hard way, I can't really say OP should have known better.

      --
      [Sir Garlon] is the marvellest knight that is now living, for he destroyeth many good knights, for he goeth invisible.
    12. Re:Short answer: Run. by Anonymous Coward · · Score: 5, Informative

      I think this is good advice, and having been on the other side of this issue, I think it's important to note the worst case scenario may not always occur here. I had to write an incredibly large application on an absolutely impossible deadline, in a programming language I wasn't incredibly comfortable with using, and there weren't any "objections" allowed, given the setting. I was young, I wrote it, and accepted what I was doing was crap, but I had to cut every corner imaginable just to get it done. Fast forward ten years, the company wants to sell the application to others, because, while it's poorly done (IMO), it does everything desired and people are still looking for that type of software in our industry. Someone else was hired to review/rewrite/refactor. The guy who was hired eventually came to me expecting he was going to be the fall guy (hell, he may even have posted here), and when he brought his (incredibly well done) analysis of what was wrong, I told him he was absolutely right, he shouldn't be afraid to say it openly, and I'd be happy to help him understand the "guts" of what was trying to be accomplished.

      Long story short, while I guess in most times it really is a political slugfest about to happen, sometimes it's that the person who did the application, rock star or not, was put in an untenable situation and did the best they could with it and is well aware it is garbage, spaghetti code that went through 100+ changes of scope due to poor project managers. It doesn't mean that person necessarily is going to hate you for it.

    13. Re:Short answer: Run. by MouseTheLuckyDog · · Score: 4, Insightful

      Rather then going and asking the original developer why it sucks, explain to the developer that you have been assigned his project.
      If he is a "rockstar " then he will lord it over you and you know to run.
      If he knows that it sucks and tells you, then you likely have an ally in your quest to fix the app.

    14. Re:Short answer: Run. by marcosdumay · · Score: 1

      At the long run (after you run away into a safe place), develop a better feeling of what's right or wrong.

    15. Re:Short answer: Run. by Anonymous Coward · · Score: 0

      Translated, it means he's a newbie in the business, which is why:
      a) he got a broken project in the first place and didn't notice
      b) was served up a broken project and wasn't expected to notice

    16. Re:Short answer: Run. by smpoole7 · · Score: 2

      > that could directly impact the contractor's future work prospects, if they cite how bad a job the contractor has done

      They're going to do that anyway, whether he stays to completion/collapse, or quits now.

      I say quit now, find something else right away and let it blow over. It may not seem like it right now, but it WILL eventually blow over. Get another successful project or two under your belt and the one bad project won't glare too badly on the resume.

      --
      Cogito, igitur comedam pizza.
    17. Re:Short answer: Run. by Anonymous Coward · · Score: 0

      That's not how Dubya put it, but I like this new and improved version better. ...I think it was an original Texas saying, but yours seems to be more of the Tennessee variety.

    18. Re:Short answer: Run. by multimediavt · · Score: 1

      If you're not going to wimp out and run, then man up, confront the situation, and fix it.

      I am with you. He might want to see if this well respected guy is still there and would be willing to do a code review with you. This way you can see what he's done and why with the current code. Try to be inquisitive and not confrontational or critical of anything unless he says something negative about how he implemented something. Show him how a project gets properly handed off and that you want to make things better. If he's that well respected and had kludgey code there might be a reason, time. Why they brought in the contractor, maybe?

    19. Re:Short answer: Run. by Jane+Q.+Public · · Score: 4, Interesting

      I was in this boat a couple of years ago.

      I was given a project that three (!!!) previous developers had worked on, but obviously none of them finished.

      The code mostly looked okay. And it passed all the tests.

      But that was misleading. The way the code was written, it was hard to read. AND it had sloppy formatting. Those are not necessarily signs of bad code, but they can be bad omens. I should have heeded them.

      Turned out the tests were poorly written. And whenever I made even little changes, things broke all over. To top it off, rather than giving me time to refactor the old code, they kept me too busy making trivial visual changes.

      THEN, the kicker: they suddenly hit me with a deadline of 3 days! I could hardly believe it. Even though with a lot of effort I had finally gotten it basically working, it was nowhere near ready for production. I told them this; they didn't listen.

      So of course when it wasn't ready by the deadline, they blamed me. Which is just plain dumb. I didn't really care at that point... I was a contractor and I had seen what a rotten place it was to work. I was happy to bow out. Which I later found out was the same attitude as the three developers before me. They were happy to be out of there.

    20. Re:Short answer: Run. by Anonymous Coward · · Score: 1

      Short answer to OP: Drop it now.
      Long answer:

      There's "unmaintainable" code usually inherited by someone who didn't know how to code, or didn't care code in a way that others may need to read it later. I inherited two projects like this, and my answer was to just clean the code up and break as little of it in the first round.

      The second round was to fix the code so it output standards-compliant markup

      But, did I update it to latest web 2.0 technology? Feh. Forget it.

      When you inherit these projects, you either do your best to make it less shitty, or you just make no effort to improve it, and encourage the owner of said code to either find someone else willing to do it, or go with whatever you'd prefer. You'll usually find that the owner will prefer finding someone to handle the existing code unless they want to do something with it that is impossible to engineer.

      The partner of the owner of the code I cleaned up wanted to start like a series of blogs and stuff that the existing code would not be able to do (since it's all flat files) and was never designed for. I said that I'd do X or Y but I'm not making their code do this. So I never heard back from it.

      One thing you have to remember is that sometimes the people who run these projects have very wishful thinking.

    21. Re:Short answer: Run. by Anonymous Coward · · Score: 0

      I had the good fortune to land in a similar situation but with the wind at my back. The guy who had the project before me (and still had it, actually - but only for appearances as management was afraid to fire him as he had written all their software and then obfuscated it to make it impossible for anyone else to work on it) had created a monstrosity that really couldn't be deciphered. He had also used such descriptive variable names as "batshit", "ratshit", "catshit", etc. I kid you not. It was all in C yet formatted into paragraphs of solid code. Even prettying it up with a code formatter was no help as you had to go through every function to try to figure out what it did to then figure out what the variable actually were.

      I presented my evidence to management as to why fixing his code was a waste of time and why the code needed to be re-written from scratch. That bought me time, but what really bought time was going home on a Friday and coming back on Monday with the framework all done and the software doing all the stuff that the guy had claimed was impossible. They immediately greenlighted devoting my time 100% to a full rewrite and gave me all the resources I needed.

      I worked in secret and then a Friday evening two months later we unhooked the original guy's computer and plugged mine in. I spent the weekend populating all the IO routines that had been just dummies until then and Monday morning, everyone walked in to see everything running perfectly and doing all the stuff the other guy had told management was impossible to do.

      He was fired a week later.

      I doubt my experience was anything like what the OP is going to have. I got very lucky that I had all the tools I needed and the project was tailored perfectly to my skill set. I also worked my butt off for two months - all day and late into the night every day and even on weekends. It was all I did but eat, sleep, and shower.

      But the satisfaction that I could pull that off, did pull that off, and even got a software patent out of the deal, as well as having the other moron shown the door for literally holding the company hostage, was complete.

    22. Re:Short answer: Run. by Immerman · · Score: 4, Insightful

      The plutocratic collective thanks you for your amoral work ethic. Without the assistance of those such as yourself it could not grow and prosper.

      --
      --- Most topics have many sides worth arguing, allow me to take one opposite you.
    23. Re:Short answer: Run. by HornWumpus · · Score: 1

      'ratshit', 'catshit', 'batshit'; luxury.

      The worst I saw was an Access vba 5 dimensional global array of variant called 'aLocalArray'. To an experienced eye, that tells an ugly story.

      --
      John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
    24. Re:Short answer: Run. by Anonymous Coward · · Score: 0

      But then they will send in Ben's friends!

    25. Re:Short answer: Run. by xaxa · · Score: 2

      One of my CS modules in final year was "Software Maintenance". For the coursework, we were given the department's exam results tracking software, which was written in Perl, and asked to plan how we would improve performance and add some new features.

      IIRC, I think my group recommended rewriting it from scratch in either Java or C#, and I think we got full marks...

    26. Re:Short answer: Run. by Jakeula · · Score: 2

      I am in a situation similar to this, but with an organization that is willing to listen. The experience, while equally frustrating on the code end, is much better.

      I maintain a few different code bases for our org. Donor management software, internal apps for job specific duties, and our largest a social-like network built on Drupal. All of these have been touched by at least 3 other developers before arriving in my lap, all of which were contractors. We have so many issues with the Drupal site, its amazing that people visit it everyday without realizing it doesn't work properly. I spend a good amount of time each day chasing tail to ensure that the users don't see there errors. You might say, "well Drupal has plenty of testing options, start there", but most of the modules in play are custom, or community alpha, and have 0 testing built into them. We have far too much AJAX at work that is all poorly written, and they all rely on other AJAX to work properly. I learned this the hard way trying to refactor the code that makes the cookies. The original code created a cookie for your name, another for your the cost of an item in your cart, another for the name, and so on. So I tried to simplify the logic by placing it all in a single cookie, but that somehow impacted our notification system to the point that it completely disappeared from our site, and the emails stopped working. No clue why even to this day.

      So the question became, do I attempt to rebuild this on Drupal but using modules that will work as well as making new ones using the good parts of the previous modules, do I just maintain this code and hope I eventually sort it all out, or do I rebuild the entire site on a more purpose built platform like a more flexible framework? The answer from above was "Yes". meaning I should do all of that at the same time. We are a non-profit so budget is tight, therefore I am the developer and the project manager. They want me to maintain our live code, while building a replacement for it. My time is split, so both projects suffer as a result.

      Where my story differs is that the management are willing to listen that what we are doing is counter productive, and they work hard to reduce my work load. There are still plenty of times where I get tasked with stupid shit like changing a users photo, and it needs to be done right now, but then there are the times when I said a project would take until tuesday, but when its not completed because of all the other things breaking, they listen and we plan a meeting for the next projected completion date.

      So while I would have loved to just drop this entire project (my job would be dropped with it), their willingness to correct their previous mistake of hiring the previous developers and getting stuck on the current system helps me stay motivated to work on both fixing the code, as well as creating something that the entire company will run on. But in the end it could be the fruitless journey that it initially appeared to be, I won't know until I reach the end.

    27. Re:Short answer: Run. by X10 · · Score: 1

      He says in the summary that quitting does not "feel right".

      I love the replies to my question, thank you all. What's amusing is the gender bias. X10 stands for "Christine", in a combined English/Dutch way.

       

      --
      no, I don't have a sig
    28. Re:Short answer: Run. by JeffAtl · · Score: 1

      Leaving a project very early on because of concerns isn't goingto cause any problems. Staying on a project that fails and getting the blame for could most certainly affect future job prospects - especially if a recruiter is involved and it hurts their relationship with the client.

    29. Re:Short answer: Run. by mikael · · Score: 1

      I've been in that situation too. Head office management from 300 miles away had decided that every new programming recruit would cut their teeth on some back-end part of the application (and completed different from what they had been told what they were doing). The first result was that they had turned their workplaces into a coding gulag" where every programmer who had ever been put in that situation made "escape" their highest priority. Each and every one of those people had managed to escape by either leaving to set up their own company, move to a different part of the team or moving to another company.The second result was that this particular block of code ended up looking the results of one of the those drawing games where each person draws on part of a sheet of paper but never sees what anyone else has drawn. Consequently, it was never going to work.

      The only option is "escape".

      --
      Vintage computer adverts: http://www.vintageadbrowser.com/computers-and-software-ads
    30. Re:Short answer: Run. by Anonymous Coward · · Score: 0

      I would assume, or at least hope, that the recommendation to rewrite was backed by some carefully laid out points as to why fixing the old code was untenable. While there are certainly times things need to be scrapped and rewritten, programmers tend to see that as the solution a bit too often. For many people and situations, code is easier to write than read, and it is tempting to rewrite things that are causing problems. Deciding to actually do so needs to come down to either something fundamentally being wrong with the architecture of the older code, or it being obvious that the time taken for incremental changes would be longer than rewriting it. The latter can be difficult to estimate depending on how simple or familiar the problems being solved are, so you don't accidentally lose a bunch of time relearning things the hard way that the first author also learned the hard way.

    31. Re: Short answer: Run. by tleaf100 · · Score: 0

      best advice i have read so far. sometimes you can even suggest to them a sacrificial lamb of someone you owe a "favour" back to !!!

    32. Re:Short answer: Run. by Anonymous Coward · · Score: 0

      Obligatory Red Dwarf quote:
      Lister: Holly, we need your advice, mate. We've been cornered by a T-Rex that was formerly a sparrow, and the only thing that can turn it back into Woody Woodpecker is in its stomach. What's your take on the situation?
      Holly: What do you want? The long or the short version?
      Lister: Long.
      Holly: You're finished.
      [pause]
      The Cat: What's the short version?
      Holly: Bye.

    33. Re:Short answer: Run. by xaxa · · Score: 1

      It was. The original developer had left, the code was barely commented, and was written in a single Perl file. There was very little structure -- just some procedures and functions. There were lots of regular expressions. It was a CGI web application, but there were no templates, and no use of the CGI HTML functions -- just HTML elements in strings.

      I think the supposed requirement was something like "The CS department use this, we want to roll it out to the rest of the university". Therefore I'd anticipate a lot more changes being made in the future, so rewriting it before it's used more widely made even more sense.

      (It was a semi-serious assignment. The year after I graduated they switched to some commercial software, and the students I knew all grumbled about it. The Perl system, though unmaintainable, had been reliable and functional for over a decade. The web server still seems to exist, though I can't authenticate... maybe they did redevelop it.)

    34. Re:Short answer: Run. by Anonymous Coward · · Score: 0

      I think my group recommended rewriting it from scratch in either Java or C#, and I think we got full marks...

      and now you know how the code was so bad to begin with, right?

    35. Re:Short answer: Run. by Hognoxious · · Score: 1

      They're going to do that anyway, whether he stays to completion/collapse, or quits now.

      Not if they have any sense, because they know that if they blame someone who walked away without touching it they'll get sued seven ways to Sunday.

      The longer he stays, the more ammunition he gives them.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    36. Re:Short answer: Run. by Hognoxious · · Score: 1

      Hint: obscure wordplays, puns etc. rarely translate well.

      By your user ID you're probably quite old. Do you still listen to K7s?

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    37. Re:Short answer: Run. by JeffAtl · · Score: 1

      Don't think this is very good advice at all. Why take on such a huge risk when the chance for reward is so small?

      This guy can easily do long term damage to his career. Some projects just aren't fixable unless without total rewrites. The company obviously feels that the application is just fine and just needs a few minor enhancements here and there, so they would expect a rewrite on the OP's own time.

    38. Re:Short answer: Run. by Anonymous Coward · · Score: 0

      I deal with "organically grown" code for the majority of my day. Code is often the way it is for good reasons, or at least good compromises. Knowing the history of the decision-making can help you grasp the architecture better and avoid certain mistakes. But you're correct, complaining or gloating is absolutely counterproductive and doesn't serve anybody's purpose except to stroke your own ego.

      Code gets shitty because we're human beings and programming computers is right at the limit of what we're capable of doing intellectually as a species. The person who makes shit happen is the person who actually does something about a problem instead of complaining that the problem exists.

    39. Re:Short answer: Run. by Anrego · · Score: 1

      This I think is a very common thing.

      A lot of bad code was written by good programmers under tight deadlines, budgets, and with requirements that are less a set of well thought out points about what needs to be done and more like "today's set of whims, check back tomorrow". The other thing I've seen (especially in-house apps) is they've been passed around to different developers for like 5 years because they were a low priority and as soon as something important came up, it was put on the back burner.

      Most good programmers I know are very critical of their own earlier work, and have a good sense of how bad some of the stuff they've produced is. A lot of times if you go to them they'll happily run through their "what I really wanted to do but didn't have time.." list with you.

      The worst case is as was said, if they guy thinks the code he wrote is golden. In that case.. run. You'll give yourself an ulcer trying to work there.

    40. Re:Short answer: Run. by im_thatoneguy · · Score: 1

      I've been on both sides of this as well before. I can't recommend just talking to the previous developer enough.

      I once had a project where I thought I had simply mocked up the basic functionality well enough to hand off to a contractor in order for them to see a working prototype and develop a new solution. Unfortunately instead of looking at the code and just saying "hey, we thought we could use more of your prototype and we need to revise our estimate" they took 6 months and tens of thousands of dollars before essentially saying that they were only half done. Needless to say we haven't worked with them before.

      I've also done this from the other end where I've picked up work, immediately realized that it was less fleshed out than I had anticipated, gone back to the company and said "I thought I could do this in _____X Time but now I see that some of my assumptions were wrong. I can still do this but it'll take double the time I estimated. Do you want me to proceed or re-evaluate the scope and/or contract." I ended up getting the job with a modified scope of work (shrunk) and an increased time frame and everybody was happy.

      If you muck along in this job and aren't honest with your boss you're going to get your ass handed to you and for good reason. If you communicate to them up front what is going on then they can make high-level decisions on what's important, whether they want to proceed at all for the new budget or if they'll just dismiss your concerns (at which point you quit and/or are let go for not living up to your original estimates).

      I've also been the developer who created something, got it working knowing full well it would have to be completely re-written from the ground up. That's not an indictment of me as a developer, sometimes you just have to write shitty programs to rapidly work out how it *should* work. It's very likely someone wrote an app very quickly--it met the client demands but was purpose built for one solution. Talking to the developer will let you know if that's the case at which point they probably have some great insights on how "they wish they had developed it". Imagine if someone came up to you and said "hypothetically if you were to start from scratch how would you have architected this feature differently?" Only a complete blow hard wouldn't have pages and pages of 20/20 hindsights.

      On the other hand I've also created things and handed them off only to have some freelancer completely bork the job. They complained that it wasn't a routine task like I had indicated--which when I looked at their solution was true. The way they were trying to solve it was extremely a-typical and back-asswards. I ended up doing it myself and we didn't use that freelancer again. The lesson in that instance was if you think it's convoluted then maybe they see an obvious solution but you don't. Don't just turn in a half-assed solution later, admit you don't see a clear path to success and maybe they have some special knowledge (or just general competence) that can ensure you succeed.

      Ultimately I almost never see people deliberately setting out to screw a project. They want to succeed far more than you want it to succeed. After all it's their money.

    41. Re:Short answer: Run. by Anonymous Coward · · Score: 1

      Moral of the story: If three previous developers have tried and failed, get in touch with them.

    42. Re:Short answer: Run. by complete+loony · · Score: 1

      Before your deadline of 3 days, did you ever give an estimate of the outstanding effort?

      Jumping into a project like that, I'd start by telling them how long it will take to get a feel for the current code base and pull a large number out of the air for the rest. Over time you should be refining that estimate as you learn more and start fleshing out the scope of unfinished / untested work.

      If they haven't had a competent process for tracking requirements, deadlines, effort, testing, .... Then all of these jobs fall on your shoulders. Don't just do the work they tell you to do, always try to list the things that haven't been done with a rough guess for how much effort it will take.

      --
      09F91102 no, 455FE104 nope, F190A1E8 uh-uh, 7A5F8A09 that's not it, C87294CE no. Ah! 452F6E403CDF10714E41DFAA257D313F.
    43. Re:Short answer: Run. by antdude · · Score: 1

      What about online? :P

      --
      Ant(Dude) @ Quality Foraged Links (AQFL.net) & The Ant Farm (antfarm.ma.cx / antfarm.home.dhs.org).
    44. Re:Short answer: Run. by X10 · · Score: 1

      Hint: obscure wordplays, puns etc. rarely translate well.

      By your user ID you're probably quite old. Do you still listen to K7s?

      What's K7?

      Christmas, Xmas, 10, teen, not so hard?

      I am quite old, yes. But I don't use punchcards any more.

      --
      no, I don't have a sig
    45. Re:Short answer: Run. by unitron · · Score: 1

      He says in the summary that quitting does not "feel right".

      I love the replies to my question, thank you all. What's amusing is the gender bias. X10 stands for "Christine", in a combined English/Dutch way.

      That's not gender bias, that's playing the odds.

      Most people here are male.

      And of all the languages that aren't English, Dutch is no more likely than practically any other to be one with which most here are familiar.

      And for most of the people here, X10 is something for turning lamps on and off by remote control that's been around nearly 40 years.

      http://en.wikipedia.org/wiki/X...

      Which means it sounds like a user name a male would pick.

      If you had a user name like Jane Q. Public, it might occur to some of us that you're not the same between the legs as probably 99% or more of Slashdotters.

      But I admire that within you which makes quitting not "feel right", and wish you all the luck in the world with that hot mess they stuck you with, 'cause it sounds like you're really going to need it.

      --

      I see even classic Slashdot is now pretty much unusable on dial up anymore.

    46. Re:Short answer: Run. by Hognoxious · · Score: 1

      K7 is French - ka sept. I think you just proved my point.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  3. Run, Run For Your Life by Anonymous Coward · · Score: 0

    Seriously, don't step on that landmine. Just run away and let some other sucker be the sacrificial offering (and scapegoat).

  4. You were not hired to finish the project by EmagGeek · · Score: 5, Informative

    You were hired to be the scapegoat.

    1. Re:You were not hired to finish the project by janeuner · · Score: 1, Interesting

      Or, perhaps, you were hired to find a scapegoat. Honestly, who cares; they need the project to work, so make it work.

      The project is yours. Guess a rewrite timeline, send it to your boss, and get to work. While they bicker on it, send them updates. If you are going to get fired, it was going to happen anyway; you can still do good work in the meantime.

    2. Re:You were not hired to finish the project by JaredOfEuropa · · Score: 3, Insightful

      Perhaps, and in that case you're damned if you do (stay) and damned if you don't (quit and run). In either case you could be looking at reputation damage.

      It might be worth doing some digging around the company, though. What relation does your boss have with this app and with the previous developer? What is the history of the development of this app? If this is a doomed but high profile app, the scapegoat theory would seem to hold. But if your boss wants the app to succeed and has no reason to be afraid to potentially piss of this darling developer, then it's worth talking to him, especially if he knows a bit about software development. Explain the problem and provide estimates on what it takes to turn this thing around. That's what I would expect a contractor to tell me if I hired him with honest intentions.

      --
      If construction was anything like programming, an incorrectly fitted lock would bring down the entire building...
    3. Re:You were not hired to finish the project by TWiTfan · · Score: 4, Insightful

      If he makes it work, the original "respected" designer will jump in and claim all the credit.

      If he doesn't, he, as the scapegoat contractor, will get all the blame.

      No-win situation. Leave now.

      --
      The cow says "Moo." The dog says "Woof." The Timothy says "Thanks, valued customer. We appreciate your input."
    4. Re:You were not hired to finish the project by SQLGuru · · Score: 1

      I'd be more inclined to go this route...if hired as a contractor, then self-evaluate whether your contract lasts longer than it would take to rewrite. If it takes longer to rewrite, communicate the problems and just triage as best you can unless they offer to extend the contract. If you have the time, refactor as you enhance so that you balance a rewrite with getting features completed.

    5. Re:You were not hired to finish the project by Anonymous Coward · · Score: 0

      Exactly. So why on earth would you continue? Unless the pay is amazing, go find a different job. You're a contractor, why on earth would you show dying loyalty to this company?

    6. Re:You were not hired to finish the project by PPH · · Score: 1

      Maybe. Maybe you were hired because you are disconnected from the company politics and culture. Talk to the customer and the previous developer (really bad sign if they discourage the latter). Get an idea what went wrong and negotiate your terms based upon avoiding the same pitfalls.

      Some of the most interesting projects I've worked have been ones that the locals couldn't solve because they had to live there after the dust settled (see sig line).

      One reason companies hire contractors for jobs like this is visibility. You represent an actual cash outlay and (unless they are swimming in contractors like a Microsoft) upper management wants to know why. Some middle management PHB fuckup can't hide you like they could a direct employee.

      --
      Have gnu, will travel.
    7. Re:You were not hired to finish the project by funwithBSD · · Score: 2

      Yes, and present as a "go -no go" choice and let him make the call.

      If he says no go, you can move on with no consequences. If it is "go" and it fails, you documented why it was in trouble and what the risks were.

      --
      Never answer an anonymous letter. - Yogi Berra
    8. Re:You were not hired to finish the project by dcollins · · Score: 1

      "they need the project to work"

      Do they, Jane?

      http://www.youtube.com/watch?v=SgAvehEDHYY

      --
      We know where leadership by an anti-intellectual "strongman" who scapegoats minorities and likes boisterous rallies goes
    9. Re:You were not hired to finish the project by jareth-0205 · · Score: 1

      If he makes it work, the original "respected" designer will jump in and claim all the credit.

      If he doesn't, he, as the scapegoat contractor, will get all the blame.

      No-win situation. Leave now.

      If you want to be unprofessional and only ever want to take easy jobs, fine that's a route you can take. Other times you can work like an actual adult and solve the problems.

    10. Re:You were not hired to finish the project by Moryath · · Score: 1

      One reason companies hire contractors for jobs like this is visibility.

      Another reason they hire contractors for jobs like this is to get a fall guy. "The code worked before we hired the contractor, now it doesn't work, obviously the contractor is to blame."

    11. Re:You were not hired to finish the project by atheos · · Score: 1

      If he makes it work, the original "respected" designer will jump in and claim all the credit....No-win situation. Leave now.

      Well, that all depends really. Is he receiving a paycheck in the process?

    12. Re:You were not hired to finish the project by cusco · · Score: 2

      He's a contractor, why does he care if the original designer gets the credit? If his manager is any good he may already know that this is a steaming pile, if an outside contractor can fix something without pissing off the original designer he's going to be a happy camper. If the contractor can enlist the assistance of the original writer to fix it, giving him an actual reason to claim some of the credit and an incentive to share, then everyone wins.

      --
      "Think about how stupid the average person is. Now, realise that half of them are dumber than that." - George Carlin
    13. Re:You were not hired to finish the project by Bite+The+Pillow · · Score: 1

      Or alternatively you were hired because someone doesn't want to fix the mess they made.

      Or they need someone to fill out the body count.

      Or they like your attitude.

      Or they ran out of people to sexually harrass.

      And speculation gets us nowhere. The question is what to do. And as always, the answer is go to management with facts and info, and keep your employer aware, assuming you work for a contractor employment service.

      You can't just bail for no reason. If you are the scapegoat, it should be obvious, just not immediately. Listening to ignorant cynics just because they are at +5 May delay you from furthering your career. With more info, we might agree you are the scapegoat, but only you can tell right now.

    14. Re:You were not hired to finish the project by Gr8Apes · · Score: 1

      It depends upon the project - if it's fun and pays well, work it with the appropriate communications to management. If you don't think it's worth it and management won't support you, start looking.

      --
      The cesspool just got a check and balance.
    15. Re:You were not hired to finish the project by smpoole7 · · Score: 2

      > Other times you can work like an actual adult and solve the problems

      I don't know the details in this case, and neither do you. But trust me, it ain't always that simple.

      Years ago, back when I was still doing the contract programming gig on the side, I took a job for a major multinational. This was a relatively simple concept: write some software that read the AutoCAD files for the wire numbers, and then print heat-shrink labels to go on the wires. Sounds good, right?

      First strike: it was done in Visual C++ 1.5, 16 bit. That compiler had some marvelous bugs (such as getting the segment and offset REVERSED when it loaded the ES and SI registers, HA HA that one was fun to track down).

      Second strike: my predecessor had used that silly "frame-document-view" model for this relatively simple program (I can't even remember what they call it now). He decided to put everything in the View, so he had globals everywhere. Of course, they were getting clobbered, and of COURSE, I had to find each of these bugs.

      Third: the people with this company had no idea what they wanted it to actually do. They said, "the stuff for the heater wiring starts with 'H," the motor wiring with 'M', and so on ... except for when it doesn't." (That's not a joke.) In other words, the files that I was reading (with a horrible third-party bolt-on DLL, by the way) weren't even guaranteed to be standardized!

      I left this project and moved on to more pleasant things. That cured me. I went back into radio engineering, even though (with no false modesty) I was actually a very good programmer.

      OH, and did I mention that this was using Visual C++ 1.5? Make sure you don't miss that. :)

      --
      Cogito, igitur comedam pizza.
    16. Re:You were not hired to finish the project by Jane+Q.+Public · · Score: 3, Insightful

      I second smpoole7. As a contractor, you can't fix bad management. No matter how "professionally" you try, you're going to get blamed.

      On lesson I have learned the hard way: if you insist on tackling it anyway, keep records of EVERYTHING. All emails, all memos. Even record conversations if you are where/when you can get away with it, and if you aren't in a position to do that, take good dated notes. Then when all is said and done if they try to blame you, you can prove it wasn't your fault.

      I have worked as a contractor for some very bad managers. Of course I did not know that going in. But later when they tried to blame me for problems I could point to an email, or a Skype conversation I had saved, and say "Uh... just no. That's not what really happened. See?"

      And it really pisses them off when you do it in front of other people. But you might as well, because they're trying to shaft you anyway, right?

    17. Re:You were not hired to finish the project by jareth-0205 · · Score: 1

      Hell, I would never say you shouldn't cover yourself, but advising someone to run before they've even found out what the management are like seems a bit presumptuous to me. They could be shit and looking for a fall-guy (but really, that's alot of expense and effort, why bother?), but they could just want someone to contribute to their project...

    18. Re:You were not hired to finish the project by mcmonkey · · Score: 1

      If he makes it work, the original "respected" designer will jump in and claim all the credit.

      If he doesn't, he, as the scapegoat contractor, will get all the blame.

      No-win situation. Leave now.

      No win? You mean OP isn't getting paid?

      Assuming X10 is getting paid, that's win. If something is accomplished that can go on a resume, that's a win. If useful experience is gained or new skills learned, that's a win. Not every job can be win-win-win. But at very least, get paid. Then there is no 'no-win' situation.

      My advice: act like a grown-up. They're paying you to code new features? Code new features. Paying you to fix bugs? Fix bugs. If you have the time and resources, refactor and fix existing code as you are able.

      Other than that, I don't understand the question. If it were easy and everything worked as expected, they wouldn't need you. They very fact that they felt the need to bring in a developer means the code wasn't doing what they wanted it to.

      Yes, I know you wanted a job where you got paid to surf the web all day. Welcome to the real world. If you consider this a no-win situation, either start your own company and code your own apps from scratch, or get in to another line of work. The situation described in the question applies to 99% of all programming positions. Again, if it worked, they wouldn't need you.

    19. Re:You were not hired to finish the project by Jane+Q.+Public · · Score: 1

      "They could be shit and looking for a fall-guy (but really, that's alot of expense and effort, why bother?), but they could just want someone to contribute to their project..."

      I doubt very many companies are actually looking for someone to be a scapegoat. I'm sure it happens occasionally, but I doubt it happens very often.

      But nevertheless, I have found that when projects don't go well, a lot of managers will shit on whoever they can to try to show that it wasn't their fault. Even if -- or especially if -- it really was.

    20. Re:You were not hired to finish the project by jomama717 · · Score: 1

      A good contractor won't try to avoid reputation damage by skulking around and trying to figure out the seedy back story of the project they've been assigned to - in fact I can't think of a better way to damage your reputation!

      A good contractor fixes the problem, or clearly documents why he or she cannot fix the problem and provides alternative recommendations, one of which might be hire a different contractor. It's called professionalism.

      --
      while [ 1 ]; do echo -n -e "\xe2\x95\xb$((($RANDOM&1)+1))"; done
    21. Re:You were not hired to finish the project by pspahn · · Score: 2

      My advice: act like a grown-up. They're paying you to code new features? Code new features. Paying you to fix bugs? Fix bugs. If you have the time and resources, refactor and fix existing code as you are able.

      This is the only response you need. Like I once told a previous employer when I was given a shit project, "Hey, I don't really care what you want me to work on, but I do want you to know that this project is doomed and here's why ... "

      --
      Someone flopped a steamer in the gene pool.
    22. Re:You were not hired to finish the project by dnavid · · Score: 1

      One reason companies hire contractors for jobs like this is visibility.

      Another reason they hire contractors for jobs like this is to get a fall guy. "The code worked before we hired the contractor, now it doesn't work, obviously the contractor is to blame."

      That only works if the contractor is stupid or young and inexperienced. The veteran strategy is to document all the bugs before fixing them. If possible, get them confirmed by the users as part of the documentation. If its part of your job to fix the bugs that documentation ought to be part of your job anyway, and you can't be blamed for bugs that existed before you got there. If its not part of your job, you have leverage: you can be a nice guy and fix them gratis, but with the understanding you didn't have to, or you can file the fixing of those bugs as change orders.

      As long as you are not a dick about it, and genuinely appear to want to fix the project and make it work, the documentation trail you leave behind will protect you against being blamed for things not your fault and you'll probably be thanked for going the extra mile.

    23. Re:You were not hired to finish the project by west · · Score: 2

      > He's a contractor, why does he care if the original designer gets the credit?

      Bingo. I generally do my best to make certain that the permanent workers get credit where it's possible to do so. If there's a permanent worker who is completely incompetent, then I'll simply refrain from praising them to management. Praise is not a zero sum game, bosses are not usually idiots, and a cordial work environment where people are happy to see and help each other is worth its weight in gold.

      It's simply self-interest to endeavor to make everybody look good, and permanent co-workers will return the favor when the next job is available.

    24. Re:You were not hired to finish the project by Hognoxious · · Score: 1

      A good contractor fixes the problem, or clearly documents why he or she cannot fix the problem and provides alternative recommendations

      Someone who's stubborn, opinionated, negative, not a team player, lacks a "can do" attitude and is evasive equals a good contractor?

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    25. Re:You were not hired to finish the project by JeffAtl · · Score: 1

      Being "professional" doesn't mean that a person should take on fool's errands.

    26. Re:You were not hired to finish the project by JeffAtl · · Score: 1

      If something goes wrong, the company would likely expect the OP to fix the issues on his dime - whether he was responsible or not.

      The overriding lesson is that a contractor should never touch the code of a project like this.

      This project could easily damage the OPs career. Why take such a risk on a fool's errand?

    27. Re:You were not hired to finish the project by JeffAtl · · Score: 1

      He's a contractor, why does he care if the original designer gets the credit?

      Because the company could consider the contractor liable for any issues found in the application.

    28. Re:You were not hired to finish the project by cusco · · Score: 1

      Seriously? You don't keep an original reference copy around when you make changes/updates to a program or database? You should, even if for no other reason than that if you fuck up enormously you can always return the system to the original state. In this case it would also serve as documentation that issues were preexisting.

      --
      "Think about how stupid the average person is. Now, realise that half of them are dumber than that." - George Carlin
    29. Re:You were not hired to finish the project by Anonymous Coward · · Score: 0

      I don't agree with this argument. Why?

      I'd suggest he man up and do the damnedest to make it work. If that means 80 hour weeks, so be it! Look at it as a challenge! He's been tasked with the incomprehensible. If he gives it his all, and documents well just how much utter bullshit it was to get to that point at the end date, he can at least feel he gave it the worthy effort. If he succeeds, at least he has some self confidence that he went through that, and can take that success to the next project elsewhere. On CV, or not. Corporate appreciation be damned! It's only worth it, if there's a bonus involved! If he fails, he takes with him a ton of knowledge towards the next contract, and all the mistakes the job he was tasked with had, and any he made along the way, as well as knowing what types of contracts to avoid.

      Respect and appreciation for a contract Corporate software gig? Leave emotion at the door. You're there to solve a problem, not make friends. You might make a few contacts, but keep your hand close to you on that type of work environment. I'm not even a programmer, and I know this!

    30. Re:You were not hired to finish the project by antdude · · Score: 1

      That is why written documents are important to prove. People think I am crazy to do that. USE THEM FOR PROOFS. I always archive these things even if it is data hoarding!

      --
      Ant(Dude) @ Quality Foraged Links (AQFL.net) & The Ant Farm (antfarm.ma.cx / antfarm.home.dhs.org).
    31. Re:You were not hired to finish the project by X10 · · Score: 1

      I agree.

      --
      no, I don't have a sig
    32. Re:You were not hired to finish the project by X10 · · Score: 1

      I'd suggest he man up

      A lot is possible, these days, for a woman to "man up". I think I'll pass, though.

      --
      no, I don't have a sig
    33. Re:You were not hired to finish the project by PPH · · Score: 1

      And in this case, visibility works to your advantage. No sane manager is going to spend real money for a contractor on a project that is designed to fail. Particularly when the result could be going before some executive committee who has the contractor's notes in hand to explain the expenditure.

      --
      Have gnu, will travel.
    34. Re:You were not hired to finish the project by wrook · · Score: 1

      He's a contractor. Win, lose, blame, credit; what does it matter to him?

      People hire contractors because they have problems that they can't or won't solve themselves. This is the nature of the job. A good contractor, one that gets hired again and again, doesn't panic just because the job is difficult. Even if the job is impossible, he simply says so before he carries on anyway.

      Relax. Write code. Get paid. Drink Beer.

  5. apologies to rumsfeld by Anonymous Coward · · Score: 5, Insightful

    document whats broken (known known), request budget to fix
    document what isn't broken, but could break (known unknown), request budget to maintain
    request budget to address change requests (known unknowns)
    request agreement to address incidents (unknown unknowns)

    1. Re:apologies to rumsfeld by CFBMoo1 · · Score: 1

      I like you, you appear to create documentation. Since I don't have mod points I'll give you a +1 awesome for a willingness to make documentation.

      --
      ~~ Behold the flying cow with a rail gun! ~~
    2. Re:apologies to rumsfeld by Anonymous Coward · · Score: 0

      +1. You presumably indicated that you would achieve a certain level of improvements to the system over a particular period of time before you accepted the contract. Hopefully this fell short of an actual promise to the client, but rather an indication of what you expected to achieve in an ideal world. Now you know it is not an ideal world, go back to the client. Tell them that the low quality of the existing work means either their scope or their timescale (and with it their budget) needs to be shifted. Manage their expectations. Make sure they know, in detail, what the problems with the existing code are. It doesn't matter how good the reputation of the last guy to work on it is, they need to know. That's just professional courtesy.

      At the same time, you need to be buffing up on strategies for dealing with the problems. Reread Working Effectively with Legacy Code. You have read it before, yes?

  6. Cover your ass and vote for a IT union by Joe_Dragon · · Score: 2

    now as a contractor it's easy for them to drop the blame on you even when it's some PHB who let things get to the point that they are at.

    Maybe even call your staffing agency and tell them what is up before you get a black mark

  7. The fault by glennrrr · · Score: 2

    The fault, dear Brutus, is not in our stars, but in ourselves.

    1. Re:The fault by rwa2 · · Score: 1
  8. I just by Anonymous Coward · · Score: 0

    scroll to the bottom and switch back to Slashdot Classic

    1. Re:I just by Anonymous Coward · · Score: 0

      scroll to the bottom and switch back to Slashdot Classic

      Absolutely not related to the topic at hand but damn! I've been looking for that button for over a month now!

    2. Re:I just by Anonymous Coward · · Score: 0

      Log in, asswipe. I'm still on D1.

    3. Re:I just by Anonymous Coward · · Score: 0

      scroll to the bottom and switch back to Slashdot Classic

      Absolutely not related to the topic at hand but damn! I've been looking for that button for over a month now!

      It certainly does seem to be related. I think that the OP implied that the Slashdot Beta is the titular "broken project".

    4. Re:I just by X10 · · Score: 1

      It certainly does seem to be related. I think that the OP implied that the Slashdot Beta is the titular "broken project".

      Nope. Totally unrelated. I posted the question here because it's not the first time I see it happen and I'm sure a lot of programmers recognize the situation.

      --
      no, I don't have a sig
    5. Re:I just by rwa2 · · Score: 1

      They're not going to actually get rid of /. classic once the new site goes out of beta, are they?

  9. Write tests. Write more tests. by Anonymous Coward · · Score: 5, Insightful

    You're very lucky: The person who created the project is with the company.

    Question him/her!

    Get an outline of how the project is supposed to work. Get broad ideas about each class, and the key functions in each class.

    Then, write tests. Write more tests. Write even more tests.

    In other words, you need to make sure that there's a second layer that 'knows' what the code is supposed to do and can ensure that it's still doing that.

    Only after you have the tests complete should you move to fixing bugs or adding features.

    1. Re:Write tests. Write more tests. by digsbo · · Score: 3, Informative

      Too bad the poster here was AC and didn't get modded up, because he is absolutely, positively right. All the people here who talk about code analysis, etc., are completely missing the point. Simply ask, publicly, for the test cases showing a positive path, and the test results. If they can't be provided, go back to management with the statement, "I don't understand why, but I'm not getting the same results as the previous engineering team did. Before I add any features or fix any bugs, we need to baseline what works and what doesn't.

      I inherited a project like this in exactly the same circumstances. It was a dangerous time for me at the company, and the previous engineering lead did make some questionable accusations, but by keeping it non-confrontational he basically ignored me and went back to what he was doing. Management eventually saw that I was dedicated to getting things working so long as they let me do what needed to be done, out of their own self-interest.

      I give a lot of credit to my product manager, who helped me navigate the political waters on that one (which included being called an incompetent liar to my face by the previous engineering lead). It worked out great for me in the long run.

    2. Re:Write tests. Write more tests. by X10 · · Score: 1

      Then, write tests. Write more tests. Write even more tests.

      That, my friend, is what I've been doing the last few weeks :-)

      --
      no, I don't have a sig
  10. Run to the hills! by Anonymous Coward · · Score: 0

    Run fooorrrrrr yourrr lifeeeeee!

    Also post really bad code to dailyWTF, need some more fun shit there.

  11. Make a real assesment by gearloos · · Score: 5, Insightful

    First thing to do is complete a real analysis of the code and report to management with an estimate to re-write complete sections of the code. Go into it realistically and tell them up front what it will take to correct things, and why. I have been in this situation several times in my career and that has always been the best approach. There is no need to "knock" the other guys code (be positive, never the mudslinger) and done correctly, would look more like you have some fresh ideas that may not have been designed into it originally. Eother way, management wants to know what to expect and having realistic expectations as soon as possible will save everyones face in the loing term. If they feel your out of line, well, then it's time to look at all those other jobs your contemplating.

    --
    "Computers are a lot like Air Conditioners" "They both work great until you start opening Windows"
    1. Re:Make a real assesment by phmadore · · Score: 2

      Why you mods harsh on this guy? Can't see how this got -1.

    2. Re:Make a real assesment by mknewman · · Score: 3, Informative

      I agree with this assessment. Be honest. If management doesn't believe you, quit and go somewhere else. Usually when you try to quit they will freak out and realize you were serious and try to keep you, on your terms.

    3. Re:Make a real assesment by Anonymous Coward · · Score: 0

      First thing to do is complete a real analysis of the code and report to management with an estimate to re-write complete sections of the code.
      Go into it realistically and tell them up front what it will take to correct things, and why.
      I have been in this situation several times in my career and that has always been the best approach.
      There is no need to "knock" the other guys code (be positive, never the mudslinger) and done correctly, would look more like you have some fresh ideas that may not have been designed into it originally. Eother way, management wants to know what to expect and having realistic expectations as soon as possible will save everyones face in the loing term.
      If they feel your out of line, well, then it's time to look at all those other jobs your contemplating.

      I agree. I have been coding for 3 years and i have seen contractors fired because they whined too much or were too needy. Do a code assessment, and create a report of what works, and what should be re-written.

    4. Re:Make a real assesment by dkleinsc · · Score: 1

      If you're a contractor who's just started, there's also a polite way to bow out or reset their plans: "After evaluating the situation more closely than I was able to during contract negotiations, this is not a task I am capable of completing to your expectations. I have put together this estimate of what it would take to do what you asked for. Would you like me to continue with the goal of meeting this new estimate, or would you like to find another contractor that might be able to better suit your needs?"

      --
      I am officially gone from /. Long live http://www.soylentnews.com/
    5. Re:Make a real assesment by marcgvky · · Score: 1

      Bump Geerloos. Most situations can be resolved in a win-win. There is a strong chance that these "managers" knew about the issue and hope you can resolve it, quietly without embarrassing them nor your predecessor. I recommend some conflict management techniques. Avoidance is not recommended. Document the facts and state the problem in terms of the business at-hand; avoid personalizing the problem, DO NOT reference your predecessors performance.... there is a relationship between management and this predecessor and those managers will shut you down, if you bash him. Once you have clearly defined the problem, try to get the managers to work WITH YOU to brainstorm solutions or remedies. Ask them to HELP YOU develop a win-win for the situation. If that fails, management doesn't want to partner with you on solving the problem and you probably do need to bail-out.

    6. Re:Make a real assesment by Anonymous Coward · · Score: 0

      Unless they're egomaniacs, which is a surprisingly common afflication amongst managers.

  12. Suck it up by CokoBWare · · Score: 4, Informative

    It's a sad thing. When someone who is well respected basically gave birth to a turd, and you need to clean it up, this is not ideal, but definitely the nature of the business... the business will become acutely aware of how crappy this app is in short order without your input.

    Advice: keep your nose clean. Don't complain about this person's code, but explain how the condition of the code will cost your time and energy to fix the problems as you dial in new changes. When they question you on it, tactfully explain that design decisions in the app are not entirely flexible, and changes may cascade into other areas that need to be fixed.

    1. Re:Suck it up by TWiTfan · · Score: 0

      He's been hired as a fall-guy. The respected developer realized his project was failing and bought himself a sap, a contractor that he can now blame for his screw-up.

      --
      The cow says "Moo." The dog says "Woof." The Timothy says "Thanks, valued customer. We appreciate your input."
    2. Re:Suck it up by CokoBWare · · Score: 1

      There is no evidence to support this hypothesis. Unless the OP had explained this to be true, I would not jump to this conclusion.

    3. Re:Suck it up by gstoddart · · Score: 2

      You know, I question if that's the case.

      I've seen several instances where someone throws together a proof-of-concept and then says "see, solved problem, the rest is an exercise for the reader". In fact, I once got something thrown at me by a VP who had knocked something together with some cheap hacks, string and tin-foil. In practice, what he'd done worked on a single demo system but couldn't remotely be made to work in a real system.

      Then you get into the problem and discover that so many naive assumptions have been made that it's not really possible to do it as envisioned. Essentially whoever did it ignored all of the real considerations as not important, and then just punts it to someone else to discover all of the underlying flaws.

      So, while it's possible the developer realized it was a turd and wanted to get out from under it -- it's also possible it was seen as well-defined enough to be an app for a contract coder to finalize.

      We once had a developer who could crank out reams of unintelligible, un-maintainable code as a demo/customization for a customer ... but which was brittle, sketchy, and completely not robust. Someone then asked that it be turned into a general solution, only to discover that it barely handled the specific solution because it made unsupportable assumptions, and completely neglected all of the other issues you needed to consider.

      Never underestimate how much trouble can be caused by someone who merely believes they've come up with something brilliant, but which on closer inspection is blatantly garbage.

      --
      Lost at C:>. Found at C.
    4. Re:Suck it up by dcollins · · Score: 1

      Yeah, that's at least a strong possibility. Both of my software jobs featured a highly celebrated "hero" coder whose primary skill was quickly smashing out a thousand lines of unreadable code per day. If management asked for "X", he (both of them) would just bulldoze the codebase and everyone else's work to the ground to deliver that day, and was much beloved for it.

      --
      We know where leadership by an anti-intellectual "strongman" who scapegoats minorities and likes boisterous rallies goes
    5. Re:Suck it up by cusco · · Score: 1

      Place where I contracted a few years ago had an engineer who knew a little coding. He had slapped together a bunch of scripts that helped him in his work, they worked fine for what he was doing, mostly output some data that then ended up getting copied and pasted into various places manually. Some of the other engineers found his tools useful and started using them, and they spread throughout the company to other departments. Then management noticed.

      Management wanted him to incorporate the scripts into their general management app, have DB tables update automatically, create work orders automatically, etc. Art took one look at what they wanted and declared himself too busy to have anything to do with a project like that (fortunately he was). Outside contractors came in, declared what he had done was junk, he admitted that it was, and the project as envisioned by management took a couple of years and several piles of money to complete.

      --
      "Think about how stupid the average person is. Now, realise that half of them are dumber than that." - George Carlin
    6. Re:Suck it up by gnasher719 · · Score: 1

      He's been hired as a fall-guy. The respected developer realized his project was failing and bought himself a sap, a contractor that he can now blame for his screw-up.

      That could be. On the other hand, contractors are usually paid more per hour, so that's just part of the job. Rumour is that a very big and expensive department job in London employs a guy whose sole job is to be fired. Every time a customer spending lots of money gets annoyed and wants to see someone fired, he will be publicly berated, fired, leaves his desk, and comes back when that customer has left the store.

  13. Depends by phmadore · · Score: 1

    Depending if I'm hourly or, as a contractor getting a single payment for the job, I'd either start from scratch (hourly) or quit (single payment). If I started from scratch, I'd make sure to document the several hundred lines which of erroneous code which led me to do so, explaining that, in my hands, the only way to do it was the way I did it.

  14. If the "well respected guy" is still there by MillerHighLife21 · · Score: 5, Informative

    Talk to him. Plainly, just explain the issues you're having and what you're trying to get done to go over it with him. Ideally, get it in email form.

    One of two things are possible here. He either did a quick "get it done" job to just get it over with really fast and move on...OR he potentially just has it setup using an approach you aren't familiar with. Even explain the issues to your boss if need be so that your boss can help to get you some of his time to go over this stuff.

    There is good code and bad code...but there's also "different" code. I've seen many a developer absolutely lose their minds because something wasn't done the way they wanted it to be done even though it was a perfectly valid approach. That might not be the case in this situation, but as developers we can get a little set in our ways and a little OCD sometimes.

    Keeping "respected guy" at a distance isn't going to help anybody. Absolute worst case, explain to your boss that in order to avoid breaking anything else you need him to at the very least, document how he did things. More than likely you'll ask respected guy for help and he'll have a look and either explain things or apologize. If things are tied together enough that when you change one thing, something else breaks then they are probably tied together for a reason. It would be odd for them not to be.

    --
    "Don't teach a man to fish, feed yourself. He's a grown man. Fishing's not that hard." - Ron Swanson
    1. Re:If the "well respected guy" is still there by Dan+East · · Score: 4, Insightful

      Further, if it's case 1 (a quick "get it done" job to just get it over with really fast and move on), then you need to take the proper tone to set up an environment for you to complete the task you were brought in to do. What I'm talking about is portray the software in a positive light - that it is efficient, single-purpose, quickly developed, etc. However, for those reasons it isn't very extensible, and you're going to need to lay some groundwork and framework to facilitate the enhancements they require. What I'm presuming you're lamenting is you don't have the time or bid too low for the amount of work required. You need to communicate to them that you will have to reorganize a significant amount of the existing code in the process. Be sure and state the advantages (IE what they're getting for their extra money), which will be streamlined future enhancements, and importantly, more efficient maintenance of the software from here on out.

      I've been in this situation a number of times, and every time the higher-ups had an appreciation for the extra work required to lay a good groundwork and I was able to proceed in the manner I recommended even if it took more time. Another way to explain it to a non-technical person is that software is often built very incrementally and piecemeal, and that can result in a hodgepodge of code over the years, and every now and then it requires a good reorganization and consolidation of redundant parts into reusable libraries. Usually they understand that general concept, because it's true of most physical, real-world assets as well.

      --
      Better known as 318230.
    2. Re:If the "well respected guy" is still there by swillden · · Score: 2

      +1

      The right answer is almost always to communicate and then communicate some more. Use both informal and formal channels, staring with the informal ones so no one is blindsided, but with the formal communication ready to go (so whoever you talk to doesn't have an opportunity to blindside you). In the informal communication, be clear that you are going through formal channels as well, in fact it's probably a good idea to approach the original dev and whoever else is appropriate with something "I have written up this analysis of my findings, but before I submit it I wanted to see if you can help me correct anything I may have misunderstood or if you have any suggestions." That way you're engaging them positively, but setting the expectation that you are going to take it through channels. Be positive and professional, not critical, but be forthright and clear about what you're seeing and your best estimate of what it will take to get to end of job.

      If backstabbing and scapegoating is the nature of the company culture, this communication will end badly. But in that case it's going to end badly regardless, and this way at least anyone who looks honestly at what happened will not think less of you. If there's a modicum of honesty and rationality around, you'll come out fine -- and much better than if you just quietly toil away and then fail. You should probably be able to look around and get a pretty good idea in advance which way this is going to go.

      Also, make sure you have something else lined up.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    3. Re:If the "well respected guy" is still there by King_TJ · · Score: 1

      Not a software developer myself, but I worked closely with a group of them for years....

      I'd say MillerHighLife21 is absolutely right. Any developer who actually has *some* level of pride in his/her work will usually be happy to explain the code to you, if you've taken on working on their original project.

      Someone else posted that you "can't win" because even if you fix it completely, it's the original author who will come back and take all the credit. That could well be true, but let's face it.... you're a contractor, not a full-time employee. IMO, that's part of the deal with working as a contractor. You're often paid to make somebody else look good. Your end of the bargain is a decent paycheck, at an hourly rate often as much as 2x or more what the full-time staff gets paid.

      If that's an issue for you, then I'd have to ask why you aren't pursuing full-time employment, where the company has more of a vested interest in you (and you in them)?

      I think you can accomplish this goal with the help of some communication with the original developer, and a tactful approach where you're not insinuating the problems with the code have anything to do with his/her lacking in coding abilities. (Maybe it does and maybe it doesn't -- but either way, the situation is what now affords you the opportunity to get paid to work on it!)

    4. Re:If the "well respected guy" is still there by Anonymous Coward · · Score: 0

      Treat it as a terminally I'll cancer patient, and just try to make it comfortable till the EOL. Which may destroy you, but really first and foremost do no harm, document what you can do, then do what you need. Pretty soon you'll find yourself doing the impossible.

    5. Re:If the "well respected guy" is still there by Anonymous Coward · · Score: 0

      Document what you need to do, then do what you can! Pretty soon you'll be finding yourself doing the impossible- is the correct chore of action

    6. Re:If the "well respected guy" is still there by Anonymous Coward · · Score: 0

      but there's also "different" code

      I have seen this NIH many many many times. Also if you go down the NIH road you will want to make sure your process is better than the last guy. Or you will just come off looking like a whiner. Things like built in test cases, decent build system, etc...

      I suggest test cases as the old code may do something you find 'ugly' or 'icky' just because you are not familiar with the style yet is doing something the business expects. Not only did they expect the code to do the 'right thing'. It is an issue they thought was already solved. If it comes back *you* get the blame.

      I usually ask is it 'broken' or do you just disagree with the style?

    7. Re:If the "well respected guy" is still there by X10 · · Score: 1

      There is good code and bad code...but there's also "different" code

      Good point. I like to see "different code", because one way or the other, you learn from it. In a different way, you learn from bad code, because it reminds you of how useful it is to spend time on making really good code.

      --
      no, I don't have a sig
  15. Write a comprehensive dossier on the situation by Thanshin · · Score: 1

    Explain, with factual data, examples and clear descriptions without embellishment, the current situation of the project. Add a detailed (factual, true, sincere) description of what will happen if the problem is ignored.

    Then, you need the professional maturity to know whether you are the correct person to solve the problem:
    If you are, present plan with the different possibilities:
    -- Restart the project.
    -- Abandon the project.
    -- Accept the losses and put another team to correct the project.
    -- etc...
    If you aren't, explain that there's a need for someone able to construct a plan with those different possibilities.

    And, above all, make an effort to believe that the best solution could be to do nothing, to accept the bugs and the losses.

  16. Prove that the code is not workable by Anonymous Coward · · Score: 0

    Gather metadata like cyclomatic complexity and prepare a few examples where changing things shows how brittle the code is. Propose structural changes and asses how much time they would take. Let them decide if they believe you and what needs to be done. The original creator will probably admit the project was rushed.

    1. Re:Prove that the code is not workable by jetkust · · Score: 1

      Sounds like a lot of work.

    2. Re: Prove that the code is not workable by Anonymous Coward · · Score: 0

      Moreover, a lot of work that will be inconprehensible to the people that need to understand the situation.

  17. Don't take the fall by SirGarlon · · Score: 3, Insightful

    The phrase that comes to mind is "set up for failure." Don't be a fool: they dumped this job on a contractor because they knew the project was doomed from the outset. I've been there.

    Which is worse: to walk off a job when you find out you've been tricked, or to stay on for the death march all the way to failure, and then get fired? (or, in your case, "contract not renewed," which is the same thing.)

    My advice is to get out while you can, and be more circumspect about accepting projects next time.

    If your sense of duty requires, you can discuss with your project manager why the job does not look doable any more, and see if he/she is open to major re-planning. But you should be prepared to quit the job on the spot if that meeting does not go your way.

    --
    [Sir Garlon] is the marvellest knight that is now living, for he destroyeth many good knights, for he goeth invisible.
    1. Re:Don't take the fall by jgarry · · Score: 1

      I've seen another variant of this:

      They've dumped it on a contractor because they "knew" it was doomed. Contract not renewed. Six months later, original "hero" is gone, and new contract, with more realistic requirements.

      Sometimes what they say they know, what they actually know, and what they come to believe are not congruent.

      --
      Oracle and unix guy.
  18. Plan and proposal by z4ce · · Score: 1

    If you think the code needs to be refactored, come up with a plan and a proposal to do that.

    It could be this individual is well respect for their ability to come up with ideas and realize through prototypes and not necessarily create long-term maintainable code.

  19. First, tell the person who's paying you by Anonymous Coward · · Score: 0

    The earlier the better!

    They need to balance features vs quality vs money (aka time), and so will need to chose between a bunch of alternatives.
    If you want to not look dumb, know the alternatives and be prepared to receooend one:

    • Spend the time/money (but they'll need to re-estimate, based on how much slower you found yourself being)
    • Cut the deliverables (again, after re-estimating)
    • Allow poorer reliability for the beta (if it's a customer priority)

    plus combinations.

    --davecb (from a work computer)

  20. Glass is half-full by Anonymous Coward · · Score: 0

    A broken project is an opportunity. An opportunity personally and for your career. Analyze the issues, understand them and attack. Yes, you may have to work harder, but you will always have an ace up your sleeve in your next interview.

  21. Professionalism by GerryHattrick · · Score: 1

    It's hard, but if you are a real Pro, you will know how to fix it, and (more important) how to fix the situation that led to the failure. Then walk away, and your reputation will most certainly follow and reward you.

    1. Re:Professionalism by polar+red · · Score: 1

      ... or : the original dev, or a manager in the company scoops it up as their win ?

      --
      Yes, I'm left. You have a problem with that?
    2. Re:Professionalism by Anonymous Coward · · Score: 0

      or? Of course they will. That's the entire point of working.

  22. Programming is hard by jetkust · · Score: 0

    If you're a good programmer, finish the project. Otherwise, quit.

  23. Like Any Other Project by azadrozny · · Score: 3, Informative

    Not many details to go on here, but I would handle this like any other project. Triage the problems and requirements, then work with the system owner to work them off. Be respectful to the developers who came before you. They may have been handed the same lousy situation, and done their best to work within the boundaries provided. If you are nice, they should be willing to help you understand the history of the app. They may have sacrificed robustness to accommodate some other requirement when they first wrote the system. Since you seem to have other options, then you don't have a lot to loose, and perhaps much to gain if you can bring this system under control.

    1. Re:Like Any Other Project by Anonymous Coward · · Score: 0

      yes.

      everyone should know you're having problems. the guy who hired you, the guy who wrote the code.

      it doesn't have anything to do with your level of skill, or his level of sloppiness.

      its a project, and if the schedule is going to be blown because the foundation isn't right,
      then best to discuss that early

      if you are both reasonable, then you find a way to proceed to your mutual satisfaction. and even
      though its not what they wanted, the client can see you're doing good work.

      if they aren't, then you can feel just fine about walking

  24. Simple, by Anonymous Coward · · Score: 0

    Shut up, suck it up, sit down, do the work, get paid by the hour

  25. Step one, do not criticize. Step 2, document. by Stolpskott · · Score: 3, Informative

    As you have said that the person who worked on the project before is well liked and respected within the company, while you are the new guy with no good will or social capital built up in the organisation, the last thing you should be doing is forming any kind of criticism of the code or the person who wrote it.
    However, if the project is truly "Broken", then the person who worked on it before will not be the untouchable God type. He may be the asshole programmer from Hell who purposefully wrote code that could not be maintained by anyone else, in which case you are his patsy and you are probably on a losing bet, because he is just waiting in the wings to swoop in, pull an all-nighter bashing away at the keyboard to rescue the company from the incompetence of the new guy, all for a measly 50% pay rise... I have seen it happen to a few contractors and it is not pretty.

    The "obvious" solution, of course, is to quit and find another gig. However, the next place (or the one after that) will probably have a similar scenario, so the best approach would be to start learning to tackle the problem on this project.

    That means that step 1 is to look at where YOU went wrong. By that, I mean that either your initial code analysis was incomplete (you did not check out the code before taking the assignment, or maybe you had no opportunity to check it out), or you started coding before understanding the existing structure (or lack of). Yes, you are under pressure to add value, contribute, justify your existence, and so on... but that will be doubly true next month. If you cannot make the argument in the first week/month that you need to review the existing code before making changes and adding features, then you are not going to be able to make that argument at any point. It takes a particular kind of coder to write updates to existing code without first understanding what the existing stuff does, and that type is rare, especially when dealing with an un-maintainable bird's nest of code.

    If the code is already documented, verify that the documentation is accurate. If it is not already documented, then document it. The code may need to be re-factored before you can make any meaningful contribution, but right at the beginning of the project is the only possible window you will have for that kind of analysis.

    If your response at this point is "I do not have time to document the code", then my advice would be to leave with your sanity and most of your reputation intact. You have already seen that coding hot, without any insight into what you are working with, causes unexpected and unexplained problems.

  26. Nice cloak post by andyring · · Score: 5, Funny

    It seems the OP is actually asking about the ObamaCare web site.

    1. Re:Nice cloak post by Anonymous Coward · · Score: 0

      It seems the OP is actually asking about the ObamaCare web site.

      Ah, thought he is talking about one of my apps

    2. Re:Nice cloak post by HnT · · Score: 1

      Simple: just upgrade to the IntelliLink Centurion package!

      --
      "Only one thing is impossible for God: To find any sense in any copyright law on the planet." - Mark Twain
    3. Re:Nice cloak post by X10 · · Score: 1

      Ah, thought he is talking about one of my apps

      No, she isn't.

      --
      no, I don't have a sig
  27. All Programs Are Like That by Greyfox · · Score: 5, Insightful
    In 20+ years in the industry I haven't seen a single well-designed piece of code. The problems are twofold; the project itself most likely evolved out of a need. Frequently they start out small in scope, perform tasks that nothing else does better than anything else the company had, and grew out of necessity. They weren't so much designed as taped together based on needs that were not clearly enumerated and are poorly documented if they're documented at all. Second, you probably don't understand the business process at the company. I've found it generally takes about a year to really start to understand the processes behind the code. Until then things that look like side effects or bugs probably have a very good reason. One you won't discover until you "fix" them.

    The new programmer, in this situation, may very well be seized by the impulse to throw that old turd out and rewrite it, but a turd in the hand is worth two in the bush. Replacing the application wholesale usually leads to an expensive boondoggle that has all the bugs that the old program has already fixed and delivers a fraction of the original functionality. You hear stories about this all the time.

    That doesn't mean you can't improve the design as you're adding new features or fixing bugs. Especially once you start to understand how the program works. You can isolate it into a test environment (because most of the time they're just building and deploying directly to production,) push the thing up to a version control server if they don't already do that, improve the build and deploy process and improve the design of the code in ever increasing scope until that turd has a really nice polish on it.

    Or, you know, not. It's really up to you.

    --

    I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

    1. Re:All Programs Are Like That by superwiz · · Score: 1

      I hope you don't evaluate the code based on code. I would know that the code sucks before seeing a single line of it. You look at the process and how the management thinks of priorities. It will tell you everything about what you'll see in the code. Any management that doesn't values individuals over a process will automatically produce bad code. There will always be opportunities to take shortcuts that are destructive in the long term. And bad management will take them. But even good general management principles are not enough. You have to know how to structure the code and how to structure the development process. If the management can't give you a clear explanation of both, they pretty much tell you what you need to know with what they don't say.

      --
      Any guest worker system is indistinguishable from indentured servitude.
    2. Re:All Programs Are Like That by Wulfrunner · · Score: 1

      In 20+ years in the industry I haven't seen a single well-designed piece of code.

      This reminds me of a funny story I heard once:
      There is this guy who is driving home from work when his wife calls him on the phone and warns him,
      "Be careful on the way home, the news report says there's a maniac driving into oncoming traffic on the highway!"
      To which he replies, "One maniac? There's hundreds of them!"

    3. Re:All Programs Are Like That by Anonymous Coward · · Score: 0

      In 20+ years in the industry I haven't seen a single well-designed piece of code.

      TeX.

    4. Re:All Programs Are Like That by Greyfox · · Score: 1
      Well in-house at companies. Actually that's not even really true now that I think about it. I did have to read some of the original AT&T UNIX code once. Those guys were brilliant programmers. But it wasn't really my job to maintain their software either, and I found a couple of doozies of security holes.

      Open source projects I've looked at usually tend to be on the better side of of the balance. You really have to enjoy programming to start one and you probably understand your problem domain a bit better. There tends to be an assumption that if you're paid to write code you must crap daisies and unicorns. This is not true. This is not true AT ALL.

      --

      I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

  28. The very first steps... by Anonymous Coward · · Score: 1

    1. request the project documentation.... and send it to the managing supervisor AND the former worker on the project... and send it to anyone else that MIGHT know of the project...

    2. when that fails, request the specifications for the applications from the same list of people...

    3. when that fails, issue a bill for services rendered... :) and offer a proposal to fix the thing (and NOT a fixed cost proposal).

  29. I know which broken project we are talking about.. by recoiledsnake · · Score: 5, Informative
    --
    This space for rent.
  30. Restate the objectives by clinko · · Score: 1

    Don't tear into the guy before you. Just say, "I'm sure this was built with an initial objective in mind. And it served the purpose well. The firm is doing well and expanding. I would like to know the best approach to make this product grow with it."

    Then, ask the firm to define the objectives/requirements again now that you've found a *few* issues.

    1.) Do you want the project to be re-built for _stability_?
    2.) Do you want me to improve the _time to market_?
    3.) Would you like me to leave it as is?, but be aware that extra QA will be needed.

    Good Luck!

  31. A broken project is like a broken heart by Chrisq · · Score: 1

    A broken project is like a broken heart. Sometimes you just have to move on.

  32. Don't break it by Lije+Baley · · Score: 0

    In today's "speed of business" world, sometimes even good programmers write brittle code. And sometimes we have to deal with it. It sounds like you need to get a better understanding of this code, otherwise you wouldn't have broken it. Then you can band-aid and duct tape it, or come with a plan for rewriting, but which approach is appropriate may depend more on business than technical considerations sometimes.

    --
    Strange things are afoot at the Circle-K.
  33. No Easy Answer by Akratist · · Score: 1

    A lot of it depends on where you are at in your career and what your long-term goals are. A paycheck is a paycheck is a paycheck. Few of us get to work on our ideal sorts of projects, and even those jobs eventually go away as the company and market changes. Part of the issue is that you really don't "own" the code, in the sense that you're not familiar with it and weren't there for a lot of the decisions that went into creating it. On my old project, I could tell nearly to the line where the problem areas were and how to fix them. On my current project (which is a large, fragile, and poorly engineering Frankenstein app that I walked into), I'm kinda in the same boat as the OP. I can see a dozen places where the architecture needs to be changed and updated, but it won't happen because of budgets and a resistance to change here. Anyway, once you've spent some time with it, you'll get to understand it better, in spite of yourself. You do have to ask yourself what you're trying to achieve, though...career advancement into an architect/lead job, or just passing time until the next coding gig. I show up, do quality work, and go home to pursue my side projects at the end of the day, as I've gone probably as far as I'll go in terms of advancement. Outside of keeping my skills current and being one step ahead of the obsolescence curve, I don't care all that much what I work on during the day...so, if I were you, my big concern would be whether or not I'm falling into a code rut -- is this old tech and old approaches, or newer stuff that is still in demand? If it's something old, learn what you can, then plan an exit. If it's newer stuff, get some good experience and move on when you feel like you've left things in a good place.

  34. Car maintenance price list: by Ihlosi · · Score: 3, Insightful
    Fixing your car: $40/hr
    You want to watch? $50/hr
    You want to help? $80/hr
    You tried fixing it first? $150/hr

    I hope you realized which kind of software work this was going to be and priced it accordingly.

    1. Re:Car maintenance price list: by Anonymous Coward · · Score: 2, Funny

      You want status reports? $200/hr
      You want to ask questions? $300/hr
      You want detailed discussions? $500/hr
      You want to be treated like a human being? $800/hr

    2. Re:Car maintenance price list: by Capt.DrumkenBum · · Score: 1

      You want to be treated like a human being? $800/hr

      You want to be treated like a human being? You can't afford that.
      Fixed that for you.

      --
      If I were God, wouldn't I protect my churches from acts of me?
    3. Re:Car maintenance price list: by HornWumpus · · Score: 1

      Scrum? $5000/hr

      --
      John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
  35. #1: Ask for a raise by stevegee58 · · Score: 1

    #2: Use it as leverage at review time

    Things like this are opportunities, not burdens.

  36. Constructively: Good Luck and God Bless by Anonymous Coward · · Score: 1

    Development Approach:

    * Make sure the source is in source control.
    * Pick a semantic version number (semver.org) if there's not one already (MAJOR.MINOR.PATCH[...])
    * File things in a ticket/issue system
    * Link commits to tickets/issues
        * Maybe even go so far as to require #[\d]+ in all commit messages.
    * Explain the problem in the ticket system (DRY: Don't Repeat Yourself)
    * Have links to reputable resources which describe the problems you've discovered.
        * http://cwe.mitre.org/top25/
        * https://en.wikipedia.org/wiki/Code_smell
        * https://en.wikipedia.org/wiki/Anti-pattern#Software_engineering
    * Have links to reputable resources for learning about doing good software development.
        * https://en.wikipedia.org/wiki/Continuous_integration#Principles
        * http://class-central.com/subjects/cs
        * https://en.wikipedia.org/wiki/Technical_debt
    * Write tests for existing functionality and then for all new features.
        * If something is 'broken', it should be demonstrably so.
        * There's no need to argue about tester competency.
        * Either the test is good and passes, or it isn't.
    * Pick a coding standard / style guide and stick to it. Link to it.
    * Develop standards for documentation to make it easier to train new people.
    * In addition to complexity/difficulty/time estimates, it can be helpful to estimate risk.
    * Plan for the "Hit By A Bus" scenario.

    Organizationally:

    * Consider advocating for software development standards and certifications.
    * Work with HR to improve hiring practices
        * There are lots of great online coding interview resources.
        * Require interviewees to write code in interviews.
    * For isolating root cause, blame can be more wasteful than helpful.
    * Make sure you notify a senior person about your concerns and intent, so that it is on file.

  37. Decide what you're getting out of it by quietwalker · · Score: 1

    Is it about the money? Is it about maintaining a professional relationship? Having a steady job? Completing a challenging assignment? Learning a new skill? Working on an app that will eventually be released as a finished product instead of a never-ending series of bugs or rolling feature updates from an agile process with no end or sense of accomplishment?

    Figure out what you want out of it, and then take the steps to achieve that.

    That aside, I personally don't place a lot of value in seniority for the sake of seniority. That someone 'respected' worked on it means nothing at all if the product is crap.

    At one workplace, I acquired a project much like you did; our three architects had all worked on it personally, over a 10 month period. It took me 2 weeks to get it running on my own machine locally - so much had been hardcoded; pathnames, machines, pre-existing sql connections with expired logins on machines only accessible from within a cluster. It had unimaginable complexity, built so that they could 'throw it over the fence' to the ops team, and supposedly let them own it, and update it for when our software changed in the future. They would only need to learn java, sql, our internal table structure (undocumented and continually changing) and SSIS too. It didn't help that the software still didn't work yet. It'd run for 2 days and then drop a 40+ gig coredump.

    Yeah, I complained, and complained, and everyone just said 'make it work', so I talked to the end users and product owners, collected requirements, and wrote the whole thing from scratch as a command-line tool in about 4 hours. I had to spend 2 days making a power point presentation to demonstrate how it was functionally superior (cpu, memory, bandwidth, throughput), easier to use (2 pages of documentation), well commented and structured, had no 3'd party dependencies (so no extra $$$ for database licenses and such), and how it followed the company statement and policy (one of which was explicit; 'Do not just "throw it over the fence"').

    I got a lot of positive attention from that. If recognition is your thing, that may be the way to go.

    When I eventually quit that job they remembered that I got stuff done, and done well. So now I work for them in my spare time, making 3x my previous salary, on discrete projects where I call the shots and they just need something that works well without dealing with months of crap in between. So, I eventually got money and responsibility too.

    Of course, your results may vary.

  38. mercy killing by prgrmr · · Score: 1

    Find reasons, both technical and financial, to make the most professional recommendation that you can to kill the project. This means just the facts, and no name calling (actual or implied), no editorializing about the lack of quality or organization of the project's goals, parameters, or guidelines or lack thereof--although anything obviously absent should be noted. Take a moral stand, if necessary, about your resolve to not take money under false pretenses, and that continuing the project would be just that. Implying that anyone else taking money for the project, contractor or employee, would be equally doing so falsely, may be either the exact needed thing to do, or the exact most wrong thing to do, depending upon your audience.

  39. Work with Management by Anonymous Coward · · Score: 0

    Be honest, work with the management and keep your opinion out of it.

    And welcome to the real world.

  40. Developers are like dentists by ljw1004 · · Score: 1

    Developers are like dentists.

    Every time you switch to a new dentist, he or she looks over your mouth and declares that they teeth are all in terrible shape, that the previous dentist did poor work, and it will all have to be redone properly.

    Software developers are the same. They see a legacy piece of code, see only the ugly cruft and hacks, think they can do better by rewriting from scratch, but their rewrite ends up with all of its new cruft and hacks as well.Oh, and the subtle "long tail" bug fixes that had previously been fixed in the legacy codebase? None of those make it into the rewrite... instead it comes with its own fresh long tail of bugs.

    1. Re:Developers are like dentists by dkleinsc · · Score: 1

      That's not entirely true though: There is such a thing as objectively bad code. Bad code takes forever to run, has security holes a mile wide, is extremely verbose and repetitive, makes unwarranted and undocumented assumptions about how the universe interacts with the code, and of course has no automated tests whatsoever.

      Now, when you discover this, the right approach is not to rewrite the whole thing, but instead to isolate and fix one small part of the problem. Fixing that one small part of the problem usually goes like this:
      1. Create a complete (with 100% case coverage) and passing unit test suite for the one small piece. If there's a bug in the program that makes correct unit tests fail, first verify that it is in fact a bug in the program and not your tests, then make the smallest possible change to make the tests pass.
      2. Write the new and better version that satisfies all those tests.
      3. Put the new version in place in a test environment, and manually poke at it for a while to ensure that everything that relies on it works properly.
      4. Then, and only then, make it live.

      --
      I am officially gone from /. Long live http://www.soylentnews.com/
  41. Been on that contract by Oligonicella · · Score: 2

    Got a contract a STL phone companyl to examine a system with much the same setup; a billing system purposely avoiding all standards (naming constants "Literal-R" because literals weren't acceptable), no performs, only jumps (not spaghetti, Ramen), etc. I decrypted it's function and what it was supposed to do as well as what it did, wrote a very detailed report on what was wrong and why it was so and turned it in. I spent the last four months of the contract sitting and studying pretty much what I wanted because Mr Silver was a golden, do not touch, boy. Meh, paid very well.

    1. Re:Been on that contract by Anonymous Coward · · Score: 0

      Spaghetti? Ramen? Literal ARR? Was this Long John Silver's plan to extend his menu beyond the traditional fried fish affair? No wonder it was difficult.

  42. Problem? What problem? by swm · · Score: 1

    If you are a contractor, and "there's plenty of jobs you can take", then you really don't have a problem here. Let's take it by cases.

    1. You just don't want to deal with this app/code base/company/assignment
    Then leave for one of those other jobs. That's part of what being a contractor is all about: being able to drop clients that you don't want to deal with.

    You don't have to be rude or snarky about it. Give notice, complete whatever term or notice period is specified in your contract, and move on. If they ask why, tell them simply and honestly. Providing such information (if asked) is part of your service to them.

    2. You are willing and able to do the work
    Great! You've got a good gig, and from the sound of it, it could keep you in peanut butter and iPhones for a long time.

    If the code base is a horrid mess--that's their problem, not yours.
    If everything takes 2, or 5, or 10 times a long as it "should"--that's their problem, not yours.
    If every time you fix a bug, the app breaks in two other places--that's their problem, not yours.

    If they ask for schedules, give them your best estimates, based on what you know about the code base.
    If they demand to know why everything takes so long, give them your best (diplomatic) explanation of the problems with the app. Speak only in terms of the code as it stands. The history of who wrote it and how it got that way is irrelevant.
    If they decide you are incompetent and dismiss you, then you are back to case 1, above.
    If they decide to cancel the whole project and terminate your contract, then you are back to case 1, above.

    Part of what a company gets when they hire contractors is the ability to dump scut work on them (so that the "well respected" people don't have to do it), and the ability to dismiss them when circumstances change (w/o paying unemployment, etc.) If you're OK with that deal--the work, the scut, being low man on the totem pole, no job security--then give them the best 8 hours of your working day, cash their checks, and sleep soundly. The day you're not OK with it--the day you wake up thinking, "I *just* *can't* do this any more"--that's the day you give notice and move on.

  43. Doh! by Anonymous Coward · · Score: 0

    1. Make up story
    2. Restore from backup
    3. Checkout
    4. Wash; rince; repeat

  44. Three options: run, coast or double down by H0p313ss · · Score: 1

    1. Run: Quit, don't let someone else's failure become a black mark on your record.
      i.e. You're a coward, not up to the challenge, nobody should hire you.

    2. Coast: Just survive and let the waves wash over you.
      i.e. You're a lazy fuck, nobody should hire you.

    3. Double Down: It's not a problem, it's an opportunity. Tell your boss there's a major issue, but show them that you're on top of it. Make a full written analysis of the code base you've inherited; document it's strengths and weaknesses and what needs to be done to address them. Provide a task list and a schedule.
      i.e. You're exactly the person people want to hire.

    --
    XML is a known as a key material required to create SMD: Software of Mass Destruction
  45. find out why you were hired by v1 · · Score: 4, Insightful

    I think that's the first thing you need to do before deciding how to react.

    Did the author decide he'd created an unmanageable hack and push management to pull in a contractor to either clean up the project or simply suffer through trying to maintain it, so he could get back to focusing on his other work?

    Did management rush the author to get something "usable" out the door so they could put him on another project, and you're just the mop-up crew?

    It's very likely one of those two things. You could respond to either of them by simply "run, forrest, run!", or you could roll up your sleeves and get to work. If you choose to take it on, your approach will depend on why you are there. First off, trashing on the author won't get you anywhere with anyone, don't even consider it. The author may realize he made a mess, management may not. But right now the author is your best ally. Don't burn that bridge by running to management and telling them the reason it's going to be expensive to fix is because the author created a mess.

    That being said, document everything, in case it comes back to bite you. You don't need to share that documentation with anyone unless necessary. It's your safety net in case the excrement strikes the oscillating unit and the author tries to blame the problems on you.

    Have a private chat with the author and find out which of the two above is the reason you're there. You'll notice that in either case, he's probably very happy to have you taking over, and you should be able to easily leverage that to get his cooperation. That will make your job monumentally easier. Projects by good authors that get into this state are usually the result of inadequate planning, or a late change in requirements. The author probably had a fairly-well fleshed out plan that went south at some point, and that plan is probably not very clear to you right now. Ask about that plan, find out where the code was meant to go, why it didn't end up going there, and mosts importantly what problems did that create and how did he work around them. Those work-arounds are what's causing your grief. Knowing what they are is half the battle (that's why stuff broke when you edited), knowing why they were necessary is the other half. (THAT'S why other unrelated stuff started breaking) Get this information from the author.

    At that point, you can take a very well-informed look at the project and decide if it's worth your hassle to take on. Then either take it or leave it. If you decide to bail, you can look back on your documentation and decide how much of that is necessary to justify your decision and get some compensation for your trouble. If you do decide to take on the project, discuss the issue again with the author and get their input on how to explain the maintenance costs. Even if it has to come down to "this is going to be expensive because Bob created a mess", giving him a chance to have some input on how this is addressed will help keep him in your corner down the road. If he's anywhere near reasonable, he'll understand that he's going to have to accept some of the responsibility for what he started.

    --
    I work for the Department of Redundancy Department.
  46. Relax. by Anonymous Coward · · Score: 1

    You can still work at it, but given an already pre-boned project, you cannot make it fail even worse. So anything you DO manage to get out of it is just gravy.

    The worst ones are the "nearly boned" projects. Jobs that are *probably* broken but with luck and hard work could work. THOSE have you sweating bullets so that it isn't failing because you're not good enough.

  47. Also.... Re:Make a real assesment by Fubari · · Score: 5, Insightful

    Excellent points r.e. "real assessment"

    Also, things to consider: without knowing these, all advice offered here is less focused (and hence less useful) than it could be otherwise.
    1) Who are the stakeholder(s)?
    1.B) What is the stakeholders' definition of "success"?
    2) What is your budget - fixed bid, time & material? (if the later, do you have a max budget or is it open ended)
    3) What is an ideal outcome for you personally?
    4) What is the least-sucky outcome for you personally that you would accept?

    Some general advice (this applies to the excellent "real assessment" mentioned above): Whatever bad news you have for your client, the SOONER you deliver it the BETTER OFF everyone will be, including yourself. If you go heads-down a pile of crap code for 6 months and end up stuck and unable to deliver anything useful enough and timely enough to satisfy the stakeholders then things will NOT end well for you.
    Also... what you think may be "bad news" may be something the client is aware of and fully expects, so don't sweat it too much. Talk to them and do some brainstorming about how to rearrange things to make success possible.

    1. Re:Also.... Re:Make a real assesment by captainClassLoader · · Score: 1

      Fubari gets it right. These are the questions to ask. Like others here, I've been involved in projects like these, and in most cases, just the fact I was there was a sign that management knew there was a mess - They simply wanted to know how bad, and what it would take for me (or maybe a team) to fix it.

      In one case I worked on, there was an obvious technical solution to the problem, but for various reasons management found the solution to be politically incorrect. I spent several months trying other approaches (carefully documenting all of them) and concluded that the obvious technical solution they had originally created was actually the best. Management was okay with that, in the end. It turned out that they were willing to confront the political drama once they had technical backing from someone outside the company that they trusted. (I had done work for this company before.) So don't assume you're the scapegoat. Yes, it does happen, but, in my experience, far less often than you think.

      --
      "The plural of anecdote is not data" -- Bruce Schneier
    2. Re:Also.... Re:Make a real assesment by ausekilis · · Score: 1

      Between this and the AC "don't wimp out" comment above, I think you've got sound advice.
      My own personal experience is similar, I was in a group in a large corporation that was "subcontracted" to another part of the same business. The project was more of a "shoehorn this into that" sort of setup, and I was the only developer and given a 5 million line plus code-base that broke if you looked at it funny. I told my boss I'd need some time to look through the code and come up with estimates and got the okay. Roughly 2 weeks later I went back to my boss, who was the interface with this other group, and gave him some options. 1 - We make everything shiny, gold, and less likely to break... but at some absurd estimate that wasn't in contract scope. 2 - We build the parts we are on contract to build, and do some shoe-horning (minimal tweaking) of the existing code base. or 3 - somewhere in between.

      My boss went for Option 3. Then in 3 months the requirements changed and so did the code base, completely. We got a new version, 2 releases newer. Having already done a lot of development in those three months, we diverted to option 2 and ported as much as we could to the new code. In the end, about a year later, the requirements had changed yet again, and our customer was having issues compiling everything on a new 64-bit architecture... when our code was strictly 32-bit (but had some custom enhancements for 64-bit floating point).

      The takeaway is honestly and communication. When the requirements changed, you can bet your ass my boss and I called up the customer and said "by doing this, you are impacting these other things and this development is going to get completely scrapped, are you okay with that?". They were, the understood the extent of their needs, the contract limitations, etc... so they made an informed decision that was the least stressful across the board, while still meeting overarching requirements.

  48. This is why poeple call their jobs "work" by Glires · · Score: 5, Insightful

    Your description sounds exactly like the only thing that I've ever been paid to do in my entire career. My job is to fix broken things and make them work. It sounds like that's your job, too. If everything were working perfectly, they wouldn't have needed to hire you in the first place. If fixing the project is beyond your skill, then perhaps moving on to a different employer is a good idea.

    --
    -Glires
    1. Re:This is why poeple call their jobs "work" by jomama717 · · Score: 1
      This. The description of the task does not sound out of the ordinary to me, it sounds about like what I have been doing for the past 15 years.

      ...the code is not robust. You create a small new feature, and the app breaks down in unexpected ways. You fix a bug, and new bugs pop up all over the place.

      You've just described every project I've ever been dropped into - welcome to the wonderful world of software development, where anything is possible - but NOTHING is easy.

      --
      while [ 1 ]; do echo -n -e "\xe2\x95\xb$((($RANDOM&1)+1))"; done
    2. Re:This is why poeple call their jobs "work" by Kjella · · Score: 1

      Well fixing a broken project is one form of work, but adding new features or updating the system to meet new business requirements or technologies is another. If that's what they expect from you but you can't make any progress on the deliverables or you're breaking the bits that work because it comes crumbling down like a house of cards at the slightest touch you're pretty much hosed. Yes, obviously you expect some breakage but if it's just one giant pile of spaghetti code where it's like trying to play a game of Mikado then progress is going to be very, very slow.

      --
      Live today, because you never know what tomorrow brings
    3. Re:This is why poeple call their jobs "work" by Anonymous Coward · · Score: 0

      YEP... and/or it might just look broken to you because you don't understand the decision process... i would be careful un-breaking anything that you don't really know why it's like that. the previous developer may have been as smart as you and may have had to do something a weird way in order to appease management/other considerations beyond "this will look good to the next developer".

  49. Depends on how critical it is by Anonymous Coward · · Score: 0

    I had one like this once. An electrical engineer, who was no longer with the company, wrote the original program. It was used in a manufacturing company to set registers on safety equipment the company sold. The code checked in to source control would not compile because the original "programmer" had checked in source haphazardly. There was no way to figure out which code was in the running binaries. The catch here was the change was critical. The longer this took to fix the more likely someone would die.

    Decompile. Edit. Recompile. Test. Lather. Rinse. Repeat.

    We made it work, and it sucked. I sat down with my boss and explained the situation and the associated risk to the company and asked for the opportunity to rewrite the app. It took a year before we started the rewrite, and I had to go through the same process two more times. Each time I reminded my boss of the issues and risks. But sometimes you have to do what you have to do. On the plus side, I got a nice promotion just before the rewrite.

    When you don't have a choice, just do it. Then explain to your boss (and possibly his boss) the problem and risk to the company in language they can understand. If the app is critical or costly enough they'll eventually get around correcting the problem if you're persistent and patient. And chances are they'll remember you saving their sorry behinds when it's time for review/promotions. If they don't, move on.

  50. Two points by advid.net · · Score: 1

    1- Document every bug encountered, corrected or not.
    2- Put emphasis on this project property: terrible cascading effects when anything is changed.

    Whatever decision you make later, this won't hurt you and will likely help you.

  51. It doesn't "feel right"? by DogDude · · Score: 1

    Who cares if it "feels right" or not? What a silly question. If one is an contractor, paid hourly, then why should it matter if the project "feels right"? Unless the subject of the project is something like child porn or genocide, then just do the damn work and take the pay.

    When I was a developer (and a contractor), and I saw a project that was a mess, I'd think, "Oh good, this project is going to require a lot of work. I should be able to make a lot of money from this contract." My "feelings" about the quality of the code were irrelevant.

    --
    I don't respond to AC's.
  52. May not feel right, but it's the right thing to do by Opportunist · · Score: 1

    To be blunt, this smells like you're supposed to be a scapegoat. If a well respected individual of a company hands off a project to a contractor, something is odd. If you then notice that the project is in the process of crashing and burning, the most likely explanation is that that "respected individual" noticed that it's going to blow and that he wanted to jump ship before it's too late, i.e. before there's no way he could pin the blame on someone else. In this case, you.

    Get out. Now. Explain the reasons, and that you didn't think it was necessary to check out the code because it was handed to you by such a respected and renowned engineer, who clearly must have taken over the project himself because he could never deliver such a shoddy work, and that you feel you do not have the necessary background inside the company that you could turn it into a successful product.

    Get out. Now. While you still can without irreparable damage to your reputation.

    --
    We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
  53. Instrument the code by rover42 · · Score: 2

    As others have suggested, talk to the original developer, document the problems and keep your boss informed. If you are a contractor being supplied by one firm to another, keep the appropriate people at both companies informed. Also, look for ways to measure the problems. First, can you run the code through lint(1) or crank the compiler options up to reveal problems? Then can you add runtime error checking or data validation code? This may help you fix things and/or be useful as documentation. Once, when working as a tech writer, I wrote a half a dozen little scripts to inspect 600,000 lines of C from a dozen programmers. Hmmm. Less than 5% of switch() statements had a default: case for error-checking. Less than 20 uses of the assert() macro in the whole code base. And so on. The programmers mostly came from a Pascal-like environment so almost none were using C idioms like if( (p = fopen(...)) == NULL) for error checking. That is OK but I found dozens of cases where they were allocating memory, starting processes or opening files, sockets or pipes with no error checking at all.

  54. Or, this guy is the problem. by Anonymous Coward · · Score: 1

    Maybe THIS guy is the problem.

    Maybe the app is breaking because he doesn't understand how it works.

    Everyone here is assuming that because he's picking up the project that he is the expert.

    Many times companies hire the contractor to do the minor things that the employee doesn't have tme to do.

    This has happened to me. I wrote a bunch of code that worked perfectly and the new guy came, slammed some code in without understanding how it worked and broke it - and I got the blame for being an idiot. I had to debug it and find the error - putting me BEHIND on my own projects just to find out I was being blamed for another's incompetence.

    God I hate this industry!

  55. Rebuild it from scratch by holophrastic · · Score: 0

    Well respected means that they've got other things to do, which is why they aren't working on it anymore, and why you were brought in to the job in the first place. There's a very likely chance that this isn't his best-effort project, but rather was done as a quick-fix, or a really-fast effort. He probably never thought it would last beyond phase 1, which is why it isn't stellar code in the first place. Hey, if a contractor can stick with it, so much the better. But since you can't, and it's not your fault that you can't, it's time to rebuild it.

    And contractors are perfect for rebuilding things that already exist. No need for a spec, nor for supervision. Just rebuild it. Ask for the time, and you'll get it. Ask for a quick meeting to discuss possible-future features so you build it properly this time. You'll get that too.

    Enjoy.

  56. Clone it. by Anonymous Coward · · Score: 0

    Make an entirely new greenfield system with "many" of the features and benefits of the vaporware project, and to some degree make it extensible. Deliver it. Now offer consulting fee level services to maintain and extend it.

    Simple.

  57. Debug, document, add tests, refactor by Cheburator-2 · · Score: 1

    Recently I had a very similar, but mirror experience. I've written a piece of complex code. Then a new guy came, looked at my code (he needed to fix a couple of things there) and decided that it's a piece of shit that could and should be rewritten from scratch in a couple of days. He failed. It's not that my code wasn't a piece of shit (it was), but there was a reason for it: that code was responsible for a very complex task and there was a severe time constraint. Most likely you have a similar code. My advice: don't blame the author. Instead, try to understand why his code is so complex. Study it, debug it, document it. Add high level tests for all possible situations. Then try to refactor the code to make it more robust and easier to understand. Good luck!

    1. Re:Debug, document, add tests, refactor by JustNiz · · Score: 1

      Seriously you should never allow yourself to be pushed into doing crap quality work. By doing what you did, you just undermined your own professionalism and reputation badly no matter what the actual reason. People will always quickly forget that you got them out the shit at the time, but bad code with your name on it will be there for all to see for ever.
      I understand you were on a deadline, but you should have instead pushed back when you got given the task and told your boss that it wouldn't be possible to do it within that time constraint. If he then chooses to give that task to someone else, be happy.
      Remember there are a million people out there that claim they can write good code but not many actually can and even less actually do. That's what you always use to differentiate your skilsl and therefore yourself. Don't allow your work to ever prove you are just another half-assed programmer that just claims they write good code.

    2. Re:Debug, document, add tests, refactor by fluffythdestroy · · Score: 1

      that makes sense if your playing with someone elses code. Study it and document everything you see and and you change.

      --
      PC Gaming enthousiast that gives comments, opinions and reviews on Games. I'm just having fun with games while doing let
    3. Re:Debug, document, add tests, refactor by Cheburator-2 · · Score: 1

      Do you mean "don't ever do any challenging task at all, fuck the external time constraints, reject all customer feature requests if they are too complex"? Sorry, it doesn't work that way in a real world. What one really should do is to request quiet time once in a while when one can refactor and improve her own code. That's when code masterpieces are born.

    4. Re:Debug, document, add tests, refactor by JustNiz · · Score: 1

      Not at all. Why are you putting words in my mouth that I clearly didn't say?
      What I said and meant, was always make sure you get given the time you need to do a good job, then do one.
      If your "real world" needs you to do a shit job, then there's a problem with what you think is the real world. Often its just people that are too afraid to stand up to their boss, who's deadline is actually an artificial one just designed to make you work any of harder/longer/for free. If you push back you will see them crumble thats how you know its not real.

      Customers in the real world always want something done fast but also right. They nearly always prefer right over fast when pushed. Fast doesn't beat right except in a very retarded short-term sense because if you do a shit job it WILL always come back to bite you in the ass 10 fold.

    5. Re:Debug, document, add tests, refactor by Cheburator-2 · · Score: 1

      Not at all. Why are you putting words in my mouth that I clearly didn't say?

      Because that is a logical consequence of what you did say. If your product is sufficiently complex, then it's not perfect internally. To make a product "perfect" internally takes at least 3x time, and competitors would not sleep at that time. And you would be polishing features that maybe dropped or rewritten in the next versions. It's better to have some user input before you start polishing. Write - release - refactor - repeat. That is what works in a real world.

    6. Re:Debug, document, add tests, refactor by JustNiz · · Score: 1

      Show me where I said it has to be perfect. As you clearly already understand, no sufficiently complex piece of software can ever be provably perfect. ...and if your process is indeed as you said where you need to refactor your code after every release, or one where think releasing crap to customers is OK because you assume you will always have another chance at a go-around to get it right next time, then you are part of the problem not the cure.

      Your apparent mindset is unfortunately already all too common especially in the US and is all about short-term $ by selling over-hyped low-quality crap before the customer can realise it, by which time you'll have already moved on to another mug.
      Consequently as a sales-at-any-cost-driven person you will fundamentally never get the point of what I'm actually saying, so please just move on.

  58. Re:Does the Tin Man have a sheet metal cock? by Anonymous Coward · · Score: 0

    Some of us already know. You just lack courage, coward.

  59. Correct Answer by Anonymous Coward · · Score: 0

    The correct answer is that he learns the code and how it works and then solve the problems. Express the problems in a factual way to the client.

    But hey, blaming the other for writing shitty code is how is usually works in this industry - "everybody else is stupid but me" is the prevailing attitude in this industry.

  60. Hand it over to your competitors by pmontra · · Score: 0

    Seriously. Find your best competitors, get them into the project, let them burn themselved out, leave as soon as you can.
    Probably this is very bad karma.

  61. I already did this. by Anonymous Coward · · Score: 0

    It was called "Moodle"

  62. All Projects are Broken by some Degree by prefec2 · · Score: 2

    First, determine what is wrong with the project.
    Second, check how much time you have.
    Third, determine different solution scenarios.
    Fourth, discuss your findings with the "customer" or the person who gave the project to you.
    Fifth, agree on a solution. Be clear that this is not a wishes come true situation.
    Sixth, proceed with the agreed plan.

    General rule: Document everything.

  63. Document and Charge Appropriately by scamper_22 · · Score: 1

    Bad projects get dumped on other teams and contractors all the time. As a regular employee, you sometimes have little choice in the matter. You simply voice your opinion to your manager and hope they can side line it. Alternatively, you move around internally and try and work on good projects.

    But as a contractor, I am curious why you don't approach this as every other contractor you deal with in other fields. Ever tried to hire a home renovator, repair person...

    1. Look at the job
    2. If the current software is a mess, just like every other home renovator or auto mechanic, it's not something you want to work on for your regular price. You're going to have to charge more and take more time to fix various things. So make a note of what needs to change and the risks...
    3. Present that to your client without judgment. Who knows why it got in this state. The superstar developer could be a superstar, but just rushed something as a prototype that management decided to put into production for example. Then see if they're want to do and if they're willing to put in the time and effort to fix it.

    But just remember your status as a contractor like any other. If you renovate basements, but someone didn't do the foundation properly, the walls were leaking, the insulation was missing, someone already tried to patch it up with filler and left all kinds of bumps on the wall... you're not going to just do it for the regular fee.

    Treat software the same way.

  64. Fail In a Glorious Manner!! by RobertLTux · · Score: 1

    If you can't get buy in from the right folks then make sure [Style= Bold Red Flashing]When[/Style] you fail you take out as many folks as you can.

    This is your time to live by the Klingon saying TODAY IS A GOOD DAY TO DIE (or stall until it is)

    --
    Any person using FTFY or editing my postings agrees to a US$50.00 charge
  65. Be real, don't be a sucker by Anonymous Coward · · Score: 0

    First of all, don't let one bad agreement ruin the next year of work for you.

    You made one mistake, not looking at the code before accepting the assignment. You've already admitted this mistake to yourself. Now take your best action to address it. I think this would be to make a proper assessment of the project.

    Talk to your manager about the need for a code review with the writer. Just say he has a different programming style and you need to pick his brain (this frames him as the expert--avoiding ego issues or blame). Presumably, he has an interest in this app's continued success. When you get together with him (with your agenda of understanding what needs to be reworked... the work ahead of you) use lot's of compliment sandwiches and questions. Like, I really like your idea behind this functionality, help me understand how it works, for example, when I do this, why does this happen? Thanks. Etc... This may make him an ally.

    After working with the guy and picking his brain. Make a professional assessment of the state of the project. Break it down and be absolutely real with yourself about what your job it. Code cleanup and enhancement? Complete rewrite?

    You took a leap and landed in some shit. Once you have assessed the shit, the first thing to do is clean the shit off yourself (decide if this project is worth staying in--whichever you decide you must decide--time will be wasted). If you leave, remember to look at the code before accepting your next project. If you stay or give it a shot, it's time to do your best at clean off the shit from whatever is salvageable in the project (rewrite his code cleanly). Then set up a clean environment and use what you can to make a clean app.

    If you are willing to clean the shit for the money you are getting, that's cool. But the project will be messy for a while and probably smell funny. It's not easy to clean up shitty code.

    This guy might help... http://www.altdevblogaday.com/2012/08/18/cleaning-bad-code/

  66. Do it and create a full report by fluffythdestroy · · Score: 1

    Each fix I would apply I would document and put as much information as possible. I would also document each bug encountered and give good arguements to why I need to fix it. In other word a thorough explanation so no one would need my input directly since all the info is in the report. That report would exist so the original programmer won't be able to backstab you in the back or create problems. Contractor or not that does not explain the skills of a person. It there was slacking done by the developers, his employee needs to know...If I payed a lot of money, i would expect to know that kind of thing from a contractor or anyone I pay to get the job done.

    --
    PC Gaming enthousiast that gives comments, opinions and reviews on Games. I'm just having fun with games while doing let
  67. build an anti corruption layer and start from that by jcfigueiredo · · Score: 1

    Try to create a decontaminated area around the bad code where you have tests, good new code and, specially, confidence on the new stuff you're building. Every time you have to touch the old codebase, try creating new code that replicate the old behavior. If you absolutely need to change the old code be sure to at least cover the affected area with many functional tests BEFORE you change anything. That safety net will make you fell relaxed and confident on your changes. Most developers really love greenfield projects but renewing an old one could be just as rewarding. If you want some hardcore insight on how to handle that, read 'Working Effectively with Legacy Code' from Michael Feathers. http://www.amazon.com/Working-...

  68. Make it work by Anonymous Coward · · Score: 0

    This describes most projects I've ever worked on.

  69. Step 2, go back to Step 1 by betterprimate · · Score: 1

    +1

    Another lesson the OP needs to have learned from this situation is that every project needs a billable assessment phase, a paid evaluation. The assessment phase is needed to address the company's business and project requirements.

    1. Re:Step 2, go back to Step 1 by Anonymous Coward · · Score: 0

      An assessment phase is needed to examine the turd and see how large it is and how painful it will be for you to remove, before you try to sell a solution of removing said turd and replacing it with a gold brick.

  70. Your Reputation is more important than the money by michaelcole · · Score: 1

    The first half of your question is phrased as a contractor. The second half is phrased as an employee. Mixing the two kinds of relationships will likely bring dissatisfaction.

    That doesn't mean stay or leave. What it means is that if you have to choose between being: an employee or a professional contractor. Some companies have employees they call contractors which is illegal, but happens anyways.

    If you want to be an employee for this company, bring the situation to your supervisor. You supervisor is the person responsible for getting you what you need to do your job. You get to choose if you want to do the job or not.

    If you want to be a professional contractor, bring the situation to your client - along with one or two recommendations for action. Working with Mr Respected on this will help you sell it. If they don't want to buy your recommendations, then don't take the project.

    Definitely don't leave this as a surprise till the end. That isn't good for your reputation.

    Whatever you choose, don't work on deathmarch projects. They pay shti, and you will get no future references for work. They are career killers - A players know to avoid these projects. B players hire C players to take the fall on them. Don't let other people turn you into a B or C player.

  71. There is no broken projects. by Anonymous Coward · · Score: 0

    The previous developer wrote the best code he can. His boss appreciates the way he handles deadlilnes, getting stuff ready everytime. Thus the boss gave the previous developer more challenging projects, and you as a contractor needs to take the easy task of maintaining the code produced. Professional programmers can handle any kind of mess. Different people think in different ways, and perfectly logical piece of code to the original developer looks like horrible mess to most other developers. No amount of refactoring is going to fix it. Your programmers need to learn to read code and understand all details of it. Even very minor issues like naming conventions are going to make it look like a mess. The programmer didn't use the naming convention you are familiar with. Deal with it. Choice of the naming convention cannot break otherwise perfectly logical code. But labeling someone elses code a mess is a big red flag. You spent two minutes looking at the code, and then you decided it's a mess. That mess is implementing important business requirements, and you don't even have specifications of what is required, much less magical crystal ball to reimplement the details. Your task is to _add more requirements_ to the code. Your task is not to break the existing code. If you can't add a feature without breaking the existing logical structure of the code, you need to STOP. stop writing code until you're comfortable enough with the small details that you can implement features in the existing codebase. Adding new features is significantly easier than "refactor all the code, then add a feature", The refactoring is not needed. It already works. You don't have enough test cases to do refactoring to the 2 million lines of spaghetti masterpiece. You don't even have the requirements necessary to rewrite the code. Stop thinking you can do it. It's impossible. Your task is to add new features. Adding new feature is very easy: you take existing empty lines of code, and replace them with working logic, implementing the requirement. It doesnt need refactoring or rewriting the whole application. Choose empty lines as the code you handle, and you never have problems with messy spaghetti code. In fact, you don't need to see the existing codebase. It's full of company confidential stuff, you can implement new features by focusing on empty lines of code.

    A programmer that takes a new project, declares it broken immediately, wants to rewrite it to fix indentation and end up the same mess with different details; such programmers are toxic waste. They can't do anything. They endlessly modify already working code. So what if original programmer decided to indent his code to the right side of the editor window? Who are you to question that decision. I'm sure his text editor didn't allow proper indentation, and the design of the code follows the decisions made. You cannot understand the decisions. Programmers make thousands of decisions every time they write code. Every decision follows some logical pattern that allows a programmer to understand it. Rewriting the code just destroys the logical structure, and loses the thought process original developers used.

    Ok, what is a good way to handle such projects? Don't look at the existing code. If you look at _empty_ lines of code, they're always nice and clean, ready to be substituted for something better. Replace empty lines with perfect logic that you can understand, and remember to look at the requirement while writing the code. This pattern allows writing code recardless of the original mess that exists in the codebase.

  72. Honesty is the best policy... by ConallB · · Score: 1

    Someone hired you to take over a development that was clearly in trouble.

    If it is your honest opinion that the codebase you have to work with is substandard you need to bring this to the attention of the person who pays your invoice.

    You should put your case forward in relation to the codebase you have been given to work with and the issues you feel are pertinent. Make it about the code, not the people.

    Your statement that "The person who worked on the project before you is well respected in the company" is a subjective one and should not be part of your argument or decision on what needs to happen to fix things.

    If they dismiss you for being honest then that is their problem. You will have done your best. That's what you are being paid for.

    --
    Quidquid latine dictum sit, altum sonatur.
  73. Let this be a lesson for your next contract by n7ytd · · Score: 1

    As this one hasn't panned out as you had hoped, you might want to consider evaluating how you approach your next contract. Rather than cross your fingers and sign up for 6 months, you might suggest to the company that they bring you on for 12-40 hours of evaluation work. Offer a reduced rate or even to do that work for free, if needed. At the end of that contract, you will provide them with your professional opinion of what it would take to complete the work they are expecting for the full contract. Break it down into schedule and price, present it to them so they can see what you're offering and how you'll be worth it. Price that contract accordingly. If you want the work, emphasize how you are now the most familiar candidtate with the work to be completed. If you don't want the work, finish your presentation explaining how you feel that as a professional, you can't in good conscience accept their contract because they would be throwing good money after bad, but would be more than happy to help them find someone who can.

    This approach will tell you several things:

    • The health of the code you're about to become responsible for.
    • If the company balks at the idea of paying for you to evaluate their code, let that be a warning as to how willing they'll be to pay for "real" work. If their management can't get this straight, expect that they will also jerk you around with their specifications and last-minute changes.
    • If their code is an unholy mess, you can decline to bid for the followup work, or at least bid at a rate that makes it worth it to you to slog through it. Declining the work in a professional way, like "I think you will be better served by finding someone else to complete the work; can I refer someone to you?" is miles above taking on the work and then quitting or doing a piss-poor job of it.,

    Don't worry about them never hiring you again. If the relationship is going to sour, it's better for both parties to know that up front rather than invest 6 months of time into it.

  74. Whos fault is this really? by WaffleMonster · · Score: 2

    "You create a small new feature, and the app breaks down in unexpected ways. You fix a bug, and new bugs pop up all over the place."

    When an app breaks because you fucked with it does all or even most of the blame for this rest on your predecessors shoulders?

    I've seen this show many times before.. I would say it is a crapshoot as to who (old guy or new guy) was actually incompetent...usually some combination of both. A good simple *proxy* for reasoning about this is does the code handle all possible failure modes it is responsible? If shit just crashes or goes bonkers when it runs out of 'x' then you can normally expect that developer to be careless, lazy and incompetent this will manifest in all other aspects of system quality.

    Otherwise it is very difficult to make any kind of determination without becoming intimately involved with the system. Sometimes you as developer just have to be more careful and suck it up as the problem space itself could be pretty gnarly to begin with and you as a nub may lack certain domain knowledge / experience.

    To summarize if someone comes to me and tells me 'x' is shit and needs to be rewritten you should expect to come fully prepared to back up your claims. Introspection required.

    1. Re:Whos fault is this really? by superwiz · · Score: 1

      When an app breaks because you fucked with it does all or even most of the blame for this rest on your predecessors shoulders?

      Because good code doesn't do that.

      I've seen this show many times before.. I would say it is a crapshoot as to who (old guy or new guy) was actually incompetent...usually some combination of both

      No, if you can't tell, then you are definitely not competent enough to judge good code from bad code. If you think that making code work, is all takes to write the code, then you are definitely incompetent. Getting code to work is by estimates only 30% of the work. The rest is making it maintainable. If you don't know what that 70% should be, you are definitely the problem.

      To summarize if someone comes to me and tells me 'x' is shit and needs to be rewritten you should expect to come fully prepared to back up your claims. Introspection required.

      He did. Adding a feature broke other features. That's a red flag right away.

      --
      Any guest worker system is indistinguishable from indentured servitude.
    2. Re:Whos fault is this really? by waldozer · · Score: 1

      When an app breaks because you fucked with it does all or even most of the blame for this rest on your predecessors shoulders?

      Because good code doesn't do that.

      Actually bad code can do that to good code.

    3. Re:Whos fault is this really? by WaffleMonster · · Score: 1

      Because good code doesn't do that.

      Problem is there is no such thing as "good code". It is only acceptable to measure quality of code in relative levels of suck. Anyone who thinks they write "good code" is delusional.

      It is not possible for you to sit there and make blanket statements of this sort without any knowledge understanding of problem space. Like it or not things are interrelated and if you don't know what your doing your failure to understand dependencies can be the source of problems.

      No, if you can't tell, then you are definitely not competent enough to judge good code from bad code.

      You assume too much.

      He did. Adding a feature broke other features. That's a red flag right away.

      Clueless developer inherits code, changes a utility function used elsewhere to work with one subsystem he is "enhancing" and it does work but clueless developer failed to understand all other places utility function used and his tinkering has now screwed up the other systems where it is used. Is this the previous developers fault too? Blanket statements are worthless. Blanket statements made without any understanding of any context are even more worthless. It simply is not possible to establish fault based on effect alone. Either party can by their (in)actions lead to the same outcomes.

  75. Do this: by Anonymous Coward · · Score: 1

    First things first:
    1. You were hired/engaged/retained because you were expected to be the best available person at your price point (hourly rate). Be sure to give the project your best effort, regardless of *any* other circumstances.

    2. Recognize you may have been hired to be a scapegoat. Give it your best anyway. You might actually make it succeed under adverse circumstances.

    3. Never make it personal. Always talk about the code that needs to be changed, not about the developer who wrote it. This applies to your coworkers and especially your boss. Double this for any future interviews where you're asked about why this project failed. You're an adult and a professional, not a finger-pointing little boy.

    Now do this:
    4. Document everything. This will take longer, but try to be explanatory in your notes (avoid accusation and snarky source code comments too). New feature breaks something? Document it. Fixing a bug introduces new bugs where they shouldn't be? Document it. See number 3.

    5. Don't just document your changes, but also keep a separate diary/journal of any political machinations you may encounter related to the project. Boss seemed kinda shifty when you told him of a major problem? Write it down in your journal with date and time of the conversation and your thoughts. Original developer acted kinda smug or snooty when you asked a question? Jot it down in your journal. It will help keep your thoughts and feelings organized and be useful later when you need to reflect on it (post-mortem write-up, exit interviews, future job interviews, or even building a case against the original developer).

    6. Cover your ass. Send emails to your boss notifying him of any major problems or set backs. If possible, send follow-up "confirmation" emails of conversations or meetings with your boss or other developers, etc so there are no later incidents of "he said X" "no I didn't, I said Y". This is standard project management practice, but a good habit to get into even if you are working alone on this. Send out change logs or summaries once a week to relevant parties (boss, etc). Let people know that you're doing real, honest-to-goodness WORK and that you're getting it done with no excuses.

    7. Speaking of which, don't make excuses. See number 1 above.

    8. If you start doing a good job, the original developer may feel threatened by your success. Ignore it, if possible. Use your journal to document any incidents if the original developer starts causing trouble for you. You may have to deal with some politics...privately documenting issues will help you later.

    9. It may very well be he's too busy with new projects to even care. It may also be that he didn't want to work on your project in the first place, and took a quick and easy route to get the basic features implemented. He may even know what a bad job he did in the first place (early iterations, prototypes, etc are not always the best code) and is happy that someone else gets to take over the project. (you didn't mention too much about him in your question).

    10. Finally, if you feel like the everything is working against you and you have no chance to succeed under the circumstances, take a break. Go for a walk, go to the gym, step out for some ice cream, do anything to take your mind off things for a little bit. Also good: go to a local meetup or user group (remember number 3 above if you tell someone about your project). Refresh yourself and regain your determination to get it done or fail while giving it your best. Then return to Number 1, above.

    -

    I spent two years in Product Management at a company where every project I worked on was doomed to fail (every product "launch" was little more than a press release and a semi-working product because my engineering resources were always reassigned mid-project, but my launch dates were *fixed* around quarterly shareholder calls. I gave each project my best effort and earned respect from my peers within the company. Because I tried to keep to the rules outlined abov

  76. "you don't check out the source code" by Anonymous Coward · · Score: 0

    That's on you.

  77. Two different Clients, Two different Answers by Anonymous Coward · · Score: 0

    Posting AC for obvious reasons!!

    A couple months ago I was working on a project as a sub-to-a-sub. My immediate client was an honest man, so no real worries here. The prime contractor is a cynical multinational corporation that cherry-picks projects for the easy buyoffs.
    Prime blames subs for their failures for as long as they can milk it, then they just walk away from the unfinished zones. Simple math--it'll cost prime $12MM to finish this to buyoff and then they the get paid only $10MM. Walk away; leave it incomplete, and take payment for the parts where they did get buyoff. Their SOP. End customer is a large multinational automotive manufacturer.
    End customer know how the game goes; they get what they can from the prime, then fire them and finish the project in-house or by direct subs. It's easy for the end customer to just not pay the prime; no buyoff; no money.
    Anyhow, prime gets to the end of the easy pickins and they started tossing subs under the bus.
    Honest client sat us down and said "here's the deal...you can go work directly for prime if you want; you won't be poaching my contract--you have my permission. But as for me, my team is getting out." One of the team sniffed at the high hourly rate and almost signed up with the prime. Almost.
    Solution here was to walk away, and when the end customer calls directly (they did), for help finishing it, tell them in no uncertain terms what the prime was up to and we're not interested in that. When you fire the prime call us and we'll help pick up the pieces. On T&M of course.

    Last month, I got a project from a different Client. I've worked for these guys off and on since late 1999.
    Here is a machine; it looks like that other machine. Take the code from that other machine and make it fit this machine. We want it to do the same thing, only fifty times instead of five times.
    Well, the code was a nightmare--no structure, all ad-hoc logic. The example "worked" (that is to say the non-technical manager asserted that it worked), but there was no way to duplicate it a fifty times and change pointers. This particular code was developed in a hurry to get one project out the door quickly and be done. A one-time thing that will never be used again. Which of course means some manager saw it worked once, and now they want to use it again. I know the developer of the supplied sample; he is pretty good at his job. I won't throw him under the bus. It was a T&M job, where the Client gave us NO specification when we signed up (hence the T&M). But they have a schedule to meet, and are not interested in how we explicitly did NOT promise blah blah blah... Just. Make. It. Work.

    Solution there was to ask for help from my colleague. He knows where the Client has some better (more iterable) sample code, and I used that. When presenting the work-product to the Client, I explained how the better sample code was not available at the time the supplied template was developed (It wasn't).

  78. Be professional by trajano · · Score: 1

    Normally the important part is things work on their target environment. So whatever approach you take does not matter as long as things will work.

    If I am thrown into a new project, I start to do a few things if they are not available.

    a) set up git and port the source code to my local git repository. This allows me to work in a version controlled environment that does not require me to show my intermediate work and experiments.
    b) build it and make sure things do work.
    c) create a test harness even if it is just to prove the welcome page works, I can add onto it as time goes by.
    d) set up a coverage report to visually how the test cases flow through the app without stepping through a debugger (if you're lucky your language supports this, most of my projects are Java based so I have these tooling available)

    Provide estimates. Don't say ASAP, always give a proper time, but not optimistic estimate. I tend to pad my estimates otherwise if something goes awry I would be accountable for them. I try to estimate based on a Jr. developer who is thrown into a project multiplied by two. However, if I do finish things sooner I let them know so the plans can change accordingly. If they want things sooner, still be firm and tell them that those are reasonable estimates given your analysis. They can choose to either accept them, try to allocate more resources (ideally) or kick you out (which is better than being burnt out)

    Should your team grow, let other people know how you're doing things, there's no need to document every little thing, but be there to offer. Documenting everything you know will burn you out. As far as documenting things in detail go, I do make detailed install guides to get new developers up and running. However, that document ownership gets passed to the new developer for updates and refinements as things go.

    --
    Archie - CIO-for-hire :-)
    1. Re:Be professional by geekoid · · Score: 1

      "not require me to show my intermediate work and experiments"
      what are you hiding?

      --
      The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
  79. Give the other guy an out by sjames · · Score: 1

    Give the other guy an out. Find whatever excuse you can to claim that requirements for the software have changed in such a way that it needs major 're-factoring' (code for rewrite). Let those who need/want to believe that the other guy is a rock star have that out.

    Then 're-factor' as much as you have to to get it working.

    1. Re:Give the other guy an out by geekoid · · Score: 1

      "'re-factoring' (code for rewrite)"
      No.
      Code rewrite and refactoring are different things. Stop mixing the two. If you don't understand that, please don't touch any code... ever.

      --
      The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
    2. Re:Give the other guy an out by sjames · · Score: 1

      You clearly have no working concept of saving face or little white lies for social purposes.

      I know the difference in definition very well. I also know that it isn't all that uncommon to sugar coat rewrite by calling it a re-factor for political purposes.

      Now, go beat your skull with a brick until some common sense falls in.

    3. Re:Give the other guy an out by Anonymous Coward · · Score: 0

      "Code for rewrite", not "code rewrite", you illiterate oaf.

      Like plump/cuddly (code for fat) when talking about women, or has learning opportunities in comprehension (code for you can't read).

  80. first cry by superwiz · · Score: 1

    Then win. How? Fix 1 feature at a time. They will break other features. That's a given and it is expected. But as you fix em, use it a chance to refactor the code into self-contained well-encapsulated modules. There will be complaints about broken features. Fix em. That's expected. But don't go for quick fixes. Refactor. Refactor at every step until very little of the original code is left. And when everyone is finally sick of the problems in the code, offer to rewrite it. You'll have enough of the well-functioning components at that point that you'll be able to re-write it quickly. Look like a hero at that point. Win.

    --
    Any guest worker system is indistinguishable from indentured servitude.
    1. Re:first cry by Hognoxious · · Score: 1

      Fix 1 feature at a time. They will break other features. That's a given and it is expected.

      Is it? Why would fixing the sales tax calculation subroutine cause the stock update subroutine to treat gallons as square furlongs?

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  81. Application Management and Support 101 by Anonymous Coward · · Score: 0

    Having worked on sundry application management teams (for a well known tech giant) on several poorly documented decades old internal use apps, the single best piece of advice I can offer..... ...don't try isolate yourself to try hide the fact you don't understand your application.

    This is especially true when taking programming or technical business analyst lead for an AMandS team that has high turnover. If you haven't figured out what's going on within a few weeks go to your manager and tell him the documentation is weak and you are working with spaghetti code. Ask him to get everyone on your team in the same room for a few hours (or days if necessary) to discuss the project in order to bring the official documentation up to speed (possibly even a user or two of the app to better grasp business logic).

    It won't answer ever question but between everyone usually the major bits and pieces get aired. Sometimes when you have conflicting narratives of what the app should be doing it also reveals previously unknown bugs and even broken business processes. That time spent upfront will be a lifesaver later on in the project.

  82. This might not be a "death march" by Anonymous Coward · · Score: 0

    You could simply be incompetent. If you're fixing a bug, and a new one pops up, it's possible that you're using the classes/functions/whateverajigs in the wrong way, which means that you don't understand quite how they're supposed to work. I'd suggest, maybe, instead of asking the users of Slashdot who've never seen the code the you're working on before, maybe, oh, ask the dude who wrote it.

    That you chose to first go to slashdot for advice tells me something about your personality. I might be wrong, but I suspect that you feel insecure about your own position, and you feel that direct face to face communication is difficult and confrontational. You think that if you go up to the project creator, Steve (or whoever, I'm just giving him a name to personify him), he'd be taken aback by your argumentative attitude and unprofessional appearance. If you think this, I believe that the odds on this being true are very slim. Here are 2 possibilities on how the conversation could go when you enter his office or cube:

    You: Hi, Steve, I'm Mark, the contractor assigned to updating your Fizawiz application. My first task is to fix an issue that got reported that when you click on 'Fiz' sometimes it doesn't respond with the right 'Wiz'.

    Possible response 1:
    Steve: Oh, that. Yeah, I remember someone said they had trouble with it, and when I first looked into it, I noticed that the 'Fiz' wasn't centered on the UI correctly, so it was actually hitting the 'Fiz' and the 'Fiza' button simultaneously and getting confused. What I was thinking about doing before I got moved to the Fuzabuz project was yada yada yada bling blang bloo.

    Possible response 2:
    Steve: Fizawiz? Oh, that piece of shit again! They should've let me write the way I wanted to, but they insisted that the Fiz do two things at once. Good luck trying to fix that, ha ha!

    If you get response 1, now you've got a better understanding of his app, and some suggestion on what to look for. If you get response 2, increase your billable rate.

    I've got to add, though, that it really sounds like you have some issues with social skills that you need to work through. Again, maybe I'm wrong, and I hope that you can prove me wrong by working through this with the people who best understand the problem, and not by asking opinions of random strangers on a message board on the Internet.

    1. Re:This might not be a "death march" by Hognoxious · · Score: 1

      If you're fixing a bug, and a new one pops up, it's possible that you're using the classes/functions/whateverajigs in the wrong way, which means that you don't understand quite how they're supposed to work.

      It's equally possible that there aren't any classes/functions/whateverajigs. Or there's exactly one.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  83. RECODE by Anonymous Coward · · Score: 0

    They like the idea, but the actual toy is not working? REWRITE IT!

    It's like getting a scan or picture of a word document & people asking if you can edit it. NO I CANNOT EDIT YOUR SCAN, but OCR'ing it or retyping it is pretty much the only solution.

  84. Re:May not feel right, but it's the right thing to by superwiz · · Score: 1

    To be blunt, this smells like you're supposed to be a scapegoat.

    I would definitely agree with that. It's the power v responsibility matrix: power with responsibility = player, power without responsibility = politician, responsibility without power =patsy (or scapegoat).

    Get out.

    You can. Or you can win. But if you win, be prepared to fight a fight afterwards. You'll make enemies of those who were hoping to make you the fall guy. But, then again, if you gonna make enemies who better than them?

    --
    Any guest worker system is indistinguishable from indentured servitude.
  85. Document the code by geekoid · · Score: 1

    give logical reason why it's a POS,and why each issue cause other issues.
    Explain to them the cost.
    Use examples.
    Then they will either ask you to keep on it, or to rewrite it.
    Unless the point blank ask, never mention rewrite. Always let them come to the conclusion to rewrite it.

    Always worked for me.

    --
    The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
  86. short answer by cellocgw · · Score: 1

    Post the code in question to The Daily WTF .

    THEN start looking for a new job.

    --
    https://app.box.com/WitthoftResume Code: https://github.com/cellocgw
  87. Code Coverage of Unit tests? Interface Boundaries? by gov_coder · · Score: 1

    When I was doing maintenance work I would take on P.O.S.s all the time and clean them up. Usually I would find missing / lacking unit tests and set about filling those gaps. This really gets you into understanding how the code works. Then, if I found stuff that was particularly stinky; I'd move it behind and interface and set about improving upon the implementation. This is aided with unit-test coverage tools like Emma (for java), BTW. Having a Jenkins/Hudson or similiar continuous-build/integration tool really helps, too.

    --
    Rob Enderle's excellent new book: Everything I needed to know about Computer Science I learned in Marketing School
  88. Tell the truth by Culture20 · · Score: 1

    Contractors are in a unique position to ignore office politics. The guy who wrote it is respected? Who cares? He and his buddies don't determine your future within the company because you don't have one as a contractor. Assuming you want to retain the contract, explain the situation politely, and maybe privately. Worst case scenario, you work with the guy to fix things. Best case scenario, you start over from scratch and earn extra contracting dough (hopefully you're billing by the hour).

  89. Software metrics, Unit Tests & CI. by Martin+S. · · Score: 1

    1) Audit the code with recognised Metrics Tools. Do this at the beginning and post regularly updates, ideally using a continuous integration environment.
    2) Introduce Unit Tests allow you to learn the project and improve its 'Quality' in a measurable way.
    3) Aggressive source code refactoring using the Unit tests as your safety net.

  90. get out while you can by Anonymous Coward · · Score: 0

    stop being emotional about code and get out while you can.

    you can avoid the black mark if you speak with whoever you're reporting to there and explain exactly what's wrong with the app (provide specifics!) and why you're leaving (there's no way you can meet their needs in the time/budget allotted is a good reason)

    you only look bad if you cut and run with no notice or explanation, if you explain why its a bad situation and why you want out at the very least they'll be more understanding, and at the best they might be so appreciative of the honesty and clarity of the situation that they ask *you* whats needed to fix it and you can re-set their expectations to something more reasonable.

  91. consult developer, hint at exposure? by Anonymous Coward · · Score: 0

    Tell the original coder your problem, and suggest that you'd like to be able to fix it so that you don't have to explain to your higher ups that a bit of incompetent coding was done, complicating your efforts.

  92. Could be.. by viperidaenz · · Score: 1

    That the project is ok and you're just shit at your job.

  93. I'm fixing my albatross by FilmedInNoir · · Score: 1

    From the ground up, a total re-write, IN MY GLORIOUS IMAGE! Ahem, it does run faster and the code is a lot cleaner looking.

    --
    Sig. Sig. Sputnik
  94. Tell people by smutt · · Score: 1

    The worst thing you can do with this information is keep it to yourself. You need to find a way to communicate the state of the code to the right people. Do it in a professional manner, but do it repeatedly.

    --
    The Information Revolution will be fought on the command line.
  95. It's simple. 2 alternatives: by vikingpower · · Score: 1

    1) run, when you still can. Give a reason ( underallocation of resources / time / money is a good reason to quit )

    or:

    2) work like an idiot, save the thing, and reap the rewards.

    Not being able to choose between the two reflects a misplaced mixing-up of justified self-interest, office / company politics and work ethos.

    --
    Religous speak to God. Insane are spoken to by God. When all shut up, one can finally hear Shostakovich in peace
  96. cover your ass by Anonymous Coward · · Score: 0

    I'd make sure to objectively evaluate the current situation in the project and the measures/resources/methods that are necessary to fix it and basically do a feasibility study. Then you can offer to whoever put you on the project to continue it along a course you staked out in the evaluation, a possibly different solution to make it better or the consequences of you continuing as originally requested/scheduled (in case that happened). If they tell you to continue, you have effectively covered your ass.

  97. Test first by Hotawa+Hawk-eye · · Score: 1

    Tell whoever's in charge that you need to add tests before you start making changes to the code, to ensure that any changes you make don't break existing functionality. Ask them if there are any specifications, requirements documents, or plans you can use to decide what tests to write. If they agree, lock down the existing behavior with tests, then use the tests as guidance when you enhance/refactor/rewrite the existing code. Test writing IS development -- it's building a scaffolding around the application you're developing, to ensure that the building doesn't fall when you add another story.

    If they don't agree, ask them to tell you in writing that you should not write tests first and that they accept and take responsibility for the consequences of not adding tests.

  98. Why is everyone assuming the he is competent? by waldozer · · Score: 2

    Why does everyone take his side? He is the one that added a feature and broke it. Sound like he added a feature without discussing with the original developer? When he says "You create a small new feature, and the app breaks down in unexpected ways. You fix a bug, and new bugs pop up all over the place" sounds like he was the person that hacked the code and not the original person.

    1. Re:Why is everyone assuming the he is competent? by X10 · · Score: 1

      Why does everyone take his side?

      The right question here would be "Why does everyone take her side?".

      And you're missing the point. If I didn't think the question (or rather, the replies) wouldn't be useful to everyone here, I wouldn't have posted it. Whether I'm a good programmer or not, there's numerous developers who find themselves in this situation.

      --
      no, I don't have a sig
  99. Take Control of the Situation by DudeFromMars · · Score: 2

    If you do not document your assessment of the code, then all the problems and cost "overruns" are going to be your fault.

    You will be able to "blame the other guy" for the first handful of bugs.
    After a very short period, all the bugs are your fault.

    You have to be nice, but firm in your assessment of the situation.
    Your boss(es) will try very hard to make you accept the project and commit to adding features fast and cheap.
    If you accept that assignment on their terms, you are doomed.
    If they accept your assessment and your terms (rewrite all or part) then you succeed.

  100. Re: Don't show weakness by Anonymous Coward · · Score: 0

    That. Only an a***** would try to delegate the blame.

  101. Re:I know which broken project we are talking abou by Anonymous Coward · · Score: 1

    Amen

  102. Roll code fixes in to your own enhancements by Anonymous Coward · · Score: 0

    If you're really concerned with all the credit going to the original developer, then come up with your own enhancements *AND* bundle them with (unmentioned) code fixes. Then you're the rockstar who thought up all this new cool shiz AND you're fixing his BS code. You won't get anywhere by complaining about it because mgmt will just come back and say "I Don't know why Joe is being so difficult - when Shane was on staff this application just worked."

  103. quit and refuse to even work on it by Anonymous Coward · · Score: 0

    best option in my opinion

  104. Try honesty without blame by Tablizer · · Score: 1

    BeenThereDoneThat. Perhaps you could say something like the following:

    "I'm finding this particular source-code difficult to follow. I don't understand the rhyme or reason behind its design. I estimate it will take me X weeks of careful reading of it to get a grasp on it. If you feel you'd like to get a second opinion or try somebody else who may be better at following this particular code style, please feel free to do so. I won't take offense. My apologies for the difficulty."

  105. Just Fix It by Anonymous Coward · · Score: 0

    Youre a programmer, program. Just fix it. How it got that way, whose fault it is, what-are-they-gonna-think...none of that matters. What matters is youve been given a chunk of code that doesnt work - fix it so that it does, and if that means re-writing it, then so be it.

    You want to get a bad rep in this business? Worry about stupid shit like whose to blame, or complain that its messed up code (Its tooo haaard!). Or even worse, worry about the political ramifications.

  106. Re:I know which broken project we are talking abou by Iconoc · · Score: 1

    and it would be the final nail in the relevance coffin ...

  107. Its real simply to succeed. by 3seas · · Score: 1

    Attache to it a statement "In support of continued software development income, the concept of 'if it works,break it' does not need to be applied" And return the project as complete.

  108. in other words... by roc97007 · · Score: 1

    > You create a small new feature, and the app breaks down in unexpected ways. You fix a bug, and new bugs pop up all over the place.

    In other words, practically any homegrown project you're hired as a contractor to fix. The bad news is you're in for that slimy feeling of traversing and fully understanding someone else's broken code. You're also probably in for some late hours rewriting the problematic parts. (Whether this is good or bad news is a matter of opinion.) The good news is people tend to make the same mistakes the same way, and once you fix this, you probably will get more work fixing this person's other broken code.

    --
    Oliver's law of assumed responsibility: If you're seen fixing it, you will be blamed for breaking it.
  109. Do it and let the original idiot take the credit by dbIII · · Score: 1

    "Do it and let the original idiot take the credit" is the job description. There are no good choices there, so just do the best you can for your own personal pride and the paycheck. Maybe stuff from it can be reused later.

  110. Notes from the trenches.... by erp_consultant · · Score: 2

    Anyone that does programming long enough will find themselves in this situation. The trick is how to get out of it (relatively) unscathed. If you decide you're going to run from it then do it now...not next week...now. If you're going to stick it out then roll up your sleeves and get to it.

    One of the things I discovered in these types of situations is that, often, bad code is the result of bad decisions not bad programmers. So keep that in mind before you start bashing the previous programmer. Do an honest assessment of where the code is now and what it will take to get it right. Document it and bring it to your manager with a plan on how you're going to fix it and how long it will take. If your manager refuses to go along with your estimates then the time to bail is now. You know where the problem lies and if you stick around you will be the scapegoat.

    If, on the other hand, your manager understands the situation and goes along with it then you have won the first battle. Make sure and build in some generous time estimates. After all, you didn't build it so you very well might encounter unforeseen issues along the way. The key thing is that once you have made a commitment to a timeline make sure you can deliver on it. Trust me, management will hold you to it.

    Set some milestones along the way where you can measure progress. If there is any slippage your manager will want to know sooner than later. Sooner means you have time to come up with a contingency plan. Later means you're screwed. Send regular status reports to your manager and other key people on the project. It keeps them in the loop and it covers your ass.

    Conduct some conference room pilots along the way. It gives them a chance to see what you have done and, importantly, it shows progress. As a contractor it is vital that you show progress each and every week. The moment that management senses that you are spinning your wheels your ass is grass and they will bring someone else in.

    One last thing - and I can't stress this enough - document, document, document. Keep all your emails, conversations, memos. If there is a change in scope then get it in writing. If that change is going to impact your timeline then tell them - in writing.

    If you do all that you should be fine. All you can do is your best. Not every project is going to succeed. Work hard, be professional and you'll be ok in the end.

  111. Re:May not feel right, but it's the right thing to by cheesybagel · · Score: 1

    You can. Or you can win. But if you win, be prepared to fight a fight afterwards. You'll make enemies of those who were hoping to make you the fall guy. But, then again, if you gonna make enemies who better than them?

    Had this happen to me once. It was fun when the project manager was reporting to the CTO that my work was not only flawed but that I was unproductive. That was when I threw the repository activity charts over the table. Those showed I had worked *more* than everyone else in the project combined. I followed that by throwing at the table the minutes of the regularly scheduled meetings where he previously had hands on evaluated my work and declared it as good to put into production. Then he got lambasted by the CTO.

    Since the project did not perform fully to his expectation and I wasn't one of his "buddies" on the dev team I was supposed to be the fall guy. Well that enough for me I just quit. I had done all that was contracted in the allotted time. I later learned they replaced me with three people.

    It was like being in kiddie grade man. Don't get in a place like that.

  112. But the premise is a stupid contractor. by tlambert · · Score: 1

    Your decline to take on their project will probably have more positive effect for that company, in the long run, than your attempting to salvage it and shooting your foot off. They'll be forced to either make the existing employee work on it or will be forced to scrap it and ask hard questions of the existing employee in the process.

    But the premise is a stupid contractor.

    Remember from the OP?

    "you don't check out the source code before you accept the assignment"

  113. Communicate by Stolzy · · Score: 1

    In one word. Your boss needs to know what's going on.

  114. But that doesn't feel right by nurb432 · · Score: 1

    "Feel right"? Feelings have no place in this. Cold hard facts are all that should be driving your business.

    --
    ---- Booth was a patriot ----
  115. So you got my old job? by Endloser · · Score: 1

    Good luck, sucker!

  116. Please refer to by Anonymous Coward · · Score: 0

    http://news.slashdot.org/story/14/02/03/223204/healthcaregov-cant-handle-appeals-of-errors

  117. they're all broken by gzuckier · · Score: 1

    Otherwise the other guy would have finished it and they shouldn't be giving it to you.

    --
    Star Trek transporters are just 3d printers.
  118. Prepare to get the other guy's 'salary review' by lpq · · Score: 1

    Had this happen under a Dilbertian boss.. Other guy was a 'pet' of boss, couldn't make his project work. He told boss it was almost done 1-2 weeks of work left that could be finished off by a less senior coder. The bug he was running into took 3-5 days of run-time / crash to find.

    It was multi-threaded/multi-cpu code back in the days BEFORE the Intel Core processor (we used multi-cpu motherboards to allow development of parallelism.

    Problem was he had zero experience with parallel or multithreaded design, whereas I did, so I was perceived as the logical choice to find the last few remaining problems..

    I didn't realize how much of a poser the other guy was -- and was naive when I agreed to finish it (as though I had a choice).

    The project that ended up taking about 2-3 months due to the need to rewrite most of his code He was a new 'senior engineer by pay-grade because he'd been here on an H1B visa and had gotten a permanent residency status. He'd been a "under-the-gun" gung-ho developer while he was under the H1-B, but due this 80-100 hour weeks and desire to have our company sponsor his permanent status (which they did, all at their expense).

    After he got it, he hinted he might leave, so to keep him, he was given a senior position in order to quality him for the benefits and salary range he wanted -- as well as not making him finish the code he had no idea how to do.

    It took me 3 months to finish his work -- with it being fully tested. My first approach had been to optimize the code so that reproducing the bug could be done in a reasonable time. With over a 10X speed up, the bu could be reproduced in 20-30 minutes, max. It was then traced to his code not releasing locks that he'd acquired -- which seemed to work when the code was very slow.

    When my boss wanted to know why I turned 1-2 weeks of work into 3 months, I pointed out the errors. He accused me of shifting blame and finger pointing. I ended up getting the 'review' the other guy should have got next cycle, while he came up smelling like a rose.

    That experience and a few others like it really put me off working with other people -- as they, almost universally got stuck in their code with blame shifted to me. In no case was my code at fault -- but that doesn't stop management from blaming you.

    Leave -- run, and avoid such situations at all costs. You will never come up with a positive result. The best you can do, usually is to minimize damage with copious amounts of evidence and documentation.

  119. Refactor the code by DickMardy · · Score: 1

    Read this: http://martinfowler.com/books/... Then realise that all organisations are sitting on top of mountains of crappy legacy code, and developers that can deal with it are the most genuinely valuable people in the marketplace.

  120. When the project is flawed -- broken by lsatenstein · · Score: 1

    If the original author is present, ask for him to walk you through the code, Ask him to explain how he structured his application.
    Whatever you do, do not criticize the code, but ask him to review your proposed changes to make the product better.

      By so doing, your rewrite or exorcism should get his support. All that if the original author is still available.

    If he is not available, ask a second person to test his code and to advise you where to fix the unfixable. It is important to solve the political (people) problem first. And if there is a clock ticking, because you thought the work could be done with fixed cost/time, and it cant, document why. Be prepared to lose.

    --
    Leslie Satenstein Montreal Quebec Canada