Better start fixing your spaghetti code. - eviltoast
  • Ephera@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    22 days ago

    I know it’s a joke, but I do not enjoy being in the position with the stick.

    Like, man, they’ll sometimes check in some stupid stuff. Yesterday, I told two juniors to implement a unit test and they could use annotations like on another unit test, which I also explained.

    Problem is, I had introduced that unit test a week ago and had given it an ignored-annotation, to document that that’s currently broken.
    And you guessed it, they copied that ignored-annotation, too, complete with the comment “//TODO currently broken”. The test they implemented was not run, not even once.

    And like, what the fuck do I do with that? Sure enough, it was a miscommunication, I’ll try to be clearer next time.
    But I’d also really like to explain to them whatever information they were missing, if they were missing any. Like, did they not know what the ignored-annotation does? Did they not think at all and just verbatim copied everything?

    And then the problem is, this is kind of so dumb, that even just bringing it up is going to be embarassing for them. It’s already me beating them with a stick.
    I’d much rather praise them when they do something well, but this is so hard to spot when just reading over committed code. All the obstacles they cleared are not visible in there.

    • beepnoise@piefed.social
      link
      fedilink
      English
      arrow-up
      1
      ·
      22 days ago

      I see coding tasks with juniors a way to actually have a two-way conversation with said juniors and get them engaging.

      What I tend to do is I’ll give them an objective, and then I’ll ask them what they think needs to be done. Each step of the way I’ll try and correct them and get them going in the right direction.

      If all is well, everything is cleared up, the junior knows what to do at each step, and then they go off and do it. Then I do the code review and the conversation restarts.

      More often than not, the junior dev will get mentally stuck on a problem that they cannot conceptualise. That’s fine - I tell them to leave it, work on the stuff they can do, and then we’ll tackle it together.

      Generally speaking, good junior devs can conceptualise a task about 50-80% and will get stuck on the other 20-50%. An excellent junior dev can be given a task and independently complete it - the code may not be perfect or up to a middle-senior coding quality, but they can get the job done.

      The bad junior developers are the ones who need their hands held at every step of the way and never seem to improve or improve at such a snails pace that it is taking effective resources away from the team (i.e. senior devs - 1 or more) to explain the task repeatedly.

      At this point, you need to raise that up to your line manager and have a serious discussion about whether you and your line manager think it is worth the investment to keep teaching this person while making said line manager aware of the problems (and make this based with facts that both you and the line manager can clearly observe and/or have observed).

      For the others, you should go from a path of having to explain fundamental concepts (mostly because you both missed out on the weird edge cases of the task at hand) to in months being able to leave said juniors to the task and have them mostly complete it without any help from senior devs. And seeing that progress is why mentoring & code reviews is great - seeing that personal development in real time is an incredibly rewarding feeling.

    • dohpaz42@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      22 days ago

      Sometimes it takes a little unintentional embarrassment to drive a point home. It’ll make them think twice next time.

      What I mean by that is that as long as you’re not intentionally or maliciously trying to embarrass them, then you shouldn’t feel bad. You cannot always control how somebody receives information; nor should you. The best you can do is to be clear and polite in your communication. If someone’s feelings get hurt, that’s on them to reconcile, not you.

      This is genuinely like parenting a child: they need to develop their critical thinking skills, and to gain their own confidence. So they must be left to make their own mistakes to learn from. Your job is to give show them the tools to use, give advice when necessary, and be there to catch them when they fall; because they will fall.

      Doing this will help bolster their self-confidence and make them better mid-/senior-developers later in their career. Coddling them and constantly holding their hand will make them reliant on other people and prevent them from learning anything.

      Edit: also remember KISS. 😊