Sunday, April 17, 2022

Comments on 'Predicting Developers’ Negative Feelings about Code Review' article

 Link to publication: https://research.google/pubs/pub49023/ 


> modern code review provides many benefits ..., including finding defects , knowledge sharing , and improving software maintenance

Absolutely agree, this 3 items are equal in importance. Even most people think that code review is all about "finding defects". 

> During code review, developers critically examine each others’ code to improve its quality, share knowledge, and ensure conformance to coding standards. 

please focus on bold word - critically. Reviewer should not praise any code he get in review. There should be detailed review with question in mind "Why we need this ?", ...

> Of the common associated factors, four that could be considered causes of pushback in code review were comments on code style, the tone in which feedback was delivered, low familiarity with the code base, and lack of rationale for suggestions or requests made

Yes, agree for all points. BUT people need understand that written communication is considered a bit more rude even writer does not mean anything bad or rude. Feedback should be considered as strive to improve for common benefit/quality (not for benefit of code author!!!). Common code base should serve for all people and NOT for certain person. If reviewer is not familiar with code, author should help to explain all/most or find another reviewer.

> ” Another respondent explained, “there are a lot of reviewers that are unreasonable and take their criticism far beyond what’s documented in the style guide.”

Better to explain in team that style guide can not cover all, even Google Style guide covers most basic items. Author of code should consider seriously feedback from reviewers as it shows exactly a way how this code will be read by other people in future. MAIN POINT: we should no have code that is good only for one person, this will force others to not participate in this project.
One more time: if you allow somebody to merge code as is because your are afraid to "push back" on author because you think he might not contribute to project in future. You do a way more damage to maintainability, because you allow one person to poison participation for others and this person will leave a project for sure because all people eventually stop contributing as their focus and interest is changing.

> “treating code review like a discussion on a web forum, i.e., ignoring the other person as an individual and arguing overly aggressively.” This theme aligns with findings from the interviews, during which participants framed aggressive comments as an initial factor often contributing to feelings of pushback

again, push back is happening to gain more quality of code or more knowledge . Do not afraid push back, it is happening for good. Everyone will benefit from push back, even pushing back is not very pleasant. 

> “it was annoying that he was not familiar with the codebase and was questioning stuff about business logic and naming.”

Reviewer is right and author need a bit more patience with reviewer. As code is review is for "knowledge sharing" . If author invest a bit more time in reviewer to explain code base or logic later on this reviewer will catch "defect" in code. 

>Several respondents expressed frustration when reviewers requested non-trivial changes without providing a justification. For example, one respondent described how, “some of the comments seemed in general hard to understand, and required a chain of replies from the reviewer/author until the reason why the change is asked is explained,” concluding, “this prevents the person asking for review from learning.”

Most of time justification is skipped when reviewer think it is very obvious. Do not allow frustration to grow in you, ask reviewer to explain. We all people, there might simply distraction happened on reviewer side and he did not finish comment. Call reviewer to get more details, verbal communication is always a way more friendly and detailed.

Some people might be frustrated, but code base is benefiting! Good code will attract more contributors again and again. Even if you lose 20% of contributors due to over high demands in Pull Requests, it is good, as 80% will stay with you.

> Situation 3: An author requests review for a change; the reviewer takes a long time giving rich, detailed feedback; the author then spends substantial time addressing all reviewer comments. All of this is done in just a few rounds of review.
However, situation 3 doesn’t create any of these negative feelings of pushback. It seems developers don’t mind spending an extended time shepherding a change through the process when they receive feedback (even if it came from a very time-consuming review) as long as it is in a succinct number of rounds of feedback. This may be due to reviewers being especially clear about what they want in their initial feedback.

This point works differently in open source and paid jobs. In open source time of reviewer is usually is more limited than time of contributor.
Review process should designed to prioritize review and not allow long waiting and long to-and-from in review. There numerous ways to avoid this (verbal calls, not big PRs, clear testing, PR-preview, ....).

