He took something beautiful and destroyed it.



  • So the story up to now is that I was tasked with re-architecting a site at a client. Since it was the first time I have done this for such an important client I took my time and implemented something elegant, clean, unit tested and more importantly easy to follow and build on top. The lead architects looked upon my work and they were greatly pleased.

    Cut to a few weeks later and another senior developer was asked to implement something new. After 2 weeks of "I'm almost finished" D-Day dawned and suddenly he mentioned he was in trouble and I needed to help him with some unit tests. Being the type of team player I am I quickly jumped in and...

    My heart sank. Validation methods that were once generic and re-usable throughout the site now had values that were hard coded for his cases, his model was copy/pasted all over the place simply because of minor differences in the views and view logic has been dumped unceremoniously inside the models. The mess made it effectively impossible to write tests.

    Unfortunately because the developer wasn't able to admit that he was in over his head we are behind schedule and it is too late to rewrite this code. We're shipping as soon as we can manhandle the mess into a functional state.

    I'm gutted. I know I shouldn't be emotionally invested in my code but this was my firstborn baby. I shaped it and brought it into existence and now it is forever soiled.

    So, to the experienced architects out there. How do you deal with this sort of thing?



  • @BDH said:

    How do you deal with this sort of thing?

    Fire


  • sockdevs

    I'll lend you a Piko Hammer. Just make sure to clean the blood and skull fragments off before you return it :wink:

    <!-- Emoji'd by MobileEmoji 0.2.0-->


  • 1. Deny that the mess is practically unfixable. 2. Rage against the individual's incompetence. 3. Bargain that it will be refactored before the next release. 4. Become depressed by the thought that the pure, clean design has been lost forever. 5. Accept the fact that average and below average developers have a poor understanding of cohesion, coupling, structure extensibility, complexity limiting, and abstractions. And as long as they are on a project, said project will not be perfect.


  • sockdevs



  • Never let anyone else touch your code. The employer and clients can get only minimized versions, to be used in production. The real code is safely kept on your server, where you can effectively maintain it and protect it from the cruel world forever.



  • @cartman82 said:

    The real code is safely kept on your server, where you can effectively maintain it and protect it from the cruel world forever.

    Also, it helps if you always refer to the codebase as "the precious".





  • @BDH said:

    I know I shouldn't be emotionally invested in my code

    Why not? It's something you worked hard to have some moron destroy it. It's perfectly acceptable to feel disappointed.

    @BDH said:

    Cut to a few weeks later and another senior developer was asked to implement something new.

    Is it so hard to rollback to changes (source control?) before they started changing and implement the same functionality after delivery?

    @BDH said:

    So, to the experienced architects out there. How do you deal with this sort of thing?

    Code reviews & pull requests.



  • @IngenieurLogiciel said:

    1. Deny that the mess is practically unfixable.2. Rage against the individual's incompetence.3. Bargain that it will be refactored before the next release.4. Become depressed by the thought that the pure, clean design has been lost forever.5. Accept the fact that average and below average developers have a poor understanding of cohesion, coupling, structure extensibility, complexity limiting, and abstractions. And as long as they are on a project, said project will not be perfect.

    6. Demand, in writing, with the entire organization copied, that your name be removed as the author of the final mess.



  • One risk, as I see it, is that the kludge is going to wash his hands and say "I did what I could, I even got the original author to help me out...", thereby somehwat laying the blame of the bad code on you. You are also hostaged into being the quality seal for the code.

    Obvious advice: Count your losses, and decline to help this guy out again, should he ask you.



  • Looks like option Z : Co-worker asks PM for another extension to get things working. PM gets sick of it and asks me to take over and finish the damn thing by Monday over my birthday weekend and co-worker goes back to his desk with a shit-eating grin because he is no longer responsible for delivering the thorn in his side.

    Needless to say there is no way in hell I am ruining my wife's plans for the weekend and I'll do my damndest to get things done by Friday.

    Sometimes I hate my fucking job.

    And a follow up. The code is worse than I imagined. At some point he started hacking and started losing track of what he was doing so he just kept churning out circular code that seems to do nothing.



  • @BDH said:

    I know I shouldn't be emotionally invested in my code but this was my firstborn baby. I shaped it and brought it into existence and now it is forever soiled.

    Then why the fuck were you hands-off for so many weeks? Did you assume having "senior" in his title meant he wasn't a moron? Because that's a dumb assumption.

    Also, I don't know about your employment situation, but 99% of the time it's not your code, it's code some company paid you to write on their behalf. They also paid this other guy to write code on their behalf. Neither of you own the code or, phrased differently, both of you have equal ownership of the code.

    @IngenieurLogiciel said:

    Accept the fact that average and below average developers have a poor understanding of cohesion, coupling, structure extensibility, complexity limiting, and abstractions. And as long as they are on a project, said project will not be perfect.

    I think the best developers are the ones who avoid abstractions.

    @Eldelshell said:

    Is it so hard to rollback to changes (source control?) before they started changing and implement the same functionality after delivery?

    Where have you worked where there's ever enough free time to do something like this?

    @Eldelshell said:

    Code reviews & pull requests.

    Yes. Back to my original question: you weren't reviewing this guy's code. You didn't apparently do any sort of training on how he should have (at least in your opinion) been writing code. You were completely hands-off. Is it any wonder?

    This just reinforces the idea that the best skill a developer could have is the skill of effective and timely communication. But we all already knew that.



  • @blakeyrat said:

    I think the best developers are the ones who avoid abstractions.

    Do you use assembly or do you prefer to set the bits manually?



  • @Keith said:

    Do you use assembly or do you prefer to set the bits manually?

    There's a happy medium between assembly and EmployeeCaseFileGeneratorFactoryCalculatorFactory.

    In my experience, developers obsessed with "beautiful" code usually tend to write the latter. The reason it's beautiful is because it looks to them. The reason it's hard to work with is because it doesn't look right to anybody else. Good developers are pragmatic. Code isn't "beautiful".


  • sockdevs

    @blakeyrat said:

    Also, I don't know about your employment situation, but 99% of the time it's not your code, it's code some company paid you to write on their behalf. They also paid this other guy to write code on their behalf. Neither of you own the code or, phrased differently, both of you have equal ownership of the code.

    Doesn't mean he shouldn't care about it though.
    @blakeyrat said:
    There's a happy medium between assembly and EmployeeCaseFileGeneratorFactoryCalculatorFactory.

    Yes, there is: it's called an abstraction :stuck_out_tongue:

    <!-- Emoji'd by MobileEmoji 0.2.0-->


  • @blakeyrat said:

    Code isn't "beautiful".

    Maybe yours isn't. Most of mine definitely isn't, but sometimes...sometimes...



  • @blakeyrat said:

    EmployeeCaseFileGeneratorFactoryCalculatorFactory

    You mock it, but some day you're going to need a generic EmployeeCaseFileGeneratorFactoryCalculator and you'll be kicking yourself.



  • @boomzilla said:

    Maybe yours isn't. Most of mine definitely isn't, but sometimes...sometimes...

    No code is beautiful. It's just as stupid to anthropomorphize some piece of code as it is to anthropomorphize a 25' I-beam hidden in the structure of a building. The building can be beautiful, but the I-beam never can. The only quality metric that applies to the I-beam is whether it does its job supporting the weight above it.



  • @blakeyrat said:

    No code is beautiful. It's just as stupid to anthropomorphize some piece of code as it is to anthropomorphize a 25' I-beam hidden in the structure of a building. The building can be beautiful, but the I-beam never can.

    This is all gibberish. No one is anthropomorphizing anything here. Why can't an I-beam be beautiful to someone?

    So TWL that you don't understand either the concept of abstraction or beauty.



  • @boomzilla said:

    This is all gibberish. No one is anthropomorphizing anything here.

    BDH called it his baby.

    @boomzilla said:

    So TWL that you don't understand either the concept of abstraction or beauty.

    I also don't understand what TWL means. So add that to your list.



  • @blakeyrat said:

    BDH called it his baby.

    Oh noes. Another aggressively illiterate day.

    @blakeyrat said:

    I also don't understand what TWL means. So add that to your list.

    Today We Learned, of course.


  • sockdevs

    @blakeyrat said:

    BDH called it his baby.

    This is also a baby:

    Something being a baby doesn't make it human.
    @blakeyrat said:
    I also don't understand what TWL means.

    It's not hard to figure out…

    <!-- Emoji'd by MobileEmoji 0.2.0-->


  • @RaceProUK said:

    It's not hard to figure out…

    I guessed it correctly, but I was trying to make a point about shitty people who are shitty at communicating shit.


  • sockdevs

    @blakeyrat said:

    shitty people who are shitty at communicating shit.

    You're not exactly outside that little club, y'know ;)

    <!-- Emoji'd by MobileEmoji 0.2.0-->


  • Who said I was? Definitely not me.


  • area_deu



  • @blakeyrat said:

    I guessed it correctly, but I was trying to make a point about shitty people who are shitty at communicating shit.

    And once again proved yourself to be firmly in the shitty communicator community.



  • Yeah we already covered that ground. But thanks for being a repetitive motherfucker.



  • Repetition is often part of a good communication strategy. Which I wouldn't have expected you to understand, of course.


  • sockdevs

    @boomzilla said:

    Repetition is often part of a good communication strategy.

    This message was brought to you by the Department of Redundancy Department that brought this message to you :laughing:

    But yeah, repetition can be good.

    <!-- Emoji'd by MobileEmoji 0.2.0-->

  • Discourse touched me in a no-no place

    @BDH said:

    asks me to take over and finish the damn thing by Monday over my birthday weekend

    That's the point where you should just say “No, it's my birthday weekend and I'm not angering my wife for just something this minor.” If you never push back, you'll get run over, and if the project fails, it's the PM's fault, not yours.



  • You're right. I should have enforced code reviews. I am not a lead dev nor am I a PM so process is out of my hands.

    As for communication I spent a few hours walking him through the code and how it worked.

    Thereafter he got permission to work from home and the PM and I were getting constant updates on what great progress he was making.

    ...anyway. I am a developer with my own tight deadlines. I don't have the time or rank to pin down every developer I work with like a cockroach in case they are lying through their teeth to me and the PM. Especially considering how much time I spent answering the specific question he asked over the last 2 weeks.



  • I personally hate unneccesarily architecture for the sake of architecture. In this case the developer just got all flustered because they couldn't create a huge momolithic collection of jQuery and untestable JavaScript to force the site into working and he got flustered and panicked. Then the lying started to cover his ass. Some people just can't cope with a paradigm shift like that.

    I really wouldn't have been as angry if he had just pulled me aside and told me he wasn't coping and the PM and I could have set aside an extra day or two so we could get him more comfortable



  • On another note. Who the hell wrote this terrible message board client? How the hell do you quote on a mobile device? What do all these non-standard, completely unintuitive icons do?

    If anyone wants to accuse me of shitty communication skills. Go ahead now. Using this site is like trying to speak after having your tongue ripped out.

    As for the "baby" thing I was exaggerating for comic effect.


  • sockdevs

    @BDH said:

    Who the hell wrote this terrible message board client?

    (The Church of the) Civilised Discourse Construction Kit, Inc. ;)

    <!-- Emoji'd by MobileEmoji 0.2.0-->

  • I survived the hour long Uno hand

    @BDH said:

    Using this site is like trying to speak after having your tongue ripped out.

    Yeah, we pretty much all agree. But for reference:


  • sockdevs

    The image is good, but it should really be "Insert 'full' text of post", given how often it leaves out nested quotes

    <!-- Emoji'd by MobileEmoji 0.2.0-->

  • I survived the hour long Uno hand

    WONTFIX_USEDMSPAINT

    (Body is invalid, but Paint is terrible for editing something once you've plopped text into it)


  • sockdevs

    @Yamikuronue said:

    Paint is terrible

    QFT

    <!-- Emoji'd by MobileEmoji 0.2.0-->


  • Never used the A



  • In that example you could have just put a white box over the text and done it again :laughing:



  • @BDH said:

    On another note. Who the hell wrote this terrible message board client? How the hell do you quote on a mobile device? What do all these non-standard, completely unintuitive

    "How I learned to stop worrying and love the discobomb"

    You'll learn, young paduan. You just need an infinitely large abacus and sufficient time.



  • @RaceProUK said:

    Yes, there is: it's called an abstraction

    Thanks for saving me the time and effort of replying to blakey. Reading:

    @blakeyrat said:

    I think the best developers are the ones who avoid abstractions.

    made me go :wtf: and I really didn't want to respond to such nonsense.


  • mod

    @BDH said:

    As for the "baby" thing I was exaggerating for comic effect.

    The misunderstanding is just @blakeyrat. He may or may not actually mean what he's saying, and there's no way to find out. Just ignore him, it's better for everyone.


  • mod

    @BDH said:

    How the hell do you quote on a mobile device?

    Highlight the text you want to quote and hit the reply button.


  • mod

    @RaceProUK said:

    The image is good, but it should really be "Insert 'full' text of post", given how often it leaves out nested quotes

    And don't forget how it leaves out formatting. By design. Because formatting isn't needed in quotes, for reasons

    Filed Under: Quoting 263 as 263



  • @blakeyrat said:

    you weren't reviewing this guy's code.

    I think this should be the OP's key learning from this experience. Unreviewed code doesn't get checked in.

    Me, I like being reminded that the word "senior" is meaningless, so I don't mind probably never having it in my job title...



  • @tar said:

    so I don't mind probably never having it in my job title

    Even if that "senior" means a 30% salary boost? Yeah right you commie

    Why won't Discourse allow me to set font col... oh right, public forum



  • @Eldelshell said:

    Even if that "senior" means a 30% salary boost? Yeah right you commie

    Money is like air, it's only a problem if you ain't getting enough.

    Anyway, in my experience, “senior" tends to actually mean "I spend at least as much time sucking off my boss as I do working", or "I worked so much overtime I nearly died".

    And I never died either of those things, so...


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.