Wednesday, January 13, 2016

Differences between Waterfall, Iterative Waterfall, Scrum and Lean Software Development (In Pictures!)

This simple overview of the different Agile-Lean methods found was too great to not share.  Sometimes it is best to keep it simple to build a foundational understanding….then build on that.   Pictures speak a thousand words.
·         Waterfall Development,
·         Iterative Waterfall Development
·         Scrum/Agile Development
·         Lean

Waterfall Development
‘Waterfall Development’ is another name for the more traditional approach to software development.
It’s called ‘waterfall’ as this type of development is often planned using a Gantt chart –you complete one phase (e.g. planning) before moving on to the next phase (e.g. development).
In Waterfall approaches, you will rarely aim to re-visit a ‘phase’ once it’s completed. As such, you better get whatever you’re doing right the first time!
This approach is highly risky, often more costly and generally less efficient than more Agile approaches.
Picture 1:











The main issues with this approach include:
·         You don’t realise any value until the end of the project (when you deploy) (See:Self-Funding Projects, a Benefit of Agile Software Development)
·         You leave the testing until the end, which means you’re leaving issue discovery until late in the day
·         You don’t seek approval from the stakeholders until late in the day – their requirements might have changed
·         You’re heavily reliant upon a plan, which you can/will often follow to the detriment of the end result
·         You’re heavily reliant upon a project manager driving the way – the power of one

Iterative Waterfall Development
This approach carries less risk than a traditional Waterfall approach but is still farmore risky and less efficient than a more Agile approaches. The focus is on delivering a sprint of work as opposed to a series of valuable/shippable features. The most commonly occurring issue in this type of scenario (in my experience) isbottle necking. For example, you deliver loads of code a little bit behind schedule (?) and you leave it until the last minute to test everything. One issue takes longer than expected to resolve, you miss your sprint deadline and you deliver nothing. Another common symptom of this type of approach is over-commitment.  It’s really difficult to estimate the total effort associated with a particular User Story/Feature when approaching delivery in this phased way.  You’re more or lessforced to estimate each phase separately (e.g. estimate development separately to testing in this instance) – this doesn’t work as the phases are not separate, they’re totally intertwined. For example, if you find an issue with the test, you must return to development. The whole team must remain focused on delivering the end goal, not the separate phases. It’s also worth noting that velocity and burn downs are far less (if at all) useful in this type of environment – you don’t benefit from early-warning-signs as you don’t find out whether you’re on track until the end of the sprint.
Picture 2:
















Scrum Development
This approach carries far less risk than Waterfall approaches. We focus on delivering fully-tested, independent, valuable, small features. As such, wediversify our risk – if one feature goes wrong, it should not impact another feature. With that said, we still plan our work in iterations and we will still release at the end of each iteration.
Picture 3:

















Lean Development
Lean is very similar to Scrum in the sense that we focus on features as opposed to groups of features – however Lean takes this one step further again. In Lean Development, you select, plan develop, test and deploy one feature (in its simplest form) before you select, plan, develop, test and deploy the next feature. By doing this, you further isolate risk to a feature-level. In these environments, you aim to eliminate ‘waste’ wherever possible – you therefore do nothing until you know it’s necessary or relevant.
Picture 4:












Original Link: http://www.agilistapm.com/differences-between-waterfall-iterative-waterfall-scrum-and-lean-software-development-in-pictures/

Tuesday, January 12, 2016

XML file changing using regex by Java and apache commons - Made Easy

We need to download commons io 2.4 for the related java code.
Commons IO 2.4 (requires JDK 1.6+)

Commons IO 2.4 is the latest version and requires a minimum of JDK 1.6 - Download now!

XML File: DataInputFile.xml

<? Xml version = "1.0" encoding = "UTF-8"?>
<LayoutDef xmlns: intramart = "http://intramart/maskat/1.0.0" xmlns: dojo = "http://maskat.sourceforge.jp/widget/dojo/1.0.0">
  <Layout name = "dataMapper">
  </ Layout>
