background preloader

Java 1

Facebook Twitter


Concurrency 1. Scala 1. Concurrency 2. Scala 2. Scala 3. Scala 4. Developing with real-time Java, Part 1: Exploit real-time Java&# Real-time Java is a set of enhancements to the Java language that provide applications with a degree of real-time performance that exceeds that of standard Java technology.

Developing with real-time Java, Part 1: Exploit real-time Java&#

Real-time performance differs from traditional throughput performance, which is typically a measurement of the total number of instructions, tasks, or work that can be done over a fixed amount of time. Real-time performance focuses on the time an application requires to respond to external stimuli without exceeding given time constraints. In the case of hard real-time systems, such constraints must never be exceeded; soft real-time systems have a higher tolerance for violations. Real-time performance requires that the application itself gain control of the processor so that it can respond to stimuli, and that while responding to the stimuli the application's code is not blocked from execution by competing processes within the virtual machine.

Back to top. Stories/MichaelDykman - J. Michael Dykman I am probably the last person on this list who should pipe in here.

Stories/MichaelDykman - J

I have been dabbling with the language for about 2 years now. Previously, I had spent 30+ years using computer languages, 20 of them professionally, mostly in what I lovingly refer to as "the bottom-feeding world of business app development". I have used C, C++, Perl, Java, PHP, Javascript. All the predictable suspects and then some. I discovered J by accident, the subject of another post for another time. When I encountered train syntax, my first reaction was that it was the most arbitrary, academically-inspired nonsense I had ever seen. Others can better describe the formal properties of the train that lend it such power and elegance but I can tell that now, to me, every problem looks like a train. Posted to the J forum on 2009-06-04. How do ClassLoader leaks happen?

Args4j: Java is Pass-by-Value, Dammit! Serbo-Croation Translation Available!

Java is Pass-by-Value, Dammit!

Woohoo! Jovana Milutinovich gratiously offered to translate this article to Serbo-Croation! You can read the translation here: Thanks a million, Jovana! Objects as Functions in Java. Earlier this year I wrote a build tool in java.

Objects as Functions in Java

The core idea at the time was to express the build in terms of functions and function composition. This is not exactly a good fit with java. So last week I had some spare time and came up with this way of defining a function (application) in java: public static class FancyFunction extends FunctionBase { @In public final Str a; @In public final Str b; @Out public final Str c = null; @Out public final Str d = null; public FancyFunction(Str a, Str b) { this.a = a; this.b = b; super.reflect(); } protected void evaluate() { setResult(c, new StrImpl(a.getValue() + "-" + b.getValue())); setResult(d, new StrImpl("XX")); } }

What I miss in Java. So I finally got some time to sit down and write, after being knee deep in work the past month or two.

What I miss in Java

And without a doubt, I wanted to write about what has been heckling and annoying me over the past month. I am an ardent defender of Java as a good language, especially defending it from Misko day in and day out, but even I will agree that it does suck at times. So today, Java, the gloves are off. I love you, but this is the way things are. Signalling Integer Overflows in Java. ...and people are still using java? Last week I was at the LASER 2009 summer school on Software Testing.

...and people are still using java?

It was pretty interesting and one brief talk captured my attention. The speaker, Martin Nordio, asked the audience if they knew Eiffel and only a few hands were raised. DEADBEEF or CAFEBABE. Two Java Type‐System Holes. Next Generation Java is not very different from today's Jav. Next Generation Java is not very different from today's Java In a recent post, Stephan Schmidt makes several suggestions in order to write "Next Generation Java".

Next Generation Java is not very different from today's Jav

Unfortunately, I disagree with most of them... Let's take them in turn: final everywhere This is guaranteed to make your code littered with final keywords and therefore, impair readability significantly (same problem as Python's self pollution). Java's Lots of Little Files. I ran into this article about "Next Generation Java Programming Style", at YCombinator.

Java's Lots of Little Files

There was some interesting discussion about the overall effectiveness of these suggestions. Part of the discussion involved commenter Xixi asking if anyone had followed point #5, "Use many, many objects with many interfaces". It turns out, I've been following that model. I started to reply there, but I recognized a blog post after a bit. Here's my general workflow, and I've found it to be quite effective. The linked-to article refers to interfaces as "roles", and that's probably the easiest way to think of them. Go Ahead: Next Generation Java Programming Style. August 10, 2009 by Stephan Schmidt Many companies and developers move away from Java to new languages: Ruby, Python, Groovy, Erlang, Scala.

