On Degrading Merchandise Quality

I’ve just replaced 4 halogen bulbs in my appartment. When I threw the old ones into our recycling bin, I’ve noticed that there were already around 8 bulbs in there. From the last 5-6 months, only! This made me sad, as it shows how our consumer society works. Read on to learn how jOOQ strives to be different with respect to endurability and long-lasting quality.

More stuff I’m made to buy because it falls apart

I’ve just bought a new mobile phone, because the old one didn’t really work anymore, after only 2 years!

I’ll be buying a new hard drive next week, because the one I’ve bought recently (to replace a broken, 3 year old one) heats up too quickly and doesn’t give me the throughput I want!

I buy 2 pairs of new Adidas a year, because they don’t last as long as my leather shoes!

I buy about 5 mini-umbrellas a year, because apparently, they’re made to last a mere 10 days of rainfall!

I buy about 2 new city bikes a year, because mending them is more expensive than buying new ones. It’s not that I’d just have to replace tires, they’re actually quite broken after 1/2 year!

I bought a Windows Surface RT tablet just to learn that almost no programs can run on it. I would have had to buy the Pro version and throw the old one away.

Should we really work this way?

I’m forced to buy new stuff. I buy new stuff because the previous stuff I’ve had breaks apart so quickly. And in many cases, it is very clear that it has been designed to break apart in a short period of time. Replacing things with new things is an industry of its own. If stuff were made to last and to work for 10 years (Hah 10 years. Our grandparents used the same stuff for 40 years!), corporations would make less money with new merchandise to replace their previous equivalent merchandise. Take my awesome Samsung flat screen TV, for instance. I had bought it around 7 year ago, and it still works like a charm. Samsung never got any money from me again, even if I’m a very happy customer. Is that a bad business plan for Samsung?

There’s more to life than making tons of money and keeping a paying customer base for your deliberately mediocre product line. There is a strong urge to contribute to making this world a better place. By selling quality products that do not fall apart very quickly. Products that do not require a lot of support. Products that are easy to use and long-lasting, such that the return on investment for your customer is extremely high, at the cost of making “only” a living instead of tons of money and waste.

At Data Geekery, producing such products is our highest credo. This is why we charge a bit of money for licensing with support included, because we think that our quality is so high, you might not even need any support. We could make a lot more money by lowering our quality and by hiring a lot of expensive consultants to explain to you how our complicated product works. But jOOQ is not complicated, it is extremely easy to use.

Many “free” Open Source products don’t work this way. They lure you in by being free and LGPL-licensed, unloading a lot of consulting and maintenance costs onto you only later on. It is your choice. Do you want to invest in your future by keeping maintenance costs low? Or do you want to get a cheap product and pay later on? Think about dirt cheap ink jet printers and how much you’ll pay on those quickly-emptying ink-cartridges later on. Think about dirt cheap coffee machines and how much you’ll pay on those capsules later on. Think about some computer products, and how often you have to pay for ridiculous updates, because the “old” minor release of the operating system is no longer supported.

Don’t think in short terms. Don’t fall for “free” stuff. There is no such thing as free lunch. You always pay. A little bit now, or much more later.

A Significant Difference Between Open Source and Commercial Software

A recent event has triggered a lot of interest in the debate about the good and the bad parts of Open Source. Oracle’s attack on Open Source. For large corporations who aren’t Red Hat, taking a stand on the topic is far from easy. Oracle used to sell only commercial software, but has since acquired a lot of open-sourcey companies, such as Sleepycat Software (BerkeleyDB) or Sun Microsystems (Java, MySQL). Phrasing a long-term strategy upon this legacy isn’t easy.

At the same time, Oracle is extremely successful, having surpassed IBM’s revenue, making Oracle the second largest software company in the world. The continuing popularity of its flagships Java and the Oracle database is promising, also for middleware vendors providing products such as jOOQ, for their flagships.

At Data Geekery, Open Source is also very important, just as commercial licensing has become, since recently. The change towards dual-licensing has been received rather positively on the jOOQ user group, even if it led to open questions about the continued Open Source strategy. But what’s the real difference between Open Source and commercial software? At Adobe, Dr. Roy Fielding is often cited saying that there is essentially no difference between Open Source and commercial software, and he’s quite an authority for both worlds. Both are absolutely viable business models with their pros and cons respectively (unfortunately, I cannot back this up with an actual citation).

One significant difference, however, is that low-quality open source software can heavily outlive low-quality commercial software, as it just never really dies, as no one is “losing money” on low OSS “sales”. I’ve recently blogged about how to recognise such low-quality Open Source software.

Open Source is foremost a business and marketing strategy, just as much as it is a mission. This business strategy can be a good or a bad choice for any software vendor.

Add Some Entropy to Your JVM

Being able to generate true random numbers depends on the entropy in your system. Some claim, that this can be guaranteed by fair dice roll. Others think that replacing the OpenJDK’s java.math.Random.nextInt() method with this body will help:

public int nextInt() {
  return 14;
}

Source: http://www.redcode.nl/blog/2013/10/openjdk-and-xkcd-random-number/.

But that’s absurd. We all know that the best way to add true entropy to the JVM is by rewriting the java.lang.Integer.IntegerCache when your JVM starts up. Here’s the code:

import java.lang.reflect.Field;
import java.util.Random;

public class Entropy {
  public static void main(String[] args) 
  throws Exception {

    // Extract the IntegerCache through reflection
    Class<?> clazz = Class.forName(
      "java.lang.Integer$IntegerCache");
    Field field = clazz.getDeclaredField("cache");
    field.setAccessible(true);
    Integer[] cache = (Integer[]) field.get(clazz);

    // Rewrite the Integer cache
    for (int i = 0; i < cache.length; i++) {
      cache[i] = new Integer(
        new Random().nextInt(cache.length));
    }

    // Prove randomness
    for (int i = 0; i < 10; i++) {
      System.out.println((Integer) i);
    }
  }
}

When I last tried, the above printed

92
221
45
48
236
183
39
193
33
84

Don’t believe it? Try it on your application! By trying this on your application, you agree to the following licensing terms:

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.


Liked this article? Here are a couple of other articles from our blog that we think you might like, too:

The End of US Internet Governance

This is huge news! The Internet will finally become the global network it could’ve always been as ICANN, IANA, IETF and others simultaneously move away from US unilateral Internet governance.

http://www.internetgovernance.org/2013/10/11/the-core-internet-institutions-abandon-the-us-government/

I guess, in the end, the NSA did us all a “favour” with their spying. If this will make the internet better, or if this will introduce UN-style politics remains unclear… But it will certainly change the world. If you want to express your opinion, there’s a heated debate on www.reddit.com going on!

Eclipse’s Awesome Block Selection Mode

This post is about an awesome Eclipse feature, that is completely underestimated and hidden in the menu. Yet, it is so useful in so many situations. The awesome “Block Selection Mode” which can be toggled through Alt-Shift-A on Windows. Here’s an example challenge for the Block Selection Mode:

Is there any way I can write (copy-paste) nicely-formatted SQL queries in Java string literals using Eclipse?

And my answer:

Step 1: Paste

Paste your formatted SQL statement verbatim into your Java file

Step 2: Write opening quotes

Notice the highlighted button, the sixth from the left. That’s the awesome “Block Selection Mode” (Alt-Shift-A on Windows). It lets you write opening quotes on each selected line at the same position

Step 3: Write closing quotes and concatenation

Apply the same technique for the closing quotes and the concatenation sign (`+`)

Step 4: Fix the semi-colon

No comment needed here.

Awesome Eclipse feature, no?

jOOQ Newsletter October 10, 2013

Subscribe to this newsletter here.

jOOQ 3.2 Released

After a bit of time, jOOQ 3.2 has finally been released. This interesting release mainly includes two new SPIs (Service Provider Interfaces), which allow for:

  • Injecting pre and post CRUD operation behaviour, which is useful for global ID generators.
  • Injecting behaviour into the SQL rendering lifecycle allowing for arbitrary SQL transformations. This is very useful for things like shared-schema multi-tenancy.

Besides, the code generator has seen lots of improvements. More details can be seen in the release notes.

jOOQ Licensing and Support

With the new jOOQ 3.2, apart from introducing great new features, we are changing quite a few things on how we operate. At Data Geekery GmbH, we believe in Open Source. But we also believe in the creative power enabled by commercial software. This is why we have chosen to implement a dual-licensing strategy. Read more about this strategy here:

https://blog.jooq.org/2013/10/09/jooq-3-2-offering-commercial-licensing-and-support

SQL2jOOQ

A very interesting open source tool is being developed by a third-party vendor called GUDU Soft in cooperation with Data Geekery: SQL2jOOQ. This tool is based on GUDU Soft’s SQL Parser application, which can parse a variety of text-based SQL strings, transform ASTs and render new dialects. One of these output dialects is jOOQ. For jOOQ developers migrating large amounts of legacy SQL to jOOQ, this will be an invaluable tool in the tool chain.

MongoDB and NoSQL Heat

MongoDB was in the news big time last week when they announced their recent raise of $150 million in a venture-funding round. While cynics claimed that they failed to write the transaction to disk, this is still a very important milestone for 10gen. After all, MongoDB is the only non-relational DBMS figuring in a quite objective top 10 rating considering 194 systems.

To SQL or not to SQL? Our take from the jOOQ perspective is clear. Any competitor in the market dominated by Oracle and SQL Server is good, even (or maybe because) it is a non-SQL vendor:

https://blog.jooq.org/2013/10/02/the-premature-return-to-sql/

jOOQ™ 3.2 Offering Commercial Licensing and Support

