Friday, November 22, 2013

Some excellent JSON tools

http://jsonlint.com/ - I use this to format and validate JSON I'm working with. Wonderfully simple and responsive interface.

http://json.bloople.net/ - A great tool to make exploring possibly large JSON data easier. Also useful for showing the content of JSON to a semi-technical audience.

https://github.com/FasterXML/jackson - Jackson is a fantastically flexible tool for working with JSON in Java. Jackson + Lombok make my API classes super trim and easy to enhance. I'll write a quick tutorial on this sometime.

Wednesday, November 20, 2013

Programming Tool Reviews

I'm a tools guy. With the right tools, hard jobs become easy. Finding good tools can be difficult and as time passes, the best tools for a given job change. I'll be writing posts here to document the tools I find and my experiences with them.

Thursday, August 16, 2012

A few quick lessons about Gradle, Jaxb, and XML

It surprising how much certain kinds of little roadblocks can slow you down. So I thought I'd mention my Gradle/Jaxb/XML woes of late in hopes they'd be helpful.

First, it appears as though the element name in XSD files is case sensitive in some tools and not in others. This means that when I took an (apparently functional) XSD and tried to run it through ant xjc (using gradle) it broke.

Java has a limit to the length of a qualified classname. According to stack overflow it is 64k. I never imagined I'd need to know that little factoid. But it turns out that one of my schemas has such a deep definition of types, that it exceeds this limit. The error warning isn't especially helpful.

Finally, I needed a feature in the jaxb plugin that wasn't available. So I implemented it. GitHub and the open ethic is amazing. It wasn't long ago when fixing adding a feature to a project on a whim would have been a serious undertaking. Instead, it was a pleasure to get my hands dirty and improve a project that had improved my project. That's the best kind of paybacks!

Friday, June 17, 2011

Gradle Sonar source compatibility

I'm slowly migrating a large project to Gradle. One of the major selling points is the Sonar plugin. I switched a module to Gradle and ran the 'gradle sonar' command. I got a screen full of exceptions that looked like this:

Fail to execute PMD. Following file is ignored:
/Users/spina/Code/apt/StagingGround/Utilities/src/main/java/gov/nasa/gsfc/util/VersionChecker.java
net.sourceforge.pmd.ast.ParseException: Can't use annotations when running in JDK 1.4 mode!
at net.sourceforge.pmd.ast.JavaParser.checkForBadAnnotationUsage(JavaParser.java:32)
at net.sourceforge.pmd.ast.JavaParser.MarkerAnnotation(JavaParser.java:5353)
at net.sourceforge.pmd.ast.JavaParser.Annotation(JavaParser.java:5272)
at net.sourceforge.pmd.ast.JavaParser.Modifiers(JavaParser.java:347)


I was building for Java 7. I did the obvious google searches and didn't find an answer. A bit more work and I found the solution here. Basically, I needed to add the following to my build.gradle file:

sonar {
// Tell sonar where the cobertura codecoverage reports are and what version of java to use.
projectProperties([ 'sonar.java.source': '1.6', 'sonar.dynamicAnalysis': 'reuseReports', 'sonar.cobertura.reportPath': 'build/reports/cobertura/coverage.xml' ])
}


The important bit was this: 'sonar.java.source': '1.6'. Hope this helps someone =).

Monday, May 9, 2011

What can I do?

I want to have a list of the skills that I have. This is to help me track my growth and may help me identify solutions to problems that I face in the future. Hopefully I'll update this occasionally...

1) Java - 3+ years professional experience as of 2011.
2) CVS - Version control.
3) Mercurial - Better Version Control.
4) Groovy - Writing a 'Domain Language' for external users (still not sure how successful I was)
5) Groovy Scripting - Shell scripting using a Java Dialect
6) JavaFx - A rendering language for Java. Needs better tooling.
7) Html - Through Notepad and WYSIWYG editors
8) Ajax - 1 graduate level class where I learned how it works.
9) Eclipse - A good IDE
10) Omnigraffle - A good diagram creation tool
11) Cosi - a listening infrastructure (developed by STScI).
12) Bugzilla - a bug tracking system.
13) Mylyn - a task management tool in Eclipse.
14) ant - build system
15) maven - better build system
16) gradle - even better build system
17) Sonar - build analysis
18) cobertura - code coverage analysis
19) jUnit - unit testing of Java and Groovy code
20) Objective c - initial implementation of an iPad app.
21) SVN - better than CVS

Friday, October 29, 2010

Announcing Gradle-Plugin-JavaFx! JavaFx built by Gradle.

I complained earlier about how JavaFx is missing some really critical tooling. I mentioned debug support, and build support. In particular I was wishing that there was a JavaFx plugin in Gradle.

Because it was lacking and I really wanted FxBattle to build using Gradle. I decided to make such a plugin. Well, this is the official release of Gradle-Plugin-JavaFx version 0.1.0. I know, the name just rolls off your tongue.

It's an open source project that exists only to enable the FxBattle build. Still, others may find it useful. If they do, I'd love to hear from them. Keep up the great work Gradle developers. I love your product and am hoping to use it more widely soon.

Tuesday, October 5, 2010

Why I love OkGo

This is a beautiful video. Their use of vivid color and clever production combines with their mellow, trance-like music to give a really excellent and somewhat trippy experience.

in reference to: YouTube - OK Go - End Love - Official Video (view on Google Sidewiki)