Java Code Geeks » Lukas Eder http://www.javacodegeeks.com/ Java 2 Java Developers Resource Center Fri, 06 Mar 2015 20:00:30 +0000 en-US hourly 1 http://wordpress.org/?v=4.1.1 How to use SQL PIVOT to Compare Two Tables in Your Databasehttp://www.javacodegeeks.com/2015/03/how-to-use-sql-pivot-to-compare-two-tables-in-your-database.html http://www.javacodegeeks.com/2015/03/how-to-use-sql-pivot-to-compare-two-tables-in-your-database.html#comments Wed, 04 Mar 2015 08:00:14 +0000 http://www.javacodegeeks.com/?p=37667 This can happen ever so easily. You adapt a table by adding a new column:                     ALTER TABLE payments ADD code NUMBER(3); You go on, implementing your business logic – absolutely no problem. But then, later on (perhaps in production), some batch job fails because it […]

 

]]>
http://www.javacodegeeks.com/2015/03/how-to-use-sql-pivot-to-compare-two-tables-in-your-database.html/feed/ 0
How to Extract a Date Part in SQLhttp://www.javacodegeeks.com/2015/03/how-to-extract-a-date-part-in-sql.html http://www.javacodegeeks.com/2015/03/how-to-extract-a-date-part-in-sql.html#comments Tue, 03 Mar 2015 11:00:04 +0000 http://www.javacodegeeks.com/?p=37606 The Modern SQL Twitter account (by Markus Winand) published a hint about how to extract a date part in SQL:                     The right way to get a part of a date/time is: EXTRACT(YEAR FROM CURRENT_DATE) = 2015 http://t.co/UNLyUoQdVb Retweet to spread the word! — Modern SQL (@ModernSQL) February 24, […]

 

]]>
http://www.javacodegeeks.com/2015/03/how-to-extract-a-date-part-in-sql.html/feed/ 0
jOOQ vs. Slick – Pros and Cons of Each Approachhttp://www.javacodegeeks.com/2015/03/jooq-vs-slick-pros-and-cons-of-each-approach.html http://www.javacodegeeks.com/2015/03/jooq-vs-slick-pros-and-cons-of-each-approach.html#comments Mon, 02 Mar 2015 11:00:09 +0000 http://www.javacodegeeks.com/?p=37511 Every framework introduces a new compromise. A compromise that is introduced because the framework makes some assumptions about how you’d like to interact with your software infrastructure. An example of where this compromise has struck users recently is the discussion “Are Slick queries generally isomorphic to the SQL queries?“. And, of course, the answer is: […]

 

]]>
http://www.javacodegeeks.com/2015/03/jooq-vs-slick-pros-and-cons-of-each-approach.html/feed/ 0
Thou Shalt Not Name Thy Method “Equals”http://www.javacodegeeks.com/2015/02/thou-shalt-not-name-thy-method-equals.html http://www.javacodegeeks.com/2015/02/thou-shalt-not-name-thy-method-equals.html#comments Tue, 24 Feb 2015 08:00:42 +0000 http://www.javacodegeeks.com/?p=37374 (unless you really override Object.equals(), of course). I’ve stumbled upon a rather curious Stack Overflow question by user Frank: Why does Java’s Area#equals method not override Object#equals? Interestingly, there is a Area.equals(Area) method which really takes an Area argument, instead of a Object argument as declared in Object.equals(). This leads to rather nasty behaviour, as […]

 

]]>
http://www.javacodegeeks.com/2015/02/thou-shalt-not-name-thy-method-equals.html/feed/ 0
“NoSQL Injection” – What 40000 Unsecured MongoDB Databases Mean for our Industryhttp://www.javacodegeeks.com/2015/02/nosql-injection-40000-unsecured-mongodb-databases-mean-industry.html http://www.javacodegeeks.com/2015/02/nosql-injection-40000-unsecured-mongodb-databases-mean-industry.html#comments Fri, 20 Feb 2015 20:00:05 +0000 http://www.javacodegeeks.com/?p=37122 The news is all over reddit… Major security alert as 40,000 MongoDB databases left unsecured on the internet Security is a feature that is often neglected until it’s too late. And when it’s too late, it is often hard to bake it into a well-established architecture without major refactoring efforts. Every system and thus also […]

 

]]>
http://www.javacodegeeks.com/2015/02/nosql-injection-40000-unsecured-mongodb-databases-mean-industry.html/feed/ 0
10 SQL Articles Everyone Must Readhttp://www.javacodegeeks.com/2015/02/10-sql-articles-everyone-must-read.html http://www.javacodegeeks.com/2015/02/10-sql-articles-everyone-must-read.html#comments Fri, 20 Feb 2015 08:00:57 +0000 http://www.javacodegeeks.com/?p=37118 We’ve been blogging about Java and SQL for a while now, on the jOOQ blog. Over the years, while researching interesting blog topics, we’ve discovered a lot of SQL gems in the blogosphere that have inspired our work and our passion for SQL. Today, we’re presenting to you a list of 10 articles that we […]

 

]]>
http://www.javacodegeeks.com/2015/02/10-sql-articles-everyone-must-read.html/feed/ 0
Top 10 Easy Performance Optimisations in Javahttp://www.javacodegeeks.com/2015/02/top-10-easy-performance-optimisations-java.html http://www.javacodegeeks.com/2015/02/top-10-easy-performance-optimisations-java.html#comments Mon, 09 Feb 2015 23:00:28 +0000 http://www.javacodegeeks.com/?p=36818 There has been a lot of hype about the buzzword “web scale“, and people are going through lengths of reorganising their application architecture to get their systems to “scale”. But what is scaling, and how can we make sure that we can scale? Different aspects of scaling The hype mentioned above is mostly about scaling […]

 

]]>
http://www.javacodegeeks.com/2015/02/top-10-easy-performance-optimisations-java.html/feed/ 0
Still Using Windows 3.1? So why stick to SQL-92?http://www.javacodegeeks.com/2015/02/still-using-windows-3-1-so-why-stick-to-sql-92.html http://www.javacodegeeks.com/2015/02/still-using-windows-3-1-so-why-stick-to-sql-92.html#comments Fri, 06 Feb 2015 05:00:23 +0000 http://www.javacodegeeks.com/?p=36648 We’ve been blogging a lot about the merits of modern SQL on the jOOQ blog. Specifically, window functions are one of the most fascinating features. But there are many many others. Markus Winand, author of the popular book SQL Performance Explained has recently given a very well-researched talk about modern SQL. We particularly like his […]

 

]]>
http://www.javacodegeeks.com/2015/02/still-using-windows-3-1-so-why-stick-to-sql-92.html/feed/ 0
Top 5 Use-Cases For Nested Typeshttp://www.javacodegeeks.com/2015/02/top-5-use-cases-for-nested-types.html http://www.javacodegeeks.com/2015/02/top-5-use-cases-for-nested-types.html#comments Thu, 05 Feb 2015 08:00:46 +0000 http://www.javacodegeeks.com/?p=36642 There has been an interesting discussion on reddit, the other day Static Inner Classes. When is it too much? First, let’s review a little bit of basic historic Java knowledge. Java-the-language offers four levels of nesting classes, and by “Java-the-language”, I mean that these constructs are mere “syntax sugar”. They don’t exist in the JVM, […]

 

]]>
http://www.javacodegeeks.com/2015/02/top-5-use-cases-for-nested-types.html/feed/ 0
You Will Regret Applying Overloading with Lambdas!http://www.javacodegeeks.com/2015/02/you-will-regret-applying-overloading-with-lambdas.html http://www.javacodegeeks.com/2015/02/you-will-regret-applying-overloading-with-lambdas.html#comments Tue, 03 Feb 2015 08:00:52 +0000 http://www.javacodegeeks.com/?p=36436 Writing good APIs is hard. Extremely hard. You have to think of an incredible amount of things if you want your users to love your API. You have to find the right balance between: Usefulness Usability Backward compatibility Forward compatibility We’ve blogged about this topic before, in our article: How to Design a Good, Regular […]

 

]]>
http://www.javacodegeeks.com/2015/02/you-will-regret-applying-overloading-with-lambdas.html/feed/ 0