Eric Barnes

Switching to PhpStorm

A few months back I retired Sublime Text from my day to day coding and have since switched to using PhpStorm as my go to editor. I do keep Sublime around for quick editing, writing blog posts, but I haven’t missed it otherwise. PhpStorm has a lot of nice features that you don’t realize sublime is missing until you switch. Here is my mini review on what I’ve found in the few months of using PhpStorm.

Git and Github

I have found the git and github integration brilliant. I really like opening issues right in the ide and it creating a new branch/workplace. At UserScape we do a lot with Trello and only use GitHub Issues for bugs so I don’t get to use this as much I would like. Maybe one day some one will integrate Trello. :)

Committing is also something I really like doing without having to leave my editor. It has this integrated via command + k. Or if you are old school you can just open the terminal tab. My personal preference is to visually commit so I only use the terminal when I have small changes.

Find Anything

Another huge feature is the search everywhere. I have this mapped to “command + t” to match Sublime but the original is a Double-Shift. This is way more powerful than Sublime though. You can find files, classes, actions and preferences. I really like the actions searching because I have a mental block and can never remember them. This is probably why I don’t enjoy VIM or anything else that requires me to learn key maps. As an example I like splitting the window so I just “command + t” type vertical and BAM the action shows and it splits. Maybe I want to diff the file, again command + t type annotate. These are huge time savers for me.

Terminal

The terminal integrated is brilliant. We use grunt for all our js and css and have a simple watch/reload task. So when I start editing I just open terminal run grunt watch and then open a new terminal tab for anything else I may need. Deploying, artisan, composer, etc.

Code Complete

PHP code completion is very nice but believe it or not I find the code complete in html and less way more beneficial. It works just as nice as the php auto complete and does a very good job filtering css classes to find the one you want without having to hunt it down. It also has great support for CoffeeScript (The ONLY way to write JS). :)

Themes and Interface

This is one area I do find frustrating at times. The default theme is Darcula and it is a huge improvement over previous versions and you can find a ton of themes at PhpStorm-Themes or my recent favorite Spacegrey. What frustrates me is the font adjustment and line-heights. Fonts typically look good at bigger sizes but when you set the size to 10 or 11 they just don’t feel crisp like Sublime. The line height is also crazy. You set it to 2.0 and then you get a monstrous cursor.

Tips

If you are currently using Sublime and want to try PhpStorm here are some tips I have. I would hide all the panels and just move in slowly. I started with just as a code editor and then slowly experimented with features until I found my ideal workflow. It has a huge number of features that I don’t understand and/or haven’t cared to fully investigate.

Expect it to be slower than Sublime. A lot goes on under the hood for finding things, auto completing, etc and it’s always going to be slower than sublime. I only really notice this at times but that first launch you will.

Laravel is my framework of choice and the code completion doesn’t work great with the facades. A work around is to add this composer package

"require-dev": {
    "barryvdh/laravel-ide-helper": "1.*"
},

Next go and watch some videos and read some posts that highlight features and show you tips you would otherwise miss.

All in all so far the features out weigh the annoyances I have so I am going to stick to using it for the foreseeable future. Big IDE’s aren’t for everyone but I encourage you to give a PhpStorm a chance. I think you might just like it.

The best1 help desk app Snappy is currently running a promotion that has the following prizes:

  • 2 Tickets to Laracon in NYC
  • 10 Laravel books, choose any one you like from Leanpub!

If you are interested in Laravel you should go sign up!


  1. Yes I’m biased. :) 

For whatever reason some modules don’t stay unpopular for long. Jacob Thorton, the creator of Twitter Bootstrap, calls this “the cute puppy syndrome”: where a developer creates a module because they want to. This is “buying the puppy”. Then suddenly, the module becomes exceptionally popular. It “becomes a dog”. And maybe you didn’t want a dog. Maybe all you wanted was a puppy. Suddenly the guilt piles up and doing what you love isn’t fun anymore.

I do not have any super popular open source projects but this whole articles rings true to me. This is one of the reasons I have so much respect for Taylor Otwell and Laravel. That guy is literally hammered with stuff all the time but he manages to keep his priorities in place and not let it overwhelm. Something I don’t think I would be able to do.

Write A Love Letter

The holidays are approaching fast and what better gift to give than a “love letter” to your loved ones. When I say love letter I’m not meaning the sappy kind that you are probably thinking about. No, I am talking about a letter from you to your family that outlines all the very personal important things they need to know in the event of your untimely death.

This is something much more personal than a legal contract such as a Last Will but would still be highly important to your family. I have seen a few examples of this letter but it’s easy enough that you do not need a template.

What I did was include three primary sections. The first a few paragraphs telling them what they mean to you, how much you love them, etc. The middle would have important private information about yourself. For me and I assume all my readers almost everything is in the computer so having the login and the password for 1password would be essential. These are the only two passwords they would need and from here could get access to pretty much anything. Then the final section describing how you want your funeral. Your favorite songs, favorite Bible verses, basically anything that would be important to you for your funeral.

For those that handle all/most of the finances it will be important to also have contact information on any of your advisors and any investment accounts. I have heard stories of families where one primarily handles all finances and the other not knowing or caring. This means if the one handles everything passes then the other will be in for a crazy life change. Anything you can do to make this easier would continue to show your love.

Finally, I would also start a journal if you haven’t. Three out of four of my grandparents have passed away and none of them kept a journal. Of course in my younger years this wouldn’t have meant anything to me but now as I’m getting older I would love to read all the stories they had. I’ve personally been using DayOne for the past year and it works well. It’s nice to have a place to keep your private thoughts, images of important events, and memories that would be forever lost otherwise.

Announcing Wardrobe

This site has always been my own little personal playground. I am constantly changing the design, the platform, and just experimenting.

Over the past few weeks I started building a brand new backend that I named Wardrobe. This was built from the ground up using Laravel 4, and Backbone.js with Marionette for the admin. The main goal was to create something minimal and simple to use.

Features

Even though it is minimal it still includes what I feel as the most critical features.

  1. Content
  2. Tagging
  3. Post Slugs
  4. Post Scheduling
  5. Post active/draft

Even though these are core features I only think content is a priority so everthing is hidden away but still quickly editable via the content toolbar.

Technologies

Because Laravel is awesome and very flexible I used that for the backend. The administration area is built using Backbone and Marionette to make everything feel super fast.

I have the luxury of being friends with the author Taylor so he made sure the backend was architecturally pure using service providers. Currently the backend only supports content stored in a database but because of the service providers swapping this out for flat files or some other service will be very easy.

I have used flat files with Jekyll and Statamic in the past but at the end of the day a database is so much easier to work with and I didn’t want to force a square peg in a round hole. :)

All the administration is written using CoffeeScript and follows a lot of the same principles as Brian Mann covers in his BackboneRails tutorials. I then use grunt to compile and concat everything.