Javascript / JQuery: Detecting the delete key

Recently I was using JQuery to detect when the delete key was pressed. I was having some issues getting it to work. I was listening to the “keypress” event, but the delete key was never detected.

$('html').keypress(function(e){
    if(e.keyCode == 46) {
        alert('Delete key pressed');
    }
});

After a bit of research I realized that “keyup” made more sense. “keypress” is for printable characters. “keydown” and “keyup” will capture all characters

$('html').keyup(function(e){
    if(e.keyCode == 46) {
        alert('Delete key pressed');
    }
});

I hope this helps someone else down the road that may be stuck on this.

Atom IDE: “EACCES, permission denied” error message

Atom IDE

EACCES, permission denied

That was the error message that I received when I was trying to update my Atom packages (I think it was linter-php). Basically, the updater was failing because it didn’t have permission to remove an old config file. The fix was simple enough. All I had to do was resign the permissions to my user by running the following command:

sudo chown -R `whoami` ~/.atom

Easy as that the permissions were fixed and the updater could do its thing again.

10 Thing I Learned From Writing My First Book

One of the last things I ever thought I would do in life was to write a book. I don’t consider myself a writer or an author. I’d much rather write code than prose. I’m also an atrocious speller (the post is likely evidence of that). Despite all those things, I actually did write a book and I’m proud to say that it has been read by thousands of people from around the world. It has been almost 2 years since Shopify Empire was released. I recently started working on an updated version. Sitting down to write again flooded my memory and made me reflect on the process of creating the book. Writing Shopify Empire was one of the largest growing experiences of my life. The following is a list of 10 things I learned from writing and publishing my first book. I hope that some of these points help an aspiring author out there.

1 – English is hard (for me)

I regularly make the joke that I’m fluent in many languages, but the ones I’m most comfortable with are ones that machines can understand. Putting my feeling and words on a page can be difficult for me. To be honest I’ve put making this post off for way too long. There is something permanent to published text. Code is fluid and can be (and should be) changed as bugs are found and as requirements change. Taking the time to sit down and write has always been a struggle to overcome. I imagine that this is just an area that I need to continually work on and eventually will find comfort in. Until that time, English is hard.

2 – Organize your thoughts and get to work

Knowing where to start a project is often one of the hardest parts of the project. I was fortunate in the fact that my book had an organic growth path. As SEO Manager for Shopify grew in popularity, so did the support request and questions from customers. Following suggestions from Tim Ferriss, in the Four-hour work week, I created a series of canned email that supported common questions. I then took those canned emails and added more context to them and created a FAQ page for the app. The FAQ page grew into a series of support articles. At some point, I realized that the support articles were becoming less focused on SEO Manager, and more about SEO best practices for the Shopify platform. I eventually realized that I had enough content for a short eBook on the subject. The content was already semi-organized into topics. When I decided to take the plunge and create a book I realized that the content I had written could be used, but not directly plugged in.  

I created a Google doc with the major themes I wanted to touch on, along with concepts I wanted to teach in a chapter. After that, I sorted the chapters and sections into a logic order. Having this outline acted like a master list of things that needed to be written.

3 – Just keep writing

Having the list was helpful but also burdensome to look at – so much work. I approached the writing as I would approach building an app. I broke it down into smaller manageable pieces instead of taking it all on at once. Often times I would randomly pick a subsection to work on – whatever grabbed my attention and was on my mind. Once it was finished I would check it off the list. I wouldn’t worry about the flow between the sections, just focus on the point of getting my ideas down and focused on the subject matter. This lead to a much longer editing process (more on that later), but it granted me the ability to take on a project that would have been insurmountable if I focused on the big picture. When I write an app, I have a motto of “at least one code commit a day”. The constant forward momentum no matter how small is still forward progress and adds up over time.

4 – Use diagrams / examples when you can

During the writing process, I found myself trying to describe concepts that could be best demonstrated with diagrams and charts. At first, when I would come to a point where a chart could be used I would open up photoshop or other tools and start. This pulled me out of the writing process and I would lose my flow. Finally, I started to insert placeholders, like I would in my code when I write apps. Something that tells me to come back and do this later, but for now leave it and keep moving.

I found that screen capture images with callouts to specific buttons and area really gave impact to what I was describing on a page. I went through a few iterations of images during the editing process. Sometimes I went overboard with charts, graphs, and images. Finding the right balance to complement but not overwhelm was key. As they say, “a picture is worth a thousand words”. I would add “when done properly”.

5 – Editing is brutal