</ LayoutDef>

Java File: ReplacerUsingRegex.java

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import org.apache.commons.io.IOUtils;

public class ReplacerUsingRegex {

/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
   // Input and Output File
File xmlFile = new File("C:/data/ DataInputFile.xml");
File newXmlFile = new File("C:/data/DataOutputFile.xml");

// Pattern data and Replacement data Map
HashMap<String, String> hmap = new HashMap<String, String>();
hmap.put("(.*) ([=+*&:/]) (.*)", "$1$2$3");
hmap.put(" Xml", "xml");
hmap.put("<Layout", "<layout");
hmap.put("</ Layout", "</layout");
hmap.put("xmlns: ", "xmlns:");

// Apache Commons method for replacement
String content = IOUtils.toString(new FileInputStream(xmlFile), "UTF-8");
for (Map.Entry m : hmap.entrySet()) {
content = content.replaceAll(m.getKey().toString(), m.getValue().toString());
}
IOUtils.write(content, new FileOutputStream(newXmlFile), "UTF-8");
System.out.println("Finished Successfully!!!");
}
}

Friday, January 8, 2016

Monolova


  1. https://wordpress.org/themes/pinboard/
  2. https://wordpress.org/themes/accesspress-parallax/
  3. https://wordpress.org/themes/simple-catch/

Wednesday, January 6, 2016

XML file changing using regex by Java

XML File: file.xml

<?xml version="1.0" encoding="UTF-8"?>
<banks>
    <bank id="1">
        <name>Barclays Bank</name>
        <headquarter>London</headquarter>
    </bank>
    <bank id="2">
        <name>Goldman Sachs</name>
        <headquarter>NewYork</headquarter>
    </bank>
    <bank id="3">
        <name>ICBC</name>
        <headquarter>Beijing</headquarter>
    </bank>
</banks>

Java File: XmlStringInJava .java

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;

import org.w3c.dom.Document;
import org.xml.sax.SAXException;
/**
  * Java Program to read XML as String using BufferedReader
  * open source library.
  */
public class XmlStringInJava {

    public static void main(String[] args) throws IOException {

        // our XML file for this example
        File xmlFile = new File("file.xml");

        // Let's get XML file as String using BufferedReader
        // FileReader uses platform's default character encoding
        // if you need to specify a different encoding, use InputStreamReader
        Reader fileReader = new FileReader(xmlFile);
        BufferedReader bufReader = new BufferedReader(fileReader);

        StringBuilder sb = new StringBuilder();
        String line = bufReader.readLine();
        while( line != null){
            sb.append(line).append("\n");
            line = bufReader.readLine();
        }
        String xml2String = sb.toString();
        System.out.println("XML to String using BufferedReader : ");
        System.out.println(xml2String);
        xml2String = xml2String.replace("bank kaka","bank id");
        System.out.println("After Replacing: ");
        System.out.println(xml2String);

        bufReader.close();
      }
}

Thursday, December 31, 2015

Postgresql Commands

1. Collumn Count:

select count(*) from information_schema.columns

                  where table_name='tm_ctrl';


2. Select query with LIMIT OFFSET:

select * from td_nyukin limit 5 offset 0







N.B: i) LIMIT: How much row will be shown here
        ii) OFFSET: Start from which position

Wednesday, December 30, 2015

Git-Gerrit Made Easy - Part 2

First Procedure:

1.   At First, commit your change to local branch.
2.   ($ git log --oneline --decorate --graph). Then grab the commit id.
3.   fetch my origin ($ git fetch origin)
4.   and then rebase master. ($ git rebase origin/master)
5.   Then I have to give the push command.( $ git push origin HEAD:refs/for/develop).
6.   Finished. Now need new code for further development:
7.   $ git fetch origin
8.   $ git checkout -b task#2021 origin/develop

