Possible bug in Calendar

H

Harold Yarmouth

Lew said:

True, but they don't have disk files last modified in the time of
Christ, or network packets timestamped during the Fall of Rome.
"Harold Yarmouth"'s point was irrelevant

No, it was not.
as well as incorrect.

No, it was not.
The evidence was to show that calendars are not neat mathematical
constructs, which it did show.

That is what is irrelevant. My point is that for things like interfacing
with network packet timestamps, file modification dates, and the like,
under the hood, one emphatically does not need a non-Gregorian calendar.

In fact, this whole issue arose when I was coding a utility to check
file modification dates, compare them, and the like. For some stupid
reason File does not provide such in the form of a Date, only in a raw
seconds-since-the-epoch type form, conversion to Date of which requires
a bunch of annoying arithmetic. And then Calendar was going and
introducing an essentially-random component that caused a file to look
like it had an unequal file modification time to itself.

I do have to wonder why there isn't apparently a better way in the
standard library, such as a Date-returning method of File, in addition
to wondering why the hell you have to go through Calendar even in the
simple case where you don't care about localization, don't need to care,
and just want a java.util.Date representing a given time you got in some
other format. Calendar's appropriateness in the BLL is arguable (and
being argued as we speak). Calendar's appropriateness in the DAL,
however, is absolutely zero, and that's where I found myself needing to
use it to work with file modification dates in an object oriented way.

I've long since fixed it to ignore the spurious milliseconds values. In
fact I'd done so before I even started this thread.

Now, after all of this pointlessly-acrimonious arguing*, I'm tempted to
change it again to just treat the dates as raw longs and the hell with
object orientation, just to wash my hands of Calendar entirely.

* And why is it so acrimonious? I made a simple and civil post reporting
undesirable and possibly-buggy behavior of a library routine. Then
people jumped down my throat. Apparently it's not enough to simply
disagree with someone around here -- if you disagree with someone you
have to insult them and call them names in public, and generally pick
a fight with them! Why??? What kind of stupid rule compels such
ridiculous and childish behavior? Hell, hardly anybody really DOES
disagree -- six or seven people agreed that the behavior in question
was undesirable, and although there's been debate as to whether it
technically constitutes a bug, I'd said POSSIBLY buggy, not DEFINITELY
buggy. The subject line, in particular, says so.
And why do some people keep bringing up Twisted and your dispute(s)
with Twisted? None of that seems remotely relevant to the
Date/Calendar thing. As I understand it, the argument you had with
him was about which editor was better, vi or emacs. That has nothing
at all to do with Date/Calendar/business layers/anything else in your
dispute with me!
It is relevant that not every day is 24 hours long, so naive
calculations based on that assumption will give incorrect results from
time to time.

I wasn't proposing to make naive calculations. You have misunderstood me
severely.
 
H

Harold Yarmouth

Arne said:
Not if your business logic are used in countries that does not
use the Gregorian calendar.

Yet again: Then you use dependency injection from the layer beneath the
UI layer and above the core logic layer.
 
H

Harold Yarmouth

Arne said:
But why settle for a 99% solution when a 100% solution exist ??

Because your "100% solution" suffers from greatly increased complexity
of use as a consequence of the work that went into adding that final one
percept. And that increased complexity of use causes subtle and
unexpected behavior to occur, such as was observed.
There are no need to go backwards.

What's backwards here is, as usual, your grasp of English grammar and
your grasp of how to win friends and influence people. (As opposed to
how to make enemies and antagonize people; on that, you seem to be the
local expert, albeit with several talented proteges threatening to
someday usurp your title as reigning champ.)
Files time stamps are stored in binary format not text format.

My point exactly. They aren't encoded in a non-Gregorian calendar, ergo
no non-Gregorian calendar is needed to deal with file modification
dates, save possibly in the presentation layer.
If they are to be displayed as text accordingly to locale they may need
another calendar than Gregorian.

And displaying them is a PL issue.

I'm glad you've begun to see the light at last.
No no no.

I wonder what your boss will think of your desire to code
location-specific policies all through your BLL instead of separating
them out into an injected object?