Go Ahead: Next Generation Java Programming Style

You might be trapped with Java. Even if you’ve trapped, you can change your programming style and reap some of the benefits of those new languages. A Java old timer reminisces – Oak, 0XCAFEBABE, Green Threads, Ru. I have been working with Java since the mid nineties, and in that time, Java has gone from being a “fad”, the next “big thing”, etc, to becoming a widely accepted and deployed programming language in the business world.

A Java old timer reminisces – Oak, 0XCAFEBABE, Green Threads, Ru

Being involved with Java for a long time has its share of ups and downs. On the plus side, you know and understand the very basic foundations of the language and its evolution, on the negative side you sometimes talk about stuff no one else has a clue about. Double Brace Initialisation. The high cost of (WS-)Security. WS-Security provides a comprehensive set of security features for Web service applications, building on established industry standards for cryptography and XML encryption and signing. You can specify the features to be used for a particular application with WS-Policy and WS-SecurityPolicy, allowing clients of the service to configure themselves automatically to access the service. With widespread support for these standards across multiple platforms and web services frameworks, interoperability is good (and getting better over time). Despite these benefits, WS-Security also has some drawbacks.

You've seen in the last two articles of this series that WS-Security can be complex to configure, and that it sometimes adds a lot of bulk to the messages being exchanged. So when are the benefits of WS-Security worth the costs? #534364. Keynote: The Future of Java Innovation. Ternary Try/Catch. We often discuss Java limitations on IRC and try to come up with (sometimes silly) workarounds.

Unfortunately after time passes it’s often easy to forget the outcome, and lose code snippets. Common Java Cookbook. Original Sin. I’ve often said that Java’s original sin was not being a pure object oriented language - a language where everything is an object. As one example, consider type char. When Java was introduced, the Unicode standard required 16 bits. This later changed, as 16 bits were inadequate to describe the world’s characters.

Tangent: Not really surprising if you think about it. For example, Apple’s internationalization support allocated 24 bits per character in the early 1990s. In the meantime, Java had committed to a 16 bit character type. Is Java as we know it doomed? While Oracle and Sun Microsystems are hailing Oracle's purchase of Sun as a big boost for Java, others are not so sure, questioning what kind of control Oracle might try to exercise over the popular platform that has driven so many enterprise applications since it was first developed in 1995. Observers also expect Oracle to make a go of trying to make more money off of Java than Sun ever could. Sun has tried to leverage Java as a lead-in to selling services, but without much success. By contrast, Oracle is very disciplined about extracting money from its technologies.

"Java is one of the computer industry's best-known brands and most widely deployed technologies, and it is the most important software Oracle has ever acquired," the companies said in a joint statement announcing the acquisition. "Oracle Fusion middleware, Oracle's fastest growing business, is built on top of Sun's Java language and software.

Mulling over Java. Transaction strategies: The API Layer strategy. Whether you are using a container environment with EJB 2.1 or 3.0, the Spring Framework environment, or a Web container environment such as Tomcat or Jetty with the Java Open Transaction Manager (JOTM), you still need a transaction strategy to ensure database consistency and integrity. The Java Transaction API (JTA) specifies the syntax and interfaces associated with transaction processing (see Resources), but it doesn't describe how to put these building blocks together. Why Java doesn't need operator overloading (and very few la. MVEL - Home. Small Language Changes for JDK7. Putting Java’s Null in its Place. Presenting the Permanent Generation. Have you ever wondered how the permanent generation fits into our generational system? Ever been curious about what's in the permanent generation. Busting java.lang.String.intern() Myths.

(Or: String.intern() is dangerous unless you know what you're doing!) Correcting the Billion Dollar Mistake. Last week I visited Stockholm to speak at the JFokus 2009 . Ten Amazing Java Applications. How to deal with filesystem softlinks/symbolic links in Java. Ok, here is the problem: You are assigned to write a method for a Java based filemanager, that is able to delete an entire directory tree. Sounds like a trivial task, that can easily be solved by a very simple, recursive algorithm, doesn't it?

How much memory is used by my Java object? Jedi - Examples. Java : the perpetually undead language. Data Rattle. Heterogeneous Lists and the Limits of the Java Type System. The case for Java modularity - Java World. Top 3 Reasons Why Constructors are Worthless. Build an Embedded Array Language in Java. Java Is Too Academic. The Long Strange Trip to Java. Java in 2008.