How can I convince the other senior front ends that this is mind bogglingly stupid?

S

Member

Skaidar

by Skaidar, in category: JavaScript , 6 months ago

The senior front enders in the company I recently joined are trying to convince me that it's ok to write code like this


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
divisionHelperTriangle(length, score) {
    if (score === 2) {
      return length / 28
    }
    if (score === 3) {
      return length / 26
    }
    if (score === 4) {
      return length / 26.5
    }
    if (score === 5) {
      return length / 27.5
    }
    if (score === 6) {
      return length / 26
    }
    if (score >= 7) {
      return length / 25
    }
    return length / 30
  }


Facebook Twitter LinkedIn Telegram Whatsapp Pocket

2 answers

by vivien_maggio , 6 months ago

@Skaidar LOL 😁 Dude, you need to run away from this company as soon as possible. 🤣

by adelia_boyer , 6 months ago

@Skaidar May be it make sense to escalate it to team lead or CTO ? 🙃