Assuming, that is, that you are actually employed in the field of Java
programming. I rather suspect at this point that you are probably not,
and that you may not have an easy time changing that either. Even your
poor fluency in English would likely be an obstacle to such, nevermind
your poor grasp of software architecture principles.
When to do certain things is part of logic not part of
presentation.

Yes, but it shouldn't be part of the *core* logic, unless it's
absolutely fixed and unchanging across the board. If it is dependent on
locale, which business branch, or much of anything else, it should not
be coded directly into the core logic.

Core logic: how to do payroll, what steps to take to iterate over the
employees, perform financial transactions, generate cheques, etc.

Not core logic: when to do payroll, since that tends to be
organization-dependent.

A payroll system that hardcoded a particular time to do payroll would
only be useful in one or a very few organizations.

We are supposed to be encouraging code reuse, not reinventing the wheel.
Especially given the unfortunate tendency for a reinvented wheel to come
out square.
Even if the class is DI'ed in then the class is still part of BLL.

It is not part of what I mean when I refer to the core logic layer. It
is part of what I consider to be an abstraction layer that sits between
that layer and the UI layer.

Perhaps we've simply learned somewhat different and incompatible
terminology.
 
H

Harold Yarmouth

John said:
"Only... in Roman times," forsooth?

Yes, when Latin was in widespread use as a living language, rather than
either dead or being kept on life-support by academia for whatever reason.

Got some sort of a problem with that?

Your opinion may be that the language is great and we should all go back
to using it. Fine, you're welcome to your opinion. But it has no bearing
on the actual facts, which are that (outside some pretty rarefied
heights in academia, and in the Vatican) Latin as a language has not
really been in use for centuries.
Is there truly no end to your ignorance?

You, Arne, and Lew are the ones being ignorant around here. I have been
very civil, especially under the circumstances (which have included some
pretty severe provocations).
 
J

Joshua Cranmer

Peter said:
Do you mean "elided", per chance? :) It still wouldn't be quite
correct (the quote wasn't elided, the letter 'r' was), but it would make
a little more sense anyway. :)

My bad. What I should have said is this:
I feel obliged here to cite the original quote:

I need more sleep...
 
H

Harold Yarmouth

Arne said:
That is correct.

I'm glad you agree. Will you and your friends stop giving me order now,
then?
You can ... stay ignorant.

You are the most ignorant person here. So even if there was any truth to
what you said about me, it would be a case of the pot calling the kettle
black.

As things stand ...

Well, suffice it to say that you are a very rude person, Arne.
 
H

Harold Yarmouth

John said:
On the behalf of the United States of America, I'd like to apologize to
Arne Vajhøj and to speakers of the Danish and Norwegian languages
everywhere. With the results of the new election, we hope to reduce the
frequency of this sort of shameful display of jingoism.

What jingoism? It's now considered "jingoistic" to use a standard
101-key American KEYBOARD?

Sheesh.

By your ridiculous standards, there must be over four hundred million
"jingoistic" people, since the statement I made is true of pretty much
every keyboard I've ever seen in the US and Canada.

What do you suggest I do to stop being "jingoistic", drop around $80 on
some kind of fancy keyboard with extra support for international
character sets?

Thanks, but no thanks. I have better things to spend my money on than
the ability to spell one asshole's name.
To Paul "Harold Yarmouth" Derbyshire:

What is this nonsense? My name is simply Harold Yarmouth. Harold is my
first name. Yarmouth is my last name. They are not middle names with
other first and last names. You are confused.
It actually takes a few minutes of work to set up a US Windows system to
be able to type the letter "ø"

I don't physically have such a key on my keyboard, so setting up my OS
to recognize such a key is pointless.
which, by the way, is neither an "o" nor
a "0", but a distinct letter in its own right, the twenty-eighth (or
twenty-seventh, if "w" is not counted) of the Dano-Norwegian alphabet.

I don't really give a shit what exactly it is. Since I don't know
another name for it, I referred to it by appearance, and it looks like
the zeros often used in the 80s in computer fonts, which had a slash
through them to make them visibly distinct from the letter O.
Because I don't have a working Windows system to hand, I won't try to
describe the process, but the key concept is to install a US
International keyboard layout.

