My Development Setup
Like any profession a developers tools are important, they help us be more productive. When speaking to any developer you always have the tools and setup debate, what computer you use, what IDE do you use etc. In this post I'm going to go through my computer setup and what tools I use to help me be more productive.
I've decided to take the leap and buy the new Macbook Pro 13" with the touch bar. For being a Ubuntu user for years making the move over to Mac OS shouldn't be too much of a leap as the normal Windows user.
So why have I decided to use a Mac?
There's lot of reasons for what I look for in a laptop, build quality, hardware performance, software, screen quality, weight.
These are all the big reasons as to why I decided to go for a Mac over other laptops. The build quality with Apple products are always top quality, and we all know you have to pay a bit more for that quality but I think in the long run it's worth it.
Macs do get the best out of the hardware they run on, because the software only has to be optimised for that certain hardware it's easier to make sure they're always running at it's best. I know there's laptop out there with better hardware specs for a cheaper price but this compatibility between hardware and software is something I've looked at most.
The software is what drawn me the most, I've been a Ubuntu user for years and wanted to continue working on a Unix based system either linux or mac. The problem I've found is on Ubuntu you have to do more messing about to get things working, some drivers dont work properly and you get a lot of buggy issues.
Most of these problem have work arounds that you can solve yourself but I didn't want to waste time playing with driver issues, I'm a developer not a hardware guy. Anytime I've got to spend solving driver issues is time wasted. I also wanted to use abode products again, I missed them. Being able to use Photoshop when a designer sends you a PSD is a game-changer. Before people say you can use GIMP...it's not as good. So many times I open a PSD in GIMP and it changes the font size or loses the font styling is endless, it's so wasteful having to go back to the designer for them to label each text type and size and styling.
As I can move around offices or desks between different clients having a laptop that's small, light and powerful is essential. The Macbook pro 13" only weighs 1.37KG so it's very easy to move about.
The operating system is a big thing in the web development world the common census is to use either Mac OS or Linux it's quite rare these days to find a web developer that uses Windows, unless you do .NET development. I'm not sure why this is, I'm sure now with the great virtualisation tools like docker or vagrant a windows system will do the job just as well.
So I used Ubuntu 16.0.4, the reason why I chose to use this is historical. I used to use Windows for all my development (like many of us I'm sure) and installed WAMP to give myself a local LAMP setup and away I go. The problem was, the difference in the operating systems between Windows and Linux, when developing in Windows and deploying to a Linux server you could never be sure everything was going to work properly it was a scary thought.
Therefore I switched to Ubuntu this was about 7 years ago and there's no way I could go back to windows, the more I've used it the better I've become on the command line which has helped with any DevOps tasks I need to perform. If you use Linux servers for your job and are still using Windows as your operating system I strongly recommend moving to a unix based operating system like Linux or Mac OS.
Now I'm using Mac OS Sierra.
The IDE, the most important tool for the developer, the place we spend most of our time. As we need it some much with our job it's important to pick the right one for you.
I've tried loads of IDEs during my time as a developer some of the most common ones are:
- Sublime text
- Zend Studio
The one I use now is PHPStorm some people are put off by PHPStorm because you have to pay for it and with it costing £149 it's seemed to be quite expensive but you definitely get what you pay for with PHPStorm it just does everything:
- It's your code editor
- It's your GIT GUI
- Database GUI
- Code quality analysis
- Easy to step through code with the debug tool
- Integrated with phpunit for testing in your IDE
- It supports a large range of languages and auto-completion
- Composer support
- Vagrant support
- Docker support
- Support for all the common PHP frameworks
- Built in REST client
You do get a 30 day free trial with PHPStorm so it's worth giving it a try for a month and see what you think.
I also use Sublime text for quick file changes, mainly because of how fast it is to load up and get running straight away.
For version control I only use GIT these days, there used to be a time where I would be switching between SVN and GIT but now every new project will use GIT with the Gitflow workflow.
To achieve this I use both Bitbucket and github depending on what I want. For repositories that I don't mind being public such as tutorials or demo then I'd use Github with a public repository. For private repositories then I will always use Bitbucket and take advantage of the new pipelines feature.
I do want to try out Gitlab in the future and heard good things about the whole workflow working with Gitlab.
The development I do is both frontend and backend development, I'm a bit of an all rounder and like to do both sides of a website. Most of the work I tend to do is in the backend split about 70/30.
In terms of technology I work almost exclusively with PHP, I used to switch between lots of different frameworks such as Zend, Symfony, CodeIgniter, Drupal, WordPress. Now almost all my work is done with Laravel framework, I'd use this for normal web apps or APIs that need to be built will all be done using Laravel.
For CSS I tend to lean more towarrds SASS rather than LESS. No massive preferences here it's just what I'm used to using.
All development work I do now is done in a visualised environment. There are two main reasons for this, one being I don't need to install and uninstall lots of server software on my local machine. The next reason is that the environment is easy to duplicate on other machines.
In the past it wouldn't be unreasonable to work on multiple projects at the same time all using different versions of PHP, therfore on my local machine I had to install PHP 5.5, PHP 5.6 and PHP 7 then depending on the project I'm working on I will need to switch the default PHP version. Or some projects require redis while others will require memcache so I'll need to make sure my laptop had both installed, then will have to make sure keys dont conflict with each other.
After a couple of projects your development machine can become a huge mess of programs you're using and old ones you don't need anymore it's just a mess.
It's worse when a new developer comes on to the project and you then need to explain to them what programs they need to install to get the project working.
Using virtualisation this is all gone, all your server builds are scripted and in version control, so any new developers starting will simple need to pull down the repository and they have everything they need to get started. You no longer need to install multiple versions of a program to choose the one you use on that one project. When switching between program just turn off the virtual machine and start the new one that's it.
There seems to be two main runners when it comes to virtualisation in your development environment and these are either Vagrant or Docker. I can use both depending on the project, when there is a project which is a simple website or API that only relies on a database I'd just use Vagrant. If there's a project that relies on other services or APIs to be running to work properly then I'd use docker with docker-compose to spin up an image of the different services.
I tend to work more in Vagrant than in Docker this is because most of my development is on Laravel applications and it's so easy just using something like Homestead to get yourself started on the new project.
But I recommend using both and see which one you prefer.
With the tools we use on our computers being important so is the environment we work in, here's the environment I work in with information about the laptop stand, docking station, desk and desk chair.
Laptop Stand I like to place my laptop open on a stand next to my monitors, this way it works as a small monitor for things like spotify and email to stay open. This stand by Griffin places the laptop at the perfect height and has a stylish look to go with the rest of the desk setup. It's not essential but a nice addition to the desk for only £32.
Docking Station, this piece of kit was essential to move away from a desktop computer to fully use my laptop. It's made by Anker so you know it will be good quality and do exactly the job it's suppose to do. It's a USB 3 docking station which comes with a DVI port, a HDMI port, an audio headphone port, an ethernet port and 6 USB ports the 2 on the front are USB 3 and then 4 on the back which are USB 2.
This means I can connect to 2 monitors, the network and my wireless keyboard and mouse, using just one USB 3 port on my laptop.
It does cost £99 but at this point in time I couldn't work without out it and allows me to keep my cables tidy by only needing one USB port on my laptop. It makes docking and unplugging my laptop very quick and easy.
Hard Drive Dock, this dock allows me to plug in 2 hard drives of either 2.5 inch or 3.5 inch. At the moment I have a 256GB SSD and a 1TB hard drive connected into it which I use for backups. This plugs into my docking station means it doesn't use up anymore ports on my laptop. It's only £35 and is very useful to help with backups.
Desk, this is a simple corner desk that gives me lots of storage for all the paper-work I need to do for running a business. There's two shelves under the desk which I use to hide the docking station, the power unit and the printer. Overall has lots of storage and looks stylish and for only £165.
Desk Chair, with sitting down for up to 10 hours a day it's important to get something that's comfortable and supports your back correctly so I've gone for this chair by cherry tree furniture. It's a very good chair for only £70.
2 x LG 22EA63V-P LCD Monitor, as monitors go you can't really go wrong with LG monitors. I've had these 2 monitors for about 3 years and can't fault them. Only thing is they are getting old now so it might be time for an upgrade soon.
You can pick these up for about £180.
So that's what I use on a daily basis in my development work, if you know of anything I can add or replace that can help with my workflow please let me know.
Subscribe To Newsletter
Get weekly updates to your email