How I Set Up My Development Machine
Every developer has a set of tools that make their life easy, without which their development life feels crippled! Over the years, I have developed my own set, which I describe in this post. The primary OS for my development related tasks is Ubuntu, and I would assume that you have one of the latest versions of Ubuntu (12.04+).
When I started off developing, I only knew basic PHP. Setting up a development machine was as easy as installing PHP5, MySQL and changing the home directory of Apache2.
But over the years I have changed as a developer and the tools that I use have evolved too- so it’s safe to say that next year, I will probably read this and smile, full of new tips and tricks.
Except for Google Chrome and Sublime Text, everything else in the list can be installed through the command
apt-get. Therefore, I have written a simple bash script which installs them in sequence. Note that a few (like
mysql-server) require you to set certain options (like a password for the root user) before the installation can be completed.
Here’s what I absolutely need in a development machine.
Google Chrome is undoubtedly the most popular browser out there- and rightly so. Chrome has a lot of features but the one little thing that edges it past every other browser out there is a powerful sync feature. I really like the fact that if I perform a Google search on my desktop and check my smartphone moments later, I can see it among my Chrome searches.
Firefox’s sync is getting there, but not quite there yet. This is the first thing that I install because many other things on my list could run into issues, which would usually require extensive Google searches to fix.
Chrome comes with a lot of features, but it’s really incomplete without the extensions that I use. The most important extension is AdBlock Plus, to remove ads from the web. When developing you need to be able to see the site as your users do to properly test changes, and according to some reports one fifth of users install ad-blocking extensions so it is nice to test both with and without ads.
The next addon that I install is Pocket. As a developer you often find there are wonderful articles out there, but you don’t always have the time to read them- that is where Pocket comes into play. It saves these articles and syncs with your other devices so that you can read them anytime later.
YSlow is another great extension for Chrome, which tells you why a certain page is slow. Another essential extension is Screen Capture for situations where pressing the print screen button is not enough. Lastly, I work with Todoist to manage my daily activities.
These extensions get synced once I sign into Chrome, and I don’t have to install them every single time.
It might so happen that a new version of Ubuntu might not be compatible with the latest version of Chrome. In that case, you could either install the development version if the issue has been solved there, or install Chromium, which provides you with the same sync capabilities.
Installation of many other tools and services on this list could involve editing text based configuration files. How can I do this without my favorite text editors?
I prefer Sublime Text when I work on a local machine. However, when you are working on remote server, a CLI based text editor is required. Ubuntu comes installed with VI, but a more capable one is Vim (Vi Improved). After installation, I configure Vim by editing the
.vimrc file to set up certain properties like tab spacing. A similar setting is tweaked in Sublime Text by changing its preference files (for either default or user levels).
For Sublime Text, you can change the a lot of settings in the preferences file. I prefer using the Soda Dark theme.
Next, you should try out the range of plugins available for Sublime Text.
GitGutter shows in the gutter area, whether a line has been added, modified or removed, according to Git.
Pylinter checks Python files for errors when they are saved and shows violations.
All Autocomplete is a plugin that extends the autocomplete word list to all the files that are open. T
These are just a few and it would take a separate post altogether to describe Sublime Text plugins. I suggest you have a look at front end specific, PHP specific or Python specific plugins for Sublime Text.
Version control software
The next step is to install version control software. If you’re involved in open-source development, installing Git, Mercurial and Bazaar should suffice, as most projects use one of these three. You can skip installing Subversion because open source projects these days have largely moved on from Subversion.
Installing them is pretty easy with the Ubuntu Package Manager. Unless you want beta versions, you can set them up with just
apt-get install. If you want unstable development versions, you might have to get a tarball from their websites and build them on your system.
Most web applications need a database for storing data. Before you install any such software, it is advisable to install a database. The most popular relational database management system is MySQL, but you may want to go ahead with something like MariaDB (which started with a fork of MySQL after Oracle stalled its development) or PostgreSQL.
If you want to go with NoSQL, you may install MongoDB or Cassandra.
PHP, Python, Ruby, Node.js
After setting up a database, I get a few languages and frameworks on which popular web based projects run. PHP, Python, Ruby and Node.js are the top options. I don’t install the Java SDK unless I need to run something that specifically requires it.
Most of them have different packages to connect to databases (like
MySQL-Python). Make sure you install the packages that are required.
Python specific packages
Since I use Python as my go-to language, there are a few Python-specific packages that I install. Firstly, I install
pip, which is a package manager for Python.
easy_install is another package manager, which I install through
pip. Then, I move ahead with the installation of
django, a web framework in Python. Further, I get the package
beautifulsoup, which is a parser for HTML (or even XML) documents. Lastly,
ipython gets me a better python shell and
ipdb helps in better debugging.
Change Apache2 home directory
In Ubuntu, a web server in the form of apache2 is installed by default. However, one little problem is that the home directory is
/var/www/ by default. The directory
/var/www/ requires root privileges to create or change files. If you are working on a development machine, it becomes cumbersome to prefix
sudo to each command.
An easy way to fix this is to shift the home directory to your home folder (
/home/[username]/), so that managing files and directories is easier.
Set up custom aliases in terminal
If you work with the terminal often, you know there are certain monotonous commands you frequently need to type. For instance, to start a Django server with a local settings file, we need to type
python manage.py runserver --settings=settinngs.local. To avoid typing this every time, you can add an alias to your
Another useful set of aliases that you could use is
cd ../../../ and so on. Here’s a guide on working with
.bashrc in Unix systems.
Whatever your level of development experience, you probably love listening to music while you work. Although some people prefer Spotify, Rdio, YouTube, or GrooveShark for streaming music, you can install VLC if you are bandwidth conscious.
The last program I install is one that may or may not be required in the development process. GIMP is an image processing processing software, widely regarded as an acceptable Photoshop alternative. Sometimes, a developer might be required to perform minute image processing tasks like cropping, which can be done quickly with GIMP.
With this, we come to the end of the list of software I install on a development machine.
Do you use something cool that I missed? Do let us know in the comments below.
Update: added a paragraph explaining the need for AdBlock when testing.