Possible bug in Calendar

J

John W Kennedy

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

The same website that wrote his high-school papers, I'm sure.
--
John W. Kennedy
"The pathetic hope that the White House will turn a Caligula into a
Marcus Aurelius is as naïve as the fear that ultimate power inevitably
corrupts."
-- James D. Barber (1930-2004)
 
A

Andreas Leitgeb

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

Don't you think these jokes are becoming stale somehow?
 
A

Andreas Leitgeb

Mike Schilling said:
Andreas said:
Don't you think these jokes are becoming stale somehow?
You have to know how to tell them. It's all in the ....
[pause acknowledged, but victimized to snipping] timing.

The way you told it, it came over as stale. Maybe you'd
fine-tune the timings a bit, and tell the punch line ...
next century(*), for example.

*: no, that doesn't translate into any number of (empty) lines.
 
M

Mike Schilling

Andreas said:
Mike Schilling said:
Andreas said:
This begins to make sense. It's true that when I was in college
I
wrote my own papers. Who wrote yours?
Don't you think these jokes are becoming stale somehow?
You have to know how to tell them. It's all in the ....
[pause acknowledged, but victimized to snipping] timing.

The way you told it, it came over as stale. Maybe you'd
fine-tune the timings a bit, and tell the punch line ...
next century(*), for example.

If you insist, though I think that result would be
 
A

Andreas Leitgeb

Mike Schilling said:
If you insist, though I think that result would be

Oh, and in case you're using Calendar for your
punch line posting program, keep in mind that
Calendar calendar = Calendar.getInstance();
calendar.set(2100,1,1,0,0,0);
Date date = calendar.getTime();
still carries with it a snapshot of the microseconds of your
local time.

PS: yes, I'm extremely in suspension for the gist, but
I'll be patient...
 
A

Andreas Leitgeb

[superseded to correct my micro/milli mix up]

Mike Schilling said:
If you insist, though I think that result would be

Oh, and in case you're using Calendar for your
punch line posting program, keep in mind that
Calendar calendar = Calendar.getInstance();
calendar.set(2100,1,1,0,0,0);
Date date = calendar.getTime();
still carries with it a snapshot of the milliseconds of your
local time.

PS: yes, I'm extremely in suspension for the gist, but
I'll be patient...
 
H

Harold Yarmouth

Arne said:
I think it is polite to answer questions from newbies even though they
may be slightly off topic.

The off-topic posts that concern me are anything but polite.
 
H

Harold Yarmouth

Lew said:
Arne said:
[Lew] proved that you ... was wrong.

Quite so.

A lie. Nobody has done anything of the sort.

I find it interesting that both of you feel such a strong and
irresistible impulse to tear me down, thinking up any excuse why
something (like, say, Lew changing his mind about something and
conceding a point of contention with me) might somehow be a reason why I
am somehow bad (wrong, evil, stupid, or whatever).

So I change Lew's mind about something -> I was somehow wrong? Not Lew?

It's times like this that make me wish I'd gone into psychology rather
than comp sci. You two are fascinating, in a "something that crawled out
from under a rock" sort of way.
 
H

Harold Yarmouth

Arne said:
Then how can you write such nonsense as the above ??

It may seem like nonsense to someone as unfamiliar with the English
language as you are, but I assure you, it is not.

So you concede that you've been attacking a straw man. Good. The first
step is admitting you have a problem.
I think your definition of "rational" and "model citizen" differ a bit
from other peoples.

They certainly seem to differ from yours.

But the facts speak for themselves. I'm not the one engaging in
name-calling. I'm not the one engaging in straw man arguments. I'm not
the one whose primary form of argument is the personal attack. I'm not
the one who is apparently not here to discuss Java at all.
 
H

Harold Yarmouth

Arne said:
Which is completely irrelevant.

Only in your not-an-English-expert,-not-by-a-long-shot opinion.

(Your intentional misquotation of the previous message has been
helpfully corrected.)
 
H

Harold Yarmouth

Arne said:
Almost everybody except you seems capable of using it.

Oh, I'm quite capable of using it, you liar. It's just excessively
complicated to use it for that particular purpose, as Lew, Roedy, Mike,
and at least two other people have agreed.

Are all of them idiots too? Even your parner in crime Lew? Go on --
either call them all names to their faces, or admit that you were wrong
to call me names. Because they are "guilty" of thinking the exact same
thing that has apparently provoked you to attack me!
And I really don't think Java API should be designed after
people like you

Where "people like me" = "ordinary Java programmers"? Boy, am I glad
that you are NOT in charge of how the Java API gets designed then!
Indeed, aren't we all! Well, except you.
The class still need to be there. It is irrelevant how it gets
instantiated.

It's relevant to what layer it's in, and the above means that it's in
the layer above the core logic layer (though perhaps below the UI layer
proper), though feeding the core with some information or providing it
with black-box methods or something.
 
J

Joshua Cranmer

Harold said:
Stop lying about me. Nobody has done anything of the sort.

I feel obliged here to cite the elicited quote:
And proved that your assumptions about his opinion view was wrong.