>For instance, the bot could suggest that discussions could be taken offline, that another expert be brought in to provide an outside perspective, or that a change should be broken into smaller parts

yes, yes, yes.

> rejection is important because it helps maintain code quality and that success in contributing to open source depends on being able to handle rejection

yes, it is unfortunate but it is required.

> prior researchers have studied newcomers to open source projects about their initial experiences, finding that newcomers sometimes feel their initial contributions are unwelcome.

unfortunately yes, nobody wants to spend time to explain basic stuff, no that much people can coach others or explain stuff. Take it as part of unfair life and keep pushing to pass newcommers period. 

Monday, February 15, 2021

How to fix time in name of files from Google camera application from UTC to localtime

 copy all files in test folder


# to rename all jpeg

jhead -nPXL_%Y%m%d_%H%M%S *.jpg


# do only mp4 as jpeg is better to be done by jhead

find . -type f -name "*.mp4" -exec exiftool -d 'PXL_%Y%m%d_%H%M%S.%%e' '-FileName<filemodifydate' {} \;


# sources are at https://gist.github.com/romani/e2358e3c1dece784fae9fe19be0fd143

./split-img.sh


------


# sometimes required to https://gist.github.com/romani/862f33b98eb05060245ef864115ee66f 

./move-portrait.sh


in case re-split, source of wisdom:

find . -type f -mindepth 2 -exec mv -i -- {} . \; 


Friday, May 15, 2020

How to pass "diff wall" caused by reformatting or bulk change

Digging git history in terminal 
https://medium.com/@drdmason/git-blame-all-the-way-back-62957f8407

Digging git history in Github
https://help.github.com/en/github/managing-files-in-a-repository/tracking-changes-in-a-file

Digging git history in IDEA
https://www.jetbrains.com/help/idea/investigate-changes.html#annotate_previous_revision

Friday, February 7, 2020

My actions of mac setup from scratch

1)
remap "End" key if key board is long
https://apple.stackexchange.com/a/16137

2) Show path and statis bar
Open finder, in menu "View" click on "Show ...."

3) show hidden files
https://ianlunn.co.uk/articles/quickly-showhide-hidden-files-mac-os-x-mavericks/
"Show/Hide Hidden Files the Long Way"

4) Show path in title
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true

Install Homebrew (https://brew.sh/)
or https://iterm2.com/
update profiles for "Default" , choose presets ".. Natural ..."
and make Terminal to keep whole history of output
Once in the Profiles section, go to the Terminal tab in the right panel of the settings, then go down to the Notificationssection and click the Silence bell option.

5)  install Sublime
sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl

6) Disable swipe between pages to avoid conflict with horizontal scrolling
https://apple.stackexchange.com/a/33009/371076

7) full clock

utc clock in menu bar(if required): https://github.com/netik/UTCMenuClock/downloads



8) use bash 
chsh -s /bin/bash
disable warning on zsh usage - https://support.apple.com/en-us/HT208050  to ~/.bash_profile or ~/.profile:
export BASH_SILENCE_DEPRECATION_WARNING=1
install https://github.com/magicmonty/bash-git-prompt , update ~/.bash_profile to use GIT_PROMPT_ONLY_IN_REPO=0 as I like time in prompt.


Friday, November 8, 2019

How to list all changed files between two branches that does not have common ancestor

If tree is like this:

Same tree you can see by(if you do not have gitk): git log --all --graph

to get a all files:
$ (git diff --name-status master...staging && \
    git diff --name-status $(git merge-base  master staging) fb-4) \
  | cut -f 2 | sort | uniq
2-2.txt
2.txt
3.txt
4.txt


Good picture that explain difference between "..." and ".." - https://stackoverflow.com/a/46345364

Tuesday, November 5, 2019

How to keep release branch commits in history but do not keep branch

