Surface Pro 6

surface pro 6

Every year during back to school time (July to September), stores would have great deals on laptops and mobile devices. This year was no exception. One of the best deals I’ve seen this year is the Microsoft Surface Pro 6. Costco is currently offering a price discount plus they will include both keyboard and pen. This deal starts at $799 for the i5, 128GB version.

Costco deal starting at $799

You would have to be a member to see this price. The higher model is also on sale for $999. I couldn’t justify the extra $200 for double the storage capacity from 128GB to 256GB plus the exclusive matte black color. I would have considered it if the storage performance was quicker. But through searching online, the performance of both for read speeds were identical. The write speeds however, is faster on the higher model. I was after the faster reads not writes though.

I have tried the Surface Pro 4 a few years ago. I love the form factor but there were some things that prevented me from keeping it. You can read about my post on the Surface Pro 4 here.

Anyway, the price made me want to check it out again. I went to a Microsoft store and checked them out. Externally, there has been no changes from the older models. All of the changes are internal. The big changes for me, are in the Intel processor. It is now using an i5-8250U chip (i7 model also available). This chip is now a quad-core processor with 8 threads running at only 15W. The base model also uses this chip and includes 8GB of RAM – unlike in the previous generations you would get a core-M with 4GB of RAM. These variants are not available for this generation. The i5 models are also fanless so you won’t hear any fans spinning.

Once again, I’m in love with the form factor. But as soon as I try to put it on my lap while in bed, the same issue occurs. What makes this form factor great is also what makes it not great – at least for my use case. That kickstand is a bit uncomfortable as it digs on my legs. The corner of the screen is now starting to be felt on my legs as well. One solution I found while using it in bed is rather than have my legs flat with the kickstand holding the device up, I raised my legs up and started to use it as the kickstand itself. I adjusted the Surface kickstand so that it’s almost 180 degrees from its normal position. This way, the kickstand is almost flat and not have to dig in to my legs. This works for some time until my legs start to get tired but it is a solution for me. This was one of the deal breakers last time I tried the Surface Pro.

I did a quick benchmark on the hard drive because I was curious to see the difference between the 256GB model. Here are my results from CrystalDiskMark.

128GB benchmark result

According to the Windows Central article, their test on the 256GB drive resulted in a 1632MB/s read and 814MB/s write. If they’re both sequential speeds then the read speeds are identical while the write speeds are slightly faster on the higher model.

I have been playing with it for a few weeks now. I installed my usual software and set up my development environment. I mainly use it for web development. Using Virtualbox and Vagrant to run a virtual machine. My IDE of choice is PHPStorm. I also run MySQL Workbench to connect to a database server running on the VM or on a remote server. With this workflow, the Surface handles it with no issue. PHPStorm does load a little slow but once open, it’s fine. The VM uses 2GB of RAM and it runs headless. Everything runs exceptional. And I could do some coding while in bed.

The hardware, in my opinion, is acceptable. The resolution it runs in is perfect for its size. The battery life is no issue for me although I tend to plug in whenever I can. While running on battery, the device still performs as well as plugged in. You can feel the back side getting warm but not too much. The weight is perfect. It is very portable and the form factor is just the best of its kind. There are other devices that are similar but I think Microsoft’s version is the best out of all of them. This is the PC version of an Apple product. Microsoft made the hardware and software and is fully optimized.

I am still on the fence of whether I should keep it or return it. Don’t get me wrong, but the device is a great. The sale price makes it even greater. But for my workflow, I would prefer to have more RAM and USB-C that allows me to charge the device. This is a 15W CPU so it shouldn’t be that difficult to do plus the port itself is small. I’ve seen 13″ laptops with full-size HDMI. I would love to run Ubuntu on this and after searching the Reddit community, people are having driver issues. My previous Dell Inspiron was easy to run Linux. Dell devices are mostly supported.

I have a Dell Inspiron 7386 on the way. I found a really good deal but I think the battery life stinks on it. Hardware specs are better and it’s cheaper. But we’ll see which one I’ll keep. Stay tuned for that post.

Laravel Homestead on Windows Issues

I really want to use Windows and Laravel Homestead as a dev environment so that I don’t have to keep pulling out my Macbook Pro when I’m at home. I have a 2015 iMac at home but I do want to utilize the better hardware on my PC. No matter how many times I try, I just can’t get it to work.

This post is meant for me to have notes on my latest attempts and results. Many seem to have success with Homestead and Windows. Laravel commands run fine but when it comes to NPM commands it just gives me problems.

The latest error is…

npm ERR! path /home/vagrant/myproject/node_modules/fsevents/build/Release/.deps/Users/eshanker/Code/fsevents/lib
npm ERR! code ETXTBSY
npm ERR! errno -26
npm ERR! syscall rmdir
npm ERR! ETXTBSY: text file is busy, rmdir ‘/home/vagrant/a1careportal/node_modules/fsevents/build/Release/.deps/Users/eshanker/Code/fsevents/lib’

npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2018-01-27T18_23_45_986Z-debug.log

Some solutions say to use sudo but you’re not really supposed to so I did the solution found at That did not work so I used sudo anyway and still a problem.

I ran the command with sudo, –no-bin-links, and –no-optional. I even followed suggestions from Still issues.