I’ve said it before and I stand by it, the editing process for this book was worse than the worse code review I have ever gone through. As covered above, the written English language is not a strong point for me. I will agree that the editing of Shopify Empire made me better, but damn it was hard! To edit, I would print out the book and take a red pen to it. I would read through every page, marking it up as a went. Often times with no computer in sight. I would go to locations with minimal distractions like a quiet park and read and redline. Sometimes I would make notes to myself in the margins. Once I finished the paper edits I would update the digital version and print it out again. The cycle of analog to digital would then restart. I did this 12 times before I felt that I was ready to send it to a real editor.

I searched for editors online but was blown away by the prices. Being 100% bootstrapped, I didn’t have 10 thousand dollars to throw at editing. I started to ask around and see if I knew anyone that could help out. As luck had it, my very good friend Rhian is an excellent writer and had some availability and was willing to take on the project. I had helped Rhian with some Shopify work, so she was familiar with the platform and had also used SEO Manager before. It was a great fit.

After the 12 rounds of edits that I did myself, I thought the final edits would be a quick process. I WAS WRONG. After Rhian’s first pass through the manuscript, I was blown away by how bad my writing skills were. It was so overwhelming that instead of making full book editing passes, the book had to again be broken down into smaller more manageable chunks. In some cases, we went through the book, paragraph by paragraph in the same room.

The most jarring portion of the editing process came when Rhian suggested that I drop an entire chapter from the book. I defended the chapter stating that it had taken me weeks to write and was the more difficult section of the book to articulate. Her response “I can tell, it doesn’t flow with the other portions of the book. It feels forced. It doesn’t add much value to the overall book. It needs to go”. I knew that there was some part of the book that was going to be trimmed down, but 27 consecutive pages, about 12% of the overall book, was something I didn’t expect!

Controlling my ego during the editing process was more difficult than watching the pages get removed. From a logical standpoint I knew that the book would be better for it, but at the same time, it emotionally felt very personal, like my work wasn’t good enough, like I wasn’t good enough. It was a struggle and a true exercise in managing my emotions. Thanks to Tim Ferriss, I had recently been reading some stoic philosophy. I’m sure some of those lessons helped me get through it.

Overall about 25% of the book was cut or drastically altered. This felt like a high number until a realized that this is fairly common in the non-fiction industry. I’m VERY happy with the end result and wouldn’t change a thing. The book and I are both better for it. The editing process went so well that Rhian joined me at venntov as my partner and COO. Talk about a win-win situation!

6 – Shut up and ship – it’s never “done”

Like all passion projects, this book could have gone on forever. I could have written more. It could have been edited more. I could have tested it with more focus groups. I could have done a million things that would have kept the book from going to press. Defining “done” is a difficult thing to do. Without having a finish line to cross there is no end to the race. When it comes to software development I have a motto I live by, “shut up and ship”. Simply but, make it happen. As my good friend JC once told me, “Don’t talk about it, be about it.” It was hard to call it done, but it had to become “real” at some point.

7 – You can outsource the cover art

When I had the book almost finished I started to think about the cover artwork. I’m dangerous with photoshop but I’m no graphic designer. I had budgeted some money to this portion of the project knowing that artwork is usually never cheap. I started to look around online for book cover artists and discovered the world of pre-make book covers. Sure a pre-made book cover might not be as cool as an original design, but when you are on a budget and you aren’t too particular they can be an amazing resource and at under $100, you can’t beat the price. I used a service called “Go On Write. For a small fee, the designer customized the cover with my name book title and tagline. I actually bought 6 covers and did some testing with friends, family and a few close customers. The winning cover became the cover of the book. It was the easiest portion of the book publishing process.

One of the covers that didn’t make it.

8 – Publishing is easy

When I started writing my book, I knew that I wanted to self-publish it. My original plan was to create and sell an eBook so I wouldn’t have to worry about physical inventory. Some of my other projects in the past involved physical inventory and it was always a mess to manage. Once I started to print the book out to manually edit it, I realized that I liked holding the paper in my hand and reading the words off a page. The book took on a different feeling. I know this is a bad comparison but it like knowing you’re going to be a parent, then holding your baby for the first time. I knew that I needed to have the book printed. I again started doing my research into self-publishing and came across Create Space.

Create Space makes the book publishing process easy by allowing you to download a word document template and a cover graphics template. After you have them filled out, you simply upload them into the system and order some books. The book proofs were delivered within a few days. It took a couple rounds of adjusting things to get the book layout just right. I actually redline edited the printed book also once it came, making note of all the little areas that could be changed to present things better in a physical book format. Once it was all done. A few clicks later and I had a case of books on their way to my office.

 

Create Space is owned by amazon, so they made it very easy to get Shopify Empire onto Amazon.com.

