Random thoughts about my interests in Java, consulting, scripting in Java and software development (especially for small and medium size organizations).
Wednesday, December 16, 2009
Nationwide's New Cartopia iPhone App
Wednesday, December 9, 2009
More Great Columbus iPhone Apps
Games:
- Springshot from FourthFrame Technologies - Fun and reminds me of a combination of shuffle board and put put golf.
- Jiggle Balls: Spikes from Funky Visions - Surprisingly addictive.
- Air Hockey: Face Off from Sad Robot Software - Have not played it yet since it requires two devices but it looks awesome.
- GeoPhoto from C.Y.borg's Neural Net - Great way to Geo Tag your photos taken with your iPhone.
Sunday, August 16, 2009
Cloud Application Achitectures Book Review
I thought it did a great job of
- giving an S3 and EC2 tutorial
- explaining the different persistence options in Amazon Web Service (AWS) offerings
- identifying things to think about in regards to security in the cloud
- providing thoughts on disaster recovery in the cloud
- making a business case for the cloud
Thursday, August 6, 2009
Columbus taking over the iPhone game market
Another fun game produced here in Columbus a little while ago is Jiggle Balls from Funky Visions.
I own all three and they are a lot of fun.
Wednesday, July 8, 2009
Grails Read-Only Plugin Repository
Listing 1 - application.properties file with plugin references.
app.version=0.1
app.servlet.version=2.4
app.grails.version=1.1
plugins.hibernate=1.1.1
plugins.image-tools=1.0.4
app.name=pfj
plugins.jsecurity=0.3
When other members of the team get the updated application.properties file they just run grails run-app and the plugins will automatically be downloaded and installed on their machine. Life couldn’t be easier. Well, maybe it could be. See for this to work, the plugin must be installed in the central grails plugin repository found at http://plugins.grails.org/ or you can use another one of my favorite new features of Grails 1.1, multiple repositories. To configure multiple repositories just create a BuildConfig.groovy in your application’s grails-app/conf directory and add a new entry for your additional repository like Listing 2.
Listing 2 - Additional plugin repository entry in BuildConfig.groovy.
grails.plugin.repos.discovery.myRepository="http://company.com/grails"
The only problem with this is it assumes the repository is hosted in Subversion (SVN). This is not always the case. With the popularity of git many of the plug-in developers have gone to using github for hosting their plugins. One example is the popular image-tools plugin.
Another important use case takes advantage of my second favorite feature of Grails 1.1, the Apache Ant and Apache Ivy integration which enables you to do a continuous integration builds in something like Hudson by executing the Ant build.xml without even having to have Grails installed on the build machine. Everything required is installed as a bootstrap. Now that is awesome. Of course this assumes the plugins are in a configured repository that is backed by SVN.
To simplify developer setup and continuous integration, I looked for documentation to setup a custom Grails plugin repository for plugins I did not maintain but I still want to access using the new Grails 1.1 features. All I found were instructions on how to do it if you are the plugin provider or using the Grails central repository. If that is your goal it can not be easier. For deploying to the central repository you first need to request permission to the Grails plugin SVN repository. Then to deploy the plugin just type grails release-plugin. For a custom plugin repository, you will need an additional configuration in your BuildConfig.groovy file to point to your SVN repository like the one found in Listing 3 and type grails release-plugin -repository=myRepository where the repository parameter is the last part of the property name. That’s it.
Listing 3 - BuildConfig.groovy with an entry to a repository for distribution.
grails.plugin.repos.distribution.myRepository="https://company.com/grails/"
I could not find any documentation about creating a custom read-only repository for third party plugins you don’t want to maintain or if you just don’t want to have to maintain a SVN repository just for those third-party plugins. So after a little bit of exploring the central repository and some trial and error, this is how I created my own read-only repository saving time and simplifying my team setup.
Note: for a read-only repository you don’t need SVN all you need is an HTTP based server that can serve files.
1. Create a BuildConfig.groovy file in your application’s grails-app/config directory containing grails.plugin.repos.discovery.myRepository="http://company.com/grails/" entry where the URL is addressable via HTTP and is the root of the plugin repository.
2. Create a plugins-list.xml file in a .plugin-meta data directory under the repository root. This file needs to contain your plugin(s) meta data like the following for image-tools:
<plugins revision="2">
<plugin release="1.0.4" name="image-tools">
<release tag="RELEASE_1_0_4" type="svn" version="1.0.4">
<title>Image Tools</title>
<author>Arquetipos Software</author>
<authoremail>projects@arquetipos.co.cr</authoremail>
<description>Images Tools</description>
<documentation>http://www.grails.org/ImageTools+plugin</documentation>
<file>http://www.arquetipos.co.cr/blog/files/grails-image-tools-1.0.4.zip</file>
</release>
</plugin>
</plugins>
3. Create a grails-
Implementing these 3 steps made my third-party plugins available to the list-plugin and install-plugin commands but more importantly to the automatic transitive plugin resolutions for developer and continuous integration servers.
Friday, May 8, 2009
Continuous Integration Lessons Learned
During the process of using CC, I learned the following valuable lessons I wanted to share.
First, once every 24 hours is not frequent enough for continuous integration. As mentioned above, I use to set up CI environments to build once every 24 hours. When I initially set up CI, I was asked to set the builds to run every 4 to 6 hours. There were skeptics who believed any more frequent builds triggered by repository activity would interfere with a team so new to CI and cause unnecessary anxiety. However, every 4 to 6 hours was a problem when trying to set up and configure CI initially so I set the CI to check the repository every minute and if something changed to wait for 5 minutes of inactivity before starting the build. Fortunately, I forgot to change it to a less frequent iteration and the minute check made into the final configuration. We discovered that the short frequencies actually provided the best results by giving everybody comfort since they got immediate feedback. Plus without a frequent build, one bad build could cause the red lava lamp to be lit all day.
Second, there are multiple audiences for the builds so there is a need for a continuous integration build and a nightly build. The audience of a continuous build should be the developers themselves. Developers need quick feedback to provide confidence. They need to know what they checked in to the repository works outside their development environment and what they check out of the repository works. So, this build should focus on code compiling, passing the unit tests and being able to be packages and possibly deployed. The second audience is management and architects. Managers are often trying to collect metrics from frameworks like NCSS and JUnit (number of unit tests). Architects are often interested in code quality reports such as PMD and unit test code coverage. These types of reports take longer to produce and don’t need to run continuously. A separate build that runs at midnight is perfect for executing metric and code quality reports. Of course developers should be able to run these reports at any point in time in their development environments since the same build scripts should be used by both the developers and CI environment.
Third, a CI web site like the one already in Hudson and provided by Sonar is a very valuable communication tool. While developers need to be notified immediately of build problems via email, IM or lava lamps, other such as managers do not. A website can provide the information they need at their convenience.
Forth, lava lamps are a fun way to provide a visual indicator of the build. I initially thought the idea was rather hokey but I was wrong. If you want to learn how to integrate lava lamps with CruiseControl check out Mike Clark's Pragmatic Automation web site (http://www.pragmaticautomation.com/cgi-bin/pragauto.cgi/Monitor/Devices/BubbleBubbleBuildsInTrouble.rdoc).
Tuesday, May 5, 2009
The Ultimate Enterprise Java Build Solution
Now after all these years, I think I found the right solutions for Enterprise Java Builds. The solution involves 5 open source projects: Maven, Subversion, Hudson, Nexus, Sonar.
At the core of the solutions is Apache Maven, a build, project, dependency management framework. Maven makes it easy to declaratively describe a project or collection of projects that generate artifacts like binary jars, source jars, doc jars, dependency lists and other artifacts. All these artifacts can be versioned to ensure all developers are using the right artifacts. These artifacts can also be published to a Maven repository making distribution of the artifacts seamless.
In order for developers to collectively own code and integrate often, a source code repository is necessary. Subversion has been a proven enterprise scale repository which integrates well with may tools like Eclipse, Hudson and Maven. But there are many other quality source code repositories that could fit in Subversion's place such as Git. The exact source code repository for this solutions is not as important as having one and having one that integrates well with the choosen tools.
One of the biggest challenges in developing software with a team of people is integrating the software so the practice of continiously integrating has become a staple in many enterprises. After every developer check-in, a continious integration server will check the code out, compile and run all the unit tests. Hudson is possibly the easiest and most powerful continious integration server available for Java. It has a very simple web console that makes creating and configuring build jobs a cinch especially Maven jobs. Just incase that is not enough, it has a very nice plug-in system and community making it very flexible and robust.
After Hudson builds artifacts (jars) that developers need it must publish them to a Maven repository hosted within the enterprise. Nexus is that Maven repository. It enables you to publish both release and snapshot artifacts, provides different views into the respository and includes searching for artifacts even their contents. In addition, it can act as a proxy to external public Maven repository providing traceablity into where artifacts came from as well as improve download performance. Both developers and Hudson can use Nexus to keep their local artifacts up to date providing continious integration for everybody all the time.
Finally, it is valuable to keep metrics about code quality. This can help show if code is improving or declining. This can help easily identify problems, risky areas and bad pratices. Sonar is a server that provides a dashboard into your code quality. It integrates with many common code quality tools like PMD, Checkstyle and FindBugs. It include metrics for code coverage, unit testing and lines of code. The trending capabilities make it easy to identify patterns.
Wednesday, April 8, 2009
Startup Weekend Columbus 2 (SWCII) Experience
Ok, let me start back at the beginning. Friday, April 3, 2009 about 130-140 people meet at TechColumbus to pitch ideas for companies and products. There were 73 or so pitches. They ranged from the absurd to the brilliant. Then we voted on which ideas we liked the most. After the cream of ideas rose to the top we formed groups around our favorite ideas.
I feel blessed that at the end of the evening I had a great team of six very talented developers and business men excited about implementing one of my two pitches. I have been thinking about this idea for over two years and this weekend gave me the kick in the pants and the team I need to make it real.
The team itself is very tech heavy and age light. The three senior members of the team were:
Dave Lucas - President/Consultant at Lucas Software Engineering
Josh Brown - Senior Consultant at Sogeti
Harish Raju - Software Development Manager at HP
The team also included three very multi talented and tireless college students that provided major contributions. All three of them would make great interns or employees so if you are looking for some check them out. I want to see this type of talent stay in the Central Ohio market.
Ben Gilbert - Computer Science and Engineering/Entrepreneurship student at OSU
Andrew Kane - Computer Science and Engineering Student at OSU
Matt Hill - Economics at OSU
I did not get any sleep on Friday night because I had so many ideas racing through my mind and I was so excited to get started.
Saturday and half of Sunday, we spent building a functional prototype which included an iPhone application and website. We also spent time putting together a business plan and presentation for the final program. During our software and business development efforts we used an agile process called Scrum. We conducted 2 hour iterations and performed a stand up (meeting where you literally stand up to encourage a short meeting in which you answer the three questions of what have you done since the last meeting, what do you plan to accomplish before the next meeting and do you have any road blocks) after each one. We all felt this made us feel extremely productive and increase our communications. It also encouraged accountability and helped us to tack concerns very early before they become problems. We also found Google docs and Google Groups very helpful. With such short timelines, Google docs gave a way of sharing and even simultaneously make changes to spreadsheet, word processing and presentation documents. Google Groups enabled to send communications out to the whole group at one time making sharing information quick and easy.
We were also glad we set up subversion repository before we started doing any development. This gave us a convenient way of sharing code and managing the rapid development.
I also got to evangelize and make some converts to some of my favorite technologies, Groovy and Grails. While most of the team had not had the opportunity to work with these technologies before, they picked it up extremely quickly which was great since I was pretty much heads down in iPhone development. I think that is a huge testament to Groovy and Grails. I really don’t think we could have put something together in a weekend using standard Java technologies since just downloading all the projects and getting them configured would have taken an immense amount of the valuable time we had.
Finally, we found the book Presentationzen Book an invaluable tool for putting together a compelling presentation.
The whole weekend TechColumbus and the sponsors provided a great facility and kept us well fed (when we actually tore ourselves a way from our work to eat) and caffeined which helped provide the perfect condition for productivity.
You maybe wondering by now what our company is. Well, I am going to keep you in suspense a little longer. We are hoping to have a beta start within two months. I will post more when that happens.
Thursday, March 19, 2009
3D Modeling Class
Our project was to model, texture and light a room and render 4 still images of it, 2 up close and 2 from a distance. I chose my son's room so I could make 3D toys. I also add a little bit of a Star Wars theme which he loved. Below is my final project.
Tuesday, March 10, 2009
Groovy and Grails Overview Slides updated
In preparation for presenting it two more times this week, I updated my slides to reflect the new releases of Groovy 1.6 and Grails 1.1. I also had to update the resources since so many great new books are also available. You can find copies of the slides here.
Groovy and Grails at Cleveland User Group
Thursday, February 26, 2009
Chmod iPhone Application
Wednesday, February 25, 2009
First CIDUG (Columbus iPhone Developer User Group) Meeting
Most importantly, we officially desided CIDUG is pronounced sigh-dug.
Monday, February 2, 2009
Creating a simple iPhone checkbox
After googling, I could not find a checkbox component that somebody else had made or a good tutorial. So below are the steps I did to create a simple checkbox.
I began by adding a UIButton to my view and setting its Type to custom and its background to my unchecked png image with transparent background. Then I implemented the auto generated viewDidLoad method to set my background image if the button state was selected to the checked png image.
- (void)viewDidLoad {
[super viewDidLoad];
[checkButton setBackgroundImage:[UIImage imageNamed:@"checked.png"] forState:UIControlStateSelected];
}
Finally, I attached a changeSeletected method to the button's Touch Up Inside event that changed the selected state of my button.
- (IBAction) changeSelected: (id) sender {
UIButton *button = (UIButton *) sender;
button.selected = !button.selected;
}
I think the final outcome turned out pretty nice.
Sunday, January 11, 2009
3D Internet
Saturday, January 10, 2009
CodeMash 2009 Presentations - Groovy and Grails Precompile and iPhone Web Development with Grails and iUI
I also presented a regular session on iPhone Web Development with Grails and iUI. Most of the presentation is about iPhone Web Development but there are several Grails introductory slides and several more on integrating iUI with Grails. I am glad I included the Grails introductory material since this was the first exposure to Grails for most of the developers attending my session. If you are interested, you can view the slides at http://www.slideshare.net/cjudd/iphone-web-development-with-grails-from-codemash-2009-presentation/
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...
-
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...
-
Class loading issues are a common frustration for many Java developers. The dreaded java.langClassNotFoundException means they can forget a...