Command: git merge --no-ff -s "ours" release-branch 
Removal of branch label from git tree: git branch -D release-branch

It will make "diamond" in git history BUT it will not merge any changes from release branch to master. Blue dots are former "release-branch"

Tuesday, October 22, 2019

move log file with timestamp prefix

mv server.log server.log.before.$(date '+%Y%m%d%H%M%S')

How to connect from docker container to host local service

Elasticsearch is running on localhost MacOS.
run image with curl and test connection to host local webservice.
Some interesting steps are at https://dev.to/bufferings/access-host-from-a-docker-container-4099 , it explains why networks are not wokrigin MacOS (it is not supported).

custom docker net creation - https://nickjanetakis.com/blog/docker-tip-35-connect-to-a-database-running-on-your-docker-host

$ docker container run --rm -it curlimages/curl sh
Unable to find image 'curlimages/curl:latest' locally
latest: Pulling from curlimages/curl
9d48c3bd43c5: Pull complete
9fbab065c978: Pull complete
Digest: sha256:4c7b687d607d7f5f397db1ca877a626fedc79c7a537a3f145482083bd68dc115
Status: Downloaded newer image for curlimages/curl:latest

/ $ curl 'localhost:9200/_cat/indices?v'
curl: (7) Failed to connect to localhost port 9200: Connection refused
#### This is expected as elastic search in NOT in docker container

# base on https://docs.docker.com/docker-for-mac/networking/
/ $ ping host.docker.internal
PING host.docker.internal (192.168.65.2): 56 data bytes
ping: permission denied (are you root?)

/ $ curl 'host.docker.internal:9200/_cat/indices?v'
health status index      uuid                   pri rep docs.count docs.deleted store.size pri.store.size
yellow open   conv_v12 tIP0ha4USEG3Wr5cKJNzGw   5   1     837120            0      1.2gb          1.2gb
yellow open   conv_v11 0e-Y9pnlQHGyFTicGfQHbg   5   1    3917501           27      5.6gb          5.6gb
yellow open   geota    lSixJug2QDqtR8sjtXWdKg   5   1      69070            0      1.6gb          1.6gb
yellow open   conv_v10 9WX0fuMgRTCem0OgHn9fPw   5   1      67706            0    127.6mb        127.6mb

/ $ curl '192.168.65.2:9200/_cat/indices?v'
health status index      uuid                   pri rep docs.count docs.deleted store.size pri.store.size
yellow open   conv_v12 tIP0ha4USEG3Wr5cKJNzGw   5   1     832120            0      1.2gb          1.2gb
yellow open   conv_v11 0e-Y9pnlQHGyFTicGfQHbg   5   1    3917501           27      5.6gb          5.6gb
yellow open   geota    lSixJug2QDqtR8sjtXWdKg   5   1      69070            0      1.6gb          1.6gb
yellow open   conv_v10 9WX0fuMgRTCem0OgHn9fPw   5   1      67706            0    127.6mb        127.6mb

Monday, September 23, 2019

WH-1000XM3 failing to pair with macOS (it is not even discoverable in bluetooth settings)

simple steps does not work https://helpguide.sony.net/mdr/wh1000xm3/v1/en/contents/TP0001867146.html

To start pairing Headphones , press power button for several seconds (about 7).

I found solution that helped me:
https://us.community.sony.com/s/question/0D50B00005kn3GA/unable-to-pair-wh1000xm3-with-mac-mojave-os-sony-support-docs-only-reference-earlier-versions-of-mac-operating-systems-am-i-out-of-luck?language=en_US#0054O000007uGjsQAE

Quote from forum:

====

Hello, I think I have the solution. this is for the latest version of Mojave. it's in this macworld article: https://www.macworld.co.uk/how-to/mac/fix-bluetooth-mac-3682642/ - this is the one that worked for me, but they have other options if it doesn't:

