Web Development
How to Create an On-Demand Feature for Your Alexa Skill
As 2020 was coming to a close and 2021 was just around the corner, I was finishing development of a new version of our skill for the Alexa smart speaker. It was a total re-write, and it changed the skill from being able to perform only a single intent (play our live stream) to providing a dialog-based menu of many intents to choose from. With the new skill, listeners can choose to either play our live stream, play our HD2 live stream, play the latest newscast recording, or play an on-demand. (One day I would like to add another intent: make a donation.)
How to use versioning with AWS Lambda and Alexa Skills Kit (ASK), a step by step guide
I learned a valuable lesson on the morning after submitting my latest Alexa skill for certification. I had an email from the Alexa certification team letting me know that their tests had failed. I thought that was odd because everything was working perfectly fine when I left work the previous day. I was using AWS Lambda to host the back-end code (within a Node.js environment) and hadn't set up the versioning system because I didn't know about it. [update: I'm now using the AWS CLI to locally host my code and push it to Lambda, which is what I recommend.
Migrating from Drupal 7 to Drupal 8: my experience, the many obstacles, and their solutions
You can't really call yourself a Drupal developer if your site is still on Drupal 7. Right? So it was high time for me to upgrade Dannix from D7 to D8. Here's how I did it, the problems I ran into, and what I did to overcome them.
Make your own conditional fields in Drupal 7 by "hacking" the hook_form_alter() function with JavaScript injection
When I needed a conditional field for a Drupal 7 content type, of course I just googled "drupal conditional fields" to see if a module exists. One did exist, but its D7 release came with a big, red flag warning any would-be downloaders that it's not supported any longer and is vulnerable to security issues. Instead of risking it on the entrerprise-level website, I decided to code up a solution myself. And I would use JavaScript inserted by the PHP code. Easy!
Exporting/migrating a Joomla website to Drupal7, with code
After building the new webiste for Kansas Public Radio using Drupal 7, I needed a way to export all of the old articles from our Joomla website to the new website. I could have experimented with the Feeds module for Drupal or another Joomla to Drupal solution, but our installation of Joomla was sooooo old and outdated that I couldn't trust anything. I decided to write my own bit of code.
Introducting: WowBox, a 3-dimensional HTML5 canvas plugin for jQuery
WowBox is a jquery plugin that adds some HTML5 canvass magic to any div on your website. With just a little bit of code, we can make some really super cool 3D effects.
Javascript, Jquery form validation using Functional Programming techniques
I just put this together for a little project at work today and thought I'd share it with the world.
The Reviews are In: Functional Programming in JavaScript "is AWESOME"
From the very beginning, the goal with Functional Programming in JavaScript was to strip the veneer off the language to expose its inner beauty and functional roots, a necessary step in helping the reader to fully understand both the language and the functional programming paradigm. And now that some reviews are coming in, it appears that the goal has been met.
Creating Podcast XML from Drupal content
I needed to create some podcasts for Kansas Public Radio, which uses the Drupal Content Management System (CMS). I couldn't find a satisfactory Drupal module that could create the RSS data that iTunes needs, so I had to come up with my own solution. IIRC, Drupal Feeds would have worked great but iTunes needs specific XML tags (i.e. <itunes:description>, <itunes:category>, etc) that Drupal Feeds couldn't provide. I also dried Drupal Views PHP but it was too buggy and I also couldn't get the code to output outside of the template.