Thursday, December 13, 2007

Schema Spy Database DDL Browsing Tool

Overview

It provides an HTML view of any database schema DDL. It is an open source Java tool that is run from the command line. The home page is: Schema Spy Home Page

Setup

  • Download the single jar from the web site
  • Copy in the appropriate Oracle thin driver into the same directory
  • Download Graphviz 2.8 from the Graphviz Archive Site at: Graphviz Archive Download Site. Note the newer Graphviz libraries do not work and have been re-numbered, so you need the 2.8 archive version
  • Install Graphviz
  • Use the following command to run the tool. You can copy this into a batch script.
echo running Schema Spy
java -jar schemaSpy_3.1.1.jar -cp ./ojdbc14-10.2.0.2.jar -t orathin -host hostname
-port 1521 -db dbName -u db_user -p password -ahic -cid -o output_dir -s schema_name

  • The output will be in the "output_dir" directory.

Tuesday, November 6, 2007

When to Commit to Source Code Control

This is a good blog about when to commit. My view is that you should commit every day if possible. This is feasible because your code should always build and have tests, right?

http://damonpoole.blogspot.com/2005/07/check-in-early-and-check-in-often.html

Tuesday, October 9, 2007

Iteration Planning Meeting and Story Writing

One of the most important (possibly the most important) part of iterative development is the Iteration Planning Meeting (IPM) or Iteration Kick Off. If you do not have a well thought out IPM the whole iteration suffers. The IPM is most significant for the development team, it provides scope and focus where it is needed the most, at the story level. As a guideline, most agile stories should be well tasked out at the end of the IPM and have a 2 - 3 day duration.

To have an effective Iteration Planning Meeting (IPM) the possible stories that will go into the new iteration need to be well written before the iteration starts from both a business and technical level. This means some time must be devoted to story writing and scoping by the "development" team.
Some would argue that you scope out the story and tasks during the IPM as a group. That all sounds great, but in reality is does not work. Try to get 4 - 6 developers who might not understand the component or code to estimate and task out story that they have just read or thought about? The estimates and tasks will be of poor quality, which will result in story carry over or dropped scope.
If all the developers really know the code and completely understand the story then it is possible to get good estimates and tasks during an IPM, but again the developers are reading the story for the first time, you are still going to get lower quality estimates and tasks.

So, how do you improve this process. Over the last three years and three projects I have found the following to work well at the development team level:
The day before the next iteration, the development team spends about 1 to 2 hours to scope out the possible stories for the next iteration and updates the story card with a note or attachment providing the following:

- High level technical approach
- Required new modules
- Identity components that require updates
- Technical Risks
- List of tasks for the story with initial estimates

While scoping out the story, business will be engaged as required. The Iteration Planning Manager will be engaged if the story is too big or small and needs to be adjusted.
This activity is usually time-boxed to a few hours and spread across the team if possible. For example, give each developer one story or have a few developers work on a group of stories. Most importantly, there is NO meeting for this, this is done by the developers with whatever resources they need.
Once this is done, the IPM would have the following agenda:

- Bring up a story
- Developer who scoped it out would give a brief overview of the technical approach and hence the tasks listed.
- The team decides if the tasks are appropriate and the estimates realistic
- The team add/deletes/adjusts the tasks as required.

This approach provides the development team and hence management with a higher level of confidence of the deliverables for the iteration.

Are there other approaches or ideas that will help?

Friday, September 7, 2007

Source Code Experimental Branches and Agile Development

In any agile development project there is a need for experimental branches. An experimental branch is where you put code that you do not want to check into main/trunk for various reasons:

- You do not want to affect the trunk in any way
- The code will probably go away at some point in the future
- It is used for a spike and you want to preserve the code
- It allows developers working on a spike to easily share the code
- A developer want to preserve some code for a while or needs to stop working on a feature. The feature might not be ready for trunk yet, but the work so far must be preserved.


Normally, an experimental branch only lives for the time of the spike or otherwise. A decision is made to either destroy it or possibly merge to trunk after discussion.
Branches in our source code control system should be cheap and fast to create (unlike CVS). Normally, the developer would create the branch with a name something "spike_name_experimental_1", so all developers have the capability to create and destroy these types of branches.
This type of branch is standard in the industry, just search on "SVN experimental branch" on Google.
Of course, the QA/release team would only create the production/release branches and strictly control access to them per normal corporate policy.

Wednesday, September 5, 2007

Web Development Tools

Some of my favorite Web Development Tools

Monday, August 20, 2007

Agile Retrospective Script

This is more a traditional format useful for a team of 5-8 developers.

Iteration Retrospective Script

Note: This is geared toward a 1hour time box

  • First 10 min Facilitator Introduction

This is the retrospective for our team for iteration X. The goal is:

To help us improve the effectiveness of our team.

General Outline of the Retrospective

    • What we accomplished.
    • What we did well.
    • What needs improvement?
    • What should we do differently next time?
  • First 10 min Introduction & Ground rules
    • Laptops and mobile phones are off
    • No interrupting each other
    • Keep comments constructive
    • This is not a discussion until the facilitator says so.
    • The time limit is one hour
  • First 10 min Display and Recite the Cardinal Rule
    • “Regardless of what we discover, we understand and truly believe that everyone did the best job they could , given what they knew at the time, their skills and abilities, the resources available, and the situation at hand“.
  • 10 – 15 Show what we did in your Iteration Planning Tool (XPPlanner, Jira, etc..) for Iteration X
    • The Timeline view for Iteration X
    • The Bugs Story
  • 15 – 30 What went well?
    • everyone takes three Post Its
    • write down on the Post Its what went well (technical, team, organizational, process, general or specific)
    • facilitator puts them on the poster in a way that they are not visible to the group
    • facilitator reads them all out in random order with no comments
    • facilitator gets the group to brainstorm (no criticism) on themes of what went well and writes them down for all to see
    • Write down 3 things only? Or everything?
  • 30 – 50 What needs improvement?
    • repeat Step Above
    • vote on the importance of the themes and chose the three most important to discuss
    • facilitate discussion to generate action items for making improvements based on the three most important themes
  • 50 – 60 Conclusion/Action Items

