From: markspace on
luc peuvrier wrote:

> I had to obey to my project manager and architect.
> I understood they want to reduce stacking layer between the objets in
> memory and the bytes in the file.


Huh, this bit is interesting. Why is main memory and disc memory
constrained?

Are you working in a restricted environment like JME?

Why is it better for your manager to pay you for several hours for work,
rather than to just go to the store and buy 2Gb of memory for $100?
(Which should be, what, worth one and a half hours of your time, minimum?)

From: Lew on
Pitch wrote:
> I didn't know parent default contructor is automatically called in
> child's constructor (if no other parent contructor is called).

It would have to be - you cannot construct an object unless all its superclass
aspects are constructed, in Java's case before subclass aspects.

> So you cannot override parent's default contructor - which sucks.

Why does it suck?

You cannot override any constructor, not default, not explicit no-arg, not
with args.

> Also, you cannot place any code before super(...) which I already new,
> and it also sucks. :)

Again, why does that suck?

> Anyone knows why is that so?

You do, if you give it two minutes' thought. You call a method or do whatever
in a constructor after the object has reached a certain level of construction.
In order to reach that level, the superclass aspects have to be constructed
first, even to reach the subclass's constructor aspect. If you want something
other than default superclass construction, you have to do it first.

Similar reasoning applies to where you put 'this(...)' invocations.

--
Lew
From: Lew on
markspace wrote:
> Why is it better for your manager to pay you for several hours for work,
> rather than to just go to the store and buy 2Gb of memory for $100?
> (Which should be, what, worth one and a half hours of your time, minimum?)

That's NTD (Taiwan), right?

--
Lew
From: Tom Anderson on
On Mon, 8 Feb 2010, Arne Vajh?j wrote:

> On 08-02-2010 02:09, luc peuvrier wrote:
>> On 8 f?v, 04:23, Lew<no...(a)lewscanon.com> wrote:
>>> Lew wrote:
>>>> just between us, after 30 years of programming I have never handled
>>>> monetary data: surprise, right?
>>>
>>>> I am really happy to learn than float is not proper.
>>>
>>> Think about the reasons why.
>>
>> Luc:
>> float is an approximate numeric datatype, as defined by ANSI
>> standards.
>> http://stackoverflow.com/questions/285680/representing-monetary-values-in-java:
>> "Martin Fowler recommends the implementation of a dedicated Money
>> class to represent currency amounts, and that also implements rules
>> for currency conversion."
>
> That is one option.
>
> java.math.BigDecimal may be good enough for many cases.

Or int/long and establishing a convention that you're working in pence, or
thousandths of a dollar, or whatever is suitable.

tom

--
No hay banda
From: luc peuvrier on
On Feb 9, 4:30 pm, markspace <nos...(a)nowhere.com> wrote:
> luc peuvrier wrote:
> > I had to obey to my project manager and architect.
> > I understood they want to reduce stacking layer between the objets in
> > memory and the bytes in the file.
>
> Huh, this bit is interesting.  Why is main memory and disc memory
> constrained?
>
> Are you working in a restricted environment like JME?
>
> Why is it better for your manager to pay you for several hours for work,
> rather than to just go to the store and buy 2Gb of memory for $100?
> (Which should be, what, worth one and a half hours of your time, minimum?)

We do not work on restricted environment, but ours customer do not
give to us so much memory on their server in wich application is
installed. In only one case we have enough memory; it is when we sale
the server with embedded application, it only run linux and our
application. But plenty of customers do not want a new PC in their
office.

An important point is we have to persist data to be able to stop and
restart the application, we do not do that so often.

We can also imagine use a 32Gbyte solid state ram-disk, there is some
we 15 days battery backup, or replication in flash memory.

Luc