Monday, August 24, 2015

Best Practices in Software Development


References

Code Integrity

  1. Automated builds
  2. Continuous integration
  3. Unit testing and test-driven development
  4. Code consistency and agreed standards for quality

Best Practice to Continuous Delivery

  • Don’t build the binaries at each stage of the deployment pipeline, create them once an reuse them.
  • The capacity testing environment should be as similar as possible to the production environment.
    • increase frequency of deployment
    • iterative monitor, measure, and improve the code
  • Script everything!
  • Don’t let builds that fail unit or acceptance test into production
  • Put all the configuration in version control (network, firewall, OS, etc)
  • Automate everything
    • automate code testing
    • automate work-flows
    • automate infrastructure

Git dos and don’ts

The dos:

Write useful, readable commit message
use topic branches locally
small, logical commits
do choose a workflow

The don’ts:

Don’t rebase public commits
Don’t delete unmerged remote branches
Don’t more than 1 project per repo.
Don’t create a very large repo.

Labels: , , , , , , , ,

Friday, August 21, 2015

Software Design

  • Contain Changes
  • Re-usability
  • Design and Development Principles
    • SOLID - Object Oriented Design Principle
      • Single Responsibility: a class should have only a single responsibility
      • Open-Closed: “ be open for extension, closed for modification.”
      • Liskov substitution: objects should be replaceable, design by contract
      • Interface segregation: many client-specific interfaces are better than one general-purpose interface
      • Dependency inversion: Depend upon Abstractions. Do not depend upon concretions
    • DRY - Don't Repeat Yourself
    • KISS - Keep it simple, stupid
    • If it ain't broke, don't fix it
    • GRASP - OO Design.

Labels: , , ,

Statistics: Language / Techs / Linux Distro

This is the popularity of different technologies
  1. Language Popularity
    1. GitHut: most popular Languages in Github
    2. Programming Lanaguage Popularity @ www.tiobe.com
    3. PYPL PopularitY of Programming Language
    4. The RedMonk Programming Language Rankings: January 2015.
  2. Linux
    1. Distro Watch
    2. Linux_Distribution_Timeline

  3. more ...

Labels: ,

DevOps, Continuous Integration, Code Quality Analysis



DevOps integrates developers and operations teams in order to improve collaboration and productivity by automating infrastructure, automating workflows and continuously measuring application performance.

  • Automate everything
    • automate code testing
    • automate workflows
    • automate infrastructure
  • development environment == development environment
    • increase frequency of deployment
    • iterative monitor, measure, and improve the code
  • Change in mindset + New tools + New skills= new fast-paced world.
    • Chef / Puppet / SaltStack ==> code deployment

Vagrant

www.vagrantbox.es

CI Solutions

  1. Jeknins
  2. TeamCity: Free for 20 Project
  3. Atlassian Bamboo: Product Series
  4. Travis CI.
  5. Other Tools:
    1. Octopus: free for 10 machines, 5 Projects
    2. Red Gate: Database Shipping tool

List of Tools

  1. DevOps Glossary: Open source tools for automation, configuration management and CI
  2. The Ultimate List of Deployment Tools
  3. DevOps: Phases of Continuous Integration
  4. Testing in Continuous Integration and Continuous Deployment Workflows from Microsoft
  5. Continuous Integration-Automated Deployments And Release Management
  6. Quora: Which is best: Bamboo or Jenkins CI?

Jeknins

  1. Install the latest version of Jenkins:
  2. Go to: http://localhost:8080/      to setup

General:

  1. Git flow with Jenkins and GitLab
  2. Generate SSH keys: ssh-keygen -t rsa -C "xxx@gmail.com"
  3. Jeknins Plugins:
    1. Install Plugins Manually
    2. List of all Jenkins plugins here
    3. EnvInject Plugin:
    4. Gitlab Hook Plugin: depend on Ruby Runtime Plugin : On windows, there must not have space in folder. Here is tutorial on how to setup Jenkins/GitLab Hook
      1. GitLab Official Documentation
      2. Git flow with Jenkins and GitLab.

Setup Nunit Quick

  1. Best Doc for setup Jenkins: Jenkins for .net in 5 Minutes, Jan. 15, 2013.
  2. A post related to continuous integration for DOTNET using Jenkins and GIT.
    Jenkins MSBuild Plugin here
  3. Continuous Integration for DotNet Using Jenkins, SVN and MSBuild (DotNet).
  4. How I learned to stop worrying and love Jenkins
  5. NUnit With Jenkins: refer to follow to setup NUnit with Jenkins:
    1. Execute NUnit with Jenkins
    2. How do you run NUnit tests from Jenkins? 
    3. NUnit and Continuous Integration with Jenkins: which NUnit-files are needed?

SonarQube

Digest

  1. Developers' Seven Deadly Sins addressed by SonaQube
  2. The Wise Developers’ Guide to Static Code Analysis featuring FindBugs, Checkstyle, PMD, Coverity and SonarQube.

Alternatives

Sonar C++ Setup

Sonar Examples

  1. sonar-project.properties

Labels: ,