Post

Nov 21
Stack Demo

import static org.junit.Assert.*;

 

import org.junit.Test;

 

    import static org.junit.Assert.*;

    import org.junit.Test;

 

    public class StackTest {

 

        // Is a new stack empty?

        @Test

        public void testEmptyStack() {

            Stack stack = new Stack();

            assertTrue(stack.isEmpty());

              

                    

            fail("Not yet implemented");

        }

 

        // If I put one object on the stack, is it still empty?

        @Test

        public void testPushCheckEmpty() {

            fail("Not yet implemented");

        }

 

        // If I push an object onto the stack and then pop it off, is the stack

        // empty again?

        @Test

        public void testPushPopCheckEmpty() {

            fail("Not yet implemented");

 

        }

 

        // If I push an object onto the stack, do I get the same one back when I pop

        // it off?

        @Test

        public void testPushPopCheckReturn() {

            fail("Not yet implemented");

 

        }

        public void testPushMultiPopCheckReturn() {

            fail("Not yet implemented");

 

        }

 

        // If I ask for an object (pop) from an empty stack what do I get?

        @Test

        public void testPopEmptyStack() {

            fail("Not yet implemented");

 

        }

 

        // If I peek an object, is it still on the stack?

        @Test

        public void testPushPeekCheckEmpty() {

            fail("Not yet implemented");

 

        }

 

        // If I put an two items on a new stack and peek, do I get the correct item.

        @Test

        public void testPushMultiPeekPopCheckReturn() {

            fail("Not yet implemented");

 

        }

 

        // If I peek an empty stack what do I get?

        @Test

        public void testPeekEmpty() {

            fail("Not yet implemented");

 

        }

 

}

Nov 20
Managing work in Team Foundation Services

Create a Team Foundation Services Account

https://www.youtube.com/watch?v=zVxVRU3HH-o&t=2s

Link Visual Studio to Team Foundation Services

https://www.youtube.com/watch?v=zrN-nPxwm6c&t=23s

Add User Stories and Delivery Team Tasks

https://www.youtube.com/watch?v=J851Q0NIXu4

Nov 12
Airline club membership... Is it worth it?

On an early Monday flight I pretty much have the whole United club to myself...

If you have ever thought about United Club membership before I offer a little food for thought:

If you spend as much time at the airport as I do (or even way less) think of club membership in terms of free "faster" Wi-Fi, free drinks, soups and salads as well as a relatively quiet space to relax or work and wait for your delayed flight.

Imagine this scenario:

You have an hour and 25 minute wait for your next flight or enough time to have 2 glasses of wine a bowl of soup (or 2) and a salad. While enjoying your wine and eating your soup and salad you return a few emails and finish that proposal on your laptop. What's that your flight was canceled and you need to talk to customer service but so do the other 247 people on your flight? No problem go to the club and talk to customer service there "members only".

So how much does all of this cost?

First let's do the math...

  • 2 airport glasses of wine $18
  • 1 airport bowl of soup $9
  • 1 airport salad $12
  • Quiet workspace with space for laptop and faster wifi $priceless


For a grand total of $39 actual dollars per leg of your trip plus at least $50 worth of less noise and airport DRAMA. What is your peace of mind worth??

So you get stuck on that flight from SFO to DCA and have to go through ORD because you booked last minute. That's $39 at SFO $39 at ORD and $39 at DCA (Because it's better to wait for your bags in the club with a free drink in your hand) or $117 each way. A grand total of $234 round trip. Did I mention you get a plus 1?

The membership is $550 which sounds expensive until you do the math. If you travel for work at least once per month club membership represents a cost savings. Or if you travel for fun with a companion more than 4 times per year or if you just drink and snack A LOT. You have a full year to eat and snack your way to your $550 membership fee. 


Nov 10
The Increasing Cost of Technical Debt

 

The cost of defects increases exponentially as they slip down the delivery pipeline a shift left in quality, security and stability goes a long way toward reducing costs. We must make a shift left in quality, security and stability by surfacing defects earlier in the Delivery pipeline as defects get exponentially more expensive as they slip down the pipeline. A defect caught after development in quality assurance is about 15x costlier than a defect found in design.

From a development perspective, a defect found during implementation is 6.5x costlier than if it were found in design but still about half the cost of finding the same defect in QA. If we have so many gaps in our process that a defect makes it from design, through implementation and QA and somehow finds itself in production the cost is 100x higher than finding that same defect in design.

