Truth First, or Why You Should Mostly Implement Database First Designs – Java, SQL and jOOQ.

In this much overdue article, I will explain why I think that in almost all cases, you should implement a “database first” design in your application’s data models, rather than a “Java first” design (or whatever your client language is), the latter approach leading to a long road of pain and suffering, once your project…
— Read on



Self-Taught IT?

I love the premise of this article: Just because you are a Self-Taught Developer/IT Guy doesn’t make you any less authentic in your field than someone with a BS or an MS.

Planning vs. Acting is procrastination.  Just go after it.

via @DZone: 

With the high cost and low quality of College courses these days, it has surpassed the threshold of not being with the value it once offered.


IntelliJ, Java 8 Refactoring, and Lambda/Stream Performance

My Twitter feed served up this delicious blog:

IntelliJ IDEA Inspection Settings for Java 8 Refactoring

My shop is using IntelliJ and we are converting our Java 6 projects (Inherited from an outsourced vendor 2 years ago) to run on Java 8.  Jetbrains built in some great IDE functionality every developer needs to check-out.

That also generated this question to mind: what about performance?  Lambdas and the Stream API make the code oh-so awesome to read, but is it efficient compared to verbose Java?  I found this nifty blog:

Benchmark: How Misusing Streams Can Make Your Code 5 Times Slower

Benchmarks tend to be pretty treacherous and it’s super hard to get it right.

… it showed {Lambdas and Stream API } … can be around 5 times worse {performance}

The operative words here are “misusing” and “can be” … 

Happy Coding

  • Fshtank


Oracle Charging for Java SE Starting in 2017?

I get DZone push content sent to my inbox everyday, as a one stop shop to keep up with Java-World news. Today’s blog list had this interesting heading:

The Sky Is Falling: Oracle (Might) Want Your Money for Java SE in 2017

The Rub of the article is :

Oracle spinning up their License Management Services (LMS) division focused on “chasing down people for payment.”

[UPDATE 2016-12-23]: A blog published in response to any concerns or outrage: Being Wary Does Not Hurt Java
I look at software like music or movies. That group full-on tried to put the up and coming players in a digital purgatory box: Apple iTunes, Real Networks now-defunct Rhapsody, Amazon, Microsoft, now-defunct Tower Records.
The DRM Promoters were were afraid of copy-right infringement, and frankly they are right. This is how the artists get paid.
The same is true of software. My time invested in a product should reflect a reasonable return. I have misgivings about Oracle, but they have a right to seek payment for reasonable use.
Before you think I’ve lost my mind, the blog makes my point – the licensing will probably go after those running embedded Java without paying for it – like Cash Registers. Those of us doing software development will probably run as we always do: download and run so we can make software that can be sold … and ha-ha, Oracle can grab their cut.

There are options:

  • Open JDK – this has the newest development that will go into the upcoming SE-JDK
  • Purchase a license of IntelliJ: my most recent personal license was $89USD for 2 years, and it is a quality tool
  • Shift gears to another language, like, oh, C# (Microsoft is starting to open up a bit), C++, Javascript on Node.JS
My non-prophetic prediction: Anyone getting charged to run SE will be for a product in production, not for those doing development of said tools – which makes Oracle money :). Oracle is on the board of Eclipse (Free OSS), they still have an interest in NetBeans even after shifting it over to Apache – Oracle has tools they sell/provide based on NetBeans.
We, the developers, are the people that make Java a viable tool in the wild. They will take care with this community.

Netbeans IDE Moving to Apache?

I read the news of Netbeans moving to Apache with less enthusiasm than a majority of the Java community from what I read:

For the me, the headline that summarizes my mood concerning this move comes from ZDNet:

So I apologize in advance for being a little black rain cloud here.  It is not my desired, nor normal approach.

Now I’m not a heavy NetBeans user, having paid for personal License of IntelliJ, but I just like NetBeans, having used it in the past.  My concern is rooted in the model by which Netbeans will grow and advance under Apache. It will rely on the number of Open Source Developers who will jump at the chance to make this IDE all that it can be.  But free-time motivation can get sucked away into other things easily (as a passionate developer with a family, I know this all too well.)

The IntelliJ model is one of pure motivation around making a great IDE for a great price and getting individual developers enthused to sell it to their Enterprises who buy additional, slightly more expensive licenses, for their developers.  Its an organic process but we’ve made noise at my company, the head Architect saw its use in the community elsewhere, and suddenly Eclipse is not the only endorsed developer option. It’s a beautiful thing.

JetBrains, with IntelliJ’s polish and sheen, is mostly driven by developer dollars (like myself) voting “we like it”.  They have a dedicated, passionate, paid staff at JetBrains over in Czechoslovakia. And they keep cranking out tools beyond IntelliJ, such as WebStorm or PyCharm among others.  There is also community driven plugin development as well.

The Eclipse foundation is a behemoth, to say the least. It has a board of directors from many large companies who donate two full-time resources to Eclipse development in addition to paying a $100,000 [Platinum], $25,000 [Gold] or $5,000 [Silver] per year sponsorship.  It makes me think of an old American Express ad campaign: “Membership has its privileges.”

Eclipse is free and open, yes, but also consider that these sponsoring companies are also using Eclipse as a base for their own developer tools:

These are companies with a vested interest that Eclipse remains viable, thereby ensuring Eclipse’s future to the best of their ability.

I also consider Apache, a foundation which excels at creating great developer tools, app servers, HTTP server, frameworks, etc.  They crank out serious quality.  It too has its own corporate sponsorship program which parallel’s the Eclipse model with the exception not to have a full-time dedicated developer among corporate sponsors.

