OS X Development Tips
Here are a few, quick development tricks I’ve picked up over the last months. Some require OS X. Others should work on any decent operating system. They’re not targeted any specific skill level and should be useful to most.
Local mail server
If you ever need a local smtp server for testing then don’t bother downloading one. Just fire up a terminal and run:
sudo python -m smtpd -n -c DebuggingServer localhost:25
This will start a simple SMTP server on port 25 and output the content of all emails sent from it. Great for testing mail features during web development. The smtpd module is also useful for writing mail related unit tests.
The ultimate SQL editor
Since I’ve yet to find an SQL client with a good query editor I usually just use Textmate. The only downside to using an external editor is the copy/paste ritual when testing the SQL. But in Textmate you can just select the code, hit ^⇧Q, and textmate will run it and show the output.
The SQL servers can be configured from Bundles → SQL → Preferences.
Git and GUI
I switched to git from subversion a few months ago and recommend trying it out if your using subversion or cvs. It’s very powerful and even works with subversion repositories. If you’re not using any source control system at all then you should be setting one up right now instead of reading this.
GitX is an must have tool if you use git for version control on OS X. It has an amazing history / diff viewer. Free and open source but well worth a small donation.