Normally, I wouldn't object, but I had to do so considering that the `r'
on `your' was elicited (twice, so it wasn't a simple removal mistake),
and that, in eliciting material, you drastically changed the meaning of
the statement. The quote implied an /ad hominem/ attack, when in reality
it was merely pointing out that you had assumed something incorrectly.

It seems like an intentional attempt to accentuate a perception of
victimization, given that it was repeated twice.
 
H

Harold Yarmouth

Arne said:
That is an OK way of doing it, but the class is still part of BLL.

IYHO. I consider the core logic to be the layer that implements the
program's core logic -- typically there's one layer beneath that (I/O
layer) and two above (UI at the top, and an abstraction layer in between
that provides models to the UI and dependency-injected modules to the core).

You may be considering both of the middle layers to be BLL, but I was
making a distinction between them. The lower one may do things like
manipulate a java.util.Set or call getNextRentDueDate() on an injected
object and act on the result. The upper one does things like provide a
ListModel wrapper around a Set to the UI or a BusinessPolicy object that
furnishes getNextRentDueDate() to the lower layer.
This is why they are needed in BLL, because a lot of real world logic
depends on them.

Depends on them != contains them. The same real world logic also depends
on values obtained from the user and calculates using information
retrieved from the disk, DB, and/or network. By your reasoning, the I/O
code and the input half of the UI code also is "needed in BLL".
 
H

Harold Yarmouth

Arne said:
Because it is not presentation.

Who said it was presentation? I said it was not core logic. It just so
happens to belong in between those two layers.

Arne, we can add another to the list of your fallacies now -- false
dichotomy.
You do not put logic about when to do what in the PL.

No, you put universal (possibly parametrized) such logic in the core and
supply non-universal logic to the core through injection. You don't put
the latter directly in the core, though.
Knowing the length of a week is not a presentation thing.

I never said it was. I said it would be passed down from a higher layer.
You made an assumption about which layer that was.
Why do you think it is called Business Logic ?

Don't change the subject. What do you think you are, anyway, a
therapist? Turning everything around into a question to ask me is not a
proper way to discuss an objective and empirical field like computer
programming.
Oh - and layering has nothing to do with OOP

It has everything to do with OOP; it's part of program structure and one
part of abstraction and encapsulation. Abstraction and encapsulation are
pretty much the beating heart of OOP.
you have misunderstood

NO. I HAVE MISUNDERSTOOD NOTHING. YOU HAVE MISUNDERSTOOD EVERYTHING --
OOP, ENGLISH, JAVA, AND ME. PLEASE DO NOT SPEAK FROM YOUR IGNORANCE ON
ANY OF THESE TOPICS AGAIN!
That is one of the core things in BLL.

No. Again you misunderstand the purpose of the layers. The core logic of
the program is not things like "when one particular branch does
payroll", it's things like "how to do payroll in general".

If we did things your way, every branch would need its own payroll
system designed from scratch, with no code reuse! The branch-specific
rules would be mixed in with the universal how-tos of the code's job,
instead of being in a separate place that's referenced by the core code.

The proper way allows the payroll systems of the various branches to be
largely identical, except for a few branch-dependent objects,
..properties files, and what-not.
BLL does some of these things, but it is really not what BLL is
about.

The above is core things in DAL and utility classes.

We are talking past each other. You're using different names to refer to
things, and then you think that I said something incorrect about layer X
when I was really saying something correct about layer Y.

Let's break it down, shall we, so that we're all on the same page?

UI layer -- what you seem to be calling PL
Abstraction layer -- what you seem to be calling BLL
Core logic/BLL -- what you seem not to be calling anything coherent
I/O and Utils -- what you seem to be calling DAL
Library code -- Streams, HashMap, etc. (but some library code used at
every layer, especially String, Date, and collections).

With that said:

UI layer -- displays payroll reports or whatever
Abstraction layer -- wraps collections in Models for UI, provides
locale-dependent/branch-dependent business objects
such as has getNextPayrollDueDate().
Core -- knows how to do payroll, decides when from injected objects or
payroll routine only called then by abstraction layer
I/O and Utils -- actually generates the paycheques or whatever, and
manages accounting, employees, etc. tables in DB

If you still have some disagreement with the above design, be sure to
let me know. If you don't, then let this entire subject drop, as there
is nothing going on here except for a misunderstanding on your part.
 
H

Harold Yarmouth

Joshua said:
Astronomers would care to disagree.
Nope.

Anthropologists, archaeologists, and
a surprisingly large amount of people would need to be able to concern
themselves with dates before the Gregorian switchover.

True, but they don't have disk files last modified during the Roman
Empire's heyday, or database tables last accessed during the
Palaeolithic, let alone network packets timestamped near the date of the
Crab Nebula supernova.
 
J

Joshua Cranmer

Harold said:
True, but they don't have disk files last modified during the Roman
Empire's heyday, or database tables last accessed during the
Palaeolithic, let alone network packets timestamped near the date of the
Crab Nebula supernova.

Calendar is not designed for representing timestamps. 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.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top