But here’s my question: what about the Apache model is appealing that it makes people think NetBeans will live long and prosper?  Adding to the dark cloud inside is what happened with OpenOffice. LibreOffice has taken much of the mind-space, AND developers.  So amidst what one article calls a “Developer Drought” Apache is going to shut it down.

Consider NetBeans standalone for the moment: what it has going for it is community enthusiasm.  That could remain infectious and even grow to a larger group of developers.  Heck, it would even be fun to work on a Development IDE.  Dream of things you’d like, propose it – and go do it.  That’s what Eclipse has done – it has every imaginable plugin under the sun.

In it’s current state, how many developers are using NetBeans?

The one thing these show is NetBeans is 3rd.  Maybe open sourcing this IDE for enthusiastic developers to crank on it may be the best for it. NetBeans has been slowly moving  in the Oracle back room for sometime, and giving it to a community that actually WANTS to do something with may be what the doctor ordered.

Eclipse and IntelliJ both have a well funded, enthusiastic eco-system around them.   If NetBeans’ community enthusiasm and energy is in place, it will have measures of success – even Wild success.  If like OpenOffice, the “love” has moved on elsewhere, then it is just being sent to a Pasture called Apache, and it will eventually become it’s grave.   I hope its the exact opposite.


Spring Application Context

For Command Line Apps

Some may find this so fundamental it is useless.  But since I make a practice of getting and using Spring Beans, not starting a Spring application from scratch, I have to write this stuff down for future – easy – access.

I need a reminder of grabbing my Spring Application Context outside of a web based application.  Normally I would just put a reference into my web.xml file:


But since I am running essentially a command-line process, I need to get a handle within the application itself.

1) Create a Singleton that will provide the context reference:
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
package com.fishizle.springsample;

import org.springframework.beans.BeansException;
import org.springframework.context.*;
import org.springframework.context.ApplicationContextAware;

public class ApplicationContextUtils implements ApplicationContextAware {

  private static ApplicationContext ctx;

  public void setApplicationContext(ApplicationContext appContext)
      throws BeansException {
    ctx = appContext;


  public static ApplicationContext getApplicationContext() {
      if (ctx == null) 
          ctx= new ClassPathXmlApplicationContext("SpringSample_annotations.xml");
    return ctx;
2) Next get a handle to the context
    private ApplicationContext ctx = ApplicationContextUtils.getApplicationContext();

In context of the functioning class:

public class Startup {

    private IncludeClass include1;
    private ApplicationContext ctx = ApplicationContextUtils.getApplicationContext();

    private Band band;

    private Thinker thinker;

    public static void main(String[] args) {
        System.out.println("Application Started Successfully");
        Startup startup = new Startup();

    public void goStartup() {
        include1 = (IncludeClass) ctx.getBean("include1");
        band = (Band) ctx.getBean("band");
3) Lastly, my app context XML::
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=""

    <bean id="contestantDelegate" class="com.fishizle.springsample.awards.GraciousContestant" ></bean>

       One Advantage of Spring aop: over @AspectJ is, Spring doesn't need Source files to AOP.  @AspectJ requires it.

        <aop:aspect ref="audience">
            <aop:pointcut id="performance" expression="execution(*" />

            <aop:before pointcut-ref="performance" method="takeSeats" />
            <aop:before pointcut-ref="performance" method="turnOffCellPhones" />
            <aop:after-returning pointcut-ref="performance" method="applaud" />
            <aop:after-throwing pointcut-ref="performance" method="demandRefund" />

            <aop:pointcut id="performance2" expression="execution (*" />

            <aop:around pointcut-ref="performance2" method="watchPerformance" />


        <aop:aspect ref="magician">
                    delegate-ref="contestantDelegate" />
            <!-- either default-impl   ... impl only for the Aspect
                 , or delegate-ref  ... Spring Bean reusable elsewhere  -->
            <!--default-impl="com.fishizle.springsample.awards.GraciousContestant" />-->

                (* com.fishizle.springsample.acts.Thinker.thinkOfSomething(String)) and args(thoughts)" />

            <aop:before pointcut-ref="thinking" method="interceptThoughts" arg-names="thoughts" />


    <context:annotation-config />
    <!--<context:component-scan />-->
    <bean id="include1" class="com.fishizle.springsample.IncludeClass"
          p:includeOneA-ref="include1a" />
        <!-- can specify list, set, map, properties as a p:property __ see page 48 Spring in Action -->

    <bean id="include1a" class="com.fishizle.springsample.Include1a" autowire="byName" />

    <!-- include2 -->
    <bean id="include2" class="com.fishizle.springsample.Include2" />

    <bean id="include3" class="com.fishizle.springsample.Include3" />

    <bean id="wireByName"
          p:inProp="My inProp" >

    <bean id="wireByType" class="com.fishizle.springsample.WireByType" autowire="byType" />

    <bean id="audience" class="" />

    <!-- The band -->
    <bean id="band" class="" />

    <bean id="bass" class="" />
    <bean id="drums" class="" />
    <bean id="guitar" class="" />
    <bean id="keyboard" class="" />
    <bean id="singing" class="" />

    <bean id="alex" class="" />
    <bean id="david" class="" />
    <bean id="eddie" class="" />
    <bean id="michael" class="" />

    <bean id="magician" class="com.fishizle.springsample.acts.mindReader.Magician" />
    <bean id="thinker" class="com.fishizle.springsample.acts.volunteers.VolunteerThinker" />

For the forgetful or unpracticed/un-exercised, I hope you find this quick reference useful.