≡ Menu

Repost: My speech synthesizer project from 1984

This is a repost, from 27 February 2006. It was on a blog-city blog I’d set up, and darn it if I wouldn’t rather it be on this blog. This is a true story. If you’re reading this, Dad, the previous sentence is false. My oldest son is into hardware, in a big way. Yesterday, [...]

{ 0 comments }

Repost: Fun with XStream

XStream unmarshalling is great fun when you’re not working with a fixed schema. I’ve been working on a quick start document for GigaSpaces‘ data grid edition lately, and I’m doing it with the code in the form of tests. This makes writing it really easy (run the tests, make sure it works, if it fails, [...]

{ 0 comments }

Repost: mea culpa: “offheap access is slow”

Steve Harris has been commenting on dzone about my last post, “BigMemory: Heap Envy.” One of his comments linked to a blog post of his, “Direct Buffer Access Is Slow, Really?,” in which he says that direct access is not slow, and therefore one of my points was invalid. Well, folks, he’s right, for all [...]

{ 0 comments }

Repost: BigMemory: Heap Envy

Terracotta has announced the availability of BigMemory, which provides a large offheap cache through their Ehcache project. It is designed to avoid the GC impact caused by massive heaps in Java, at a license cost of $500 per GB per year, if I have my figures right. The Reason We’re Here First, let’s understand the [...]

{ 1 comment }

Repost: Rocket Java: Use Maven.

Trying to build something destined for a JVM? Use Maven. We know it sucks. We know you hate it. We know you’d prefer Gradle, or buildr, or Ant, or even make. Tough. Just because Maven sucks is no reason to not use it. It’s easy to say “but I know Ant,” or “Gradle has a [...]

{ 0 comments }

Repost: Rocket Java: That stupid classpath thing you should understand.

By far, the most common questions in Freenode ##java center around the concept of classpath. It’s funny, too, because the questions are often asked by people who – upon questioning – insist that they understand classpath, they really do… and then, upon having it explained to them in excruciating detail, manage to solve their problem. [...]

{ 0 comments }

Repost: The “Stupid Test”

Every so often I’ll describe something (or someone) as having failed the “stupid test,” my term for considering something like a third-grader would and seeing what the result is, while the devil in the details might make sense. The Stupid Test is what you fail when you, well, refuse to execute someone on the grounds [...]

{ 0 comments }

Repost: Rocket Java: how to swap(int, int) and have it work… sort of

So it’s a known fact that Java passes references by value. That means that if I pass an Object of some kind into a method, I can change the values in the object, but not the object reference itself. Likewise, if I pass an int into a method, I can change the value of that [...]

{ 0 comments }

Repost: Rocket Java: Timing Method Calls

My data stores benchmark gives out timings in terms of nanoseconds, by making a list of response times and then applying statistical methods to get data out of the list. However, one part of that comes up every now and then: how do you measure the time it takes to issue a call? After all, [...]

{ 0 comments }

Repost: Rocket Java: Spring Injection of Other Beans’ Properties

Woot, IRC FTW! Someone today asked a question about Spring that was actually relevant for once. The problem was that he wanted to inject not a bean, but a bean’s referenced property into another bean. Put more succintly: He had a bean A, with a property B, and didn’t want to inject A into bean [...]

{ 0 comments }