Using Finder
  1. Open Finder.
  2. Click Go.
  3. Click Go to Folder.
  4. Type in: /Library/Preferences
  5. Click Go.
  6. Find the com.apple.Bluetooth.plist file.
  7. Move the plist file to the Trash.
  8. Click Go > Go to Folder
  9. Type in: ~/Library/Preferences/ByHost
  10. Click Go.
  11. This time find com.apple.Bluetooth.???.plist file (this will be made up of some random letters) and move it to the Trash.
  12. Now restart your Mac - it will automatically generate new Bluetooth plist files the next time you turn Bluetooth off and on again.

After I did this it took a few minutes, at first all the bluetooth commands were just digits but after about 1 minute the headphones showed up and now they work. 

====

to initiate pairing I pressed power button for several seconds (about 7 seconds).

Tuesday, August 27, 2019

Firefox multi-line tabs

Enable loading of styles from disk - https://winaero.com/blog/enable-loading-userchrome-css-usercontent-css-firefox/ (Set at "about:config" page the option toolkit.legacyUserProfileCustomizations.stylesheets to True)

create or find userChrome.css - https://www.userchrome.org/how-create-userchrome-css.html or https://www.howtogeek.com/334716/how-to-customize-firefoxs-user-interface-with-userchrome.css/
1) Open "about:support" in Firefox
2) Click on "Profile Folder" button.
3) Steps inside folder
4) create "chrome" folder

put content of https://github.com/MrOtherGuy/firefox-csshacks/blob/master/chrome/multi-row_tabs.css to userChrome.css

In version FF 76.0.1, something was broken in again, download of latest multi-row_tabs.css helps to make work again.

in FF 81.0 something changed again and required to reload latest multi-row_tabs.css from github again

Tuesday, May 7, 2019

shell function to put changes in previous git commit

code for '~/.profile' file:

amendPrevCommit() {
  BRANCH=`git branch | grep \* | cut -d ' ' -f2`
  cd `git rev-parse --show-toplevel`
  git stash
  git branch -D $BRANCH-temp-for-stash
  git checkout -b $BRANCH-temp-for-stash
  git checkout -
  git reset HEAD~1 --hard
  git stash pop
  git add .
  git commit --amend --no-edit
  git cherry-pick $BRANCH-temp-for-stash
}

after update of ~/.profile
do not forget to do "source ~/.profile" in terminal window

Example of use:
$ amendPrevCommit


Tuesday, December 18, 2018

How to quickly checkout github pull request

Two ways:

1.
$ git fetch origin pull/117/head:local-branch-name
$ git checkout local-branch-name

Or you can put in  ~/.profile following function:

checkoutPull() {
  #Usage: checkoutPull pr-number pr-branch
  #   or  checkoutPull pr-number user:pr-branch
  BRACH=$(echo $2 | sed -e "s/^.*://")
  if git branch | grep $BRACH; then
    echo "Branch $BRACH already exists and should be removed"
    read -p "Are you sure (y/n)? " -n 1 -r
    echo    # (optional) move to a new line
    if [[ $REPLY =~ ^[Yy]$ ]]
    then
      git branch -D $BRACH
    fi
  fi
  echo "git fetch upstream pull/$1/head:$BRACH"
  git fetch upstream pull/$1/head:$BRACH
  echo "git checkout $BRACH"
  git checkout $BRACH
}

And use it as:
$ checkoutPull 3058 my-coworker-username:issue-51502

