git plugins for eclipse and netbeans

Last year, I tried out Git for the first time.  The command line was fine, but I really like my version control to be integrated into my IDE.

Overview

Git shines at some things.  Aside from the common ones, it is useful when internet access is unreliable.  We take connectivity for granted.

NetBeans

I hadn’t tried the NetBeans plugin last year. I mainly use Eclipse and only use NetBeans when working with a local robotics team. As such, I haven’t used NetBeans in eight months and needed to update it before I could try installing the NetBeans Git plugin.

Note: This Git plugin is in experimental mode. It will likely stay there as Oracle is working on an official plugin. Check Oracle’s page for updates. (Nice to see they didn’t abandon NetBeans after taking over Sun.)

The install procedure to connect to an existing repository:

  • Tools > Plugins
  • Select available plugins tab
  • Search for git
  • Click checkbox next to nbgit
  • Click install
  • Next and agree to license
  • Install
  • Continue to acknowledge it isn’t a signed/trusted plugin
  • Finish
  • Close
  • Team > Clone Other
  • Enter URL of git://github.com/prog694/frc
  • Enter directory/clone name if want to change. I had to change the clone name since the default was in use from last year’s Subversion project.
  • NetBeans looks for projects in that repository. I got a pop-up saying 7 projects were found and was asked to click “open project.” Select one or more projects to open them.

Eclipse

I tried egit again. This didn’t go well last year.  It’s now a year later and I’m on Eclipse 3.6 (Helios) instead of 3.5.  Things went much better this time around.

The install procedure to connect to an existing repository:

  • In Eclipse, connect to the update site.
  • Download all available plugins (egit and jgit).
  • Eclipse restarts
  • Change to the Git browsing perspective
  • Choose “clone Git repository”
  • Enter the URI.  In my case it was git://github.com/prog694/frc.  Note this same repository is available in a browser at https://github.com/prog694/frc.  All I did was change the protocol to git to connect. 
  • Since this repository is open for public browsing, I do not need to supply a username and password
  • Click next
  • Click next again to select the master
  • Click finish
  • Wait a minute or two
  • Expand until you find the project you want to checkout. (In this case, the actual project is a NetBeans project in this case so you can’t check it out as a project.  You can browse it in the repository view if you really want to check something.)

Conclusion

Both plugins are intuitive to use if you’ve a CVS/SVN plugin before.  Right click the project, choose “git” and the relevant option.  It’s nice to see the integration is seamless now.

scea – decomposition strategies example – part 2

In part 1, I posed a question on decomposition strategies.   Before I present my answer to the example, I want to point out a few things:

  1. An experienced architect (or organizer) is going to be able to do this in one pass.  This is ok.  Even in the real world, once you’ve seen a problem before you take shortcuts to the solution and don’t think about each step.  Just like a child will count on their fingers to figure out 9 x 6 and an adult will just say 54.
  2. If you aren’t comfortable with the concept of decomposition yet, take it slower.  Force yourself to pick something that splits the list into two pieces.  Then do it again.  Or give a reason for why you are making everything into a category.

My sample solution

Here I walk through the five layers presented in Cade & Sheil (listed in part 1).

Group 1 Technique – Distribution

I choose distribution over layering as my first technique because some of the items in this list represent different subsystems.

Accounting System Food System
  • coupon
  • fork
  • gift card
  • knife
  • paper cup
  • paper receipt
  • pen
  • spoon
  • chicken
  • lettuce
  • mayonnaise
  • mustard
  • pickle
  • onion
  • roast beef
  • roll
  • rye bread
  • tomato
  • turkey
  • wheat bread
  • white bread
  • wrap
  • Group 2 Technique – Functionality

    I choose functionality over exposure and generality.  Since there are clear business groupings, it makes sense to separate on that level.

    Accounting System Food System
    Eating supply Check out item
    • fork
    • knife
    • paper cup
    • spoon
    • coupon
    • gift card
    • paper receipt
    • pen
    Bread Meat Condiments Veggies
  • roll
  • rye bread
  • wheat bread
  • white bread
  • wrap
  • chicken
  • roast beef
  • turkey
  • mayonnaise
  • mustard
  • lettuce
  • pickle
  • onion
  • tomato
  • Groups 3-5 – not needed

    The system is sufficiently decomposed.  All done.

    algorithms – survival of the fittest

    I’ve been volunteering with a FIRST robotics high school team as a programming mentor. Due to a “series of unfortunate events”, we didn’t get to test our logic to drive straight in autonomous mode until the night the robot went into the crate.

    We wound up using an interesting approach. First we brainstormed options and prioritized them. If the programmers got the robot early, we would test in that order. Alas, we did not get the robot early. We got it for 45 minutes about an hour before packing time.

    Since it takes time to load code changes to the robot, we parallelized as much as possible. The students had time to test the competing approaches before we got our turn with the robot. So we tried them all by flipping a switch and then tuned the most promising one. It was a great use of time and available resources. And we wound up with an approach that wasn’t in our initial brainstorm.

    The lesson applies to us all. Be aware of your primary constraint; in this case time; and optimize to that. Punch card programmers certainly knew this and optimized per run at the machine.

    I was very impressed. Good luck in the regional competition team 694!