Selling the eBook version on Amazon Kindle and Apple books was also easy. I paid Create Space some money to have the book translated into kindle format and sold on Amazon.com. For Apple, I paid someone on fiverr to translate the book into the format that Apple wanted.

Once the books were on Amazon, Kindle, and Apple books, I opened a Shopify store – https://ShopifyEmpire.com. I used Shopify’s Digital Downloads app to sell PDF versions of the books, and I manually packed and shipped physical book orders from my office.

Overall getting my book into formats that people could consume was fun and somewhat easy to do. When I release a new version of my book, I will most likely follow these same steps.

9 – Books are magic

I’ve written and released dozens of programs and apps over my career. I expected this book release to be similar to an app release – I was dead wrong. I’ve learned that people react very differently to apps and books. These days, everyone uses programs and apps, but there is a disconnect from them. Apps are generally easy to install and use. How they work doesn’t concern most people. For the most part, apps are magical things, written by anonymous geeks who are part of “The Cloud”.

Most people understand what books are, what goes into them, and they understand the struggle of the writing process. Not everyone is a “writer” but most people write all the time – work reports, school work, text messages, emails, blog posts, Facebook posts, etc, so they can better appreciate books.

I can’t count the number of people who congratulated me on writing a book. I watched people connected with the folded pieces of paper in a way that I’ve never seen someone interact with my mobile apps or web projects.

My biggest surprise came when I was @ mentioned in a tweet from Daymon John, the man behind the hit show Shark Tank.

If you have a @Shopify store this is a MUST READ. @JoshHighland #SharkTools – Daymond John

I was also shocked to find that his tweet endorsing my book went to his Twitter, Facebook, and Instagram accounts. The message was sent to over a million people.

Entrepreneurs the world over would kill to be on Shark Tank or positively mentioned by one of the Sharks. To this day I am unsure of the situations that lead to Daymond John publicly endorsing my book. All I know is that I am extremely grateful and blessed that it happened. The other books that he has endorsed have helped shape me into the person I am today. It still blows my mind to see my book alongside Tim Ferriss, Gary Vaynerchuk, Malcolm Gladwell, Eric Ries, and Guy Kawasaki.

Apps may power the world, but BOOKS ARE MAGIC!

10 – Everyone should do it

It’s pretty common for an author to encourage everyone to write a book. I’m not an exception. I think everyone should do it, but do it for the right reasons. I wrote a book to stretch myself and to better help people understand a subject that I’m passionate about. I went into this effort with a budget, knowing that it was most likely going to cost me more than I made. Money wasn’t the motivation for me, neither was notoriety. I had zero expectations. It was a hobby. Not having expectations made the process fun, even though it was tough.

Before you write a book ask yourself these questions:

  • “Why do I want to write a book?”
  • “What am I hope to gain from writing a book?”
  • “Will this book help other people?”

If you can come up with honest answers to these questions, I think you should write a book.

As with many things, writing is a skill and something that I still struggle with, but it hasn’t stopped me and it shouldn’t stop you. LET’S DO THIS!

Becoming an Author – The launch of Shopify Empire

Shopify Empire SEO

 

Shopify Empire SEO BookWell, I did it. I wrote and released a book. “Shopify Empire” went live a few weeks ago and it’s been a whirlwind sense then.

I’ve written and released dozens of apps over my career. I expected this book release to be similar to an app release – I was wrong. I’ve learned that people react very differently to apps and books.

Almost everyone uses computers and apps everyday, but there is a disconnect from them. Apps are generally easy to install, and use. How they work, most people couldn’t tell you. Most people don’t write code, even less write SaaS products. For the most part, apps are magical things, written by anonymous geeks.

I think that most people understand what books are, what goes into them, and they understand the struggle of the writing process. Not everyone is a “writer” but most people write all the time – work reports, school work, text messages, emails, blog posts, Facebook, etc, so they can better appreciate books.

I’ve never thought of myself as a writer. I have a lot of thought and opinions, but putting them into written form has always been difficult for me. I’ve done a fair amount of public speaking, video, and podcasting, but always avoiding the written form whenever possible. To be completely honest the real magic happened during the editing process. It was basically worse than the worse code review I have even been through, but in the end the book is MUCH better for it, as am I.

Josh Highland book signingOne of my reasons for writing this book was to push myself to grow in a new direction. I think it’s done that in a major way. The process for me was much more difficult than creating an app, and oddly just as satisfying. I might not be the best writer in the world, but I no longer can make excuses to avoid writing and generating content.

I’m very grateful for the outpouring of support I have received. In the few short weeks that the book has been out, I’ve already been a guest on a Shopify podcast, done an #AMA event, and even did some book signing. I’m excited to see what the future holds as Shopify Empire gets into the hands of more people.

You can find Shopfy Empire at