article thumbnail

Mangling JSON numbers

TechEmpower

Theoretically we can send it from a Java server to a JavaScript client via JSON and both sides see exactly the same number. To convince ourselves that this number is safe, we examine various representations of this number in Java and JavaScript: // In Java long x = 1L. We happen to use JAX-RS in our example code.

article thumbnail

Everything about Java 8

TechEmpower

The following post is a comprehensive summary of the developer-facing changes coming in Java 8. At the time of this writing, Java 8 development is still very much in progress. It had the best support for the Java 8 language features at the time I went looking. The List interface is an example.

Java 560
Insiders

Sign Up for our Newsletter

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

article thumbnail

Efficient multiple-stream concatenation in Java

TechEmpower

With three streams we could write Stream.concat(Stream.concat(a, b), c). For example, it interacts poorly with infinite streams. Let me share a few trends that I've noticed when dealing with streams and stream concatenation in general, having written a fair amount of code in Java 8 by now. Stream a = Stream. forEach ( System.

Java 200
article thumbnail

How to Teach Computational Thinking

Xconomy

So when you write in it, you’re doing programming. Yes, there’s certainly a need for some number of software engineers in the world who can write low-level programs in languages like C++ or Java or JavaScript—and can handle the details of loops and declarations. The Wolfram Language is a programming language.

article thumbnail

EnumSet and EnumMap

TechEmpower

from Java's standard libraries. Historically, Enum{Set,Map} were recommended as a matter of safety, taking better advantage of Java's type system than the alternatives. Effective Java goes into detail about this use case for Enum{Set,Map} and enum types in general. This article discusses java.util.EnumSet. and java.util.EnumMap.

Java 330
article thumbnail

Framework Benchmarks

TechEmpower

Netty , Vert.x , and Java servlets are fast, but we were surprised how much faster they are than Ruby , Django , and friends. In third place is plain Java Servlets running on Cauchos Resin Servlet container. For example, on the Java platform, Jackson was used for frameworks that do not provide a serializer. Java / JVM.

Framework 560
article thumbnail

Frameworks Round 1

TechEmpower

Netty , Vert.x , and Java servlets are fast, but we were surprised how much faster they are than Ruby , Django , and friends. In third place is plain Java Servlets running on Caucho''s Resin Servlet container. For example, on the Java platform, Jackson was used for frameworks that do not provide a serializer. Java / JVM.

Framework 544