Skip to content
Snippets Groups Projects

convert limb access in seWedding*.tw

Merged Arkerthan requested to merge Arkerthan/fc-pregmod:limbFunction into pregmod-master

I am mentioning it here because it was an extreme case, but the basic problem pops up all over the place:

Lines that get longer and more complicated because of ever growing if-else constructs. In this case it was so extreme that there was even a comment above it wishing good luck reading this, at which point I am wondering why it was still one line and not distributed over multiple lines, because once I did that it became pretty easy to read and the logic errors in it became obvious, whereas they where impossible to spot before.

I know that it was likely not just one contributor, but instead grown over time(and in some places I might have contributed to it myself) but I still wanted to mention it.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • After a point, it may be better to break text blocks like that down into overarching if-elses instead of in-line ones. I will agree that that is the biggest concern about this overhaul.

    Another option is to see if any of those condition outcomes happen repeatedly. If they do, you may want to consider replacing it with a variable and just setting that variable once.

    Edited by Pregmodder
  • merged

  • Pregmodder mentioned in commit 61f317d1

    mentioned in commit 61f317d1

Please register or sign in to reply
Loading