A more elusive fact we must also take into account is the soft costs associated with the very public statement that the dev (and quality assurance) team "is a joke" as colleague of mine would say. All joking aside this is a team effort it is not only the developers fault but also QA, infrastructure, release management and anyone else responsible for any part of the pipeline. We sink or swim as a team and quality is everyone's responsibility. If we deliver a crappy piece of software and the stock tanks and the company goes out of business we are ALL out of a job. Reputation cost is a little difficult to quantify but suffice it to say that releasing software riddled with defects and poor user experience does not build confidence in your team's ability to deliver quality solutions to its customers.

http://www.isixsigma.com/industries/software-it/defect-prevention-reducing-costs-and-enhancing-quality/

Implementing processes such as Test-Driven Development, Continuous Integration and Automated Acceptance Testing / Behavior Driven Development can help teams make that "Shift Left" in quality that reduces the cost of their debt. As teams will typically incur from 10% – 30% technical debt to new work ratio per sprint it's a good idea to do everything we can to find the defects and reduce debt before is slips down the pipeline towards Maintenance / Production where the costs skyrocket.

Oct 03
Git Installation

In this tutorial, we will walk through each step required to successfully download and install Git. To successfully integrate code changes from multiple developers, we need a central source of truth. One location where the latest version of all source code, tests, configuration files, installation files, and anything else needed to move our solution down the DevOps Delivery Pipeline.

Git combined with Jenkins provides the ability to configure Continuous Integration triggers that automatically fire off builds and tests. In previous tutorials, we have installed the Java Development Kit, Maven, and Eclipse to complete our Continuous Integration development environment we will now install Git.

  1. Open a browser, and navigate to https://git-scm.com/downloads
  2. Download the latest version of Git for your OS
  3. Locate the Git download package in your Downloads folder

  4. Double Click on the Git setup Icon.
  5. Click Next to accept the defaults, then click Install
  6. Click Finish to complete the setup

     

     

      The next important step will be linking our Jenkins installation our new Git installation. Things are about to get interesting! 

Aug 25
Jenkins Install

In this tutorial, we will walk through the download instalation of Jenkins to prepare our Continuous Integration setup. So far, we have installed the Java Development Kit, Maven, and Eclipse. Now we will install Jenkins. Next we will Git, and connect to Jenkins to fire off new builds on Commit.

 

While there isn't much to the Jenkins installation, installing and configuring the plugins is where things will get interesting.

 

  1. Navigate to the Jenkins download page: https://jenkins.io/download
  2. Scroll down to the latest version of Jenkins, and click on the latest version for your OS

  3. Locate the Jenkins zip file in your downloads folder
  4. Open the Jenkins zip file and launch the Setup Wizard (jenkins.exe), and follow the instructions

  5. Once the install has completed, click Finish


    It's as simple as that. As we say in the industry: "Bing bang boom" … you have successfully installed Jenkins!

     

     

     

     

     

     

Aug 23
Simple Echo App in Eclipse with TDD

In this tutorial, we will walk through creating a basic JUnit test class in Eclipse just to make sure that our environment is set up properly. We will use Test Driven Development (AKA Test First Development) to ensure that we are writing just enough code to pass our test, and not writing our test to pass our code. This process can be used to test and confirm that you are getting the correct output from your code.

We will create a single Junit test method, review the various dependancies, and confirm that there are 0 errors in your code. Using this process can help to save time & energy that may otherwise be expended on reviewing and re-writing code that doesn't work.

 

First we will create a new Java project, then we will create a JUnit test that describes the functionality that we expect from our code. In addition, we will use code generation tools in Eclipse (templates) to create the class and it's contained methods. Lets get started!

 

  1. On the File menu, select: New > Java Project
  2. Name the Project EchoApp, and click Finish
  3. Expand the EchoApp project
  4. Right click on the src folder
  5. On the popup menu select: New > Class

  6. Name your new class TestEcho, and accept all defaults by clicking Finish

  7. Type the following code into your project (Notice the red squigglies beneath some of your annotations)

  8. Hover over the @Test annotation with the red squiggly beneath it
  9. Select "Add JUnit 4 library to the build path" to make the red squiggly disappear
  10. Hover over the assertEquals annotation
  11. Select Add static import 'org.junit.Assert*' to add the assert import and make the red squiggly go away

  12. Hover your mouse over Echo and select Create class 'Echo' to create the Echo class and make the red squiggly disappear

  13. Accept default settings and click Finish


    An empty public class has now been created:

  14. Click on the TestEcho.java tab to return to your class (Notice that now, a red squiggly is beneath echo)
  15. Hover over echo, and you will see '1 quick fix available:'
  16. Select Create method 'echo(String)' in type 'Echo' to create a Public Static String method

  17. Right click on the @Test annotation, select Run as > 1 Junit Test

  18. Eclipse will prompt you to save your TestEcho and your new Echo class

  19. Click OK to save the files
  20. Uh oh! It looks like your test has failed L

  21. Click the Echo.java tab (Notice that the default method template has set the return value to null)

  22. Change null to expected
  23. Click the TestEcho.java tab to return to your test class
  24. Right click on the @Test annotation
  25. Select Run as > 1Junit test

  26. A dialogue box will appear that asks if you want to save your resources. Select OK

 

