Coming Up for Air

An Introduction to Programming with Minecraft at the Oklahoma City JUG

On Monday, July 13, I will be leading the monthly OKC JUG session, whose topic this month is "An Introduction to Programming with Minecraft Mods". We’ll be using a modified version of the curriculum Arun Gupta has developed for this Devoxx4Kids program, with examples taken from the book he and his son wrote, Minecraft Modding with Forge: A Family-Friendly Guide to Building Fun Mods in Java.

Here is the announcement sent to the Oklahoma City tech community. If you’re in the area, come check it out!

Running IDEA 14 on Java 8 on the Mac

My team at work was having some issues with IDEA and the Checkstyle plugin. Based on the error message, and without actually looking at the JARs, it seemed pretty clear that the issue was a JDK version issue. While I think this issue has been resolved, when I set up my Mac months ago, I was forced to install Java 6 in order to install IDEA, but, apparently, the new version of the Checkstyle plugin was compiled with a newer JDK (as it should be). Whether or not the Java 6 issue still exists with IDEA, you can make IDEA run on Java 8 pretty easily, and I’ll show you how to do it.

Changing the GlassFish Admin Users's Password Programmatically

Recently, in the #glassfish channel on Freenode, a user was having trouble configuring GlassFish in a Docker environment. He was scripting the configuration of the server, but was having trouble setting the admin user’s password, since the change-admin-password command takes input from stdin. Fortunately, there’s REST API for that. This curl command will do what the user needs to do without any need for additional input:

curl  -X POST \
    -H 'X-Requested-By: YeaGlassFish' \
    -H "Accept: application/json" \
    -d id=admin \
    -d AS_ADMIN_PASWORD=password \
    -d AS_ADMIN_NEWPASSWORD=password2 \
    http://localhost:4848/management/domain/change-admin-password

Once the password is set, this same command can be used to change the password, but --user admin:$PASSWORD must be added to authenticate the request.

I should note that I don’t think this is an officially supported way to execute asadmin commands. It works, but it may change, or it may go away. I would say that Oracle may not support doing this either, but they don’t offer any support, so there’s no harm there. :) Also note that AS_ADMIN_PASWORD has a typo in it that may be fixed in future releases of the server. Caveat emptor! :)

Custom Maven Packaging Type

As I’ve noted in a previous post, I recently moved my blog from Awestruct to JBake. This also allowed me to migrate the building and publishing of the blog contents to the toolchain that I know pretty well (Maven). What bothered me, though, was that my POM defined the project as a jar packaging type: the build produces no jar file and, in fact, doesn’t process any Java at all. What I wanted, then, was to be able to define the lifecycle in such a way the the compile phase didn’t try to compile anything, and the install phase didn’t try to put anything in my local repo. Unfortunately, either I’m a bit dense, or the documentation wasn’t very clear (it’s likely a combination of both :). At any rate, I finally had a eureka moment late last night and figured it out. Here is a distillation of my findings.

From Awestruct to JBake

For some time now, I have been using awestruct to power my blog, and, for the most part, I’ve been happy. However, I have found, especially on the Mac, the Ruby-based environment more difficult to setup than I would like. While I have solved this problem before, it presented itself once again when I was issued a Mac upon joining NetSuite. I can, of course, muddle through it, but I’m tired of fighting it, so I started looking around for an alternative and found JBake.

Multitenant PostgreSQL

As more and more of our applications move into "the cloud", multi-tenancy has become a pretty big thing these days. In a nutshell, "multi-tenancy" means handling multiple customers data using, say, a single server. This concept scales, of course, to clusters, etc., but the concept is the same: a bunch of people’s data all mixed together in one big bucket. The problem, then, for the development team is isolating one customer’s data from another’s, disallowing, for example, the viewing or editing of another customer’s information. There are a myriad of ways to accomplish this, but I’d like to discuss here a way to accomplish this using a single database.

Merry Christmas

To all of my readers, I wish you all a very Merry Christmas. My hope, as always, is that even in the busyness and the hustle of the Christmas season, you will find the peace and joy of God brought to us so many years ago in the birth of the Christ child.

Contract-First REST APIs with RAML

Yesterday, at the OKC JUG, I presented on the topic of Contract-first REST API development with RAML. This post is a rough blogification of that discussion. For those of you who were at the meeting, the preamble to the source demo (introduction, background, options discussion, etc) have been not been reproduced here.

tl;dr: You can find the demo source here and play around with it.

So long, and thanks for all the fish

thanksforallthefishAs so many of my friends and peers have done before me, it’s time to use that admittedly overplayed Douglas Adams quote and announce my departure from Oracle.

I joined Sun Microsystems in July of 2008 as a member of the GlassFish team, working primarily on the Administration Console. Over time, I would add REST to my work load, which has been my primary responsibility for the past few years.

I’ve had the opportunity and honor to work with some very smart and talented people over the last six years. I’ve learned a lot from them, and made some great friends. While it’s nothing as drastic as the destruction of the Earth to make way for an intergalactic highway, the time has come, though, to bid farewell to those friends and the job that’s offered me so much opportunity and growth and move on to a new venture and more great opportunities and chances to learn and grow.

It’s been a pleasure.

Quotes

Sample quote

Quote source