How can my boss take rails seriously with bugs like this?

The Time::next_week method is supposed to give the time of the start of
the next week. But look at this, it cocks up :

t=Time.parse “Monday October 16th 2006”
=> Mon Oct 16 00:00:00 BST 2006

t.next_week
=> Mon Oct 23 00:00:00 BST 2006

t.next_week.next_week
=> Tue Oct 24 00:00:00 BST 2006

t.next_week.next_week.next_week
=> Mon Oct 30 00:00:00 GMT 2006

Arrhhhgg!! Its just f*cked up my application data!

Has anyone run across this problem?

On 2006.10.25 01:17, Chris R. wrote:

t.next_week.next_week.next_week
=> Mon Oct 30 00:00:00 GMT 2006

Arrhhhgg!! Its just f*cked up my application data!

Has anyone run across this problem?

I am sure someone on the Rails list has.

Posted via http://www.ruby-forum.com/.
^^^^^^^^^^^^^^^^^^^^^^^^^

On Tuesday 24 October 2006 19:17, Chris R. wrote:

=> Mon Oct 23 00:00:00 BST 2006
Arrhhhgg!! Its just f*cked up my application data!

Has anyone run across this problem?

Your boss can read code?

If something is broken fix it! It’s an OpenSource project built upon an
OpenSource programming language…

At least submit a bug (after you search the bug tracker for duplicates
and possible fixes).

The last thing you should do is bitch like this… it’s embarrassing…
and who cares about your boss or your problems anyways?

This is a bug and nothing more. Did you give up on a C/C++/php/[put your
Lang here] library when you found a bug in their functions? I bet you
haven’t…

So have some respect for the devels and take into consideration that
this is a technical mailing list not a kindergarden.

Not to mention that this is one of the easiest libraries (that I’ve
worked with) to fix / patch on the fly.

On 10/24/06, Chris R. [email protected] wrote:

t.next_week.next_week.next_week
=> Mon Oct 30 00:00:00 GMT 2006

I agree with everyone else that your manners while pleading for help
could use some work. I empathize, however, with screwed up data and
how that can put you in a bad mood. That said…

This is really not as widespread a bug as it looked to me when you
first mentioned it, but is an edge case tied to the messed up system
we have called “Daylight Savings Time”. What’s happening is that the
next week function hops forward by 7 days, then pulls back to the
Monday immediately preceding (or coinciding with) the resulting date.
This usually works all fine and handy. But if:

  • the seven day jump crosses the DST boundary
  • the seven day jump ends on a Monday, and
  • the time portion is within an hour of midnight

Then the timezone change is going to change early Monday morning to
late Sunday night, and next_week will slurp it back 6 days to what it
thinks is the previous Monday. But since we cross the boundary again,
we actually make it back to Tuesday. The second time you call
next_week (from Tuesday), we don’t end on Monday, so there’s no
problem (aside from the wrong starting point).

Similar conditions will apply in April where if you start late Sunday
night the Sunday before DST, the Monday 8 days in the future (instead
of 1 day) will be returned. Stupid Daylight Savings Time. As if it
doesn’t confuse us humans enough, it has to go and mess with our code.

FWIW, this issue has actually been brought up on the Rails list and a
patch submitted[1], all the way back in June. Now just to see if that
patch can gain some momentum in actually being committed…

Jacob F.

[1] http://dev.rubyonrails.org/ticket/5617

On 10/24/06, M. Edward (Ed) Borasky [email protected] wrote:

Jacob F. wrote:

This is really not as widespread a bug as it looked to me when you
first mentioned it, but is an edge case tied to the messed up system
we have called “Daylight Savings Time”.

And I thought it was just cows that got messed up by Daylight Savings
Time!

Cows and people in Arizona

  • Greg N.

Jacob F. wrote:

This is really not as widespread a bug as it looked to me when you
first mentioned it, but is an edge case tied to the messed up system
we have called “Daylight Savings Time”.

And I thought it was just cows that got messed up by Daylight Savings
Time!

Hal F. wrote:

Actually, it’s Daylight Saving Time. :slight_smile:

Sorry, just feeding a pet peeve…

Hal

Just wait til next year when the US changes the day that DST starts and
ends on. Won’t that be fun.

It’s not a hard thing to fix, but you just know that some ISP is
going to forget.

BTW… Daylight saving time doesn’t actually save any daylight…
another pet peeve.

_Kevin

M. Edward (Ed) Borasky wrote:

Jacob F. wrote:

This is really not as widespread a bug as it looked to me when you
first mentioned it, but is an edge case tied to the messed up system
we have called “Daylight Savings Time”.

And I thought it was just cows that got messed up by Daylight Savings
Time!

Actually, it’s Daylight Saving Time. :slight_smile:

Sorry, just feeding a pet peeve…

Hal

_Kevin wrote:

Just wait til next year when the US changes the day that DST starts and
ends on. Won’t that be fun.

Hmm, isn’t that this year??

It’s not a hard thing to fix, but you just know that some ISP is
going to forget.

BTW… Daylight saving time doesn’t actually save any daylight…
another pet peeve.

Quite right. Will R. said it was like cutting off one end of a
blanket and sewing it on the other end to make it longer.

My father occasionally nags Congress to do away with it. (I always
admire those who tilt at windmills.) He is actually old enough to
remember when there was no such thing.

Hal

Paul I. wrote:

If something is broken fix it! It’s an OpenSource project built upon an
OpenSource programming language…

Rails is from the user’s POV a tool. If a screwdriver has a loose
handle, buying a different brand is as valid an approach as trying to
stabilise it…

Users do have the right to object against the low quality of something
even if it’s free. (Granted, in a less whiny tone, and using official
ways like the bug tracker for specific bugs.) Just because the barrier
to contribution is lowered from one side, it doesn’t mean it
automagically as lowered from the other - even people unskilled in
developing web frameworks or that just don’t have time to spare to
develop it should receive a product that, well, works.

The “fix it yourself” attitude I perceive as actively harmful to
open-source software as a whole - it creates an image of getting away
with half-done jobs, lack of concern for the end user, and general
tending to mediocrity. I personally much prefer working with
high-quality tools (open-source or otherwise, I’ve seen neither model
prove as a magic bullet - big surprise there), more so since
specifically Rails is far from a free lunch, considering it -started
out- as parts of commercial 37signals services before going open-source
(no idea how much of the development is done by paid employees of that
company anymore). The latter is actually a comforting fact, since they
do indeed eat their own dogfood and are interested in keeping Rails
maintained for other purposes than open-source karma points.

David V.

On 10/25/06, David V. [email protected] wrote:

Users do have the right to object against the low quality of something
tending to mediocrity. I personally much prefer working with

I agree with most of the things you said, but do note that after that
quote
(from my initial mail) I did mentioned posting the bug on a tracker… I
think it was the next paragraph.

Anyways I didn’t mind that he asked for help or reported a bug, or even
that
he was angry about a certain loss of data. That’s all normal. But the
tone
and, for God’s sake, look at the thread’s subject…

Hal F. wrote:

_Kevin wrote:

BTW… Daylight saving time doesn’t actually save any daylight…
another pet peeve.

Quite right. Will R. said it was like cutting off one end of a
blanket and sewing it on the other end to make it longer.

Will R. didn’t know about fractals.

My father occasionally nags Congress to do away with it. (I always
admire those who tilt at windmills.) He is actually old enough to
remember when there was no such thing.

No Congress? How old is he?

SCNR.