What Goes in Source Control?

Short answer: everything! However we need some good directory structures and source control configuration to make that a really practical answer, so this article is a quick outline of my usual advice for a good source control structure for a standard web project. The examples are for a PHP project but I’m sure you could apply this to your own language of choice, also. Continue reading

You’re Not Using Source Control? Read This!

Last week I wrote an email to a client who hasn’t yet implemented source control, but who is thinking about it. It turned into rather a long email as I attempted to convey WAY too much information in one long email. After some twitter banter, I repackaged my thoughts into a whitepaper on Source Control entitled You’re not using source control? Read This! (PDF, no registration needed).

The document goes on to talk about the available tools (git, Hg, SVN) and give a sales pitch for _why_ source control has benefits for an organisation. There are also some action points to follow to implement source control if you haven’t already taken the leap, which I hope will help anyone looking to take that step – it’s kind of awkward in this day and age to admit that your organisation doesn’t have source control, but however this situation arose, hopefully this document wraps up my thoughts on how to find a good way out! Continue reading

Do Open Source with Git and Github

This article originally appeared in the May 2012 php|architect magazine.

Often I find absolutely competent programmers, who aren’t involved in open source, either because they don’t know how to approach a project, or because they just aren’t sure how the process even works. In this article we’ll look at one example, the conference feedback site joind.in, and how you can use GitHub to start contributing code to this project. Since so many projects are hosted on github, this will help you get started with other projects, too.

The tl;dr Version for the Impatient

  1. Fork the main repo so you have your own github repo for the project
  2. Clone your repo onto your development machine
  3. Create a branch
  4. Make changes, commit them
  5. Push your new branch to your github repository
  6. Open a pull request

This article goes through this process in more detail, so you will be able to work with git and github projects as you please.
Continue reading

We Don’t Know Deployment: A 4-Step Remedy

Someone emailed me recently, having read my book and wanting some advice. Here’s a snippet of his email:


So here’s my problem.
We dont know deployment. We work from same copy on one test server through ftp and then upload live on FTP.

We have some small projects and some big collaborative projects.

We host all these projects on our local shared computer which we call test server.
All guys take code from it and return it there. We show our work to clients on that machine and then upload that work to live ftp.

Do you think this is a good scenario or do we make this machine a dev server and introduce a staging server for some projects as well?

I wrote him a reply with some suggestions (and my consulting rate) attached, and we had a little email exchange about some improvements that could fit in with the existing setup, both of the hardware and of the team skills. Then I started to think … he probably isn’t the only person who is wondering if there’s a better way. So here’s my advice, now with pictures! Continue reading