Re: [Alarm] respectTimezone

On Friday, 15 February 2013 at 05:36, Jonas Sicking wrote:

> On Mon, Feb 11, 2013 at 2:05 PM, Marcos Caceres
> <marcosscaceres@gmail.com (mailto:marcosscaceres@gmail.com)> wrote:
> > The spec says:
> > > > The second argument respectTimezone can be either "respectTimezone" or "ignoreTimezone" to
> > > 
> > 
> > 
> > 
> > This seems to be a boolean in disguise:) Also, why is this a required argument? In most cases, you want to "respectTimezone", right?
> 
> A calendar app would likely use "respectTimezone", while an alarm
> clock app would likely use "ignoreTimezone". I'm not sure which is
> more common, but neither behavior seem obvious enough that it makes a
> good default.
> 
> For example, what time do you think an alarm should go off if a page does:
> 
> alarms.add(new Date(2013, 2, 20, 10, 0, 0))
> 
> if the user changes timezone the day before the alarm goes off? Should
> it go off at 10am or some other time?

If the default is respectTimezone, then respect the time zone.  
> Default values are good when the lack of the argument clearly
> indicates a particular behavior.

But when there are only two choices, so does its absence. The fact that someone has pasted in a string "respectTimezone" or "ignoreTimezone" does not mean he or she actually understands what that means in practice. If you really wanted to avoid this problem and actually make this more intuitive, you could simply separate Alarms (datetime based) and Timers (countdown based).  
> But I don't think either behavior
> here is particularly intuitive or clear when left unspecified. A good
> case in point is that most people think when looking at an alarm API
> is alarm clocks, and they generally want the "ignoreTimezone"
> behavior, which you seem to think the default should not be?
> 

Yeah, that's because I got confused about what they mean! And here in lies the problem: "respectTimezone" can be easily misinterpreted as "ignoreTimezone", because it can be understood as: "if I say, 9am, I mean 9am wherever I am right now, not the time zone in which I set it - so respect the timezone I'm in as I move!". While "ignoreTimezone" could be interpreted to mean, "ignore the timezone information, I just want to sleep 7 hours". In any case, I hope it helps illustrate the point that simply forcing developers to paste in some strings is not really going to help avoid confusion.
 
-- 
Marcos Caceres
http://datadriven.com.au

Received on Friday, 15 February 2013 09:05:32 UTC