2.
One more approach is or create function that consume easy to copy value from Github page. All PRs pages show this value as text "my-coworker-fork:his-branch".
Add to ~/.profile
checkoutForked() {
  #usage: checkoutForked another-fork:branch-in-fork
  FORK=$(echo $1 | cut -d ':' -f 1)
  BRANCH=$(echo $1 | cut -d ':' -f 2)
  REPO=$(grep -A 1 "\"origin\"" .git/config | grep github | sed -E "s/.*\///");
  if git remote | grep $FORK; then
    echo "Fork already exists"
  else
    echo "git remote add $FORK git@github.com:$FORK/$REPO;"
    git remote add $FORK git@github.com:$FORK/$REPO;
  fi
  echo "git fetch $FORK"
  git fetch $FORK
  if git branch | grep $FORK/$BRANCH; then
    echo "Branch $FORK/$BRANCH already exists"
  else
    echo "git checkout $FORK/$BRANCH"
    git checkout $FORK/$BRANCH
    echo "git checkout -b $FORK/$BRANCH"
    git checkout -b $FORK/$BRANCH
  fi
}
execute:
$ checkoutForked my-coworker-fork:his-branch

NOTE:
to push to forked repo remote you will need bind your branch and his branch:
git push my-coworker-fork my-coworker-fork/his-branch:his-branch -f

Tuesday, May 1, 2018

How to find and install missed man page or section in linux


Two options:
1) web
2) in server repositories

1) In web - just google it
https://www.google.com/search?q=man+7+signal
Will result in smth like http://man7.org/linux/man-pages/man7/signal.7.html

2) In server
$ man kill
# no signals details , most likely in "SEE ALSO .... signals(7)"
$ man 7 signal
No manual entry for signal in section 7
$ yum provides */signal.7.gz
...
#man-pages-3.53-5.el7.noarch : Man (manual) pages from the Linux Documentation Project
#Repo : rhel-7-server-rpms-master
#Matched from:
#Filename : /usr/share/man/man7/signal.7.gz
..
$ sudo yum install man-pages
$ man 7 signal

Tuesday, January 10, 2017

How to get name of laptop from windows command line


In Windows CMD:
wmic csproduct get vendor,name,identifyingnumber

Result is smth like:
IdentifyingNumber  Name            Vendor
JG1Z111            Latitude E6420  Dell Inc.

Tuesday, January 3, 2017

Process maven's pom xml file with xmlstarlet

General command  to get version of certain plugin dependency from pom file:

xmlstarlet sel -N pom=http://maven.apache.org/POM/4.0.0 -t -m "/pom:project/pom:build/pom:pluginManagement/pom:plugins/pom:plugin[pom:artifactId='maven-checkstyle-plugin']/pom:dependencies/pom:dependency[pom:artifactId='checkstyle']/pom:version" -v . pom.xml

Examples for editing and selection are at:
https://github.com/sevntu-checkstyle/sevntu.checkstyle/blob/master/pom-version-bump.sh

https://github.com/checkstyle/checkstyle/wiki/How-to-generate-Checkstyle-report-for-Google-Guava-project

Few XPATH conditions for query:
http://stackoverflow.com/questions/28370054/find-a-specific-groupid-from-a-maven-pom-xml-using-xmstarlet


Useful command to print all tags from xml file to help construct XPATH:
xmlstarlet el -v pom.xml


Wednesday, September 28, 2016

Comments on "To what extent can maintenance problems be predicted by code smell detection? – An empirical study"

Article: To what extent can maintenance problems be predicted by code smell detection? – An empirical study

I highly recommend to all to read this article, it is big but have valuable details of great experiment. I doubt that smb could conduct smth similar as it is very costly.

Some valuable quotes from article:

Results: From the total set of problems, roughly 30% percent were related to files containing code smells. ......
Conclusions: The role of code smells on the overall system maintainability is relatively minor, thus complementary approaches are needed to achieve more comprehensive assessments of maintainability.
Moreover, to improve the explanatory power of code smells, interaction effects amongst collocated smells and coupled smells should be taken into account during analysis.

Is 30% of problems are minor ? 30% of problem that can be predicted on the moment of writing code in automatic mode without wasting time of other engineers. I doubt that it is minor.

Lets take a look deeply to report:

Twelve different code smells were detected in the systems via Borland Together and InCode.