And the International Keyboard to go with this? How much does that cost,
and how much more would I pay in transportation to go shopping for one?
Last time I checked, they only stocked bog-standard 101-key
English-letters-only keyboards in the local corner store around here, so
I'm pretty sure it wouldn't just be a trip around the block or to the
local mall.

And you want me to spend all this money so I can properly spell Arne's
name, when
a) Arne is an asshole,
b) Arne can't or won't properly spell MY name, and
c) Arne can't or won't properly spell half the English language,
besides?
Of course, if you had an ounce of wit about you, you could have pasted
it in, anyway.

I do and indeed I could have, had I felt like going to very much effort
on behalf of someone who has been nothing but a colossal prick to me.

Keep in mind I didn't have one displayed at the time to copy, since
Lars's post didn't contain one, so I'd have had to browse through other
posts or start up Character Map to grab one. We're talking a minute
rather than a second or two of work here. On behalf of a complete and
utter jerk.
 
H

Harold Yarmouth

John said:
Really? That seems unbelievable, considering his clear belief that
English is the world's only language.

I don't know about this Paul person, but I thought this arose in
connection with my keyboard lacking a ø key (and this time there was one
handy to copy and paste). And I certainly don't believe that English is
the world's only language.
(I don't have a Windows system to refer to, but my Mac lists "ø" on
the Canadian English keyboard.)

My keyboard lacks one. Perhaps English Mac keyboards inexplicably have
this key, despite its uselessness for composing English texts, but
English PC keyboards do not?
Maybe he's an American who fled to Canada when he heard that college
students were being drafted by the NFL.

That doesn't even begin to make sense. Even supposing I had some
inexplicable fear of football recruiters, I would have fled to Canada
for other reasons, such as fear of the Bush administration and its
erosion of the Constitution, had I in fact fled to Canada at all.
 
H

Harold Yarmouth

Arne said:
No need to apologize.

Arne sees the light? Whoa.
That letter has caused much confusion in IT systems.

Or number. For a long time, zero in computer fonts tended to have a
slash through it to make it readily distinguishable from capital letter
O. Since I had no other name for the letter in Arne's surname, I
referred to it by what it resembled, figuring anyone in IT would know
what I meant.

Apparently I underestimated how stupid (or maybe how willfully blind, if
being so will furnish a handy excuse for going off with another tirade
full of verbal abuse against me) some people here would be, and perhaps
how many of the regulars here aren't actually in IT at all.
 
J

Joshua Cranmer

Harold said:
My keyboard lacks one. Perhaps English Mac keyboards inexplicably have
this key, despite its uselessness for composing English texts, but
English PC keyboards do not?

Windows can use the so-called "Alt code" method to type characters, at
least those in the ISO 8859-1 character set. Most Linux users will map
either the right Alt key, right Meta (also known as the "Windows") key,
or the Menu key to the Compose key, which allows one to similarly
compose non-Latin characters.

For example, I can type the character using <Compose> </> <o>: ø.

As a last-ditch resort, there is always the Character Map or its analog
on other operating systems.
For more information:
<http://en.wikipedia.org/wiki/Ø#On_computers>

And as a final note, the proper way to transliterate 'ø' is 'oe', not 'o'.
 
J

Jerry Gerrone

Jerry said:
That "someone" calls himself Hunter Gratzner, and his erroneous
speculations have since spread far further than ever was merited. (The
speculator in question does not even seem to use this newsgroup.) So

Credibility: [insult deleted]

Internet usage skills: [insult deleted]

None of the nasty things that you have said or implied about me are at
all true.
[misquotes me and misquotes others]

Do not misquote me again. Your post contained supposed "quoted
material" that did not occur in the post that you followed up to nor
summarize material that did. That is incorrect. Stop being dishonest.
 
H

Harold Yarmouth

Joshua said:
Calendar is not designed for representing timestamps.

Thank you. That was exactly my point.
This is what the documentation says about Calendar's purpose:

The Calendar class is an abstract class that provides methods for
converting between a specific instant in time and a set of calendar
fields such as YEAR, MONTH, DAY_OF_MONTH, HOUR, and so on, and for
manipulating the calendar fields, such as getting the date of the next
week.

It is therefore entirely intended for display purposes.

