6

Short contract job, helping a solo dev.
Me: what's these "200" everywhere?
Him: the max number of sensors we support. I know it should be a define, but it just became that way.
Me: <shrugs. Well, I'm only staying here a couple of weeks. Goes on working on my own branch>

A week later, manager says: "now we need to support 400 sensors!"

Solo dev: <searches and replaces all occurrences of 200 with 400. The program breaks>
Me: what happened?
Him: I only changed the max number of sensors!
Me: Mmm. <searches for 199 as well... Bingo. Creates a define, searches for 198 and 201 for good measure. Gives him no comment about my change>

Comments
  • 0
    Why even have a maximum if it's such an arbitrary one? I read this piece once that said that there are usually only 3 acceptable maximums: 0, 1 and n (of course there are exceptions). I think that applies here too, why not make it any amount of sensors?
  • 1
    @LucaScorpion No OS, 4 KB RAM. You want to know at compile time if you have enough memory to support the max. I guess the max was defined by the competition.
  • 0
    @Gauthier Ahh I see, that makes sense. Thanks for the clarification!
Add Comment