Ancient systems , non of them is alive now !
Where is opensource stack of tools like: Checkstyle, PMD, FindBugs, SonarQube, IntelijIdea inspections, nondex, forbiddenapis, error-prone, ..... ?

We report on a multiple case study in which the problems and challenges faced by six developers working on four different Java systems were registered on a daily basis, for a period up to four weeks.
.....
there is a substantial body of work that investigates if certain source code characteristics (i.e., a code smell) affect a given maintenance outcome (e.g., effort, changes, defects).

Selected model is pretty impressive and based on real code.

Individual progress meetings (20–30 min): were conducted daily, with each of the developers and the researcher present at the study to keep track of the progress, and register problems encountered during the project (ex. Dev: ‘‘It took me 3 h to understand this method. . .’’)

3h is too much for a method , if that is more than 20 min or even 5 min - it is problem and code smell.

Code smells automatically detected in the systems:
Data Class
Data Clumps
Duplicated code in conditional
branches
Feature Envy
God (Large) Class
God (Long) Method
Misplaced Class
Refused Bequest
Shotgun Surgery
Temporary variable for various
purposes
Use interface instead of
implementation
Interface Segregation Principle
(ISP) Violation

it is strange why that minimal amount of code smells are detected only , look like list whole smells were not that big. Not clear why minor smells are ignored in investigation. In you have 5K minor problems in project , you have a lot of problems, and you will pay for that on daily basis. Minor problems stumble engineer for 2min, 5min .... but that time is valuable too! At the end of the day it could come up to 30min or even an hour.
Minors can not be ignored, as they can make engineer to tire and slightly demotivate and in general performance will be slightly lower.

In total, 137 different problems were identified from the differ-
ent maintenance projects. From the total, 64 problems (47%) were
associated to Java source code. The remaining 73 (53%) constituted
problems not directly related to code such as: lack of adequate
technical infrastructure, developer’s coding habits, external ser-
vices, runtime environment, and defects initially present in the
system.

almost 50% of problems could be find automatically . And by the way, "developer’s coding habits" is also code smell.

From the total set of difficulties identified during maintenance,
less than half (43%) were related to Java code, and from those, only
58% clearly related to any of the twelve code smells used to analyze
the code. This means that even if we count those difficulties that
are due to combination of factors, roughly only 30% of the total
set of difficulties can be explained and potentially foreseen by code
smells. As a result, we conclude that the subset of aspects that are
covered by current code smell detection has a relatively low
...
The results from our study reminds us of the limitations of evaluations based purely on static analysis and suggest the need of more comprehensive quality models and techniques that can incorporate the analysis of diverse factors.

Even in average it is 30% for purely static analysis ..... is it low ? Just offer your manager 30% bust in productivity in development that could be archive by using free tools in CI or IDE integrations!
I doubt I would say "Do not bother about this."

Thursday, April 28, 2016

How to do ssh-copy-id on SunOS

There is no ssh-copy-id command on SunOS(Solaris, SmartOS).

How to do ssh-copy-id on/from SunOS(Solaris, SmartOS) to another server:
cat ~/.ssh/id_rsa.pub | ssh user@server "mkdir -p ~/.ssh; cat >> ~/.ssh/authorized_keys"

Friday, April 15, 2016

How to print whole command from ps in SunOs Solaris SmartOS

[sb@c-apps01 ~]$ uname -a
SunOS c-apps01 5.11 joyent_20160121T174331Z i86pc i386 i86pc Solaris

[sb@c-apps01 ~]$ ps -aef | grep mail
      sb 52561  5477   0 18:47:58 pts/38      0:00 grep mail
      sb 38414 38411   0 18:30:41 ?           0:03 /opt/java8/bin/java -mx256m -classpath :/www/mail-notifier/lib/act
      sb 38411 38408   0 18:30:40 ?           0:00 bash /www/notifier/sh/_shell.sh --processor com.revere.auth.j
      sb 43546 48142   0 14:38:12 ?           0:00 /www/bin/wd -p /www/sb/jobs/notifier/w.pid -- /www/sb
      sb 38408 43546   0 18:30:40 ?           0:00 bash /www/notifier/sh/listener.sh