Once again, I have wasted an entire morning. I really want to use my PC hardware but don’t want to dual boot on Ubuntu. I have a spare Dell Inspiron running Ubuntu and I have my iMac and Macbook Pro. I guess I just want it to work. Oh well, when I get the itch to look into it again, I guess I’ll find another morning to waste time on it.

Update 2018-01-01: Problem Solved

I finally fixed the problem. I updated the package.json using code from another project. I noticed there was a new entry called “config”. I ended up copying the “scripts” and “config” section. Here’s what I have below.

"scripts": {
    "dev": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch-poll": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --watch-poll --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "hot": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
    "production": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
  "config": {
    "webpack": "node_modules/laravel-mix/setup/webpack.config.js"

Finally, Homestead works on Windows 10.

Developing on OSX Yosemite

I shared how I configured Windows 10 for my web development needs. In this post, I will share how I configured OSX Yosemite 10.10.5. I will be using Homebrew to install everything I need. This is a great package manager available on OSX that’s similar to apt-get on Debian and yum on Red Hat. So let’s get started.

Installing Homebrew

Make sure you are not using MAMP or something similar. It could affect the environment. Remove it before continuing. Ruby is used to install Homebrew. Ruby should already be installed by default on your Mac.

# install Homebrew
ruby -e "$(curl -fsSL"

# run update and upgrade
brew update
brew upgrade

# check installation
brew doctor

If you haven’t done any development on your Mac, it may ask you to install the command line developer tools. I would not only install but get Xcode as well just in case you’ll be using Xcode for other things. So click on the Get Xcode button to install both Xcode and the developer tools.

command line dev tools

This will open the App Store. Once installed, open XCode for the first time. It will ask you to agree to the terms and it will ask you to enter your password. If you don’t do this, it will ask you when you run your brew command until you do so. Afterwards, go back to terminal and press Return or run the process over. It will prompt you for your password. Hopefully you don’t have any errors when running brew doctor.

Installing PHP56

Homebrew does not have a default formula for PHP. A formula is what a repository is called in Homebrew. We need to add two.

brew tap homebrew/dupes
brew tap homebrew/php

With this, we can install PHP along with other options like PHP for Apache or Nginx. You can view the options with the following command.

brew options php56

I want to install PHP with the Mysql driver so I will use the following command. I’m not going to need a web server at the moment. PHP56 has a built-in one I can use.

brew install --without-apache --without-fpm --with-mysql php56

For some reason it wasn’t installing PHP56 so I had to run the install as follow.

brew install php56

If you read the long description after you install it, it explains more steps to set it up. I will also note it below.

Next we will update our $PATH so that we can use php command in terminal.

# bash
echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile

# allow for PHP CLI to use version from Homebrew
export PATH="$(brew --prefix homebrew/php/php56)/bin:$PATH"

. ~/.bash_profile

# very that php is running from /usrl/local/bin/php
which php

# check the version
php -v

If you don’t have a ~/.bash_profile, create one or use whatever file you’re using as the initialization file. It could be .bash_login or .bashrc.

Let’s set up a launch agent so that things will start automatically. We will create a folder in your Library folder called LaunchAgents. Then create symbolic links.

# create LaunchAgent folder
mkdir -p ~/Library/LaunchAgents

# create symbolic link for php
ln -sfv /usr/local/opt/php56/homebrew.mxcl.php56.plist ~/Library/LaunchAgents/

# autostart
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php56.plist

This is optional but if you’re going to develop using Laravel, then you will need mcrypt and composer.

# install mcrypt
brew install php56-mcrypt

# check/view modules and make sure mcrypt is there
php -m

# install composer
brew install composer

# check composer is installed
composer about

Install MySQL

Here are the commands to install MySQL using Homebrew.

# install mysql
brew install mysql

# set up autostart
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents/

# start the server
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist

# run secure install, just follow the prompts

Install Node and NPM

It’s really easy to install node and npm via homebrew.

# install node and npm
brew install node

# check the version of node and npm, also checks to see if it's installed
node -v
npm -v

Install RVM for Ruby

But Ruby is already installed with OSX. Yes it is but sometimes Apple will release newer versions at a later time and you may not be able to use new features. So to make things as flexible as possible, we’ll use rvm to handle different versions of Ruby. You can also use rbenv but this article we’ll be install rvm.

# you can append ruby=[version#] as well if you know the version # ahead of time
curl -L | bash -s stable --auto-dotfiles --autolibs=enable

It may give you a warning about .profile not existing (unless it already does) but if you’ve been using .bash_profile, make sure you add the contents of .profile into .bash_profile. It may look like this.

export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session$

# don't forget to source it
source ~/.bash_profile

# install ruby using rvm install [version]
rvm install 2.2

# select version and use it if it didn't do it automatically
rvm use --default 2.2

# check version and which one - should be in your home directory inside the .rvm directory
ruby -v
which ruby

# check which gem, should be inside .rvm using same version as selected above
which gem

# update gem and install bundler
gem update
gem install bundler

# install jekyll if you will use it
gem install jekyll

That’s pretty much what I do to get an development environment going on OSX. Of course I didn’t include all the tools I use for deployment – that’s another post in the future. Why go through all the trouble when there’s MAMP or packaged environments? Well, I tried MAMP and purchased a pro license a few years back. I just didn’t have the same control as I do with this setup. Maybe it has changed now but this works for me. I also played with Vagrant. I don’t really like Virtualbox much. Hopefully this helps some of you. Please check out I got some of the commands off this post.