Category Archives: blogging

A Great Counter-Rant


Now, this is a great counter-rant, replying to one of my more popular articles:
http://blog.jooq.org/2013/02/26/the-golden-rules-of-code-documentation/

The counter-rant is given here: http://javax0.wordpress.com/2013/04/07/to-comment-or-not-to-comment-that-is-the-question

The writer went through the trouble of actually implementing my fictional (but not unrealistic) example, which he’s publicly displaying on GitHub:
https://github.com/verhas/commentOrNotToComment (my fork, if the former was deleted)

The code still doesn’t communicate “why” it does things, it only communicates “what” it does. But I still like this reaction :-)


Get hidden feature requests from your users


In general, I’m not a marketing guy, I prefer to develop code. But when I look at modern marketing tools that we developers have created for our marketing friends, I’m getting a bit jealous. Take this blog, for instance. It’s the perfect jOOQ marketing tool. Check out my 2013 visitor statistics:

jOOQ blog 2013 statistics

jOOQ blog 2013 statistics

Quite obviously, my February posts were given a lot more attention than my January posts even if I’m taking into account the average visitor that visits old posts, generating “background noise”. The reason is simple:

  • In February, I blogged mostly about controversial Java topics. Before, the topics were more technical and SQL-related (and thus objective and boring). Java blogs get more traction than SQL blogs.
  • My two blogging partners DZone and JCG tend to reblog Java posts more than SQL posts

Aha. So I should write more Java blog posts in order to get even more traffic. But I don’t just want traffic, I want “relevant” traffic.

How to generate “relevant” traffic

“Relevant” traffic for jOOQ is traffic that will generate “conversions”, e.g. people that may not know jOOQ before hitting this blog, checking out jOOQ and downloading it, because they read my articles. That’s an obvious case for “relevant” traffic.

But I also want to get people on my blog / website, because they are already (or not yet) using jOOQ and because they’re looking for something specific, like a jOOQ feature that they’re missing. Only few people will actually take the time to write up a nice, understandable e-mail with a well-explained use-case to issue a feature request on the jOOQ user group. They’re more likely to give up after a couple of google searches. Hence, it is important to take notice of those searches and to be sure that they will end up on my blog / website, not on some arbitrary google search result or on Stack Overflow (which is good, but which I cannot analyse). Here are some interesting search strings that have lead to “hidden” feature requests or blog posts in the past:

Search strings leading to blog posts

These search strings indicated that there are grounds for generating more relevant traffic on the blog:

  • jooq vs linq: jOOQ is a good answer to Java’s missing LINQ (Language INtegrated Query).
  • jooq vs hibernate: jOOQ is a viable alternative to Hibernate. This is a good opportunity to read about the pros / cons of each approach.
  • scala slick: SLICK (Scala Language-Integrated Connection Kit is another “LINQ-esque” API.
  • jooq vs querydsl: QueryDSL is yet another attempt to mimick LINQ.
  • jooq vs mybatis: MyBatis is a different approach at abstracting the data layer in Java.
  • jooq vs jpa: See jOOQ vs Hibernate
  • java fluent sql: All users that are looking for fluent APIs should come here. There is probably no better fluent implementation of SQL in Java, other than jOOQ.
  • scala sql: Yes, Scala users should use jOOQ to write SQL statements.
  • where are there good java sql open source projects: Here! ;-)
  • querydsl db2: No! jOOQ DB2! ;-)
  • jooq migration: Some people may expect jOOQ to add a database migration module. There are good tools for that already, e.g.: Liquibase or Flyway.
  • jooq caching: Some day, I will get this bad idea out of people’s head. The data access layer shouldn’t implement caching!
  • jooq google app engine: Yes, that should work, too. Although I don’t have a running instance anymore.
  • bad software: I don’t know how they got here :-)
  • jooq clojure: I wonder what that would look like. Anything like SQLKorma?
  • jooq alternative: Why?
  • jooq enterprise sql: You can donate here, to feel a bit more enterprisey!
  • querydsl vs linq: Nice. Here’s relevant traffic! People looking for competitor products wind up on the jOOQ blog
  • how to create a java internal dsl from a bnf: I should sell this idea, or create a non-free tool from it!
  • martin fowler jooq: Yes, I’ve asked him too. Neither he himself, nor his company ThoughtWorks responded to my inquiries so far. I should really get on their tech radar…

The above examples show that I should probably write a post that shows the main disadvantages of LINQ (heavily reduced expressivity) compared to using SQL directly (very expressive, feature-rich language). In a way, LINQ and JPQL both attempt to cripple / standardise SQL by removing most of SQL’s features. Unsurprisingly, one of the most popular articles on this blog is this one here:

http://blog.jooq.org/2012/07/30/when-will-we-have-linq-in-java

Search strings leading to “hidden” feature requests

These search strings indicated that users may be interested in a particular feature:

  • jooq ddl: It’s about time that jOOQ also supports DDL statements.
  • jooq cte: Common Table Expressions (CTE’s) are an important missing feature today, in jOOQ. jOOQ’s current fluent API technique doesn’t fully take care of taking advantage of CTE’s expressivity.
  • postgres insert returning: Postgres’ INSERT/UPDATE .. RETURNING syntax is one of the nice features in jOOQ.
  • jooq transaction: jOOQ currently doesn’t handle transactions. jOOQ can run, but jOOQ can’t hide from this feature (delegating it to other APIs).
  • relational division: Beautiful feature. Implemented in jOOQ!
  • bnf sql: Yes, jOOQ’s API has an underlying (informal) BNF notation. Time to formalise it!
  • jooq cursor: jOOQ can read cursors from stored procedures, which is a pain to do with JDBC.
  • derby trunc: jOOQ simulates functions unavailable in some dialects.
  • jooq logging: jOOQ allows for easy logging of executed SQL statements.
  • jooq meta: jOOQ has an API to query database meta data, which is more intuitive than JDBC’s
  • java multiple cursors: Yes, fetching several result sets is much easier with jOOQ than with JDBC.
  • hibernate olap: No, unfortunately, Hibernate can only handle simple OLTP. For OLAP, you’ve come to the right place.
  • simulate skip locked h2: Beautiful! Challenge accepted.
  • connect by: Oracle and CUBRID support this nice and concise way of expressing recursive SQL.
  • group by rollup: A nice OLAP feature.
  • load mysql script java .sql: jOOQ’s Loader API gets you started quickly, when batch loading data into your database.
  • derby bitand: Ah, yes. Bitwise operations are poorly supported in most SQL dialects. jOOQ simulates them for all databases.
  • jooq blob: Most JDBC drivers don’t really care about the distinction between Blob / byte[], or Clob / String. But things might get nasty for very large Blobs
  • production schema: Yes, jOOQ’s distinction between development schema and production schema has proven very useful to many users.
  • jooq batch insert: Batch queries. A pain to do with JDBC. So simple, with jOOQ
  • jooq customtable: I get a feeling that this “dynamic SQL” thing is still not 100% well implemented in jOOQ.
  • jooq informix support: Yes, one day!
  • for update sql server: jOOQ can simulate pessimistic locking through the JDBC API!

The above examples show that a library that is “true to SQL” in a way that it does not try to hide SQL’s syntax complexity hits the spot with many users.

Conclusion

These search strings help adding even more value to jOOQ. They are the “hidden feature requests” of jOOQ’s users. Tool vendors, use this knowledge and blog about your experience, products, thoughts, ideas. Give away free information that is interesting to a broad audience. It will pay back when you analyse your incoming traffic and the google search strings that people used to find your relevant blog (granted that your blog is somewhat relevant)!


The true spirit of Open Source


As an open source developer, I’m often asking myself why the hell am I going through all of this pain in my free time to deliver quality software, when I’m already doing this in my office?? Sure, it’s fun, you can try out new things, deepen your knowledge in a specific field, it helps boost your career, etc. etc.

But every now and then, I’m reminded of another reason:

I believe in open source

This is just like other people saying

I believe in charity work
I believe in militia politics
I believe in volunteer firefighter engagement
I believe in helping that poor grandma across the street

They do, whereas I…

I believe in open source

All these things make the world go round, without most people noticing, as there is no big fame in it. Of course, there’s always that other point of view on open source. You can make as much money with organised open source, as with organised charity work, or organised militia politics (a.k.a. lobbying), and that’s perfectly fine – why shouldn’t you? But the driving force is always the same, regardless of the pay: It’s belief. Here’s another open source project I’ve recently re-discovered, that has a very nice reason of being, along the same lines. It’s EMMA. Citing the EMMA website:

Until recently, the world of Java development had been plagued by an absurd discrepancy: Java developers had excellent free IDEs, free compilers, free test frameworks but had to rely on code coverage tools that charged an arm and a leg in license fees. As a Java pro, I would like to use the same free coverage tool regardless of whether it is a massive commercial project at work or a small fun project at home. I’ve created EMMA to be that tool.

Beautiful!


Hilarious Rant about SQL Injection


My recent article about SQL injection has stirred some serious emotions on JCG. I don’t want to keep it from you! An extract:

[...] The idea that if I use an ORM, my SQL injection woes will magically go away is f***ing harmful, shortsighted, and anybody who thinks that should be kicked squarely in a sensitive region. [...]

And if you’ve survived that kick…

[...] Since there is no SQL statement, things like “‘a’; TRUNCATE your_mom” get stored/selected from as exactly that [...]

And if your mom has survived truncation, too:

[...] ORM still won’t save you. Validate your god-d*** f***ing inputs, jack-a**.

So please, sanitise your code, or the angry man will come and get you!! :)
http://www.javacodegeeks.com/2012/07/database-abstraction-and-sql-injection.html#comment-603438572


Open source user rants


So far, I have escaped jOOQ user rants and insults. Maybe it’s because jOOQ is still quite a niche product. Maybe it’s because jOOQ has almost no bugs ;-) The only real rant I’ve seen so far is this one by a contributor to JDO, JPA, EJB 3.0:

http://erix-data-services.blogspot.ch/2010/10/jooq.html

An extract:

How should we react when reading posts like this in 2010?
It’s like being back 15 years earlier.
How is that possible to write so many irrelevant statements in a single post?

The so-called “pragmatic” approach has given birth to so many useless frameworks like this one.

The good news is there is still a need for a comprehensive data manipulation solution.

Apparently, jOOQ stirs emotions in some people ;-)

Anyway, there’s critique, there are rants and then, there are plain insults. I’ve recently stumbled across this hilarious thread here:

https://bugs.php.net/bug.php?id=50696

Quite nice :-) What’s your favourite rant by an open source user?


Martin Fowler on “The Vietnam of Computer Science”


It couldn’t be a better match by a more suited person for jOOQ. Martin Fowler expresses his feelings about SQL, NoSQL, Object-relational mapping on his blog post, which is copied on DZone:

http://java.dzone.com/articles/martin-fowler-orm-hate

Think about the following two slogans:

“The Vietnam of Computer Science” – “A Peace Treaty Between SQL and Java”

Swell, no? :-)


jOOQ and Hibernate, a discussion


Starting out from a rather emotional and maybe not really objective comparison between jOOQ and Hibernate, this turned out to be quite an interesting discussion. A must-read for jOOQ and SQL aficionados:

http://www.reddit.com/r/java/comments/sk25o/forget_hibernate_jooq_is_byfar_the_best_database/

I personally like this comment here:

“You’d be hard-pressed to find a database abstraction layer that can map to SQL better than #jOOQ does, it pretty-much is #SQL.”


jOOQ website re-launch


jOOQ has re-launched its website. Come back to see the new design here:

http://www.jooq.org/


A very refreshing point of view about language design


Have fun:

http://joshondesign.com/2012/03/09/open-letter-language-designers


Blog has “moved”


The jOOQ blog has moved to a new domain:

http://blog.jooq.org/

The old wordpress domain will still be active, though


Follow

Get every new post delivered to your Inbox.

Join 217 other followers