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, October 31, 2014

Linux Tools and Setup

Helpful Tools

  • Meld for file comparison, with GUI, easier to use than Linux Diff
  • Tmux 
  • I3 Window Manager
  • htop - an interactive process viewer for linux

Linux Issues and configuration

  • lUbuntu disable screen lock: sudo rm /etc/xdg/autostart/light-locker.desktop
  • Emacs <Ctrl>-<Spc> not function
    • sudo apt install dconf-editor, Then browse to Desktop >> ibus >> hotkey. The trigger and triggers setting will still show 'control+space'. Edit these settings out, being careful to leave empty brackets [] in triggers.
  • Grub boot order change:
    • sudo add-apt-repository ppa:danielrichter2007/grub-customizer
    • sudo apt-get update
    • sudo apt-get install grub-customizer
  • Undelete 
    • Looking for: extundelete - utility to recover deleted files from ext3/ext4 partition
    • To find such a package, you can try: apt-cache search undelete
    • To use the utility install it with: sudo apt-get install extundelete
    • After installation invoke man extundelete and study it carefully
      • extundelete --restore-file /opt/andy/bin/clean-bin-dir /dev/sda5
      • extundelete --restore-directory /opt/andy/bin/clean-bin-dir /dev/sda5
  • replace rm with trash
    • rm is dangerous operation, and it's hard to restore deleted file. Solution: trash-cli:
    • another options is to use gvfs
    • alias rm=trash, but trash don't support delete folder
  • Linux replace in all files
    •  .
  • Linux Commands
    •  tar -cvf files.tar my_directory --remove-files

Misc:

  • Bash (Unix shell) wiki 
  • find and replace: find . -name Makefile.POSIX -exec sed -i 's/CCFLAGS += -O3/CCFLAGS += -O0/' {} +
  • How use CUT -d 'delimiter' is delimiter is a TAB?   cut -d "<CTR>v <TAB>"

Top 5 Things to Do After Installing Fedora 22 Workstation

  • Software & Update
    • Canonical Partners is checked.
  • Step1
    • sudo yum update
  • Step 2: Configure Gnome Shell Interface
    • sudo yum install gnome-tweak-tool
  •  2. Enable RPM Fusion Repository
    • sudo yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-21.noarch.rpm
    • sudo yum localinstall --nogpgcheck http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-free-release-21.noarch.rpm
    • sudo yum update
  •  Install VLC Media Player
    • sudo yum install vlc
  • sudo yum install yum-plugin-fastestmirror

Labels: , , ,