Developers seem to love to hear about how other developers work, so I thought I’d try to capture my entire environment, from end to end, in a single post. This will change (has changed) over time and depending on the project/company/whatever, but this is how things are for me right now. A couple of points up front:
- I work for Automattic, so a lot of this is influenced by our internal policies/security/workflow.
- I don’t always use all components of this “system”. I’ll try to detail when I do/don’t use certain parts of it as I go.
OK, here goes.
Note: This turned into a little bit of a summary of how we work internally at Automattic as well. Oh well, maybe it’ll provide some inspiration, I think we do some pretty cool things.
As a prelude, let me summarize how this all generally works: We have “sandboxes” for all of our work at Automattic, so it’s a VM that contains a complete instance of whatever code/system we’re working on (I have one each for WordPress.com, Gravatar.com and IntenseDebate.com because I work on them all regularly). Within that sandbox, we can make changes however we see fit. We all have certain hostnames that we can use to access that sandbox directly, or we can also point any live domain to that sandbox (via hosts files, see below) so that we can see how a live site will function when running our modified code (direct from the sandbox, so only we will see it).
If I’m doing something non-Automattic (like some random personal project), or a WordPress.org plugin (like Keyring), then I’ll normally just develop locally (see below) and avoid all/most of that complexity (and skip a lot of the details below).
So, here’s the full stack as far as I can tell:
- Physical Environment + Local Development
- I am currently working on a 13″ MacBook Air
- My desk is actually a standing configuration, built into a IKEA PAX closet (it’s hard to find a standing desk that’s tall enough when you’re 6’4″)
- I have a 27″ Thunderbolt display, external keyboard and Magic Mouse connected when I’m working from there
- I use MAMP on my local machine because it’s easy and I’m lazy
- Connectivity & Hosts juggling
- To access a lot of the things that I need to access for work, I have to connect through a secured proxy server.
- I use SideStep to run a local proxy server and route that traffic to my secured remote server, which I connect to using my SSH key.
- I leave my local System Prefs alone, and use Proxy SwitchySharp in Chrome to control proxy access
- I have one profile for “Automattic”, which loads a PAC file and only proxies work-specific requests
- Also have an “Everything” mode that proxies everything (for when I’m on an insecure network)
- Lastly, I have a profile for running things through Charles for when I want to monitor HTTP traffic
- When I get around to it, I’m going to set up something for proxying through my own personal (dv) server at Media Temple
- GasMask helps me manage a series of different hosts files for running things through my sandboxes or for local development
- I maintain a “base” file that includes some core/fundamental host mappings, and then different files for each “project” or major concept that I work on
- I then configure “Combined” files that are just base + one of those projects.
- I only use/activate the combined versions, so I always have everything I need mapped
- When I switch to a new one, I normally have to go to this internal config page in Chrome (which I have bookmarked) and click the “Clear host cache” button, which clears Chrome’s internal DNS cache
- File Access
- All SSH access uses passphrase-protected keyfiles, no passwords are used in normal flow.
- I alias all of the common machines that I need to SSH into so that I can do it with a simple command, e.g. “dented” to log into my personal server (beaulebens.com).
- When I’m on a good, solid connection, I normally mount the remote server that I’m working with as a local filesystem over SFTP, using Transmit’s Disk Mode.
- If I’m on a less-solid connection, then I’ll just connect to the remote server using Transmit (SFTP) and access files individually.
- I used to use Macfusion but got sick of the flaky connection so have switched to using Transmit.
- I’ve got a copy of DTerm running which allows me to quickly execute a Terminal command within any directory, it’s neat for simple little things like svn upping. When I’m in any window in Finder, I just hit Cmd-Shift-K and a little window pops up so I can type a command.
- I also have “cd to” which allows you to immediately open a full Terminal window with the cwd set to the directory you were browsing in Finder. Super handy.
- Text Editing
- I am currently using Sublime Text 2 as my primary editor. This is where I do the bulk of my work.
- I try to only install plugins using Package Control to make management easier
- Some plugins that I have include:
- Alignment
- Bracket Highlighter
- DocBlocker
- SFTP
- SublimeCodeIntel
- SVN
- Terminal
- I used to use TextMate, but recently switched
- When I need to make a quick fix or something on my sandbox or a remote server, I prefer vim, via Terminal.
- I am currently using Sublime Text 2 as my primary editor. This is where I do the bulk of my work.
- Testing/Browsers
- I work primarily in Chrome (currently v20)
- I spend a fair amount of time in web inspector (Cmd-Opt-I and Cmd-Opt-U get a pretty good workout on my machines)
- I also have Safari and Firefox installed for testing
- VirtualBox is installed and used for cross-browser/platform testing, with a Windows 7 image running
- That has Firefox, Chrome, Safari and obviously IE.
- I use the compatibility mode thing in IE to test different versions (7, 8 & 9)
- I work primarily in Chrome (currently v20)
- Communication and Source Control
- All of our source control happens in SVN
- We have separate Trac installs for each project
- I normally just use command-line SVN commands (mostly on my sandboxes)
- I have a copy of Versions, but I don’t use it much
- Most of our synchronous communication happens via an internal IRC server (rooms for projects/groups/teams), but we also use Skype a bit
- Lots and lots of asynchronous (and some almost synchronous) communication happens via a series of P2-themed WordPress(.com) blogs
- We have a lot of “helpers” on the P2s or via WordPress.com features
- Simple checklists
- Notifications (via email, Jabber and now toolbar)
- “Matcher” for keywords/regular expressions
- Ticket and changeset quicklinks (mention a ticket number from any of our Trac installs and it creates a link, with a hovercard that provides a summary)
- We have a lot of “helpers” on the P2s or via WordPress.com features
That’s all I can think of right now. If you have any questions, suggestions, or links to other people’s development stacks, drop them in the comments!
Thanks Beau – "cd to" and "dterm" look like very handy apps!
Are the Automattic VM's run using VirtualBox as well?
Also, what's your preferred IRC client? Colloquy is a bit unreliable for me.
James
Howdy James. Yeah both of those little apps are pretty awesome. I forget that I have them, but then I go to use them on a different machine and realize how often I actually hit them 🙂
Our internal VMs are not separate images that we run locally, they run in a virtualized environment on one of the servers within our general grid of machines. The systems guys tell me they use xen.
I used to use Colloquy, and still have it on my iPhone/iPad "just in case", but am currently using Linkinus for IRC.
Thank you for the Chrome proxy extension link! 😀
No probs Andrea 🙂 There have been a bunch of iterations of that extension, but this one (the latest?) works best with OSX Lion (haven't tried with Mountain Lion yet).
I use it with Mountain Lion and it works great!
Thanks for sharing.
You should be able to set up a Socks proxy on your Media Temple machine pretty close to the same way as your proxy to the Automattic server: `ssh beaulebens.com -D 8000` and then set your Socks proxy in SwitchySharp or System Prefs to localhost:8000.
Yep, should be simple enough… I'm just lazy and haven't gotten around to trying it out 🙂
It'd be really cool if SideStep supported multiple proxy server configurations as well, would probably make it a smoother switch over.
some useful utility apps | Room 329
You can also set up a ~/.ssh/config file for ssh aliases.
<pre>
Host dented
HostName beaulebens.com
IdentityFile ~/.ssh/id_rsa_dented
User beau
</pre>
Then you can do things like <code>ssh dented</ssh>, <code>scp file.txt dented:</code>, etc.
<code>man 5 ssh_config</code> for more details.
bah 🙂
Thanks for that IKEA link.
I'm gonna get one of those standing desks… I read somewhere sitting kills you and I don't feel like dying young 😛