When I first started working professionally, it was in a ColdFusion environment. Beyond that scariness, the company I worked at was a victim of licensing costs requiring the use of an internal development server on which we’d all work. It was a small company with just three people coding day-to-day, so collisions were unlikely. On top of that, it was my first real job so I didn’t really see much of an issue with it.
As I became more involved in the front end community though, lots of people would talk about local development and how they wouldn’t trade it for anything in the world. As my process began to form and become more refined with every project, I first began my abstraction of working on the front end start to finish first, followed by ColdFusion development. While the initial inspiration was to see if local development was that much faster, the byproducts of segmentation have carried through to my workflow today. I always build out the front end completely before integration with WordPress.
Unfortunately though, I was stuck working on the in-house dev server due to licensing and frankly a feeling of being too busy to worry about exploring other options that kept us on ColdFusion. Fast forward a few years and we had moved to WordPress. That was the day I began developing locally and it made me love open source that much more.
My local development environment as of today is a 13″ MacBook Air running OS X 10.6.6 with MAMP Pro. I was running XAMPP for a time but since moved to MAMP Pro due to the ease of creating named virtual hosts, switching between recent PHP versions, local Postfix, and easy fine tuning of Apache modules to name a few reasons.
Editor v. IDE
That’s the environment, the other big piece is the editor. I’m a self-proclaimed editor addict; I’m always interested in what’s being released and why it might help me work faster. That said, however, I purchased a license for TextMate the day I moved to OS X in 2006 and to this day it remains the best tool for the job. Sublime Text 2, though, is on it’s way to being the TextMate 2 we’ve all been waiting for.
At the end of the day both TextMate and Sublime Text 2 are just text editors. I don’t profess that I’m the world’s best programmer by any means, but I’ve built a few things over time, and I don’t see that going anywhere soon. I have a heart for design, but practicality keeps me neck deep in markup, style, script, and PHP every day of the week at Iron to Iron and I love it. I’m liking it so much in fact that I’m finding that I want to get more out of my programming workflow, a text editor isn’t really cutting it. Enter IDEs.
I’ve had a nagging interest in IDEs since first hearing about them. While a much more elaborate piece of software, I’m essentially using those pieces in segmented applications already, and the editor itself is much more elaborate. When working with a text editor, it’s likely you’re using that to edit the code, another application for version control, yet another application for working with your databases, your browser for documentation, and the list goes on. That’s what I’m doing anyway. I’ll edit code in TextMate (Sublime Text 2), commit in Versions, Sequel Pro for all things database, and Chrome to review documentation when needed.
I recognize and appreciate that many of you are using command line git, command line vim, and so forth. While the command line is super productive and minimal, sometimes I like eye candy for the sake of eye candy.
IDEs are, by nature, fully featured and very comprehensive. The most attractive feature of an IDE for me is codesense, or smart autocompletion of code. Many times when I’m reviewing documentation, it’s simply an effort to get function parameters right on the first try. Codesense helps do that for me, and even provide more detailed documentation on WordPress-specific functions as many IDEs will pull in PHPDoc which can be really useful on the fly. IDEs aren’t the only kids on the block using codesense, though. Many newer text editor builds are doing the very same thing which is great. So what is it that has me wrapping back to IDEs? Debugging.
Debugging. My final frontier. Until the next one.
Debugging and (unit) testing are two aspects of my workflow that I admittedly have not spent a gigantic amount of time with. To me, that reflects poorly on my professionalism as a programmer and it’s something I want to focus on over the coming years. My workflow is filled with print_r()
and echo
when needed and it just feels sloppy. Sure, it gets the job done, but it just feels like things can be done better, faster. Debugging solves that feeling for me.
I’m currently integrating Xdebug into my workflow and it just feels right. Not only does it feel more productive, the geek in me goes nuts in the fact that I can step through a call to a WordPress page and watch things execute line by line. Beyond that I can keep an eye on memory usage, call stacks, check out variables at any point in time during execution, and the IDE caters to exactly that. As I build more advanced things for WordPress, this interaction exchange is going to prove extremely valuable.
For the time being, I’ve settled on NetBeans as my IDE of choice. I explored many of the available IDEs and chose NetBeans because of the customizable language patterns (it lets you define, for instance, how your braces are formatted), it’s integration with Xdebug, it’s price tag, and it’s release performance over the past couple of years. I don’t love the fact that it runs on Java, but overall I like the decision. Komodo comes in as a close second, but the price tag is a bit up there for something I’m not sure will remain in my workflow over the next six months. Should the IDE route remain valuable for me over time, I’ll begin to evaluate other IDEs based on features. Suggestions welcome.
All things considered, I’m hoping to go cold turkey with NetBeans for the next week. I’d like to revisit the actual debugging process in the form of a screencast should anyone be interested in checking that out on a more intimate detail. I’m also hoping that the broadcast of my newness to it will help get some targeted feedback on what I can do to take even more advantage of what an IDE and debugging tools have to offer.
Comments
Another really nice app filled with both eye candy AND features for subversion is Cornerstone. It allows branching, merging, switching, etc. Versions doesn’t have any merging or switching functionality as far as I know. http://www.zennaware.com/cornerstone/index.php
If you want some eye candy with git, check out Tower: http://www.git-tower.com/
I use git with Tower every day and it’s extremely nice.
I too have thought about switching to an IDE, and NetBeans was my first choice, but since I only do front-end work (on a Windows box, no less) I decided to go with Notepad ++ (and a few plugins) with WinSCP. Both tools are fast, light, and stable. Still very curious to see how your transition goes, though.
I’m with you on the editor vs. IDE debate. I’m generally focused on information management rather than development but inevitably find myself writing code all too often to manipulate data to a usable form.
Long ago, I switched from an editor to Komodo Edit. This is the free version of Komodo IDE and I find it just the right balance. It has the features I need, namely folding, code completion and macro’s. It uses Mozilla as the code base so it is generally pretty speedy and not too bloated and has some great plugins that add to the capabilities.
It’s easy to then set up a workflow that allows local edits (I’m often mobile and don’t always have easy remote access to servers) with scripts via Bazaar (similar to GIT) to push change sets to a server when desired.
I’m not a Java fan and usually find Java desktop applications to be too bloated and slow.
Regards, Julian.
Personally I see local development as an antipattern.
I’ve often been the person that “the buck stops with” for web projects and I’ve frequently been in the situation where somebody spent a year developing a project locally, everybody thinks that it is ready to deploy, but it takes another two months to get things working on a real server in a maintainable way.
For instance, I developed a Java applet a decade ago and I still get support calls from Windows users who are deploying to Unix, because they were able to be sloppy with case on their local machine but were mystified at the problem they had in production.
It’s certainly O.K for developers to have independent development environment, possibly even installed on their own machines, but this independent development environment needs to be identical to the production system. Otherwise, things aren’t done when they say the project is done.
Great article, it has me thinking of making a switch to an IDE, also interested in the screencast mentioned.
I’ve been bouncing around with various editors and IDEs for a while now. I’ve finally landed on PHPStorm (http://www.jetbrains.com/phpstorm/) after NetBeans’ shortcomings became a little annoying.
I’m one of those freaks that actually codes using a proportional (as opposed to monospace) font so I had to eliminate a few options right off the bat.
So now I use PHPStorm for project-based stuff and Notepad++ for quickie editing. It’s a pretty good combo, and bonus points for using Dropbox to keep all the settings in sync between work and home.
IDEs can be very helpful when it comes to code completion, especially when working with a very complex application and picking up methods from custom classes. I also think the thoroughness of an IDE is very helpful when learning a new language (especially if it offers automatic, context sensitive code completion hints). On the other hand, CSS and simple HTML markup in an IDE is complete overkill. At the end of the day, I think there’s a place for both.
I have been using Netbeans for about a year now and think it’s fantastic. I’d love to see some tutorials/ screencasts on the xdebug integration, and unit tests – particularly with regards to WordPress.
Awesome, I was hoping someone would be interested in that! I’ll put one together over the next couple of days.
You bring up a fantastic point. Your local environment needs to be compared to production and staging environments. There are a ton of lessons to be learned on launch day if you’re not proactive about your environments.
Thanks so much for the input! I’m hoping to really take advantage of debugging which unfortunately requires the full Komodo IDE. Great to know you’re liking it though.
Man, Cornerstone got even better since I last saw it. Thanks for the refresher!
I’ll throw in some interest in a debugging screencast also. print_r() has been my only friend in that department as well.
I would also love to see xdebug integration tutorials. I primarily develop WordPress sites and am using coda, however I feel an IDE would speed my development up.
I love Netbeans, but have always found it can be a little slow thus using coda primarily. This may be a silly question, but are there any IDE’s / Plugins that can autocomplete WordPress’ methods / classes etc?
I find myself often referring to the docs which can be tedious and slow as my brain can only handle a limited number of functions’ arguments.
I would say that letting a year pass between the start of coding and production deployment is the bigger anti-pattern.
I realize biweekly deploys aren’t practical for everyone (I’ve never worked anywhere that did it), but the point (the pattern, if you will) is to deploy as small a change set as possible, so that when errors appear in production, the code that needs fixing is minimized.
In the case of a configuration problem, that’s something you catch on the first deploy. Hopefully, a process can then be introduced that prevents the problem from recurring.
Cornerstone is Excellent. I use it for SVN regularly, and it’s one of the best tools I’ve ever found for managing versions.
It’s not without flaws — there are still bugs surrounding empty Trunks — but it’s definitely worth the price of admission.
[…] WordPress plugins. It spawned a diversion from my comfort using a text editor and has me seriously considering a switch to an IDE. The underlying root though, was my desire to increase both productivity and quality when […]
Just out of curiosity. When debugging, do you debug on a local machine? Or a remote machine hosted elsewhere?
I’m using a local machine.
I like Coda. It’s by the same guys who make Transmit, and integrates nicely with that. It also has some SVN stuff too (I think), but I use Eclipse for SVN tasks.
Coda may or may not be good for a Team environment, I don’t know. But I keep coming back to it. Have used Komodo in the past, but just liked Coda better.
Far from an IDE but MacRabbit’s Espresso is supposed to be out in the first half of this year (per their Twitter feed), which is only a few weeks away.
Someone made a comment on their forum about the program being side hobby of the developers, since it’s been a while since their last update.
The response was something like: “If you think that it is possible to write a great text editor in your spare time, please feel free to try it yourself. I’ll personally bake you cookies if you release something competitive before Textmate 2.0.”
Seems this would imply they are making efforts to stay pretty competitive with Textmate. Can’t wait!
[…] been dabbling in tons of tools over the past year. Of course, without fail, I’ve stuck with TextMate for […]