Four years ago, the Java database middleware market was dominated by a variety of ORMs implementing JPA. This paradigm was hardly challenged by alternatives. There was a gap for an API making SQL a first-class citizen in the Java language ecosystem and jOOQ had come to fill this gap. With jOOQ, developers who engage heavily in writing SQL finally had a tool that helped them express SQL almost natively in the Java language, leveraging the Java 6+ compiler’s features to validate their SQL statement’s syntax and type correctness. In the last four years, jOOQ had become increasingly popular and mature. jOOQ is used by many demanding customers operating on large and complex databases. The feedback that we have had from those customers was unanimously positive, although there was one thing missing. That one missing thing was professional support, warranties, and thus commercial licensing. With the new jOOQ 3.2, apart from introducing great new features, we are changing quite a few things on how we operate.

jOOQ is now jOOQ™
After jOOQ 3.1, we have now published jOOQ™ 3.2

At Data Geekery GmbH, we believe in Open Source. But we also believe in the creative power enabled by commercial software. This is why we have chosen to implement the following dual-licensing strategy:

  • Users using jOOQ with popular Open Source databases will continue to be able to get our high-quality, integration-tested Apache Software License 2.0 licensed free Open Source distribution from Maven Central, from GitHub, or from the jOOQ website. At the same time, they will continue to profit from our free community support in English on the jOOQ User Group.
  • Users using jOOQ with commercial databases will be able to profit from our competitive commercial jOOQ subscription licenses, which include support for commercial databases, as well as professional support in English, German, and French, early access to releases and bugfixes, warranties, custom engineering and much more.
license-models
Our license models

Of course, customers using jOOQ with an Open Source database can also purchase a commercial license subscription, if they wish to profit from our professional support and services. In the following FAQ, we’ll answer to some questions you may have:

Why offering a workstation license?

We believe that the main added value of jOOQ is added to our customer’s development lifecycles. jOOQ helps developers write SQL code in 10% of the time they needed if they had used JDBC or other String-based approaches directly. At the same time, jOOQ and its powerful source code generator help prevent coding mistakes early in the development lifecycle, preventing 90% of the usual SQL mistakes. jOOQ is thus a development tool, as opposed to a database, which is a storage tool adding most value at runtime. This is why jOOQ offers a workstation license, as opposed to most databases offering server licenses.

Why not just offering support for an all-Open-Source library?

We’re aware of vendors that sell all-Open-Source software, making money only with expensive support subscriptions. This is a viable model for vendors offering server software, such as databases, where 24/7 support is very crucial. It is also a viable model for vendors offering very complex software, which needs a lot of additional, costly consulting efforts. jOOQ is none of the aforementioned. It is middleware, which is very easy to use and will not generate any consulting business as it adds almost no complexity on top of SQL itself. We have challenged our decision with a variety of existing users and customers, and we firmly believe that we can add most value with a dual-licensing model that builds upon dependent database licensing models. After all, spending a bit of money on a jOOQ license will save our customers an incredible amount of money on their development lifecycle with powerful databases like DB2, Oracle, SQL Server, or Sybase.

Why stick with the Apache License?

The Apache License has served us well in the past four years. It is very liberal while at the same time, protecting our trademarks. It is a license that has enabled us to grow and get lots of high quality community feedback and contributions. We do not want to follow suit with other dual-licensing companies who go down the *GPL path, as we believe that dual-licensing *GPL software is not true to the spirit of Open Source Software in the long run. By staying with the Apache License, we want to express our deep commitment to Open Source.

What about contributor copyrights?

We take copyrights seriously. This is why we had our major contributors sign an agreement to transfer all copyrights to us. While we need to settle copyrights, we still want to publicly attribute authorship to those contributors who have shared code or documentation with us. Of course, we also welcome all future contributions by our community! Should you as a contributor feel that your copyrights are challenged or infringed by our dual-licensing, please do contact us directly.

What happened to the jOOQ Console?

While the jOOQ Console 3.1 will continue to be available to jOOQ 3.2 users from Maven Central, the jOOQ Console development has been stopped in its current form. It will make room for a new, commercial profiler software that Data Geekery will develop in the near future, stay tuned.

Why do this at all?

Because we want to show our commitment to jOOQ, which is much more than a library. It is a vision of a better Java and SQL integration. It is innovation in various fields of the Java ecosystem. We want to:

  • Support those who love both Java and SQL and who were denied appropriate tooling, in the past.
  • Further develop the integration of internal domain-specific languages in Java, by formalising language aspects of software like jOOQ. Not just for jOOQ.
  • Expand our high-quality SQL integration into the Scala ecosystem by offering a native Scala API – and possibly core.
  • Further improve the jOOQ Console to provide more high-quality development tooling.
  • Make our SQL knowledge available to our customers through our blog and source code.

In order to implement the above plans, we need to create a business from jOOQ. And we believe that this business will be extremely interesting both to us and to our customers. Together, as the jOOQ ecosystem, we’ll create a better Java/SQL world! Let us start with jOOQ 3.2!