Your test will now run and pass with 0 errors and 0 failures:

 

 

 

It is 100% official… you are AWESOME! In this demo, we used a basic class and test class to ensure that the resources were properly installed.

 

Resources:

Java Development Kit

Maven

Eclipse

 

See the post on installing Jenkins to convert this simple Java Project to a Maven Project and build and test with Jenkins.

Aug 22
Installing Eclipse Oxygen on Windows 10
  1. Navigate to http://www.eclipse.org/downloads/eclipse-packages/
  2. In the Eclipse installer window select your OS from the dropdown menu
  3. Click 32 bit or 64 bit

  4. Click Download to download the Eclipse Windows installer
  5. Locate the Eclipse installer in your downloads folder, and double click the executable
  6. On the Start menu, select Eclipse Oxygen (recently added)
  7. When the Eclipse Launcher dialogue box appears, type C:\Demos as the Workspace path


  8. Close the Welcome window by clicking the X next to the Welcome tab in the upper left corner
  9. Now you can see the Package Explorer window

     

     

    See the next post Simple Echo App in Eclipse using TDD to verify your installion!

Aug 14
Install Maven
  1. Download the Binary zip archive from Apache Maven from http://maven.apache.org/download.cgi

  2. Locate Apache Maven zip file in downloads 
  3. Right click on the folder and choose Extract All

  4. Cut and paste Maven folder into your C drive 
  5. Rename the folder as Maven

     



  6. Once the installation is complete you will need to create an Environment Variable and add it to the Path system variable.
  7. On Windows 10 type System in the Start Menu and select System (Control Panel) not System Info.
     
  8. In the System dialog select Advanced System Settings in the menu on the left this will bring up the System Properties dialog.
  9. In the System Properties dialog select Environment Variables

  10. In the Environment Variables dialog select New in the System Variables section
  11. In the New Variable dialog enter MAVEN_HOME for the Variable Name and the path to your JDK installation as the Variable Value
  12. Click OK to save the changes to the new MAVEN_HOME system variable

  13. Repeat the Process to add an M2_HOME variable.
  14. In the Environment Variables dialog select the Path System variable in the System Variables section and click Edit.
  15. Add %MAVEN_HOME%\Bin to the end of the list
  16. Add %M2_HOME%\Bin to the next line and click OK

  17. Now that the M2_HOME has been installed and the Path System Variable has been updated we can verify the version of our installation from a command prompt.
  18. Launch a command window by typing CMD in the start menu
  19. At the command prompt type mvn -version end press Enter You should receive output similar to the image below:

 

  

Aug 13
Install Java Development Kit


To get started with Java Development and follow along with the ProDataMan Agile and DevOps samples and demos using Open Source tools you first need to download and install the Java Development Kit (JDK)

JDK.jpg

You can find the link to download the JDK for you environment here: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Select your operating system and CPU type from the list. I am running Windows 10 on a x64 CPU

 

Once the download is complete launch the .exe to install the JDK.
Click Next, Next, Finish to complete the installation.

Once the installation is complete you will need to add an Environment Variable for the JDK and add it to the Path system variable.
On Windows 10 type System in the Start Menu and select System (Control Panel) not System Info.

 

In the System dialog select Advanced System Settings in the menu on the left this will bring up the System Properties dialog.
In the System Properties dialog select Environment Variables

 

In the Environment Variables dialog select New in the System Variables section
In the New Variable dialog enter JAVA_HOME for the Variable Name and the path to your JDK installation as the Variable Value

Click OK to save the changes to the new JAVA_HOME system variable.
In the Environment Variables dialog select the Path System variable in the System Variables section and click Edit.
Add %JAVA_HOME%\Bin to the end of the list and click OK

 

Now that the JDK has been installed and the Path System Variable has been updated we can verify the version of our installation from a command prompt.
Launch a command window by typing CMD in the start menu
At the command prompt type Java -version end press Enter
You should receive output similar to the image below.

 

Now we are ready to install Maven and Eclipse.

 Check out the YouTube video of this demonstration below:

​​

​​

1 - 10Next