Pretty much, though if you do business in a non-Western context, it may
be needed to parametrize some of the logic, too, as Lew and Arne have
pointed out. (But to parametrize the logic, injected from the layer
above, unlike what some have suggested.)

It definitely should have no place in the DAL, as a general rule, but we
don't have a tidier, non-deprecated Date constructor or builder, so ...
 
H

Harold Yarmouth

Mike said:
Not understanding it is yet another of them.

Okay. I'm assuming that these are insults, and of a particularly
childish sort ("your name sucks and is ugly!").

Please go find a quiet spot and grow up now, Mike.
 
H

Harold Yarmouth

Joshua said:
I feel obliged here to cite the elicited quote

You're not making very much sense.
Normally, I wouldn't object, but I had to do so considering that the `r'
on `your' was elicited

Please speak English.
The quote implied an /ad hominem/ attack, when in reality
it was merely pointing out that you had assumed something incorrectly.

But "merely pointing out that I had" done /anything/ bad constitutes an
/ad hominem/ attack. Especially when it isn't even true.
It seems like an intentional attempt to accentuate a perception of
victimization, given that it was repeated twice.

This seems like an intentional attempt to paint an incorrect picture of
me as some sort of dishonest person.

That constitutes another /ad hominem/ attack.

Neither yours nor Arne's /ad hominem/ attacks are evidence to support
your positions regarding the behavior of Calendar and Date. As such, you
have both committed a logical fallacy in "arguing against the man"
instead of arguing against what I have SAID about Calendar and Date.

Your disagreement is apparently with that, and certainly this thread's
topic is (supposed to be) confined to that; just look at the Subject
header if you don't believe me.

It is improper -- not only morally, but also logically -- for you to
express your disagreement with what I've said on that subject via
personal attacks.

Please stop doing so. I won't warn either of you again.
 
H

Harold Yarmouth

Peter said:
Do you mean "elided", per chance? :) It still wouldn't be quite
correct

None of this is "quite correct". Indeed, when it comes to personal
attacks aimed at me, by Arne or Joshua or pretty much anyone else, far
from it.

In particular, it's incorrect:
* Factually,
* Morally, and
* Logically, since no amount of badmouthing me or mudslinging in general
is going to convince any rational person that what I said about Date
and Calendar is false, or that what you said about them is true. Only
if you say things that are actually germane to Date and Calendar can
you be said to be approaching the matter logically (and even then that
is a necessary, but by no means sufficient, condition).

Neverminding the sheer ridiculousness of saying that someone's OPINION
is wrong, as Arne had done in one of his more recent personal attacks.
Opinions generally aren't factually decidable either way, hence their
being called "opinions" rather than "matters of fact".

Is nobody here capable of having a disagreement of opinion and remaining
civil? Or of agreeing to disagree on a matter of opinion? What compels
certain posters to lash out at their opponents when they realize that,
horror of horrors, someone disagrees with them /and won't promptly
change their mind upon discovering this/? It's like

X: I think A
Y: No, I think B. A seems unlikely because foobar.
X: Well, that being said, I still think A, and here're my reasons: etc.
Y: WHAT?! You IDIOT! How DARE you continue to disagree with me once I've
made my opinion on the matter clear? You're WRONG! My opinions are
as good as facts! If you do not agree, then you are wrong, and
moreover stupid for continuing to argue with I, the great Y, lord and
master of all I survey and final arbiter of everything!

Okay, perhaps a bit of a caricature, but I can name at least three
people that post regularly here and that have attacked me, that
sometimes display at least some tendency to express (more subtly) the
attitude attributed above to Y.

The fallacy this time seems to include something resembling "argument
from authority" or "appeal to authority", only not quite, since Y only
implies having some kind of special extra weight to his opinions,
instead of stating it outright or appealing to an external authority.

Perhaps some of the people in question are experienced Java experts, and
perhaps their opinions might reasonably carry more weight. But that does
not make an argument, or an attitude, like that correct. Indeed, it
means that they should try to set a better example regarding logic and
reasoning, and they should certainly have no problem articulating the
actual reasoning behind their opinions, instead of simply saying "I
think it's this way, and I think anyone who disagrees is at best naive
and at worst an idiot, and that's the end of the discussion, unless you
continue it, in which case I will flame you for doing so and still not
explain myself".

That is not a rational argument, and in my /humble/ opinion (so feel
free to disagree, though please do explain your reasoning if so)
arguments of that general form have no place in technical newsgroups.

In particular, to settle matters of fact /here/, we should use compiled
and tested/benchmarked code; to settle matters of law /here/, we should
refer to the JLS or the newsgroup charter, whichever is appropriate; and
to settle matters of opinion /here/, we should debate civilly like
educated and rational adults, not stoop to namecalling or adopt a
high-and-mighty "my opinions are the FINAL word on the subject!"
attitude. And we should accept that matters of opinion, by their very
nature, often will not /be/ settled, nor should we try to force them all
to be.
Surely you have noticed by now that, for this particular person and his
many different manifestations

What on earth are you blithering on about now? "Many different
manifestations"? There is only the one Harold Yarmouth, and he lives on
the east coast and programs full-time. My only "manifestations" are my
physical body and my handful of Internet accounts -- a hotmail email, an
email my internet provider supplied (and that I won't disclose here),
this newsgroup name, and one or two accounts at web forums. In
comp.lang.java.programmer I've only got the one "manifestation", the one
you're talking to right now.
 
H

Harold Yarmouth

Mike said:
This begins to make sense. It's true that when I was in college I wrote my
own papers. Who wrote yours?

That is an insulting insinuation.

The answer is: nobody. I didn't have papers to write, in that sense. I
had computer-programming assignments and related coursework. And for the
record, I was in university comp. sci., not "college". For my humanities
so-called "options" I picked the usual easy-low-workload stuff -- no
papers with references or other hard-core academic work, just essays and
even multiple-choice questions. The comp. sci. and related curriculum
involved no original research, just learning the existing subject matter
and some applied programming.

If you want to look down your nose at me for not having had more
challenging humanities courses or whatever, go right ahead, but I really
couldn't care less, and I really don't think it's relevant to this
newsgroup, so I'd prefer you let the subject drop.
 
H

Harold Yarmouth

John said:
The same website that wrote his high-school papers, I'm sure.

No.

I didn't have papers to write, in that sense. I had computer-programming
assignments and related coursework. And for the record, I was in
university comp. sci., not "college". For my humanities so-called
"options" I picked the usual easy-low-workload stuff -- no papers with
references or other hard-core academic work, just essays and even
multiple-choice questions. The comp. sci. and related curriculum
involved no original research, just learning the existing subject matter
and some applied programming.

If you want to look down your nose at me for not having had more
challenging humanities courses or whatever, go right ahead, but I really
couldn't care less, and I really don't think it's relevant to this
newsgroup, so I'd prefer you let the subject drop.

One thing I most certainly am not, however, is an academic cheat.

You people, on the other hand, I wouldn't put it past. Given your
demonstrated penchant for fallacious logic (particularly /ad hominem/,
but also strawman, appeals to authority, and others besides) it is clear
that you're more concerned with scoring points, by hook or by crook,
than you are with honesty, and given your "our opinions are FINAL, no
dissent will be tolerated!" attitude, you're also more concerned with
scoring points than you are with learning anything new.

That paramount concern with scoring points, by whatever means and
whatever the cost, and that disinterest in learning anything new, are
quite consistent with someone being an academic cheat.

Which isn't to say that you are. Just to say that given your recent
behavior here, I'd be more inclined to believe it, given circumstantial
evidence, than if you'd acted more normal.

Although there is also one other thing: by suggesting the mere
possibility, I have now given you a small taste of your own medicine. If
you don't like it, I suggest you quit dishing that particular brand out
to others.
 
H

Harold Yarmouth

Andreas said:
Don't you think these jokes are becoming stale somehow?

Those are not jokes. They are slander, or at least that last one (the
one you quoted) is.

I've half a mind to sue. Perhaps I would, if I thought that anyone might
take you at all seriously. But I can't imagine anyone taking the likes
of Mike Schilling seriously except for other low-lifes that are like
Mike Schilling, and I don't think any such person has any power over me
at this time or likely ever will, save if civilization collapses and
devolves to mob rule. (And if that happens I'll just grab a gun and
vanish into the Maine woods and the heck with the rest of the human race.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top