Author: Nic Raboy

Getting Started with Vue.js Navigation Guards to Restrict Access to Routes

July 29, 2019 Nic Raboy

You might remember that I had written a tutorial titled, Simple User Login in a Vue.js Web Application, which demonstrated how to navigate between routes and check a variable to determine if a user should in fact be allowed to be on a particular route. This previous tutorial focused on applying logic after the user had already completed the navigation process, rather than during or prior. While this is a good introduction to becoming familiar with the Vue.js router, it isn't a realistic approach to handling user login and route restrictions.

The recommended approach is to use navigation guards, sometimes referred to as route guards.

In this tutorial, we're going to see how to use Vuex with Vue.js navigation guards to protect certain pages within the application from unauthorized access.

Read More

Chaining JavaScript Promises While Sharing Parent Data

July 17, 2019 (Updated) Nic Raboy

Typically when I'm working with RESTful APIs, the routes or endpoints return what I need, plus more, which would be too much data. However, recently I ended up working with an API where the responses were rather trim, resulting in the need to use many HTTP requests to various endpoints, rather than getting everything in a single request. To take it a step further, some of those HTTP requests depended on data from other requests creating a mess of asynchronous operations in JavaScript.

After consulting with my pal, Corbin Crutchley, we came up with a solution to what I needed, without creating chaos in my code. Remember, Corbin is a JavaScript professional, as demonstrated on the podcast we recorded together titled, Asynchronous JavaScript Development.

In this tutorial we're going to see how to chain JavaScript promises, but also use data from parent links in the promise chain with child links in the same promise chain.

Read More

TPDP Episode #29: Asynchronous JavaScript Development

July 8, 2019 Nic Raboy

The latest episode of The Polyglot Developer Podcast has just published, this time focusing on the use of callbacks, promises, and async / await, in JavaScript.

This episode titled, Asynchronous JavaScript Development, is the twenty-ninth episode to appear on the show and it features Corbin Crutchley, an expert JavaScript developer and open source maintainer.

If you've ever struggled with wrapping your head around working with remote resources or blocking tasks in JavaScript, this episode should clear things up.

Read More

Share Internet Between macOS and a Raspberry Pi Zero Over USB

July 1, 2019 Nic Raboy

If you're a fan of the Raspberry Pi, you might have stumbled upon my tutorial for interacting with a Raspberry Pi Zero using nothing more than a USB cable. If you recall, the standard Raspberry Pi Zero has no WiFi, no Bluetooth, and no Ethernet.

Alright, so let's assume that you're able to interact with your Raspberry Pi Zero. Now what? How do you update it, download new software, or work on some awesome projects that might require internet in some fashion?

Well, you could take a look at my tutorial titled, Three Simple Ways to get Online with a Raspberry Pi Zero IoT Device, or you could share the internet of your host computer without having to purchase any extra hardware.

In this tutorial we're going to see how to share the internet from our host device, assuming that host is macOS.

Read More

Image Cropping, Zooming, and Scaling with Angular and JavaScript

June 17, 2019 Nic Raboy

When building a web application there is a good chance you're going to need to work with images eventually, even if it is something as simple as allowing a user to upload a profile image. In theory this is a simple task, but in reality, your website theme is probably anticipating images of a certain resolution or aspect ratio. If the user tries to upload an image that doesn't meet your requirements, it might break your theme.

We're going to see how to include image manipulation capabilities in your Angular application using the popular cropperjs JavaScript package.

Read More

TPDP Episode #28: Coding Bootcamps vs Traditional Computer Science Degrees

June 10, 2019 Nic Raboy

I am pleased to announce that the 28th episode of The Polyglot Developer Podcast titled, Coding Bootcamps vs Traditional Computer Science Degrees, has been released to all of the major podcast networks!

In this episode I'm joined by Ben Nelson, founder of Lambda School, an increasingly popular coding bootcamp and an alternative approach to a Computer Science degree that you'd typically get at a four year or more institution. The topic that we discuss is around coding bootcamps in general, not limited to Lambda School, and how they could be beneficial for new developers attempting to enter the workforce.

Read More

Getting Started with Building Chatbots using AWS Lex and Node.js

June 3, 2019 Nic Raboy

Amazon and a lot of cloud vendors such as Microsoft and Google have services around machine learning (ML), artificial intelligence (AI), and virtual assistants. A popular one that might come to mind is Amazon Alexa, something I've written quite a few tutorials around over the years.

The concept around Alexa is simple. Provide the Alexa service some audio, have that audio converted into text or some other format that can be evaluated, execute some code, and respond with something to be spoken to the user. However, what if you didn't necessarily want to use a virtual assistant with audio, but integrate as part of a chat application in the form of a chatbot?

In this tutorial we're going to look at using Amazon Web Services (AWS) Lex, which is a service for adding conversational interfaces to your applications. If you're coming from an Amazon Alexa background, the concepts will be similar as AWS Lex shares the same deep learning technologies.

Read More