Development Tools

Here is where I write about the tools that I use in my day-to-day work as a software developer.

Netbeans IDE

Netbeans is a powerful IDE (integrated development environment) that supports many languages. It got its start as a Java IDE, and in fact its written in Java, so it runs on Windows, Linux, and Mac.

Netbeans is open source and free of licensing costs.

At the time of this writing, I am using Netbeans 6.8 for PHP development.

PHP is an interpreted language that can be developed and maintained with any bare bones text editor or notepad application. While you can work this way, you're losing a lot of productivity in doing so.

Here are just a few reasons why I like Netbeans:

Syntax coloring. At a glance you will be able to distinguish comments from code, from strings, etc. This gets your eye right to what you're looking for and allows you to filter out the noise.

SVN integration. SVN (subversion) is my version control system of choice right now. The Netbeans project explorer will color code the source file icons according to their state with respect to SVN: unchanged, modified, or new. The diff is very pretty and makes it very easy to see where code has been inserted, modified, or deleted,

Smart code navigation. You can right-click on a method and select "Go to Declaration" and Netbeans will open the right source file and position you where the method is defined. In any non-trivial PHP application you will find that there are many folders, often with many instances of files called controller.php or view.php, and the like. Not having to manually flip through a half-dozen open windows showing different controller.php files saves my sanity.

Interactive debugging!! Netbeans has support for xdebug which allows one to set breakpoints, single-step through code, examine call stacks, and variables in scope. Problems that might take you days to discover by reading code and sprinkling echo statements often can be solved in hours or minutes with the use of an interactive debugger. This feature alone puts Netbeans into my toolbox.

There are plenty of other free and commercial IDE's out there. Not intending to exclude, I would say that Eclipse is the closest competitor in the free, open source IDE space. It is well-established and has a huge user base. I just prefer Netbeans.

Subversion

Subversion is a client-server open source version control system.

Subversion employs an optimistic approach to file locking to encourage concurrent development. Unlike Microsoft Visual Source Safe, one need not lock a file before editing by explicitly checking it out. In fact the term "check out" has very different meanings in VSS and SVN.

Check Out fetches a copy of one or more files from an SVN repository to create a new working copy of a file or project. A check-out makes no changes to the state of the SVN repository.

Update fetches the latest version of one or more files from the repository, automatically merging changes where possible. In the cases where changes cannot be merged automatically, the file is placed in a "conflicted" state such that a merge can be performed to reconcile the conflict by the user. In my experience, conflicts are rare when division of labor in the team is reasonable. An update makes no changes to the state of the SVN repository. I know, this is unintuitive to the SVN newcomer! Think of it as updating your working copy, not the repository.

Commit posts the changes made in your working copy to the repository and increment the repository revision number. The youngest revision is often referred to as the HEAD revision. SVN revision numbers are maintained at the repository level, unlike VSS where each file gets its own version number.

Add flags a file for addition to the repository once it is committed. The add action, alone, does not alter the state of the repository.

Delete flags a file for deletion from the repository once it is committed. The delete action, alone, does not alter the state of the repository.

Revert discards any changes made to your working copy and restores the file to a previous state. One can revert to any prior version.

Rename renames a file in the working copy, and flags the file to be renamed in the repository once it is committed. The rename action, alone, does not alter the state of the repository.

Copy copies a file in the working copy, and flags the file to be copied in the repository once it is committed. The copy action, alone, does not alter the state of the repository.

Move moves a file in the working copy, and flags the file to be moved in the repository once it is committed. The move action, alone, does not alter the state of the repository.

Tagging associates a symbolic name with a revision so it can be easily referenced. For example one may wish to create tags representing stable releases.

Branches allow a team to work on parallel versions of a code base, for merging at some point in the future.

Tortoise SVN

The most intuitive interface to SVN on Windows is Tortoise SVN.

It is a fantastic integration of SVN functions into the Windows Explorer. Right-click on folders and files to perform any SVN function.

The difference window is color-coded to show additions, deletions, and modifications, character-by-character.

The merge tool is also quite easy to use.

Although, I don't care for the name, the "blame" function shows who last modified each line of a source file, and the related revision number. I find this very helpful to determine the age of code, and the related comment of that revision's commit. Once one trsusts the version control system, one can stop polluting the source code with old commented code, and other low-value comments with dates, names, and when lines were added and deleted. All of this information can be stored in version control and readily accessed with "blame" without degrading code readability.