Second Procedure:

l  At First, commit your change to local branch.
l  ($ git log --oneline --decorate --graph). Then grab the commit id.
l  fetch my origin ($ git fetch origin)
l  and then rebase master. ($ git rebase origin/master)
l  If any kind of problem occurs in rebasing position. I have to create a new branch from origin/master. Then cherry-pick the previous commit id. Then push it.
l  Create a new branch (git checkout -b bug#75#L origin/master)
l  Then cherry-pick the commit id(git cherry-pick b6e82b5)
l  Then I have to give the push command.( $ git push origin HEAD:refs/for/develop).
l  After pushing, we need to create a new branch for further coding. For this reason we need to fetch the origin. Then I have to create a branch.
l  $ git fetch origin
l  $ git checkout -b task#2021 origin/develop

REVIEW, FEEDBACK AND PATCH SET:

I have pushed all fixes. My TL reviews the code and want some comments. So he gives some feedback. I have added all comments and make a patch set using the previous commit ID 26889. All step are given below step by step:

USER@zakir-rizvi MINGW64 /c/bapf/eBuilder722/eclipse/workspace/bookstore_project (bug#75#1)
$ git push origin HEAD:refs/for/develop
Counting objects: 17, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (13/13), done.
Writing objects: 100% (17/17), 2.56 KiB | 0 bytes/s, done.
Total 17 (delta 10), reused 0 (delta 0)
remote:
remote: New Changes:
remote:   https://review.g2it.com:8443/26889
remote:
To ssh://abu.rizvi@review.g2it.com:29418/bookstore_project
 * [new branch]      HEAD -> refs/for/develop

USER@zakir-rizvi MINGW64 /c/bapf/eBuilder722/eclipse/workspace/bookstore_project (bug#75#1)
$ git branch
* bug#75#1
  master

USER@zakir-rizvi MINGW64 /c/bapf/eBuilder722/eclipse/workspace/bookstore_project (bug#75#1)
$ git push origin HEAD:refs/changes/26889
Counting objects: 17, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (13/13), done.
Writing objects: 100% (17/17), 2.54 KiB | 0 bytes/s, done.
Total 17 (delta 10), reused 0 (delta 0)
To ssh://abu.rizvi@review.g2it.com:29418/bookstore_project
 * [new branch]      HEAD -> refs/changes/26889

USER@zakir-rizvi MINGW64 /c/bapf/eBuilder722/eclipse/workspace/bookstore_project (bug#75#1)
$ git push origin HEAD:refs/changes/26889
Counting objects: 17, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (13/13), done.
Writing objects: 100% (17/17), 2.54 KiB | 0 bytes/s, done.
Total 17 (delta 10), reused 0 (delta 0)
To ssh://abu.rizvi@review.g2it.com:29418/bookstore_project

 * [new branch]      HEAD -> refs/changes/26889

Wednesday, December 23, 2015

Git-Gerrit Made Easy - Part 1

First Procedure:
1.   At First, commit your change to local branch.
2.   ($ git log --oneline --decorate --graph). Then grab the commit id.
3.   fetch my origin ($ git fetch origin)
4.   and then rebase master. ($ git rebase origin/master)
5.   Then I have to give the push command.( $ git push origin HEAD:refs/for/develop).

Second Procedure:
l  At First, commit your change to local branch.
l  ($ git log --oneline --decorate --graph). Then grab the commit id.
l  fetch my origin ($ git fetch origin)
l  and then rebase master. ($ git rebase origin/master)
l  If any kind of problem occurs in rebasing position. I have to create a new branch from origin/master. Then cherry-pick the previous commit id. Then push it.
l  Create a new branch (git checkout -b bug#75#L origin/master)
l  Then cherry-pick the commit id(git cherry-pick b6e82b5)
l  Then I have to give the push command.( $ git push origin HEAD:refs/for/develop).