Monday, July 2, 2007

Upgrading to Eclipse Europa

Eclipse Europa (3.3 final) is out. There are a couple of versions for Java Developers:

  • Java Developer Version
  • JEE Version
  • Classic Version (geared toward Rich Clients, I guess)
So, the JEE version was pulled from the download site because it was not installing correctly. The version I downloaded was the Java Developer version, but I still had to install a bunch of plug-ins to make it a useful IDE. The JEE version was supposed to solve this, oh well...
Do not forget to update your eclipse.ini file with your favorite environmental settings, for example my eclispe.ini has:

-showsplash
-showlocation
org.eclipse.platform
--launcher.XXMaxPermSize 128M
-vm /home/dlucek/jdk6/bin/java
-vmargs
-XX:+UseConcMarkSweepGC
-Xms256m
-Xmx700m
-Dosgi.bundlefile.limit=100
I installed the following plug-ins after installing Europa:

  • Use the Eclipse Europa Discovery Site to install WTP 2.0
  • Subclipse Version 1.2.3 works with Europa: http://subclipse.tigris.org/update_1.2.x
  • Spring IDE 2.0 is out, the update site is: http://springide.org/updatesite

Tuesday, June 12, 2007

Eclipse Install with Plugins

Eclipse is a good IDE, but you have to add a lot of sub-projects and plug-ins to get it ready for enterprise development. This blog will list how to install Eclipse and select the right plug-ins.

Installing
  • Load JDK 1.6, I use this for running Eclipse, it gives a little speed boost.
    • You will need to specify this JVM on the Eclipse command line, see next item.
  • As of this post 3.3RC4 of Eclipse is out, please install this by selecting "All Versions" on the Eclipse web site.
    • I normally install it in $HOME/apps/eclipse.
    • Create a short cut or start-up script that adds the following environmental settings.
      • eclipse -vm path_to_jvm/bin/java -showlocation -vmargs -XX:+UseConcMarkSweepGC -Xms256M -Xmx700M
  • Load the Web Tools Project (WTP)
    • WTP 2.0 is the latest version
    • Help->Software Updates->Find and Install
      • Select Search for New features to Install
        • Select Europa Discovery Site
        • Check Automatically Select Mirrors
        • Follow prompts
        • Select "Web and JEE Development"
        • Select Required
        • When prompted for installation, choose to Add a Location. This will create an Extension directory. I normally use $HOME/apps/eclipse-plugins
  • If you are using Subversion, then load the Subclipse plugin
  • Load the Spring IDE plugin using the Update Site
    • Use the 2.0 RC1 (Release Candidate 1). It supports Spring name spaces.
    • Add a new remote site
  • Update your code formatting preferences as required.
    • Once you do this, you should save them to an external file.

Sunday, June 3, 2007

XFire Presentation

The JSR 181 support is interesting, I like the Spring integration.


XFire Web Services Presentation

Data Binding with JiBx

JiBx data binding technology. Interesting approach but lots of XML configuration.

Introduction to Jibx Presentation

Basic Struts Presentation

Back then Struts was king, now you should look for other frameworks like Spring MVC.

Basic Struts Presentation

Basic Servlet/JSP Presentation

I presented this a while ago, but still some good intro stuff.

Basic Servlet/JSP Presentation

Friday, April 6, 2007

Web Application Integration Testing

I have found it really useful to have some type of integration level testing on web screens, by development, before turn over to QA. There are many open source tool kits out there that provide this capability. These tools will allow use to run regression tests again the web UI locally on our desktops. In fact the tests should be automated by Cruise.
One tool, which I used before is Selenium, the web site is:

http://www.openqa.org/selenium-core/

This tool was started by ThoughtWorks.

Another tool that is gaining in popularity is Canoo WebTest:

http://webtest.canoo.com

The Grails project is using it as their Integration Web Test Kit.

There are others, but these two seem to have the highest level of mind share.

A good resource is: http://java-source.net/open-source/web-testing-tools

Tuesday, January 16, 2007

Development Tools

IDEs
  • Eclipse for general Java development,
  • NetBeans for Swing development.
  • Intellij to just have everything work.
Editors
  • Gvim
  • Notepad++, for Windows
  • JEdit is not bad

Database
  • Sql Squirrel - Database worksheets and grids
  • DB Visualizer, free version
  • Oracle Sql-Developer - Great when working with Stored Procedures
  • Tora - Oracle/MySql IDE

Merging Tools
  • kdiff3 - good for three way merging
Source Code Control
  • Subversion, http://subversion.tigris.org
  • Subclipse Eclipse Plugin, http://subclipse.tigris.org
  • Svant task for Ant
  • Tortoise for Windows, http://tortoisesvn.tigris.org/
  • esvn - Linux Subversion client
WebServices
  • SoapUi - Rocks for testing and integration work
  • Apache TcpMon for Monitoring
Scripting
  • Perl Plugin for Eclipse
  • ShellEd Eclipse plug-in for Bourne Shell scripts
  • Eclipse Groovy plug-in

Thursday, January 11, 2007

Eclipse Tips & Settings


Exporting Global Settings/Preferences
  • File->Export->Preferences
Good Command Line and Environment Options
  • -Xms128m
  • -Xmx784m
  • -XX:MaxPermSize=128m
  • -XX:+UseConcMarkSweepGC