Showing posts with label GreenJUG. Show all posts
Showing posts with label GreenJUG. Show all posts

Tuesday, January 14, 2014

Unit Testing Example with Code Coverage using Cobertura

Cobertura Coverage in NetBeans 7.4
I gave a presentation on unit testing a few months ago at Greenville Java Users Group (GreenJUG) about unit testing using JUnit and Cobertura. I finally have gotten around to publishing the code with a little cleanup.

NetBeans will detect the addition of Cobertura in the POM file and automatically add menu items for checking code coverage. This is a very slick feature in NetBeans.

The Cobertura coverage shows 90% in the project because it does not handle the generics correctly at this time.

The Apache Maven based project can be downloaded from Bitbucket below:

unit-testing-demo

Here is an example snippet of the code.

ListDataStoreImplTest.java


Wednesday, November 21, 2012

What is the definition of a JUG Leader?

Daniel deOliveira, a friend of mine, asked me for what I thought a JUG leader definition should be:
I’m writing an academic paper about the seven dimentions of collaboration in JUGs and I needed a definition for a JUG Leader. I looked in several search engines and … nothing :-( Amazing :-0
I replied to him, and the JUG Leaders list with my definition below. One of the things he noted was that there is no definition out on the Internet that he could find. I decided to add one.

What is the definition of a JUG Leader?

A JUG leader is someone who is passionate about Java. That is the most obvious answer. However, that answer has many different levels. A JUG Leader can be a very technical individual, and some are the best developers in their JUG. This does not need to be the case.

A JUG Leader understands the power of communication, collaboration, and community. As I noted, a JUG leader does not need to be the technical expert of the group, but they need to be able to identify those members (community) and get them to share (communicate) their knowledge. The group dynamic results in a number of synergies that lead to making the group successful (collaboration).

JUG Leaders can act as facilitators. They tend to pay attention to the activities of their members. Often, when someone mentions an issue, or something that they need assistance with, a JUG Leader knows someone else in the community who may have the answer, or provide direction.

JUG Leaders introduce people. We tend to meet really interesting people, and cool projects. When a member asks about a project, or a person, we can often introduce them to the right people. They can also provide assistance to employers looking for people. They tend to know who is in their communities and their expertise.

The best JUG Leaders are people oriented. They are personable, and are the type of people you want to hang around with. They realize that technology changes, but that people are the constant. This leads them to make relationships with people. The power of relationships with people will overcome technical challenges, and personal conflicts. We already know that JUG Leaders are passionate, but the relationship part tempers our dealings with others. We understand that people will disagree, it is how we deal with disagreement that others will judge us.

A JUG Leader is the continual "newbie". They tend to be first adopters. This results in an appreciation for new members. They are always new to some technology, and publicly recognize those projects that support new people.

A JUG Leader is social. As a JUG leader, you tend to be involved with social media. A number also tend to be bloggers. This passion for communication and sharing drives them to blog, or tweet.

A JUG Leader cultivates success. The most successful JUGs have other leaders which are pulled from the membership to make the JUG successful. The JUG should not succeed, or fail on the efforts of one individual. The leader organically grows its members, and asks them to do things that they will be successful in. Move people forward by giving them opportunities to succeed.

Hard projects should only be handled the JUG Leader, or those who will not be deterred by failure. Those projects which could fail should be very public. In the event of failure, the JUG Leader can demonstrate that failure is OK, and that we move on. The leader mentions the failure in terms of themselves, and not the JUG. This is very important.

Success will breed success, and a very public success is a win that should be mentioned in terms the JUG making it possible. Communal ownership and pride in your JUG will make the leader and the JUG grow.

Those are some of my thoughts on what a JUG leader is, or at least what we should aspire to be.

Thursday, July 26, 2012

JAX-RS JUG Demo CDI and @Singleton Usage

This is the last demonstration I gave at the Greenville Java Users Group (GreenJUG) on CDI and JAX-RS. I cleaned up the code, but not as much as you would think. I managed to code this in about 15 minutes during the meeting live while everyone watched. It was a fun experience, but the best part is that it worked during a live un-rehearsed demo.

It goes to show you that CDI and JAX-RS are simple enough in combination to use in a live high stress demo environment. Imagine what it could do for you in your code. This code was written using NetBeans 7 IDE which may be responsible for the simplicity as much as the other technologies.

Here is the source code: cdi-example.zip

The code below demonstrates some interesting bits. The source code above contains the less interesting POJOs.

PersonResource.java



PersonDB.java


JAX-RS JUG Demo Examples (@QueryParam and @PathParam)

I gave a demo of JAX-RS using @QueryParam and @PathParam annotations, and created a client to connect with the resources and display the results. I promised to post the code. So here it is along with some cleanup.

Here are the Apache Maven projects and code:
simple-queryparam-example.zip
simple-queryparam-client-example.zip

Example.java



SimpleExampleClientApplication.java


Sunday, July 08, 2012

JAX-RS Simple XML Service and Client Example

I thought that I would publish the information and code from a recent JUG meeting where I coded some simple JAX-RS examples on the fly to show how easy it can be to create RESTful web services.

This particular code for the service and client are nothing fancy, but I told the JUG members that I would publish it when I got a chance.

Code

The Apache Maven based projects were developed using the NetBeans 7 IDE and GlassFish 3.1.2. You will need to run the simple-xml-example project first before you can run the client application.

The code for the projects can be downloaded here: simple-xml-example.zip and simple-xml-example-client.zip

ExampleResource.java



SimpleXMLExampleClient.java


Thursday, November 25, 2010

Oracle Certified Java Programmer Boot Camp Code Examples

Java Mascot introducing Netbeans.Image via Wikipedia
I uploaded all of my code examples today for the free Oracle™ Certified Java™ Programmer Boot Camp that I do for the Greenville Java Users Group (GreenJUG).

You can find more information on the JUG site about the boot camp, and from the links below. The projects are NetBeans 6 files.

You need to still need to attend for the presentations! If I posted those, you wouldn't feel the need to come and participate.

Code Examples

Links



Enhanced by Zemanta

Sunday, August 31, 2008

Sun™ Certified Java™ Programmer Boot Camp

The Greenville Java Users Group (GreenJUG) is conducting an ten (10) week boot camp to prepare its members for the CX-310-065 exam. It is a great opportunity to get a better understanding of Java™ and a obtain a valuable industry certification.

The code examples, books, and notes can be found on the Blue Lotus Software Sun™ Certified Java™ Programmer (SCJP) Boot Camp site. All of the code is Open Source Apache 2 licensed. The schedule for classes and final exam preparation are on the GreenJUG site.

Saturday, October 28, 2006

Greenville Java Users Group Graduates Incubator

Finally I have had a chance to complete the steps required to graduate the GreenJUG site from the java.net incubator. I still need lots of assistance from the Java user community to make our JUG a success, but this will come with time and perseverance.

I have asked for some items to give away at meetings from Sun, O'Reilly, and JetBrains. Sun and O'Reilly have really stepped up to offer a bunch of goodies. We will see if JetBrains will offer some goodies.

Popular Posts