

Or, if the business is 24/7, make sure they have an explicit on-call policy with designated shifts. (e.g. who is allowed to call you, what is the expected response time, is an issue disruptive enough that it needs resolving at 3am on a holiday, etc.)
My current job (IT for a non-profit research facility) pays a sweet daily bonus just for having my phone on me, even if I don’t get called over a week, plus double overtime pay when I do get called afterhours. I’ve had 13 shifts over the past couple years, and was called only 7-8 times, 3 of those on the same weekend for the same issue (couldn’t make a permanent fix until the following Monday).
In any other job, I definitely wouldn’t accept a manager or random coworkers sending me messages out of the blue on a weekend and getting mad when I don’t respond.
Agreed, but I’m pretty sure the auto-formatters available do alignment indentation anyway as it is part of the style guides.
Otherwise, I think some of the lines have too much nesting and could be broken up, and the ifcond-then-else blocks aren’t indented enough in the last example.