As might notice all commds are cut to 80 symbols.


Answer is (undocumented "w" option): 
ps axwwl



Side note:
how to list all open ports on SunOs: "lsof -P"

Sunday, February 7, 2016

Master development problem with pictures

we need to decide: Jenkins should test pre-rollout state or post prollout state of sources.

Workflow:  master --> development --> topicBranch
Advantages:
Simple exception stack trace examination from PROD (only require switch to master)
new iteration/feature come with version bump so PROD code could be bumped with mvn-release-plugin without worries to interfere with development.
only 2 branches are required
Disadvantages:
master is not correspond to PROD after release was roll-backed on PROD!!!!! no way to revert/reset master without pain for all developers (conflicts are unavoidable).
person that do rollout to PROD have to remember to do merge from development to master before rollout to PROD - RomanIvanov always fail to this on time. Rollout could be done in out of working hours by SysAdm, so it impossible to sync that events.
"hot fix branches"(http://git.server.com/cgit/ld/log/?h=master-1.7-hotfix) is better than do changes in master and then force rebase on development that could not be that simple. Two master("master","mastr-hotfix") branch appear and same problem is raised "Where is prod code?"
in case of hotfix over "master" Jenkins have no easy ability to test changes before rollout (if you follow a model merge to master after rollout ) ...
any changes to master, with development far in forward, make it impossible to keep Fast forward merge
keep master-1.7-hotfix branch is not good for jenkins as it does not aware of it - so you deploy changes that are not tested.

Problem: we released to RPOD repgen but not a RP, so I can not do merge to master as this two projects lives in same repo - is it git structure problem or problem of your workflow?
Problem: reports 1.3 and 1.4  - we cannot do fast-forward merge as we have conflicts in changes (we did cherry-pick from master to development), we can not do just merge without conflicts, with non fast-forward we will loose all commits history as all of them will come to one merge-commit, tags will be lost as we change SHA1 for commits. Should we do reset of master till common commit and then do fast-forward merge ? should we store all hot fixes ? should we name it like branch and keep in git for a while but in this case how it is different from alternative git workflow ?
Problem: 'themes' - fix was applied to master and then in few days was applied to development, on merge development to master I got conflict, I could resolve it - but in master I will got merge-commit. I could revert that fix in master that will help me to merge without problem but still - one merge commit(history is lost). I did HACK by reset to common commit with development and that allowed me do fast-forward (master keep history).  Resume: looks like to keep history we need to work in master, or treat development branch as the most valuable branch (that never have to be removed or lost).

Delema: how to merge from developement to master?  up to a tag(3.1.6) or next commit after tag ?
in case of "next commit after tag" - it is convenient to do versioning as we stay on SNAPSHOT
in case of "up to tag" - is more correct as we rollouted exact version, it even make more sense as it comes to master-X.X.X-hotfix creation where it will unclear in history why it was required to revert changes from 3.1.7-SNAPSHOT to 3.1.6.1-SNAPSHOT as in master 3.1.7 have never existed.

Problem: master, master-3.2.12-hotfix, master-3.2-hotfix  (all branches were created as mentioned here) -  master-3.2.12-hotfix contains tag 3.2.12.3 that rollouted on PROD, after rollout from master-3.2-hotfix by tag 3.2.14 we can not remove master-3.2.12-hotfix branch as it contains tag that could be useful in case rolback on PROD.
Command "git merge -s ours master-3.2.12-hotfix" will not help as do exactly what we need from keeping commits/tags in history, but it DO CREATE ADDITIONAL/MERGE commit, that will make problem when it comes to development->master merge.

problem: master ans master-hotfix, master-hotfix depend on DB changes that is incompatible with master code. So we have master that is failing on UTs but master-hotfix is not. So model of checksout "master*" in Jenkins does not help.

!!problem!!: if repository is composite of few projects that could be releases/rollouted/tagged separately (ld and ld-data-job) we can not merge to master all as ld-data-job is rollouted to RPOD, but some changes in ld-server are not rollouted and cannot be merged to master as it brake main idea that master===prod  code.

Workflow : hot-fix branch <-- master --> topicbranch
Advantages:
...
only 1 common branches is required
Disadvantages:
not clean when remove hot-fix branches - but will not be a problem
Problem: we didnot bumped minor version in pom till rollout to prod we do few rollouts with build number increase, but still not ready to prod, and now we got PROD critical issue, we come back to prod revision to create branch, but we cannot use maven:release plugin as next few build numbers already occupied by rollouts to dev. Will be jars override in maven secure, can we trust to this ?
How we will secure UT passed for Prod version before rollout to prod ? not sure that developer will remember to goto Jenkins change config to new commit reference and launch configuration.... but I could be not right here .

It is highly required for ease and speed of development and fix delivering to have hot-fix branch to backport some features/fixes and rollout them more frequently, without being blocked by next rollout changes.

Alternatives:
http://blogs.atlassian.com/2013/05/maven-git-flow-plugin-for-better-releases/

Performance problem while using Checks that extends AbstractJavadocCheck

Get all Javadoc Checks that are using Grammar parser for Javadoc:
~/java/git-others/checkstyle/checkstyle [master|✔] $ grep -l -r --include "*.java" --exclude "*Test.java" "extends AbstractJavadocCheck" . | sed -E 's/.\/src\/.*javadoc\///' | sed "s/Check.java//"
JavadocTagContinuationIndentation
NonEmptyAtclauseDescription
SingleLineJavadoc
JavadocParagraph
SummaryJavadoc
AtclauseOrder


Execution test that show performance degradation in 15 times (19sec vs 5m8sec):

$ grep -E "JavadocTagContinuationIndentation|NonEmptyAtclauseDescription|SingleLineJavadoc|JavadocParagraph|SummaryJavadoc|AtclauseOrder|AbstractJavadoc" google_checks.xml 
        <module name="NonEmptyAtclauseDescription"/>
        <module name="JavadocTagContinuationIndentation"/>
        <module name="SummaryJavadoc">
        <module name="JavadocParagraph"/>
        <module name="AtclauseOrder">
        <module name="SingleLineJavadoc">
$ grep -E "JavadocTagContinuationIndentation|NonEmptyAtclauseDescription|SingleLineJavadoc|JavadocParagraph|SummaryJavadoc|AtclauseOrder|AbstractJavadoc" google_checks_only-one-javadoc-check.xml

        <module name="NonEmptyAtclauseDescription"/>
$ grep -E "JavadocTagContinuationIndentation|NonEmptyAtclauseDescription|SingleLineJavadoc|JavadocParagraph|SummaryJavadoc|AtclauseOrder" google_checks_no-javadoc-checks.xml
$

$ time java -jar checkstyle-6.15-all.jar -c google_checks_no-javadoc-checks.xml guava/
Starting audit...
Audit done.

real 0m19.532s
user 0m56.985s
sys 0m0.807s

$ time java -jar checkstyle-6.15-all.jar -c google_checks.xml guava/
Starting audit...
Audit done.

real 5m8.913s
user 6m25.283s
sys 0m1.287s

$ time java -jar checkstyle-6.15-all.jar -c google_checks_only-one-javadoc-check.xml guava/
Starting audit...
Audit done.

real 5m7.450s
user 6m14.414s
sys 0m1.179s



The only excuse for such performance degradation is that parsing is done correctly in comparison to RegExp implementation of parsing of javadoc that have anonymous amount of bugs.

This need to be fixed.....