Why I don’t get into arguments the way I used to

Leave a comment

 

  • Everything is opinion
  • I believe if I had the same experiences as others I would most likely share a similar opinion
  • And for every strongly held belief an example or counterexample can often be given
  • Not all advice holds in all scenarios
  • And I also have seen this happen in myself.
  • My own thoughts and beliefs have changed over time. So don’t get too excited or surprised when people think differently than you. We need all opinions. Young and old.
  • So when faced with a hostile of different point of view I don’t get as excited as I used to
  • Instead I think
    • There is probably some merit to what they believe
    • It would be to my advantage to discover what it is
    • And then after I can judge and decide whether I share that belief or not
    • And then, only then, if the other party is interested will I share my thoughts back

 

Setting end date instead of computing

Leave a comment

Instead of doing a lot of date and time comparisons, just set the end date of the thing you want.

For example instead of checking to see if a token expires in an hour like this

- (BOOL)hasExpired
{
    if (self.tokenExpirationDate == nil) {
        return YES;
    }
    return [SPTMessageClockUtils oneHourHasPassedFrom:self.tokenExpirationDate];
}

Just set the expiration date on the object itself, and see if it is later than now like this.

- (BOOL)isValid
{
	return ([(NSDate *)[NSDate date] compare:self.expirationDate] == NSOrderedAscending);
}

This simplifies the computing and requires less coding to account for time checks and such.

%d bloggers like this: