Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror

Slashdot videos: Now with more Slashdot!

  • View

  • Discuss

  • Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

×

Comment: Re:Some loss already happened (Score 1) 332

My impeccably logical rational friend, loosen up a bit :-)

Don't forget: location, location, location :-) Speaking of pussiness: if you buy one of those addresses, and happen to look a bit like the guy who lived there, and have three small kids, "courage" is not in the context of your bravery, more like not exposing your children to avoidable risk. If you didn't know, US real estate prices in these - probably - nice areas are impacted by new neighbors who are not of the majority race.

Also, proper notification of these guys by government agencies, and other preparations may also amount to a few millions. US officials probably don't want the type of revenge terrorism that killed most of a journal's staff in France a couple of months ago.

Comment: Some loss already happened (Score 0) 332

Each of those 100 real estate addresses are worth many ten k less because living in an address where a jihadist can appear for shooting is less desirable. Loss of about 5-10 million USD before doing anything. Since media is their enabler, perhaps censorship doesn't appear avoidable.

Comment: Re:This is not a mindshare battle...at all (Score 1) 319

by robi5 (#49083609) Attached to: Java Vs. Node.js: Epic Battle For Dev Mindshare

> Javascript, despite it's popularity, is a terrible language. It's popularity is due to one thing, it is embedded in the browser.

A devil's advocate may answer that if JS were that terrible, it and the browser and the web (or Web 2) wouldn't have taken off. But this also offers no proof or reason.
Admittedly there's lots of dislikeable parts of JS, but we probably agree that for whatever reason it happens to be one of the most popular languages ever.

> There's a 4th reason that gets tossed around that I've never seen actually validated with the idea of "reusing code on the backend and the front-end" but I've never seen a case where that was actually a good idea since it involves exposing so much logic.

I don't understand 'so much logic'. You need to validate user input in the browser (with 'logic') to avoid server round trips for common errors; but you also must validate data on the server side, because you can't trust the incoming POST/PUTdata (it may come from a malicious agent). Why would you program the validation twice? The same goes for aggregations, filtering, sorting, utilities etc. - not to mention prerendering the page on the server side for faster initial load or some other purpose (SEO optimization).

> On the frontend, yes, Javascript everything...because you have no other option. That's like saying black was beating green for mind share with the Model T Ford.

> On the backend, you have Java, Go, .NET, Ruby, Python, PHP, Clojure, Groovy, Erlang, Perl, Scala...all of these languages exist with different benefits and different trade offs.

So instead of a zillion competing options with various tradeoffs, just pick the language you already use anyway (JS), which also has various tradeoffs, with the big plus that you don't introduce a language chasm along arbitrary technical boundaries such as some length of wire between a data center and the user.

Comment: Re:That's where Vaadin enters the picture (Score 1) 319

by robi5 (#49083531) Attached to: Java Vs. Node.js: Epic Battle For Dev Mindshare

One can find an interesting niche project for anything... but probably the analogous meteor.js (as in Javascript) has a larger community. It may be to do with social reasons; the JS world could remain nimble while the Java world has matured, consolidated, slowed down and lost its coolness as well as edge. By now, those Java folks who were more ambitious, are testing Clojure, Scala or RxJava.

Comment: Re:Can someone explain node's supposed speed (Score 1) 319

by robi5 (#49083501) Attached to: Java Vs. Node.js: Epic Battle For Dev Mindshare

> Node is slower than a modern typed VM like the Java on the JVM or C# on .NET. Let's get that out of the way right now - Java is faster than Javascript. The reason is that Javascript source lacks a lot of info needed to efficiently map it to machine code, so V8 and other fast JSVM's all have to rely heavily on speculation. That's a fancy way of saying they guess what the code might do, compile that, and then recompile it again if it turns out they were wrong (or if the code actually changes itself at runtime which is not uncommon for dynamic languages).

I don't think it follows. Both Java and JS use JVM and both need to compromise some performance in the name of safety. Code fragments that are used once won't be optimized and it won't matter. CPU heavy lifting occurs if you operate on larger memory blocks (typically loops or nested loops). One common example is matrix multiplication. If you worked at Google, you may be familiar with how a Javascript array can hold unboxed integers or floats, if the programmer followed common sense and didn't destroy this optimisation by also storing strings in the array (of course you can use typed arrays too in JS...). If the JIT knows the bounds of the array and the element type, why would a Java MMULT be inherently faster than a JS MMULT?

By the way, even if the JIT cannot guarantee e.g. the type of something: the overhead does not occur because the JIT has to deoptimize something. With well written code, the programmer avoids the circumstances that would lead to such deoptimization. Instead, the overhead occurs because the JIT cannot guarantee it in all circumstances, and by extension, when it is unsure, it is obliged to check first. These instructions are typically low level bit tests and the like, and they add instructions, but they don't typically involve extra memory lookups or some other complex thing that would slow down a modern multiscalar CPU. But again, most performance-critical time would be spent in tigth loops running on typed arrays, where memory alignment, cache hits etc. play a more important role than the language, and neither JS nor Java has the type of control over memory allocation or memory arithmetic that C has.

Comment: Re:Node.js is server side (Score 0) 319

by robi5 (#49083221) Attached to: Java Vs. Node.js: Epic Battle For Dev Mindshare

> assuming Java generally has better run-time performance than Javascript

Java has no speed benefit of any impact over Javascript (e.g. V8). What you propose (node.java) actually exists (e.g. Ratpack); node.js elements such as non-blocking I/O were basically taken, and implemented in Java. Even with this there's no compelling argument for Java, and the developer mindshare and most action is in node.js land. These societal factors easily outweigh the few technical positives of Java.

Java is most commonly used as a simple, synchronous web server, so statistically speaking, JS has the lead over Java (because node.js is non-blocking).

Comment: Re:Node.js is server side (Score 1) 319

by robi5 (#49083157) Attached to: Java Vs. Node.js: Epic Battle For Dev Mindshare

Why PHP or Perl on the backend, if you already need to use JS on the client, AND you can as well use it on the server?

For it is obvious that the modern web experience requires more and more dynamism, with fluid interactions, and this necessitates JS more and more (though with high bandwidth, low latency and high reliability may come dumber terminals which just receive video streams, but that's another 10-15 years).

Comment: Re:Node.js is server side (Score 1) 319

by robi5 (#49083125) Attached to: Java Vs. Node.js: Epic Battle For Dev Mindshare

Interestingly, one of the most important but forgotten part about node.js hides in plain sight - it is that it's a NODE.

More traditional architectures have a strong separation of client vs. server. But node.js is already showing some of what it means that it's a node:
- you can write your code once and run it anywhere :-) be it client, server, middleware etc.
- your server may not be just one server: maybe it's a network of servers (nodes), e.g. with functional separation, domaln object separation or partitioning separation
- you already use node.js on the client side (the developer toolchain contains dozens of node.js based tools, like grunt)
- some client/server lines are blurred; e.g. the use of phantom.js for testing or server side static page prerendering
- the Internet of things is a buzzword, but it's coming

So this highlights the strength of node.js and JS in general: while people with a traditional mindset say node.js is just a server which just happens to use Javascript, the implications are a lot more profound. Check out something like meteor.js to see how it allows a reimagination of data flows.

Comment: Re:Ummmm.... (Score 4, Insightful) 319

by robi5 (#49083057) Attached to: Java Vs. Node.js: Epic Battle For Dev Mindshare

The summary is not about node.js vs. the browser, but Java vs. Javascript.

The main problem with Java (other than the other major problems others listed) is that it's not Javascript:

1. you cannot realistically avoid Javascript on the client side
2. the client side is only getting richer in functionality (look up something like dc.js, crossfilter.js, d3.js, Google apps, mapping, all web apps...)
3. there is benefit to using one language instead of two, if the feature set is comparable: no context switch for programmers...
4. ... and you can use common data validation (on the client: reject/highlight bad user input without a server trip; on the server: 'never trust the client' principle, infosec)
5. ... and common aggregation analytics (allow your user to sort, filter, aggregate data, product descriptions, events whatever) between client and server
6. ... common domain-specific logic, common utilities libraries, DRY principle, no duplicated testing of logic, common development toolchain, we could go on

So the 'they both have their place' isn't quite true for a very large fraction of deployments which currently use Java on the server (and naturally, JS on the client).

Javascript is not 'only so performant', and, as someone else below assumed, JS isn't fast 'because of concurrency'. Most JS is run on V8 or similarly advanced engine, and in my experience the resulting code is about as fast (or slow) as Java execution (single threaded) even if we ignore the most often cited benefit of node.js, which is non-blocking IO. As JS itself is evolving, with typed arrays and the possibility of programming it without generating garbage, WebGL, Web workers, and low level numeric and bit logic functions coming up in about a year, so it'll only get faster. It's unlikely Java will ever have a performance lead on JS ever again.

Using the same language end-to-end is a more powerful argument than 'the right tool for the job' argument, especially if Java's current lead in some specific server side areas (e.g. finance/reliability/type safety aspects, or machine learning) aren't inherently a consequence of the language, just a consequence of a head start in those areas.

So in my opinion there is a strengthening incentive for using one language end to end at the expense of Java.

Comment: Re:Continental Europe (Score 1) 149

by robi5 (#49045707) Attached to: Mooted: An Undersea Link From Finland To Estonia

I'm sure there are _lots_ of people in the Middle East who are also not fond of sharia law, yet something like the Islamic State occurred, and Islamic revolutions resulting in 'fundamentalist' religion-states. Interesting that you seem to starkly contrast modern Muslims who migrated to the West with, your word, 'minorities that live in the middle ages'. I'd have thought that there are all kinds of gradients and influencing channels.

Also, walking in the streets of some of the above mentioned cities, not all Muslims living there appeared very modern muslims, what with their youth forming large, loud obnoxious groups of man-gangs where other pedestrians, especially women do best by crossing to the other side of the road.

Comment: Re:Continental Europe (Score 1) 149

by robi5 (#49045419) Attached to: Mooted: An Undersea Link From Finland To Estonia

> Becoming 'Muslim' is not a fault line. Actually no one really cares what religion you have. Even if you are so brain damaged that you need a religion to have a fulfilled life the - in general more or less atheist - population of Europe tolerates you.

Well, your opinion exhibits the tolerant Western mindset. It is this very mindset that is likely taken advantage of as the Muslim influence is growing unabated, through migration, demographics and propaganda. But mostly, through sitting out the couple of decades before there is majority. If a Western democracy has become predominantly muslim through demographics, or at least very large parts of it, what's going to stop electoral wins and eventually Sharia law? Just asking. So it's not _your_ tolerance what matters (in fact it's an enabler more dangerous than terrorism) but what the other side does with it, and IF the other side has a very strong agenda, then this will inevitably bias the whole system.

But, while being eaten alive by other worlds, the First World and Western culture preoccupies itself with internal fighs, such as Russia against Ukraine, UK immigration intolerance toward E-Europe, Russia against Nato and the US etc. When democracy, girls' education and women's rights will evaporate, all these shortsighted frat bullyings will be obvious in retrospect.

Comment: Re:Continental Europe (Score 1) 149

by robi5 (#49045403) Attached to: Mooted: An Undersea Link From Finland To Estonia

Most Hungarians borrowed in CHF. Had Hungary adopted the EUR in time, people would have borrowed in EUR rather than CHF (it had only marginally higher interest rates than CHF, and there is natural bias toward a domestic currency if conditions are not too far). Also, debt repayment would have occurred in the same currency. So the timely adoption of the EUR woulnd't have been detrimental or against the interest of the population; on the contrary, it would have served the country better. Yes the current government did its best to eliminate the CHF exposure and famously hedged all domestic CHF debt weeks before the Swiss central bank let go of the exchange rate. You're right about Orban's success in taking the country out of the high risk debt the Socialists irresponsibly built up.

"What is wanted is not the will to believe, but the will to find out, which is the exact opposite." -- Bertrand Russell, _Sceptical_Essays_, 1928

Working...