Tools
Komodo's Database Explorer is pretty cool. You can access your databases, view table schemas, run queries etc right from the IDE. No need to run a separate app or access your databases on the command line.
On my current project, we create a branch at the beginning of each sprint and maintain a clean trunk. All code from the sprint is committed to the sprint branch. At the end of the sprint, we merge the sprint branch into trunk (assuming it passes QA). This is pretty much the same setup as feature branches. Here are a few notes and snippets for this type of setup.
Debugging with an IDE like Komodo (or another debugging tool) will save you a whole world of pain. It will save you through dropping in print_r all over you code and allow you to step in and out of your code as it executes with ease. The first stage, of course, is setting it up and that is the focus of this tutorial.
MAMP (Mac Apache MySQL PHP) is relatively easy to set up, but there are a few things that I had to change. Here are my notes on the changes I made.
It is a good idea to block access to .svn directories if you are using Subversion. Otherwise, anyone can read the files. Add the following snippet to your .htaccess file (in root directory of the website).
This is the command to restore a MySQL database.
To restore it on a local computer, follow this process:
1) Open the command line (Windows, Linux or Mac)
2) cd (change directory) to the directory where the mysql.exe is located. This is likely to be in a bin directory. For example, with WAMPserver, mysql.exe is located here:
c:\wamp\bin\mysql\mysql5.0.45\bin
I have just discovered a conflict between Skype and WampServer that I thought I would share. They both use port 80 which causes the conflict. If you run Skype before running Wamp, then Apache will not run. If you go to a site on localhost, you will probably get a blank screen.
If you are running WampServer on your local machine, it can be a bit tricky to restore a MySQL database. You need to do it from the Windows command line (DOS prompt), rather then the MySQL console command line. The actual MySQL restore command is slightly different to normal and you need to make sure you are in the right directory first.
One of the most annoying things in the world is trying to create a screen grab of a web page when the page does not fit on the visible screen. It involves hitting "Print Screen", pasting into a graphics programme, and then scrolling down to grab the lower part of the page, and then joining the 2 together. Do that a few times and you will soon get sick of it!
One of the best things about Firefox is the vast array of add-ons/extensions/plug-ins to make your life easier. Some are absolute life savers, while some are time wasters. Here are my top 5 Firefox add-ons of all time:
Learn how to write custom Drupal modules
Does Drupal module development make your head explode and drive you crazy?
Why not learn from someone who has paved the way instead?
Sign up to Master Drupal 7 Module Development.
I am