Slashdot Mirror


Ask Slashdot: How To React To Coworker Who Says My Code Is Bad?

A week ago, you read the other side of the same question. Now, an anonymous reader writes "I have been with my company for 10+ years and have seen many development cycles on our projects. We have a developer intern who has not been on the team for very long. On day one he started ripping into my code on how terrible it is. We have a code base of roughly 50,000 lines of code. When he comes to me with a complaint about the code it is simply because he does not have the experience with it to actually understand what the code is doing. He is a smart guy with lots of promise, he is asking good questions, but how do I get him to look past his own self perceived greatness enough to slow down and learn what we are doing and how we have pulled it off?"

114 of 507 comments (clear)

  1. Tell him to write goddamn login page himself? by crazyjj · · Score: 5, Funny

    After all, he's fresh from a CS program where they taught him everything.

    --
    What political party do you join when you don't like Bible-thumpers *or* hippies?
    1. Re:Tell him to write goddamn login page himself? by Anonymous Coward · · Score: 5, Funny

      Code Monkey get up get coffee / Code Monkey go to job / Code monkey have boring meeting, with boring manager Rob / Rob say Code Monkey very diligent / But his output stink / His code not functional or elegant / What do Code Monkey think? / Code Monkey think maybe manager ought to write god damn login page himself....

    2. Re:Tell him to write goddamn login page himself? by cod3r_ · · Score: 5, Informative

      Exactly. Don't hold the guy's hand. Tell him to waste all his time rewriting everything and see what the company does with him.. In the end the boss man doesn't give a shit about how clean the code is.. he give a shit about how fast the code was written and if it does everything it's supposed to and more. New guys gota learn the game too or they will have a hard life in the world of software development.

    3. Re:Tell him to write goddamn login page himself? by Jiro · · Score: 2, Insightful

      The boss is interested in the long term effects of having code that doesn't suck, such as lower maintenance time. If the boss wouldn't care when directly told this, that just shows he has bad management skills.

      In other words, you're basically saying "take advantage of the boss's bad management skills to get the employee fired for doing something that would actually benefit the company".

    4. Re:Tell him to write goddamn login page himself? by Anonymous Coward · · Score: 5, Funny

      Code Monkey not say it out loud. Code Monkey not crazy, just proud

    5. Re:Tell him to write goddamn login page himself? by Anrego · · Score: 5, Insightful

      As programmers its an easy trap to fall into thinking that better code always translates into those dollars and cents management seems so hung up on. Sometimes it does, sometimes it doesn't. Yes, some bad managers are too short term focused, but being able to do the math and figure out if the cost of cleaning up some code is going to be justified in the long run is part of a managers role.

      Telling management you want to re-write everything is a programmers perogative. Accepting it when the manager comes back and says "what we have now works, our customers arn't complaining, the thing is end of life in 2 years, and even if this made future maintenance free it wouldn't be worth it" is a reality.

    6. Re:Tell him to write goddamn login page himself? by Anonymous Coward · · Score: 5, Funny

      Code Monkey regret his lousy placement / Code Monkey recall his mama's basement / Code Monkey's chest still swell with pride / Recalling Natalie Portman statue, naked, petrified.

    7. Re:Tell him to write goddamn login page himself? by Anrego · · Score: 4, Interesting

      Forgot to add, this guy put it way better than me a while ago (yes, I bookmark slashdot comments that are particularily helpful.. it comes in useful surprisingly often):

      http://ask.slashdot.org/comments.pl?sid=1932550&cid=34743614

    8. Re:Tell him to write goddamn login page himself? by cod3r_ · · Score: 2

      Or maybe it would be a great first job for him to put him towards refactoring code. He's just an intern after all.

    9. Re:Tell him to write goddamn login page himself? by marnues · · Score: 3, Insightful

      Given the GP's vitriol, I'm guessing he's one of those self-taught coders who has to deal with someone telling him his code is poor. My experience shows that self-taught coders do write a lot more code, but tend to write it without understanding how it's less maintainable. Us college learners try to write less code that does more, but often end up in the design phase longer than necessary.

    10. Re:Tell him to write goddamn login page himself? by Nemesisghost · · Score: 5, Insightful

      This is what a lot of idealistic programmers who are just out of school fail to realize. We should be able to remember that all the code we wrote in college had to be perfect, without any flaws. At the same time, most of these programs were fairly small(

      Another problem arises when you have an older developer who is forced to learn new tech where the best practices are drastically different from those he/she is familiar with. For example, if all you've ever done is procedural code(which is what most of my college classes did), and you are tossed into a situation where most of your coding is layered event driven the best practices between the two are so different that you are bound to make mistakes. What I've then see happen in situations like this is that a new developer comes along & sees where there are places that the best practices aren't being followed 100% of the time, and therefore assumes all the code must be crap. Instead, what should happen is the new developer should look at why something was done the way it was & work with the responsible party(not necessarily the original developer) and see if there's a good reason to "fix" the bad code.

      Currently I work with a great set of managers. They understand the cost of any project and are very good at prioritizing "fixes". They know that some of the early development doesn't work with the things we are now trying to do, and are will to let us go back & fix things. But they also know that we don't have the resources to fix everything, even things that might reduce the errors & crashes. I have a fellow developer that not fixing everything drives him crazy, and that was one of his first lessons. Nothing's perfect, nothing will be, and our job is do the best we can & worry about the problems only when we are told to.

    11. Re:Tell him to write goddamn login page himself? by shadowofwind · · Score: 2

      So where are all these bosses with "good management skills"? I haven't seen it since the early 90's. The long term effects of code that doesn't suck do not seem relevant to any manager's career goals, apparently.

    12. Re:Tell him to write goddamn login page himself? by Synerg1y · · Score: 4, Insightful

      Anybody who says tell the 1st year intern to rewrite the app cause he doesn't understand better... is pretty much a moron. That's not how you learn, and it's a huge waste of company resources, a lot of coders come out of college over-zealous and thinking they know best... it's the college mentality, you're invincible and on top of the world, doesn't mean you should set them up for failure, esp. w a decade in the biz. What we have is a poor approach and a conflict of interest, OP of ta is probably a dinosaur (10+ years at a company is not the industry trend) who just wants to go home at 5 and not do a single thing not asked of him... which is fine, and a college student who wants to learn anything and everything and probably hasn't been shown much of the humbling QC experience.

      I've had my code criticized before by people who I knew were in a lower league, and all I did was explain it to them proper and I consistently get back "oh, ok" and it's dropped, every once in a great while I may learn a minor thing or two even.

    13. Re:Tell him to write goddamn login page himself? by n7ytd · · Score: 5, Insightful

      The boss is interested in the long term effects of having code that doesn't suck, such as lower maintenance time. If the boss wouldn't care when directly told this, that just shows he has bad management skills.

      Rewriting is very often the last thing to do with working code. IChucking out working code and reproducing it usually involves relearning all of the reasons those last guys did it that horrible way.

    14. Re:Tell him to write goddamn login page himself? by benjfowler · · Score: 3, Informative

      Best Slashdot comment ever.

    15. Re:Tell him to write goddamn login page himself? by Junta · · Score: 2

      The rub being that in many of these circumstances, it's one developer's word against anothers in terms of what's more 'maintainable'. In one corner you have a software developer who is a veteran for your company, in another a likely recent college grad still brimming with less-than-practical ideals intact still yet.

      If you have a long term codebase that has been managed by people that have come and gone, no rewrite or refactoring should be embarked upon lightly. If the codebase isn't subjecting the business to constant churn and frustration, then no matter how ugly it looks, you don't touch it. Making the case that 'maintenance is expensive on code like what I see' rings hollow when the manager has tracked and knows that his developers haven't been devoting a lot of time to 'maintenance' at all. Just because code is ugly doesn't mean it is not doing the job correctly.

      On the other hand, if the codebase is truly a hopeless mess that does have high maintenance cost, then management certainly already feels it. The two parties should be able to recognize the climate and realize which side is in the wrong from a business standpoint. However even here, there is a whole lot of inertia. Even if complete crap that fails a lot and behaves sluggishly and inconsistently, frequently these projects are considered 'sacred cows'. Nothing short of a new project to replace the old would save some of them, and managers recoil in horror at that concept.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    16. Re:Tell him to write goddamn login page himself? by hey! · · Score: 2

      That was my thought. You'd be doing him a favor. He's an intern and that means he's there to learn. That'd teach him an important lesson to take into his professional life.

      I feel a development team has to constantly stretch. Somebody who comes in and challenges you to do better is in itself a good thing. But most coding these days is a collaborative effort and there's no place for prima donna behavior or theatrics. Those things are unprofessional, and wages of unprofessional behavior are dismissal.

      This is what the whole agile movement was about -- working together to continually improve code without chest thumping, egotistical posturing and the disruption that comes with it. In the real world you seldom have time to make something as good as you wanted to make it -- at least all in one go. You get the job done for the customer, then as you maintain the code you constantly improve it by refactoring, using the whole spectrum of agile tools like source control and unit testing to provide a safety net.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    17. Re:Tell him to write goddamn login page himself? by AlphaWolf_HK · · Score: 4, Insightful

      There's also the matter of rewriting things introducing new bugs and getting the "so what good did it do to rewrite it when the new code doesn't work?" element. Worse is when the new bug is difficult to reproduce or troubleshoot.

      Sometimes it is just best to let sleeping dogs lie, and do something better with the next product.

      --
      Careful with names containing L slashdot.org/~AiphaWolf_HK slashdot.org/~AlphaWoif_HK slashdot.org/~AiphaWoif_HK
    18. Re:Tell him to write goddamn login page himself? by StormUP · · Score: 2

      There are very few good programmers out there. I suspect there is a high likelihood that if you have hired one of the few as your intern that the code he is looking at is in fact bad. I've seen much more bad code than good code in my career. 50,000 lines is pretty small. If it really is bad, it shouldn't take long to fix so why not let him have a stab at it? He's an intern, part of what he's supposed to be doing is learning things. Something that size should be fixable in a month if the things surrounding it are any good whatsoever and they don't have to be thrown out as well. The last code I worked on that size that I claimed was bad and many longterm employees of the company where I worked at the time insisted was great ended up being about 1/3 of the original size at the end with significantly fewer bugs, additional new features, and had lower maintenance costs over the remainder of the years I worked there. Total investment...About 50% of my time for a month. If the intern achieves the same type of results, great, you've found a stellar programmer you should hire full time. If not, your intern wasted some time and you throw away what he produced and get a new intern.

  2. Old problem by Anonymous Coward · · Score: 5, Insightful

    This is an ancient problem, with 10 years experience I'm amazed you haven't run into this constantly throughout your entire career. New guys (even old guys) perceive everything they didn't write as shit.

    How you deal with it is dependent on a lot of things.

    First: is he right? Maybe your code does suck. Hell maybe you suck! At minimum. code that has been around for a while, has been written by multiple people over a long period of time, been adjusted and re-worked to meet changing requirements, and been done under a deadline usually does suck at least a little. Admitting this is hard.

    New guys want to re-write everything and don't understand the value of code maturity... most of the time a re-write isn't practical, and even the shittiest code usually attains remarkable stability by virtue of having all the bugs pounded out through years of use. Reminding him that this isn't a university project and a certain level of ugliness should be expected might help.

    If you don't think he's right, learn how to properly describe why you do things the way you did, and conversely expect him to explain why they are wrong. This is the biggest thing to learn when doing code reviews, and applies here. If you can't objectively describe what is wrong using with references to either standard or internal best practices or conventions, arguing code ugliness just becomes subjective. If you want to defend your code, learn how to describe how it doesn't suck.

    Having some company guidelines will really help, because it gives you something to point at in defending a decision. Ultimately what one guy considers good code may be considered bad by another. You are always going to have cases where someone thinks your code is too abstract, or not abstract enough, or sacrifices too much performance for maintainability, or too much maintainability for performance. At least with standards, the new devs will rail against the standards rather than personally attack you, and a standards document is a lot easier to defend (and yet still allows good changes without too much politics of hurt feelings).

    1. Re:Old problem by N0Man74 · · Score: 5, Insightful

      Good answer.

      Your keyword "deadline" didn't really get the emphasis it deserved. I know that I've been guilty of writing some pretty shitty code (and fully realizing it) because I simply did not have the luxury of the time to "do it right".

      Sometimes this is because I made a bad assumption early on. Sometimes there was a surprise change in the specs that didn't mesh well with the design. At times, it is because I'm working in unfamiliar territory and still learning about some aspect of the project. Sometimes it is because I am working with existing bad code someone else wrote (possibly because of one or more of the same previously given reasons), and I have to do my best to work within an existing bad implementation.

      In the real world, sometimes you have to make the choice of doing things right, or actually getting them done.

    2. Re:Old problem by LordNimon · · Score: 4, Insightful

      New guys want to re-write everything and don't understand the value of code maturity

      I've been working in this industry for 20 years, and I've never experienced this. Instead, the "new guy" is intimidated by me because I'm constantly explaining things to him, and he quickly realizes that he doesn't know anything.

      --
      And the men who hold high places must be the ones who start
      To mold a new reality... closer to the heart
    3. Re:Old problem by gatesstillborg · · Score: 5, Interesting

      I disagree with this "perceiving everything they didn't write as shit" stance.

      I came into a new position, my first serious one (when I was in my forties, second career field, after a couple years of good community college studies). I have experienced in depth 3-6 (3 thorough exposure, 3 partial/peripheral exposure) different, substantial code bases. Two of them where horrendous ("devil spawn"), one was not exactly a work of art, but manageable, managing considerable (reporting and logging) complexity, and the other 3 were solid to the point of being elegant, and naturally readable. And mind you, this was my first serious in depth exposure, across a variety of development platforms, including both proprietary and open source.

      "Man is the measure of all things." -Protagoras

    4. Re:Old problem by fermion · · Score: 2
      This is good. I was in a situation with some legacy code a while back. It was crap because of the changes that had been made over time. This was when I had about 15 years of code experience, about 5 of it in a formal team situation. I sat down for a few weeks, tore out old stuff, reworked the stuff that was left, and came up with a new product. What I forgot to mention was that it fixed many complex and long standing bugs.

      So this the first thing I would add. It the problem with code that it is not pretty, or that it does not work. If the code is not pretty, suck it up. The world revolves around no individual person and narcism has not place at work. If the there is outstanding bugs that can be solved, then have this person work on that.

      But really without knowing language, application, style, funding, there is really no way to answer this question. If the code works, and is accesible to a experienced programmer, then it is good. If the code meets the standards set by the team, then it is good. Even if the new person is technically right it does not matter. What matter is if a person is willing to do the job under the prevailing conditions. In all cases where that is not the case, it is better to find someone who is.

      --
      "She's a scientist and a lesbian. She's not going to let it slide." Orphan Black
    5. Re:Old problem by cod3r_ · · Score: 2

      I feel like many do this. Which gave birth to all the development styles like XP or whatever the flavor of the office is. Get something functional down, get the unit tests done, get small pieces to QA as quickly as possible, refactor the code. Lots of companies skip lots of steps. I've been at one that skipped the QA step all together let alone the refactor part. Refactoring was a "when we stop being busy" type of job. Also a good one to let the new interns take a stab at in an alternate tree.

    6. Re:Old problem by jhol13 · · Score: 2

      Shittiest code does not attain stability because "all the bugs" have been removed. More often it attains stability because it cannot be changed, the odd undocumented bug-like "feature" can be the expected behaviour by some client which you really cannot change ('cause you'd end up in an avalanche).

      Then what I have noticed is that new code is usually bad: when you implement something, integrate and test you'll usually notice how to do it better. But then it might be too late to rewrite it.

      Old coding practices (from 80s or even 90s) are almost universally bad, even if nobody admits it. Back then the memory footprint etc. had hugely bigger effect than they have now. Today usually code which helps finding bugs (tracing, syslog, ...) is much more important than code which has optimal performance.

      I fully agree that you must be able to explain why your code supposedly does not suck and learn when he says why it does. Do not personal, it just a bunch of characters, after all!

      Company guidelines ... well, if they are really good they may help, but I doubt that very much.

    7. Re:Old problem by Anonymous Coward · · Score: 3, Insightful

      The fact that you explain things means you understand what you're doing. A lot of people who can't explain things don't really know what they're doing so they get defensive anytime anyone questions them.

    8. Re:Old problem by beelsebob · · Score: 3

      Regardless of right or wrong the other thing to expect is that sometimes the other guy will be able to better argue their position than you can defend yours.
      In that case you may find yourself "made redundant" by an ass hat.
      If that's the case chalk it up to experience and find a better place to work.

      Alternatively, if they have arguments that you can't answer, realise that you were in fact in the wrong, and fix your code. This applies to newbies, and old hats alike, you should be listening to other people's arguments and figuring out if they're actually right or not (based on whether you can actually find an answer for why they're wrong).

    9. Re:Old problem by Zero__Kelvin · · Score: 3, Insightful

      You sir, and people like you, are the reason why the software industry is comprised of mostly incompetents these days. If there isn't time to do it right, there isn't time to do it at all, and it was your job to make that clear to management. The industry is flooded with people who don't have time to do it right, but do it anyway, and wind up with Garbage. This is the reason why the Linux Kernel is far superior to Windows. In Linux kernel development, there is always time to do it right, because Linus knows what a moronic thing it is to do it any other way, and understands what a clusterfuck it would be if they started just hacking things together to get them "out the door."

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    10. Re:Old problem by DragonWriter · · Score: 3, Insightful

      In the real world, sometimes you have to make the choice of doing things right, or actually getting them done.

      In my experience, in the real world, the invocation of this phrase is usually used as justification for doing things in a manner that is so bad that what is actually done doesn't actually qualify in any meaningful way as doing the thing that was supposed to be done at all, although it often has enough of the superficial appearance of doing so that the people involved might reasonably hope that they will be out of the radius of accountability when it is realized that what was supposed to be done wasn't done.

      So when I hear it, I mentally translate it into "in the real world, sometimes you have the choice between admitting that things can't be done as requested with the resources alotted and pretending that they can and hoping not to be held accountable when the failure is revealed."

    11. Re:Old problem by japhmi · · Score: 2

      First: is he right? Maybe your code does suck.

      I'm thinking of a case I've been in. The code didn't necessary suck, but it was almost completely uncommented. Maybe Mr. "I have 10 years of experience!" should go back and comment his code so the new guys can understand what's going on.

      --
      "Giving money and power to government is like giving whiskey and car keys to teenage boys" P. J. O'Rourke
    12. Re:Old problem by Catskul · · Score: 4, Insightful

      While a virtual disregard for a deadline is a big part of the reason that Linux kernel is as good as it is, that does not mean that quality first is the only way to go, and even the Linux kernel has plenty warts that were compromises. A kernel requires a level of perfection that very few other types of software require. There is a vast range between that and, for example, a convenience shell script.

      It's mature developers who both, know how to create high quality software, and also recognize the value of trading perfection for many other goals at the right time who are the most valuable. And Linus Torvalds is one of them. RMS probably is not.

      I, and I'm sure many other highly skilled developers, find your assertion, that anyone who compromises quality as incompetent, insulting but more importantly, wrong.

      --

      Im not here now... Im out KILLING pepperoni
    13. Re:Old problem by celtic_hackr · · Score: 3, Interesting

      Actually the Space Shuttle Challenger was a design choice to save on the cost of shipping the tanks to Florida. The alternate one piece design didn't fit through one specific tunnel along the railroad from the plant to Florida, and would have required overland transit. It was well known within the industry. The other tank design was nearly identical to the design used by Russia. I was in an aerospace engineering class when this happened, and we studied the problem. I'm positive my professor already knew the answer, he was part of NASA's team.

    14. Re:Old problem by Zero__Kelvin · · Score: 3, Insightful

      "I, and I'm sure many other highly skilled developers, find your assertion, that anyone who compromises quality as incompetent, insulting but more importantly, wrong."

      Most likely you don't understand the term quality. Might I recommend that you read Zen and the Art of Motorcycle Maintanence, or re-read it if you have already done so? Any developer who sacrifices quality is incompetent by definition; that holds doubly true for those who know they are doing it and do so anyway. .

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
  3. Very simply by houbou · · Score: 5, Insightful

    Critique is only as good as the suggestions for improvement. So, that's your answer. I feel that if someone has issues with my code, then show me better and prove me it is better. In the end, clarity, code reuse, design patterns, performance, all of these things come to play.

    1. Re:Very simply by Anonymous Coward · · Score: 4, Insightful

      It boils down to two questions:

      1) Does it work?
      2) Will I ever touch it again?

      If yes to the first question and no to the second, quality doesn't matter.

    2. Re:Very simply by Ravaldy · · Score: 4, Insightful

      You can never answer #2 with 100% confidence and if you are a seasoned coder, coding it properly won't be harder than hacking it together.

    3. Re:Very simply by AwesomeMcgee · · Score: 3

      You're comment about seasoned programmers ignores the countless engineers who spent 10 years in industry only aware of the first rule. The poor sad sods.

    4. Re:Very simply by terec · · Score: 2

      If the probability is 10% that you will touch it again and you invest 100h on rewriting it, then, on average, you wasted 90h of programming time for no good reason. As long as the APIs are reasonable, there is no benefit to cleaning up code preemptively.

      Code needs to be cleaned up or rewritten only if it causes actual problems, and the person to do it is the person who actually needs it cleaned up.

      (There are some exceptions to this rule of thumb, like when people leaving the company are involved or when the code isn't merely messy but truly obscure, but that goes beyond merely "bad code".)

  4. Is he right? by AdamStarks · · Score: 5, Insightful

    Take a step back and seriously consider his criticism, as if he were one of your 10+ year coworkers. Whether or not he's right informs the right reaction.

    1. Re:Is he right? by Anonymous Coward · · Score: 5, Funny

      Maybe, but we know that he posts to Slashdot as well.

    2. Re:Is he right? by flatt · · Score: 5, Funny

      Whether he is right or not is immaterial. Now is the time to assert your dominance. Sucker punch him and urinate on him while he's down to put him back in check.

    3. Re:Is he right? by AK+Marc · · Score: 3, Insightful

      I've never seen anyone right on this issue (the ones that are actually right quit and go someplace else, solving the issue, after all, would you want to work somewhere where all your coworkers were wrong all the time? I worked there once, and I quit and got a much better job elsewhere). It always boils down to "I would have solved this differently, so your way is wrong.

      It's a geek problem. There's often more than one right answer. You can't always get a single correct answer for every question. And that confuses and frustrates people new to some areas where it's true.

    4. Re:Is he right? by Anonymous Coward · · Score: 5, Funny

      This works and it's a good fundamental method, but it's not extremely efficient.

      I typically like to hire them in a groups. Initially, lay quiet and see who is the more uppity of the bunch. Let him have his moment in front of the new kids and really start to build an alpha status for himself.

      Shortly there after you really want to just casually stroll up to the fresh example and just stab him in the kidneys a few times. This will deal with the problem candidate and build your reputation as someone who gets things done. In fact, it is unlikely anyone will question your authority for some time.

    5. Re:Is he right? by rahvin112 · · Score: 4, Funny

      We are primates, the proper response is to throw poop at him.

    6. Re:Is he right? by dubbreak · · Score: 4, Informative

      Absolutely. Experience (as in year doing software) doesn't mean shit. I had a co-op student under me (who I hired when I started my own company) that could code circles around everyone at the company. He understood software, something some developers just never get. I'm not a bad developer by any means (people jump into my code, understand, modify etc no problem), but he'd usually come up with something more elegant and cleaner. It was give and take as I'd come up with some good suggestions for improvement or ways to solve a problems he hadn't considered (which was partially due to experience, partially due to having a different perspective).

      First step is to understand that young or old, lot's of experience or little, a person can have valuable contributions. For a good team you have to put ego aside. Sounds like there is ego on both sides of the equation in this particular issue. Listen carefully to what he thinks is wrong and he should listen back about the design decisions etc.

      My experience tends to make me think that there are serious issues with the codebase. Depending on language, 50K lines isn't much and could be rewritten by a couple smart people in a matter of months. Obviously the product works, but how long are bug fix turnarounds? How extensible is it? How quickly can you add new features? Do new features ever break other parts of the code (i.e. coupling issues)? You can be proud of what you achieved, but also be honest. I've written some code myself I wasn't proud of (I'm sure we all have). A good developer isn't the same coder as they were 6 months ago, because it's a continual learning process.

      If this jr has valid input, good ideas for restructuring (once you look at your code honestly, "Yeah, there was a better way to solve the issue..") then why not let him lead the dev for the next gen product? If you are honest about the code and he's just an egotistical little shit not willing to discuss things like an adult (some back and forth and actually listen to you and others).. get rid of him. Seriously. It's not going to help your team at all and he's going to cause problems anywhere he goes. If he's right and you're all wrong, then he's better off elsewhere anyhow (though if he's bullheaded and egotistical I doubt that's the case).

      --
      "If you are going through hell, keep going." - Winston Churchill
    7. Re:Is he right? by Jeng · · Score: 2

      You just made me consider something I have never thought about before.

      Do wild monkeys throw poo?

      I would think that the ones in zoos throw poo because they can't actually get close enough to rub it in your face and then bite your face off.

      --
      Don't know something? Look it up. Still don't know? Then ask.
    8. Re:Is he right? by Darinbob · · Score: 2

      Then ask what the junior programmer's job really is. Is his job to critique all the other code, or is his job to get a particular set of bugs fixed and features implemented?

      One of the harder things to learn is how to give up idealism and replace with pragmatism. Ie, you have deadlines which means you get the code done even if it's not perfect; you code the feature that the customer wants even if you think the customer is wrong; you eventually start fighting the boss and do what you're told; etc.

  5. Fire him by Anonymous Coward · · Score: 4, Funny

    Firing him might be the best lesson he ever learns...

  6. You Are Not Your Code by Anonymous Coward · · Score: 5, Informative

    You Are Not Your Code: http://sstephenson.us/posts/you-are-not-your-code

  7. Looks like that other guy figured out how by Anonymous Coward · · Score: 4, Funny
  8. Mod this up! by ganjadude · · Score: 5, Insightful

    Might as well close the forum down, this is gonna be the best answer concerning this issue. if only I had mod points

    --
    have you seen my sig? there are many others like it but none that are the same
    1. Re:Mod this up! by Anonymous Coward · · Score: 2, Funny

      Mod points are rare these days.

    2. Re:Mod this up! by del_diablo · · Score: 5, Informative

      No. You only say that until you are almost permanently awarded with mod points.

  9. Become Jonathan Coulton v2.0 ? by Qubit · · Score: 2

    < insert witty song about geeky stuff here >

    --

    coding is life /* the rest is */
  10. 4 o' clock by Anonymous Coward · · Score: 4, Funny

    outside, at the gate.

  11. bad code offsets by themusicgod1 · · Score: 3, Interesting

    And ask him what you can do to improve yourself? Do so in a way that gives him work to do in correcting you. But either way...offer to buy bad code offsets

    You can always learn, and the world can always stand to benefit from more people offsetting their Bad Code.

    --
    GENERATION 26: The first time you see this, copy it into your sig on any forum and add 1 to the generation.
  12. Re:What to do by Desler · · Score: 2

    And then reality strikes when management says "NO" to these suggestions.

  13. Do you always let interns tell you what to think? by jeffmeden · · Score: 4, Insightful

    And a follow up question: do you have any internship openings?

    Seriously, if he was hired as an intern I take it he has little/no real experience, and may not have even finished his formal education. He thinks your code is bad because it doesn't look like the code of whatever professor he most admired in school, or it violates some rule of some particular coding sect that he subscribes to. Tell him to write his objections down in a safe place, and come back to them after a year of working "for Real" and you will gladly sit down and listen to what he has to say then.

  14. It depends on how he goes about it. by ByOhTek · · Score: 4, Insightful

    I would be as blunt, harsh and straightforward back to him, as he is was me, were I in your shoes. I might add a few nails to the coffin of the argument.

    Him: "Your code sucks."
    Me: "Back it up. What suck why."
    Him: *explanation*
    Me: "Well, I can understand you not realizing X, Y, and Z, being new and ignorant, but give it a few years."

    Him: "Why'd do you do [pattern X, Y, Z]? Isn't it better to do [pattern A, B, C]?"
    Me: "In certain circumstances, sure, but in [insert current circumstances and logic for X, Y, Z], this methodology works better."

    Put him in his place if he needs it, otherwise, just educate. Also, listen - just because he's less experienced than you doesn't mean he hasn't picked up something useful. I know a lot of people who think they don't have anything to learn from the new guy, when the new guy had a few tricks up his sleeve. I've been one of those people who's learned from the new guy he didn't suspect. I've also been the new guy with unsuspected tricks.

    --
    Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
    1. Re:It depends on how he goes about it. by ByOhTek · · Score: 2, Informative

      You should also try to avoid my typos and grammatical errors. Those will not help your case.

      --
      Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
    2. Re:It depends on how he goes about it. by caywen · · Score: 2

      Templated examples. I like it, we should do more template meta posting.

    3. Re:It depends on how he goes about it. by LordLimecat · · Score: 2

      I definitely try not to make typos when having a verbal conversation. You're right-- it does help.

    4. Re:It depends on how he goes about it. by neurovish · · Score: 2

      I think the "what suck why" phrasing goes an extra step into emphasizing the dismissive attitude. His objections are so far beneath you that he does not even deserve the time it takes to create a properly formatted sentence with all of those useless articles.

  15. I thought... by SternisheFan · · Score: 4, Funny
    I thought if you were supposed to call in sick if you had a bad code. :-)

    *ducks*

    1. Re:I thought... by Anonymous Coward · · Score: 3, Funny

      I thought if you were supposed to call in sick if you had a bad code. :-)

      *ducks*

      I got debug bad.

  16. Is Your Code Designed to Build Walls or Bridges? by VoidEngineer · · Score: 5, Insightful

    Recently went through this myself. Despite having used a kanban board, used version control, commented code, written unit tests, etc, some junior devs thought the code sucked. My takeaway was that there were still too many barriers to entry. Too many passwords, not enough installation instructions, etc.

    Somewhere in the process of learning to write production ready code, it occurred to me that it was necessary to work the process backwards. Begin a project by setting up your hosting or distribution environment before starting to code. Write unit tests before starting to code. And so forth.

    Getting other people to contribute to your project requires the same kind of thinking. Set up a project page before you start to code. Write a vision statement before you start to code. Write installation instructions, coding style guidelines, and operations support instructions before you start to code. That way, as you proceed in the project, you have clearly build up the documentation that other people are going to need to join your project. These things shouldn't be started after the fact.

    If you can't point a new dev to a website and say 'download the source and instructions' here, it's probably too complicated and will meet resistance.

  17. A good opportunity by Anonymous Coward · · Score: 5, Interesting

    From your description, the guy isn't mean spirited. He's likely never had to deal with multiple revision code bases before.

    On the other hand, if this is code that has been through multiple revisions and re-purposes, admit to yourself -- it probably is bad. I'm the lead engineer and dir. engineering at a company I've been at for 10+ years, and I'll be the first to tell you that the code-base I am most proud of (30-50k lines of embedded/DSP code, mostly mine) is TERRIBLE! I wouldn't wish that code-base on my worst enemy. But its also been bread and butter for the company for the last decade and is stretched to its limit.

    We've had at least two hotshots come onto the project in that time who have been terrified seeing that code-base and declaimed it as schizophrenic at best, and they are right. It is bad code, poor coding practices, and everything else bread out of necessity to keep the project(s) going and alive.

    Your mission -- accept that whatever reasons are out there for the code being the way that it is, it probably is poorly structured and could use a rewrite. SO - this is a good chance for him to learn that not every bit of code that should be rewritten can be. Its called business reasons and experience. Whatever the reasons, you probably, as a company, don't have the time or resources to rewrite from scratch (we surely don't!), but a fresh out of school developer probably has not experienced these -non-engineering- reasons for bad code, and certainly was not there for the blood, sweat, and tears that went into them. He won't know about those all nighters that "saved the company" that you and the rest of the team probably went through en-route to this codebase.

  18. Don't be a dick by uepuejq · · Score: 4, Insightful

    Ask him how he would do it, and be genuinely interested in his response. Maybe he just wants to beat his chest a little, and maybe he'll even say something useful.

  19. How's your documentation? by dbc · · Score: 5, Insightful

    I'm sure if he re-reads your internal design specifications, coding standards, and comments in the code he will understand your design.

    1. Re:How's your documentation? by Jawnn · · Score: 4, Funny

      I'm sure if he re-reads your internal design specifications, coding standards, and comments in the code he will understand your design.

      What's the giant whooshing sound? It's as if thousands of blissfully ignorant "senior" coders suddenly missed your sarcasm, all at once. Well done, sir.

  20. Re:Do you always let interns tell you what to thin by ByOhTek · · Score: 4, Insightful

    It's also possible the younger coder learned a trick developed since the older coder got his skills fairly solidified, and the older coder never saw, or came up with in his own experiences.

    Just because the new guy is disagreeing and less experienced, doesn't make him wrong. Yes, 9 times out of 10, the new, less experienced guy will be wrong, but that 1 time out of 10, makes it worth giving the other 9 times a fair hearing as well.

    --
    Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
  21. Those who are not satisfied with others . . . by PolygamousRanchKid+ · · Score: 4, Interesting

    . . . are really just not satisfied with themselves.

    Give him a copy of "The Psychology of Computer Programming", and tell him to read the bit about egoless programming . . .

    --
    Schroedinger's Brexit: The UK is both in and out of the EU at the same time!
    1. Re:Those who are not satisfied with others . . . by gstoddart · · Score: 5, Informative

      Give him a copy of "The Psychology of Computer Programming", and tell him to read the bit about egoless programming . . .

      This, a thousand times this -- but remember, it works both ways.

      The professor I worked with closely in university was a strong proponent of this. Sit down, go over the code, look at what can be made better and why, and what may need to stay crufty because it's arcane, and if someone doesn't understand something that's an excellent time to explain it. Walk through and review everything, and don't let your vanity get in the way of writing better code.

      He called it egoless programming back in the 90's (no idea how old your book is), and I've found it extremely handy -- objectively look at your stuff and see if he's right. If he's wrong, explain it to him. In the end, the better solution should win out (unless someone is being stubborn or the 'better' solution is technically feasible, which does happen).

      Get over the whole "I'm a code guru who knows everything", and be prepared to explain, justify, or even accept that you're wrong. In the end, you review your code to make sure it is as good as you can make it (within reason) and your junior guys get up to speed and understand things better. You get better code out of it, your junior guys get up to speed faster, and you might even learn something along the way.

      It's still how I work with co-workers, and it helps in a lot of ways -- instead of saying "here's the solution", you start with "here's a solution, what have I missed?"

      You won't agree about everything, but you can pick your battles and try to reach quorum -- the cats don't need to be herded when they're on-board in the first place.

      I've seen really awful, and really good ideas from junior coders -- part of the process is helping them understand which is which. In a year or so when he's got more real experience, and knows he can have the discussion, both you and he might actually be better coders for it.

      --
      Lost at C:>. Found at C.
  22. Put him in your shoes by kvnslash · · Score: 2

    Sounds like he wants to be a big boy. Put him in your shoes with an incredibly challenging and time-sensitive project (real or fake). Then start changing the project requirements every week/day at random. In my experience this is how shitty code gets made (other obvious way is person is inexperienced).. If his code works and looks great and is bug free, maybe you'll learn something, if not, maybe he will..

  23. Re:timothy is apparently easily trolled by gigne · · Score: 5, Funny

    yep.

    What next? "I am some code. How do I tell my new maintainers they suck?"

    --
    Signature v3.0, now with 42% less memory usage.
  24. Different philosophies by scorp1us · · Score: 2

    Well I am back at the place where I was 10 years ago. I thought the code was great then, I think it is shit now.

    But what I've learned in the intervening time, and having been a software development manager myself, is that code is optimized on a few axis:
    - Brevity (get er done!)
    - Clarity (I'll be able to read this again in 5 years and understand it)
    - Structure (Object models)
    - Formatting
    - Efficiency

    All of them factor into a meta category, which I call "Maintainability", where you want high clarity and structure. Maintainability is by far the most important aspect to an organization. Your n00b developer won't have your company's maintainability desire in mind. Efficiency is the dead last because increased computing power is cheaper than the development time to make it efficient, save some scenarios.

    So my recommendation is to have him rate his code on those axis and your code on those axis. Hopefully he'll learn there's more than one way to code. It is very likely he's just out of school and his head is filled with registers and asymptotic running times. Those are important, but not as important as shipping maintainable code on time.

    --
    Slashdot's rate-of-post filter: Preventing you from posting too many great ideas at once.
    1. Re:Different philosophies by PRMan · · Score: 5, Insightful

      I've said this at several workplaces:

      What the Business values:
      1. Correctness
      2. Reliability
      3. Maintainability
      4. Speed
      5. Coolness

      What the Developer values:
      1. Coolness
      2. Speed
      3. Correctness
      4. Maintainability
      5. Reliability

      Don't believe me? Look at practically ANY open source project. Most are unreliable and impossible to contribute to. They are often incorrect, but they are usually fast and the programmer always thinks what he's doing is mega-cool.

      Developers need to adjust their mindset to be valuable to the business, but sadly most business code looks more like the second list than the first.

      --
      Peter predicted that you would "deliberately forget" creation 2000 years ago...
  25. Re:Is Your Code Designed to Build Walls or Bridges by phantomfive · · Score: 3, Interesting

    Yeap. If you have 50,000 lines of code, and it isn't clear how to enter it and begin to understand it, then the code sucks. It might be good in other ways, but in at least one crucial way it's bad.

    --
    "First they came for the slanderers and i said nothing."
  26. Re:Possibly related? by magarity · · Score: 5, Funny

    This questioner says he's been at the company 10 years and the new kid is hassling him. That prior question says the guy he's hassling has been at the company longer than the hassler has been alive. If they've hired a 9 year old as a coder then they deserve all the atttitude they get.

  27. Well, he's young, so you're a moron by mveloso · · Score: 2

    By definition your code sucks, because it's legacy code and you wrote it.

    So what? Does it work? Does anyone want to fuck with it? Is he willing to risk his job to change the code and break everything?

    New developers want to rewrite everything, and don't understand that new projects don't happen often - and when they do, they don't get to work on them unless they have skills. That doesn't mean they need to kiss ass, but it does mean that they have to write code that works.

    Maybe there -is- a better way to write it now. It'd be worth it to ask. Maybe he's right? Most likely he's has no context - it's written that way because it was written that way. Maybe he can rewrite it in his spare time and show everyone.

    NOTE: if he was able to read your code and said it sucks and should be refactored or something, that means the code doesn't suck as much as he said it does - because he could read and understand it. That means that it's maintainable. So that's a plus on your side.

  28. Re:comments are free by Desler · · Score: 2

    There is no excuse for anyone looking at your source code to not understand it.

    That's a ridiculous statement and standard. Lack of experience or knowledge of the problem domain is often a reason why people won't understand code. Now the code might genuinely be poorly-written, but just because newbie hot shot doesn't understand it doesn't mean it's bad.

  29. Maybe you code _is_ bad? by gweihir · · Score: 2

    The only way to deal with this professionally, is to look at his complaints in detail and either refute them or acknowledge them. Code quality is an area that cannot tolerate any power games. Have him actually explain in detail why he things some piece of code is bad and then explain to him why it is not, or why there are external circumstances that require it to have the form it has. Make that perhaps a repeated session, until one of you learns something about their coding skills. Go into this open and with a pure technical PoV. If he should happen to be right, then he is right. If not, you have to be able to explain why. That will also deal with the most common source of this behavior: The younger person feels under-appreciated and not respected.

    If that approach goes nowhere because he cannot admit limits in his skills or is unwilling to learn, escalate to management. But make very sure the problem is not on your side before you escalate. Typically, escalation will not be needed, but some junior engineers are so convinced of their own superiority, that they cannot see anything else and cannot learn. I had that twice. In one case it resulted in the termination of the lady in question. That one was so set in her ways, she was not even willing to implement an interface designed by somebody else, but could not explain why it was bad. (It was not. She was just not able to implement anything not of her own design.) Zero team-working skills and zero ability to learn. It happens and it is not your job as a developer to resolve it.

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  30. Define "bad" by SirGarlon · · Score: 5, Insightful

    As an engineer, I've adopted the maxim that there is no good and bad, only fitness for a particular purpose. I prefer a discussion of trade-offs to statements of principle.

    I tend to ask "what requirements does this code fail to meet?" And very often, the reviewer has invented his own new requirement! Depending on your process, your response might be anything from "good point, let's add a test case for that" to "you should submit a Requirements Change Form for that. Make sure to get all the required signatures."

    And if the criticism is for something immeasurable like "readability" or "maintainability" you can let your critic make the case to the boss why fixing this code is worth the cost.

    --
    [Sir Garlon] is the marvellest knight that is now living, for he destroyeth many good knights, for he goeth invisible.
  31. Personally, I would... by tomzyk · · Score: 2

    stare him directly in the eyes and, in an outrageous French accent, curtly state "MIND YOUR OWN BUSINESS!"

    --
    Karma: NaN
  32. Re:What to do by gamanimatron · · Score: 2

    Management won't say "no". They'll say, "That sounds good. Do it, but don't change the date for our next release." And everyone will hate the new guy forever.

    --
    cogito ergo dubito
  33. Klingon Programmers by AlienSexist · · Score: 5, Funny

    "You dare insult my code!? I'll kill you where you stand!"

    1. Re:Klingon Programmers by H0p313ss · · Score: 2

      An oldie but a goodie:
      http://gradha.sdf-eu.org/textos/klingon_programmer.en.html

      Top 20 things likely to be overheard if you had a Klingon Programmer:

      • Defensive programming? Never! Klingon programs are always on the offense. Yes, offensive programming is what we do best.
      • Specifications are for the weak and timid!
      • This machine is GAGH! I need dual Pentium processors if I am to do battle with this code!
      • You cannot really appreciate Dilbert unless you've read it in the original Klingon.
      • Indentation?! - I will show you how to indent when I indent your skull!
      • What is this talk of 'release'? Klingons do not make software 'releases'. Our software 'escapes' leaving a bloody trail of designers and quality assurance people in its wake.
      • Klingon function calls do not have 'parameters' - they have 'arguments' -- and they ALWAYS WIN THEM.
      • Debugging? Klingons do not debug. Our software does not coddle the weak. Bugs are good for building character in the user.
      • I have challenged the entire ISO-9000 quality assurance team to a Bat-Leth contest on the holodeck. They will not concern us again.
      • A TRUE Klingon Warrior does not comment his code!
      • By filing this bug report you have challenged the honor of my family. Prepare to die!
      • You question the worthiness of my code? I should kill you where you stand!
      • Our users will know fear and cower before our software! Ship it! Ship it and let them flee like the dogs they are!
      • Our competitors are without honor!
      • Python? That is for children. A Klingon Warrior uses only machine code, keyed in on the front panel switches in raw binary.
      • Klingon programs don't do accountancy. For that, you need a Ferengi.
      • Klingon multitasking systems do not support "time-sharing". When a Klingon program wants to run, it challenges the scheduler in hand-to-hand combat and owns the machine.
      • Perhaps it IS a good day to die! I say we ship it!
      • My program has just dumped Stova Core!
      • Behold, the keyboard of Kalis! The greatest Klingon code warrior that ever lived!
      --
      XML is a known as a key material required to create SMD: Software of Mass Destruction
  34. Future Dot..... by __aacvzh55 · · Score: 2

    How to react to the coworker who complains to you that a coworker thinks that his coding is bad.

  35. The first problem by SirGarlon · · Score: 2

    The first problem is that you regard the code as "yours" rather than "the project's" or "the company's." Engineering discussions should not be personal, and getting emotionally attached to the code is unlikely to help you evaluate it objectively.

    --
    [Sir Garlon] is the marvellest knight that is now living, for he destroyeth many good knights, for he goeth invisible.
  36. Technical Debt by Anonymous Coward · · Score: 5, Interesting

    We always see bad code as technical debt and treat it as debt. When we have cycles we pay it off, when we don't we get some more.

    Having been doing this for 12+ years, I have come to realise I have never liked anyone's code and figured out its more of a style or personality than bad or good. Yes there is bad code, but there is no good code per say. Or put another way, if done right its good and you and I still may not like it.

    Its just the nature of the beast, its kind of like driving a car, all other drivers seem bad.

    1. Re:Technical Debt by Anonymous Coward · · Score: 2, Insightful

      Disagree (respectfully), there is such a thing as good code.
      Good code is readable, maintainable, and performs the required function ... (great code is also extensible and/or flexible).
      Bad code is anything else.

      Variations of design, style, elegance or efficiency are the art of coding and being the
      subjective part of the equation determines whether or not a particular person* will like it or not.
      Just because someone doesn't like a particular piece of code or would have implemented it differently doesn't make it bad.

      *yes programmers are people too, no matter how hotly debated that "fact" might be.

    2. Re:Technical Debt by Anonymous Coward · · Score: 3, Informative

      Bingo, it's bad code in the eyes of the beholder if the code currently fulfills the user case(s). what is good code: What is good code? Readable? Efficient? Academically written? following standard? ingenious? a hack? All depends on the use case... remember those things?

      If you're coding for a career, coding is about filling a use case, to make money. It's not a mental exercise--which is left to college students. That's why I see CS prima donnas and Business AppDevs fight so much on code.

      If it does the job and fills the use case, it's good code regardless, if you're speaking british, english or latin.

      I always found writing good code is easy, reading [someone else's] code is where the money's (and respect's) at.

    3. Re:Technical Debt by MozeeToby · · Score: 5, Insightful

      Sometimes I don't even like my own code if I'm coming back to it a year later. It's just the nature of the game. What looks 'good' and 'right' to you changes based on what you know about coding, what problems you've encountered, what you know about the project, what you know about the budget, etc, etc.

    4. Re:Technical Debt by Dastardly · · Score: 2

      I absolutely agree. I wrote a large portions of some code alone that now several other people are advancing and maintaining. There are some good things and some not so good things in there. Some of the worst were caused by attempts to be overly clever.

  37. Re:timothy is apparently easily trolled by Anonymous Coward · · Score: 4, Funny

    That's easy.

    Perform a Core Dump.

  38. Re:Do you always let interns tell you what to thin by dubbreak · · Score: 2

    Just because the new guy is disagreeing and less experienced, doesn't make him wrong. Yes, 9 times out of 10, the new, less experienced guy will be wrong, but that 1 time out of 10, makes it worth giving the other 9 times a fair hearing as well.

    I honestly don't think "experience" has anything to do with it. How long you've sat in front of a computer monitor doesn't directly translate to your understanding of software development. I've worked with a few guys with 15+ years experience. One created more work than he produced over 6 months (we were cleaning up shit from him a year after he was canned), another whom I bitched about in the last question really had no fucking clue how to structure code. He'd write stuff that "worked", but basically misused every concept in computer science. No one could follow his code and there was no clean way to cut it out. I also know plenty of CSc and S.Eng. student that never learned how to code in school. I mean, yeah, they passed assignments that required coding but never really got a grasp on writing software.

    On the flipside I've worked with people straight out of school that were as good as experts with plenty of years behind them. The big thing I've seen is there tends to be two groups: people who understand software development and those that don't. People who don't understand can write working code and even create big projects.. but they are hell to maintain and even hell for that person to write. For people that understand, it's a lot more fluid. We all start at the ignorant stage and some get beyond it quicker than others, some never make it out.

    I honestly didn't learn to code (as in really code) until late in my degree, but I buckled down and got over the learning curve.. then it all became a lot easier and way more fun. More practice and the fog cleared even more. I think I still have quite a ways to go (as I'm able to recognize those that are much clearer than I), but that's ok as long as I'm dedicated to moving forward and can recognize others are more cognizant and clear and lean on them when I can. Some areas I might be better than others and if they are good they lean on me for that. It feels great to work in an environment like that. Life is hell when you're trying to fix some clueless code.

    One other observation I've had is that people that understand tend to code throughout their career. Those that don't quickly move onto non-coding positions (analyst, management etc) and drop coding as quickly as possible.

    --
    "If you are going through hell, keep going." - Winston Churchill
  39. Years ago by Anonymous Coward · · Score: 4, Funny

    Years ago I worked with a senior guy who was very good but very critical of everyone else's code, often for poor reasons. One day I showed him some code and asked his opinion. He starts ripping on it and asks me why I did it that way. I reply "You tell me, this is your stuff from a couple years ago.".

    1. Re:Years ago by neminem · · Score: 2

      Oh, to have some mod points right now... You'll have to accept this virtual "+1 Funny" instead.

  40. Get rid of him by autocannon · · Score: 2

    He's an arrogant douche. Get rid of him. Any new kid who has the balls to call existing code terrible to your face is going to be nothing but far more trouble down the line. He already knows everything, and nothing you can say is going to get through to him. It's just not.

    Get rid of him if possible, stick him in a little box otherwise. Don't let him work on the good stuff and hopefully he'll leave on his own because he's "awesome". Your bigger fear should be that he won't ever leave...

    We have a few of those types in my office, and sadly we don't get rid of them because they have value just being present. It's depressing watching them bounce from project to project because they can't do anything right, and yet think they are god's gift to programming and that we're all just idiots.

    Don't take the time to explain jack shit to him. It's been tried here, and they didn't change. People may say I'm too harsh and that everyone deserves a chance. My response is that they don't. People that act like dicks to others like that don't deserve another chance. Their next chance is at another job.

  41. The two rules of programming by TimTucker · · Score: 2

    Quite a while back I came across the following two rules for development:

    1. The code written by the guy who came before is junk.
    2. Eventually you will be "the guy who came before".

    Rule #1 tends to work because it's rare to be unable to find some way to improve code when you come back to it again with more experience or a fresh perspective.

    Rule #2 helps keep you humble.

  42. Or... by JMJimmy · · Score: 4, Interesting

    The answer is really simple:

    Step 1) Hire a second, unpaid, intern
    Step 2) Give all the current responsibilities the 1st intern has to the 2nd intern
    Step 3) Have the 1st intern do nothing but beautify your existing code, with the understanding that he can't change how any of it is written.

    1. Re:Or... by Nefarious+Wheel · · Score: 2

      Why does this thread keep reminding me of BOFH?
      Ahh, I remember now. It's the hidden ITIL.

      --
      Do not mock my vision of impractical footwear
    2. Re:Or... by dintech · · Score: 3, Insightful

      One thing you might consider about junior guys is that they often say things like 'this code is crap' not because they really want to change it but because they want you to notice that they're smart. He probably is a bit socially awkward and doesn't get that he's also being offensive. Pretty much he's just trying to prove that he's knowledgeable, knows how to do 'the right thing', is a good coder etc.

      I think the best way to resolve the situation is not to distract him by giving him some greenfield work to do. This give him the scope to prove himself without pissing you off in the process. What you actually think of HIS code is a totally different topic.

  43. Your code IS bad by wcrowe · · Score: 3, Insightful

    Your code IS bad. I know this because it doesn't look like my code.

    --
    Proverbs 21:19
  44. Re:timothy is apparently easily trolled by ifiwereasculptor · · Score: 4, Funny

    "How can I stop my employees from fighting over who's the best coder?

    I don't care about code one way or another. I own a bakery, all I care about is selling bread. I just hired this CS college dropout because he was my cousin's nephew and I owed him a favor, and the kid turned out to be a good employee. Even suggested we bought a computer for keeping our budget electronically, and that worked out well. So, as I was satisfied with this somewhat bright kid, when I had to replace our janitor, I hired a second CS dropout. The problem is they started disagreeing right away about the most irrelevant things you can imagine and now they bicker all the time, have heated, uncivlized arguments about who is the better coder, what sort of software license works best, their choice of cellphone and whatnot. It's really disturbing the workflow around here. Nothing works properly anymore. For example, I never know whether my computer will have LibreOffice or MS Office installed, which means that at any given day I can open only about half my files properly. My customers are also placing complaints and I'm fed up with the food fights they cause. Can someone tell me how to make them stop or, at least, how to properly discern compatible nerds in the future?"

  45. Yes, this is the problem. by mosb1000 · · Score: 2

    In the end the boss man doesn't give a shit about how clean the code is.. he give a shit about how fast the code was written and if it does everything it's supposed to and more.

    This is the reason most software is terrible.

  46. I really want to imagine by Arancaytar · · Score: 2

    That this and the linked story are really about the same two coders.

  47. as usual: xkcd by spatley · · Score: 3, Funny

    just show him this http://xkcd.com/844/

  48. There is only one correct reaction by AmazingRuss · · Score: 2

    Fasten your teeth in his trachea, and pull your head back backward sharply until the trachea comes free from the body.

  49. Source code is like shit, you can't smell your own by TapeCutter · · Score: 3, Insightful

    Regardless of where anyone learned to program, I'd ask the kid one question - "You say can't read it, so why should we trust you to rewrite it?" - Then offer him some help to understand it, or sack the arrogant little shit if he's pissing people off with his unwillingness to learn "what is".

    I've been in the game for a long while, I have never seen anyone walk in and comprehend the inner workings of a non-trivial source tree in under 3 months, but I've seen plenty of inexperienced people that think they can. The real problem is that code is much easier to write than it is to read. When a coder rewrites something only one thing is certain, it will be an education for the coder. However that coder is now the SME for that application and other coders will have to try and read his code. An old friend of mine, an excellent coder and all round pragmatist, described this phenomena perfectly with the expression; "Source code is like shit, you can't smell your own".

    Disclaimer: Self-taught coder, BSc CS/OR, 22yrs commercial experience, 28yrs coding experience.

    --
    And did you exchange a walk on part in the war for a lead role in a cage? - Pink Floyd.
  50. What is Good? by jmactacular · · Score: 2

    My top 3 practical criteria to judge whether code is "good" or not.

    1) Performance. How fast does the application actually run.

    2) Complexity. How many layers and levels and do you have to trace down into to debug something.

    3) Flexibility. Can it be modified easily as new change requests come in.

  51. Re:Drivers by Immerman · · Score: 2

    And they may have been right - the really bad drivers bring the average down a lot more than the really good drivers bring it up.

    Now if you were talking above *median*, then sure, at least 30% of them were wrong

    --
    --- Most topics have many sides worth arguing, allow me to take one opposite you.
  52. Re:Drivers by NoOneInParticular · · Score: 2

    If you want to be pedantic, please use correct terminology. First, the median is an average, the arithmetic mean another, the mode another, the geometric mean yet another. You probably equate average with arithmetic mean, but that's not strictly true. Second, the central limit theorem proves that for any random variable that has finite (stable) variance the mean and the median are equal. Not sure if 'driver ability' has finite variance, but if it is anything like IQ, length or weight, then yes, the (arithmetic) mean divides the top 50% from the bottom 50%.