Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×

Comment Re:You shouldn't need insurance for most things (Score 1) 739

For most things maybe you just shouldn't be paying, at all denying treatment to those who happen not to have spare cash, eg students and young adults in general getting going in their jobs. I couldn't have paid anything much as a teenager for my epilepsy diagnosis and treatment; should I have just rotted before I even got to uni? I had left home, BTW.

(In the UK I do pay for a few things at point of use under the NHS, but often even then fairly small fixed/tiered charges.)

Rgds

Damon

Comment Re:Just don't try to write an OS in Java (Score 1) 511

Hi,

That is a different and also interesting case, and just by bringing it up you'd pass my test.

No, I meant something like:

public static final String CRITICAL_ID = "whatever"

in a secure API. If I use char[] instead what happens if a miscreant overwrites the content of the array; what BadThings might happen?

Rgds

Damon

Comment Re:Performance improvements have helped it survive (Score 2) 511

Except that once JIT/Hotspot is involved all or most of the executions *are* of compiled machine code, optimised to the particular CPU on hand and the particular data set for this particular job. So things like dynamic inlining *for this particular job* can allow the JVM to produce *better* machine code which will execute more quickly than statically-compiled code.

The translation takes time, but for long-running tasks that may well be easily amortised away.

So single-threaded Java can beat single-threaded C++.

But I can also bring more CPUs to bear on the code safely with Java for a given level of code complexity (well, now C++ finally has some sensible volatile semantics, that's a little less true).

And there are other factors such as the generally forced synchronous nature of C++ heap handling which can work against it.

Rgds

Damon

Comment Re:Performance improvements have helped it survive (Score 1) 511

I promise you that it was worth saving many MB in the .WAR and associated thumb-twiddling time, plus showing me in the logs which library and other routines were actually being used. I never felt the need to time stuff (since performance was at least not visibly worse). Shame on me!

If I get a chance I'll do as you suggest, though it'll be tricky with all the many things going on concurrently.

Rgds

Damon

Comment Re:Just don't try to write an OS in Java (Score 1) 511

My favourite related Java question to ask in the context of security is: "What's the difference between char[] and String, eg if I have one in a critical API as a public static?"

I'm quite happy to hear slightly 'wrong' answers as long as someone understands a little about wrapping/immutability and so on...

Rgds

Damon

Comment Re:Performance improvements have helped it survive (Score 2) 511

"WILL NEVER": gosh, not true and never has been unless you know the exact CPU and execution paths and data sets that you are compiling for, for all executions of the statically-compiled code. Please don't regurgitate this stuff.

When maintaining a C++ build system used internationally by a large bank I had to guess what the optimal target instruction set variant, cache line size, etc, would be over the lifetime of the output code, which was always a compromise over London/NYC/TOK/etc and a huge range of dev and production hosts of various ages. And with most/much of the library stack unsafe for C/C++ threading even though almost none of our machines (eg desktop or server-farm) where single CPU you could not then and could not now say whether C++ or Java would be necessarily faster on a given machine, given all the CPU- and run- specific optimisations the JVM has available to it that C++ does not.

I currently work on a Java low-latency high-frequency trading platform in the day job and an ASM/C/C++ based microcontroller platform for my start-up. And I think that I've been using C++ and Java for most of their existences, amongst other languages (I've been writing ASM for >30y); I have a fair idea of what is fast and what is productive.

Rgds

Damon

Comment Re:And when you include end-of-life costs? (Score 1) 409

Well, not entirely. Still has its own nuke, gas and (erk!) coal, at least for now. And still not enough interconnection to depend very heavily on anything outside its borders I suspect (I must look up those figures vs winter peak demand).

Don't get me wrong, I'm not against nuke at all, it's just not the panacea that is frequently claimed IMHO.

Rgds

Damon

Comment Re:No, school should not be year-round. (Score 1) 421

Much (not all) of what they're learning at school is like scaffolding; they need to retain it to get to better things but not necessarily for its own sake after that. I've managed without various apparently-essential rote-learnt elements too. (I loved physics because you had to remember about 4 things to pass the exams, including inverse square law and Ohm's law; I hated biology at times since it seemed to require lots of meaningless memorisation of things best looked up when actually needed.)

But if they drop that scaffold too quickly then all sorts of more interesting and lucrative and enjoyable opportunities will elude them, I think.

Rgds

Damon

Slashdot Top Deals

Crazee Edeee, his prices are INSANE!!!

Working...