Random thoughts about my interests in Java, consulting, scripting in Java and software development (especially for small and medium size organizations).
Saturday, July 26, 2008
NFJS COSS 2008 1st Day Wrap Up
I really enjoyed Jared Richardson's, author of Ship It! A Pratical Guide to Successful Software Projects, keynote called Career 2.0. He announced he was writing a book of the same name that he expects to finish in January. In his keynote, he encouraged us to take control of our careers by improving our visibility in the industry. Some of his suggestions for getting started were writing, speaking and contributing to open source. He recommended setting goals but starting with simple steps like writing a blog, giving lunch and learns in your office or contributing documentation to your favorite open source project or maybe one you want to learn more about.
I have to agree with Jared completely. During my exit interview from college with my advisor, I was asked what I wanted to do with my career. I told her I don't know. But I did know there were two things I did not want to do. I did not want to write and I did not want to teach. 12 years, 4 books, several articals, numerous technical classses, many conferences and COJUG presentations I can say that was a very narrow minded view. I have found those are two of my favorite things to do and doing them have opened so many doors including free trips to Europe. I also discovered that contributing and observing open sources has really improved my disipline as a developer. It has allowed me to be exposed to more projects and practices then I could even be exposed to in my consulting practice. It allows me to see more of what works and what doesn't.
I also attended Scott Davis's, author of Groovy Recipes, Blue Pill and Red Pill presentations I had heard so much about from Java One. I was not dissappointed. I think it was a great introduction to Groovy for Java developers.
Thursday, July 3, 2008
Free Groovy and Grails training and copy of Beginning Groovy and Grails
Eclipse ${project_loc} errors during Grails development
This is caused by the fact that certain actions can cause Eclipse to loose focus of the current project. To resolve the issue, simply select your current project in the Package Explorer or Navigator and repeat task that caused the error. This can get annoying so another alternative is to replace ${project_loc} with ${workspace_loc}\project_name if your project in your workspace directory.
Thursday, June 26, 2008
Announcing Beginning Groovy and Grails Book
Friday, June 13, 2008
eApps is great for Grails hosting
In episode 58 of the Grails Podcast, Glen and Sven spoke about a Grails hosting service that costs about a dollar a day if used in production. So, I thought I would share my experiences in hosting Grails applications. For the past year I have used eApps for my Java, PHP and Grails hosting. I have been extemely happy with them from a support, feature and price perspective. I have used many hosting services in the past including other Java hosting services and eApps is definitely the best. My Beginning Groovy and Grails co-authors, Joseph Nusairat and Jim Shingler also use them for hosting as well.
eApps starts Java hosting at $20 a month for Tomcat and a offers a $30 option for JBoss or Glassfish which is less than a dollar a day. It also includes database options of MySQL, PostgreSQL or
I personally use the JBoss option while Joseph and Jim are using the Tomcat option.
Tuesday, April 29, 2008
Agile Web Development with Groovy and Grails at ITX Forum
Monday, April 21, 2008
Posted my Agile Development with Groovy and Grails presentation
In addition, I offer to freely give this presentation to any companies or organizations interested in Groovy and Grails in the central Ohio area.
Wednesday, March 19, 2008
Groovy Meta Libraries
Thursday, March 13, 2008
I might be getting this DSL stuff
I took this simple example written in Groovy that only a programmer could love.
println this.class.getResourceAsStream('readme.txt').getText()This example only reads a file found in the classpath and then prints it to standard out. It might look pretty standard to developers but to anybody else it looks like a cryptic foreign language. This example is even in Groovy which simplifies the code a lot compared to a Java equivalent. (I actually started writing a Java equivalent for this post but it was too painful after writing the Groovy solution so I stopped.)
So after looking at this example, I set out to write the same functionality in a human readable format. In all the DSL sessions I have attended, they always say start of with the end in mind and make it look like a sentence.
So, I came up with "write readme.txt contents". In code it looks like the following example:
write 'readme.txt'.contents()Not to bad for my first DSL. I think the intent is pretty clear. Next is how I implemented it.
String.metaClass.contents = {
this.class.getResourceAsStream(delegate).getText()
}
def write = { file ->
println file
}
write 'readme.txt'.contents()You can see I used a little bit of Groovy's MOP (Meta-Object Programming) to add a contents method to the String class that does the resource loading base on the delegate which is the object on which the message was passed which in this case is the 'readme.txt' String. Next I defined a write closure that does a println on the parameter passed. Note using Groovy's optional parentheses makes it flow much more like a natural sentence.
Now that I have reached this milestone, I am afraid all standard code is going to repulse me. I know I am stuggling to write Java code after having used Groovy.
Monday, March 10, 2008
Free Groovy and Grails lunch and learn
Groovy Ant task is for Groovy Scripts
final GroovyShell groovy = new GroovyShell(classLoader, new Binding(), configuration);This behavior was unexpected since it does not follow the normal Ant convention and because the documentation states the src attribute is a File containing Groovy statements rather than stating it expects a Groovy Script.
try {
final Script script = groovy.parse(txt, scriptName);
script.setProperty("ant", new AntBuilder(this));
// code removed for brevity
script.setProperty("args", cmdline.getCommandline());
script.run();
}
AWS EC2 Hibernate Java SDK v2 Example
I recently wanted to automate the creation of developer VMs in AWS using EC2 instances. To improve the developer experience (DX), I didn...
-
In May of 2009, I wrote the blog post The Ultimate Enterprise Java Build Solution . Over the past 7 years since I wrote the post I have help...
-
Class loading issues are a common frustration for many Java developers. The dreaded java.langClassNotFoundException means they can forget a...
-
Early in my career I took on the role of setting up and operating the build infrastructure of many of the projects I have consulted on. I st...