Skip to content

Instantly share code, notes, and snippets.

@kirkegaard
Created March 22, 2010 11:31
Show Gist options
  • Select an option

  • Save kirkegaard/339989 to your computer and use it in GitHub Desktop.

Select an option

Save kirkegaard/339989 to your computer and use it in GitHub Desktop.
Notes for Verk's developer meetup

Developer Meetup

A collection of notes for our developer meet-up. This will be our agenda and help us streamline workflows in the development phase. This will also describe how we use tools like Basecamp with the rest of the company.

Version Control

We use Git and GitHub. We keep projects private as a rule of thumb and we release modules and code public. GitHub will also be our goto when we want an overview of a project, code wise. We will start out by having a Medium plan and upgrade when needed.

We will keep the projects that we supports on GitHub. Same goes for our public projects. If we run out of private repos we can archive old projects that wont need a store. Though try to keep as much on GitHub for backup reasons.

Please use .gitignore to ignore cache, temp files, Drupal files, and settings file containing password. One line per rule.

Documentation and good reads

Servers

We are not in the business of hosting but we will have hosting for some sites. We will slowly move to a cloud based platform like RackCloud.

Backup will slowly change as we change our server solutions. Most service have great backup solutions.

This is a gray area right now as we are changing over the next year.

One guy is in charge of managing the servers.

General/Local Development and workflows

Development should be done locally. You can use what ever tools you like as long as Git is your version control system.

The initial flow:

  1. Initial project setup
  2. Push to Git
  3. Development / Collaboration
  4. Push back to Git
  5. Deployment from Git

Deployment to production & staging server should be done by who is in charge of the servers or the lead developer. But we should look into deployment services and tools.

Do's and Dont's when developing

  • Commit often
  • Pull often
  • Dont push broken code
  • Test out stuff in a branch or local copy
  • Never edit a live site

Do's and dont's when coding

  • Document your code
  • Separate your code
  • Keep It Simple (KIS)
  • Dont Repeat Yourself (DRY)
  • General rules are: PascalCase for Classes. camelCase for methods. Lowercase for files.

An example on how to format and document your code by following the rules above:

/**
 * App_Ninja_Weapon_Abstract
 * 
 * Abstract class for Ninja Weapons
 * 
 * This class contains all general weapon functions. We extend this class
 * to get all the general features for weapons.
 * 
 * @category  App
 * @package   App_Ninja_Weapon
 * @author    Christian Kirkegaard <christian@verk.dk>
 * @license   http://www.opensource.org/licenses/bsd-license.php New BSD License
 * @version   1.0
 */
abstract class App_Ninja_Weapon_Abstract {
	
	/**
	 * Uses the selected weapon.
	 * 
	 * @param string $weapon Weapon to use
	 */
	public function use($weapon) {}
	
}

/**
 * App_Ninja_Weapon_Katana
 * 
 * Adds a katana for our ninja
 * 
 * @category  App
 * @package   App_Ninja_Weapon
 * @author    Christian Kirkegaard <christian@verk.dk>
 * @license   http://www.opensource.org/licenses/bsd-license.php New BSD License
 * @version   1.0
 */
class App_Ninja_Weapon_Katana extends App_Ninja_Weapon_Abstract {
	
	/**
	 * Required level for ninja
	 * 
	 * @var int $_levelRequired The level your ninja requires to use this weapon
	 */
	protected $_levelRequired = 20;
	
	/**
	 * Damage of the weapon
	 * 
	 * @var int $_damage Damage that this weapon will give
	 */
	protected $_damage = 42;
	
	/**
	 * Durability
	 * 
	 * @var int $_durability How strong is the weapon. 0 equals broken
	 */
	protected $_durability = 100;
	
	/**
	 * Constructor
	 * 
	 * @return void
	 */
	public function __construct() {}
	
	/**
	 * Swing
	 * 
	 * @return int A calculated int of damage giving
	 */
	public function swing() {
		return ( $this->_damage / 40 ) * 100;
	}
	
	/**
	 * Stab
	 * 
	 * @return int A calculated int of damage giving
	 */
	public function stab() {
		return ( $this->_damage / 60 ) * 100;
	}
	
	/**
	 * Throw
	 * 
	 * @return int A calculated int of damage giving
	 */
	public function throw() {
		return ( $this->_damage / rand(0, 100) ) * 100;
	}
	
	/**
	 * Calculate Damage
	 * 
	 * @param object $object Instance of App_Ninja_Weapon_Damage
	 * @param string $type Type of damage giving
	 * 
	 * @return object Instance of {App_Ninja_Weapon_Damage}
	 */
	protected function _calculateDamage(App_Ninja_Weapon_Damage $object, $type) {}
	
}

Basecamp

We will have 3 lists at all time while developing. They are features, issues and bugs. If you find a bug or issue you should report it to the bugs, or issue list. Assign a person in responsibility for the task if you can. If not leave it blank. Blank assigned todos are for everybody to work on.

Every developer is in charge of keeping these list up to date.

Developers will keep separate milestones from the overall phases. The lead developer will make these with his team.

Frameworks

We use Zend Framework and Drupal. We choose one of these depending on the job.

We will work on a workflow for collaborating on Drupal development. We are looking into installation profiles, [Features](http://drupal.org/node/580026) and maybe develop our own migration tools

When using one of these frameworks we should follow the standards of the framework.

Software

We will use PHP 5.2 for now but look into 5.3 and its new features. That way we will be ready to the new changes for all the frameworks out there.

Apache 2 as our webserver

Mysql 5 as our database

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment