<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: April Speight</title>
    <description>The latest articles on DEV Community by April Speight (@aprilspeight).</description>
    <link>https://dev.to/aprilspeight</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F455958%2F6a7d807f-2549-4617-8f47-02c71abbf133.png</url>
      <title>DEV Community: April Speight</title>
      <link>https://dev.to/aprilspeight</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aprilspeight"/>
    <language>en</language>
    <item>
      <title>Daily News Report with Bing News Search and Twilio SMS</title>
      <dc:creator>April Speight</dc:creator>
      <pubDate>Mon, 16 Nov 2020 20:56:31 +0000</pubDate>
      <link>https://dev.to/azure/daily-news-report-with-bing-news-search-and-twilio-sms-4g46</link>
      <guid>https://dev.to/azure/daily-news-report-with-bing-news-search-and-twilio-sms-4g46</guid>
      <description>&lt;p&gt;This article is part of &lt;a href="http://aka.ms/PythonFunBites"&gt;#PythonFunBites&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;When I decided to shift my career focus to Extended Reality (XR), I had only brushed the surface of what was happening in the industry. I knew that if I wanted to get more comfortable speaking about hot-topics and industry trends, I had to stay up to date on the latest news. I personally don't keep up with tech news sites so I had to find a way that would keep me informed without the need to engage on yet another social media platform. That's when I had the idea to bring the news to me! Rather than seek new articles, I figured I could automate the process instead.&lt;/p&gt;

&lt;p&gt;Using Python, &lt;a href="https://docs.microsoft.com/en-us/azure/azure-functions/functions-overview/?WT.mc_id=python-10758-apspeigh"&gt;Azure Functions&lt;/a&gt;, &lt;a href="https://docs.microsoft.com/en-us/azure/cognitive-services/bing-news-search/search-the-web/?WT.mc_id=python-10758-apspeigh"&gt;Bing News Search&lt;/a&gt;, and &lt;a href="https://www.twilio.com/sms"&gt;Twilio SMS&lt;/a&gt;, I created a daily SMS that sends me the latest articles related to XR. Check out how I made it below!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Requirements&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python 3.7 or newer&lt;/li&gt;
&lt;li&gt;An Azure subscription - sign up to &lt;a href="https://azure.microsoft.com/en-us/free/?WT.mc_id=python-10758-apspeigh"&gt;create a free account&lt;/a&gt;!&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://code.visualstudio.com/download"&gt;Visual Studio Code&lt;/a&gt; (also install the &lt;a href="https://marketplace.visualstudio.com/items?itemName=ms-python.python"&gt;Python&lt;/a&gt; and &lt;a href="https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions"&gt;Azure Functions&lt;/a&gt; extensions)&lt;/li&gt;
&lt;li&gt;A smartphone with an active number&lt;/li&gt;
&lt;li&gt;A &lt;a href="https://www.twilio.com/referral/46BROd"&gt;Twilio account&lt;/a&gt; (be sure to purchase a phone number and validate your personal number)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Tutorial
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Create a Project Folder and Open in Visual Studio Code
&lt;/h3&gt;

&lt;p&gt;Create a folder to store all the project files and save to your preferred location. In Visual Studio Code, open the folder by navigating to &lt;strong&gt;File&lt;/strong&gt; &amp;gt; &lt;strong&gt;Open&lt;/strong&gt; (&lt;code&gt;Ctrl+o/Cmd+o&lt;/code&gt;).&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Sign in to Azure in Visual Studio Code
&lt;/h3&gt;

&lt;p&gt;In the left Activity Bar of Visual Studio Code, click on the Azure icon to open the Azure view. Select &lt;strong&gt;Sign In to Azure&lt;/strong&gt;. You will be taken to the browser to sign-in. Enter the credentials to your Azure account. Back in Visual Studio Code, you can confirm whether you're signed in if your username appears in the Status Bar.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Create a Bing Resource
&lt;/h3&gt;

&lt;p&gt;In the &lt;a href="https://portal.azure.com"&gt;Azure Portal&lt;/a&gt;, navigate to &lt;strong&gt;Create a resource&lt;/strong&gt;. In the search bar, search for &lt;strong&gt;Bing Search v7&lt;/strong&gt;. Select the resource and click &lt;strong&gt;Create&lt;/strong&gt;. On the Create page, enter/select the following:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Name&lt;/strong&gt;: Name of the resource&lt;br&gt;
&lt;strong&gt;Subscription&lt;/strong&gt;: Your Azure subscription&lt;br&gt;
&lt;strong&gt;Pricing Tier&lt;/strong&gt;: Free (if available, otherwise select your preferred pricing)&lt;br&gt;
&lt;strong&gt;Resource Group&lt;/strong&gt;: Either create a new resource group or select an existing one.&lt;br&gt;
&lt;strong&gt;Region&lt;/strong&gt;: Location where the function is used&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--p0ysZM-w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9gtra73mrxdfng3bp34r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--p0ysZM-w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9gtra73mrxdfng3bp34r.png" alt="A screenshot of the Create page for the Bing Search v 7 resource."&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  4. Install Azure Functions Core Tools
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=windows%2Ccsharp%2Cbash#v2/?WT.mc_id=python-10758-apspeigh"&gt;Azure Functions Core Tools&lt;/a&gt; enables you to create and test Azure Functions from the command line or terminal prompt. &lt;a href="https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=windows%2Ccsharp%2Cbash#v2/?WT.mc_id=python-10758-apspeigh"&gt;Review the docs&lt;/a&gt; to determine the proper installation process according to your OS.&lt;/p&gt;

&lt;p&gt;To verify whether Azure Functions Core Tools is instead, run the command &lt;code&gt;func&lt;/code&gt; in the Visual Studio Code integrated terminal (&lt;code&gt;Ctrl+~&lt;/code&gt;). If Azure Functions Core Tools is successfully installed, the Azure Functions logo appears in the terminal (you may need to scroll up to see).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jKPMOdwk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/k5i1rudb2tw5l261cyrr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jKPMOdwk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/k5i1rudb2tw5l261cyrr.png" alt="A screenshot of the terminal in Visual Studio Code. The Azure Functions logo appears after entering the command func."&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  5. Create a New Project
&lt;/h3&gt;

&lt;p&gt;In the Azure view, click the &lt;strong&gt;Create New Project&lt;/strong&gt; icon. Visual Studio Code takes you through a workflow to create a new project. Enter/select the following for each step:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Folder&lt;/strong&gt;: Folder created earlier in the tutorial&lt;br&gt;
&lt;strong&gt;Language&lt;/strong&gt;: Python&lt;br&gt;
&lt;strong&gt;Python alias or Full Path&lt;/strong&gt;: Your Python interpreter&lt;br&gt;
&lt;strong&gt;Template&lt;/strong&gt;: Timer Trigger&lt;br&gt;
&lt;strong&gt;Function Name&lt;/strong&gt;: Name the function whatever you'd like&lt;br&gt;
&lt;strong&gt;CRON expression&lt;/strong&gt;: 0*/1**** (this runs the functions every minute)&lt;/p&gt;

&lt;p&gt;After Visual Studio Code creates the function, a few files are added to the project folder. The &lt;em&gt;&lt;em&gt;init&lt;/em&gt;.py&lt;/em&gt; file opens in the editor.&lt;/p&gt;

&lt;p&gt;Make sure to activate the virtual environment if Visual Studio Code does not do so for you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Windows&lt;/strong&gt;: &lt;code&gt;.venv\Scripts\activate&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Mac/Linux&lt;/strong&gt;: &lt;code&gt;source .venv/bin/activate&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  6. Install and Import Required Modules
&lt;/h3&gt;

&lt;p&gt;Install the following modules:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Python-dotenv&lt;/strong&gt; (access environment variables): &lt;code&gt;pip install python-dotenv&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Requests&lt;/strong&gt; (for GET requests to Bing News Search API): &lt;code&gt;pip install requests&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Twilio Python Helper library&lt;/strong&gt;: &lt;code&gt;pip install twilio&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;At the top of the &lt;em&gt;&lt;em&gt;init&lt;/em&gt;.py&lt;/em&gt; file, enter the following import statements:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import datetime
import logging
import azure.functions as func
import json
import requests
from twilio.rest import Client
from dotenv import load_dotenv
load_dotenv()
import os
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  7. Create and Access Environment Variables
&lt;/h3&gt;

&lt;p&gt;In the Explorer view (&lt;code&gt;Shift+Ctrl+e/Shift+Cmd+e&lt;/code&gt;), create a new &lt;em&gt;.env&lt;/em&gt; file at the root of the folder. In the &lt;em&gt;.env&lt;/em&gt; file, enter the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;TWILIO_ACCOUNT_SID=&amp;lt;Replace with Twilio Account SID&amp;gt;
TWILIO_AUTH_TOKEN=&amp;lt;Replace with Twilio Auth Token&amp;gt;
MY_TWILIO_NUMBER='&amp;lt;Replace with your Twilio phone number&amp;gt;'
RECEIVER_NUMBER='&amp;lt;Replace with your personal phone number&amp;gt;'
BING_SUBSCRIPTION_KEY=&amp;lt;Replace with your Bing Search v7 resource subscription key&amp;gt;
BING_ENDPOINT=https://api.bing.microsoft.com/v7.0/news/search
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace the values with your credentials. All Twilio credentials and phone numbers are accessible in the &lt;a href="https://www.twilio.com/console"&gt;Twilio Console&lt;/a&gt;. The Azure credentials are available in the &lt;a href="https://portal.azure.com"&gt;Azure Portal&lt;/a&gt; within the Bing Resource.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: Be sure to include the country code before the phone number. Ex: +13235555555&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In the &lt;em&gt;&lt;em&gt;init&lt;/em&gt;.py&lt;/em&gt; file, enter the following below the import statements:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;account_sid = os.getenv("TWILIO_ACCOUNT_SID")
auth_token = os.getenv("TWILIO_AUTH_TOKEN")
my_twilio_number = os.getenv("MY_TWILIO_NUMBER")
receiver_number = os.getenv("RECEIVER_NUMBER")
subscription_key = os.getenv("BING_SUBSCRIPTION_KEY")
my_endpoint = os.getenv("BING_ENDPOINT")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  8. Create Bing New Search GET Request
&lt;/h3&gt;

&lt;p&gt;In the &lt;em&gt;&lt;em&gt;init&lt;/em&gt;.py&lt;/em&gt; file within the &lt;code&gt;main&lt;/code&gt; function, enter the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;'''
    This sample makes a call to the Bing News Search API with a text query and returns relevant news webpages.
    Documentation: https: // docs.microsoft.com/en-us/azure/cognitive-services/bing-web-search/
    '''
    query = "&amp;lt;Replace a search term. Ex: Microsoft&amp;gt;"

    # Construct a request
    mkt = 'en-US' # change if necessary
    params = {'q': query, 'mkt': mkt}
    headers = {'Ocp-Apim-Subscription-Key': subscription_key}

    # Call the API

    response = requests.get(my_endpoint, headers=headers, params=params)
    response_json = response.json()

    title = response_json['value'][1]['name']
    description = response_json['value'][1]['description']
    article_url = response_json['value'][1]['url']
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  9. Create Twilio Message
&lt;/h3&gt;

&lt;p&gt;Below the block of code for the Bing News Search GET request, enter the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Twilio account credentials
    twilio_client = Client(account_sid, auth_token)


    message = twilio_client.messages \
        .create(
            body=f"Title: {title} \n\n {description} \n\n {article_url}",
            from_=my_twilio_number,
            to=receiver_number
        )

    print(message.sid)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Note: Feel free to update the message body!&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  10. Add Requirements to &lt;em&gt;requirements.txt&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;Update the &lt;em&gt;requirements.txt&lt;/em&gt; file with the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;azure-functions
requests
twilio
python-dotenv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  11. Run in the Debugger
&lt;/h3&gt;

&lt;p&gt;You can now test the function! Before you proceed, make sure that the &lt;em&gt;&lt;em&gt;init&lt;/em&gt;.py&lt;/em&gt; file reflects the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import datetime
import logging
import azure.functions as func
import json
import requests
from twilio.rest import Client
from dotenv import load_dotenv
load_dotenv()
import os

account_sid = os.getenv("TWILIO_ACCOUNT_SID")
auth_token = os.getenv("TWILIO_AUTH_TOKEN")
my_twilio_number = os.getenv("MY_TWILIO_NUMBER")
receiver_number = os.getenv("RECEIVER_NUMBER")
subscription_key = os.getenv("BING_SUBSCRIPTION_KEY")
my_endpoint = os.getenv("BING_ENDPOINT")

def main(mytimer: func.TimerRequest) -&amp;gt; None:

'''
    This sample makes a call to the Bing News Search API with a text query and returns relevant news webpages.
    Documentation: https: // docs.microsoft.com/en-us/azure/cognitive-services/bing-web-search/
    '''
    query = "&amp;lt;Replace with a search term. Ex: Virtual Reality&amp;gt;"

    # Construct a request
    mkt = 'en-US' # change if necessary
    params = {'q': query, 'mkt': mkt}
    headers = {'Ocp-Apim-Subscription-Key': subscription_key}

    # Call the API

    response = requests.get(my_endpoint, headers=headers, params=params)
    response_json = response.json()

    title = response_json['value'][1]['name']
    description = response_json['value'][1]['description']
    article_url = response_json['value'][1]['url']
    # Twilio account credentials
    twilio_client = Client(account_sid, auth_token)


    message = twilio_client.messages \
        .create(
            body=f"Title: {title} \n\n {description} \n\n {article_url}",
            from_=my_twilio_number,
            to=receiver_number
        )

    print(message.sid)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Start the Debugger by navigating to &lt;strong&gt;Run&lt;/strong&gt; &amp;gt; &lt;strong&gt;Start Debugging&lt;/strong&gt; (&lt;code&gt;F5&lt;/code&gt;). The first time you run the Debugger, Visual Studio Code prompts you to select an Azure Storage Account. Follow the prompts to create a storage account (or use one that you may already have created).&lt;/p&gt;

&lt;p&gt;After the storage account is created/selected for the function, Visual Studio Code starts the debugger. If you receive an error, stop the debugger and enter &lt;code&gt;func host&lt;/code&gt; into the terminal.&lt;/p&gt;

&lt;p&gt;You should receive a SMS generated every minute to your phone if all is successful. If you do not receive a message, review all of the steps to check what may have been missed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QQtKPTf2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/lt70oiwqc77s13l58z74.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QQtKPTf2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/lt70oiwqc77s13l58z74.png" alt="A screenshot of the S M S generated by the Azure function. The S M S provides a news article about Microsoft."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  12. Update the CRON Expression
&lt;/h3&gt;

&lt;p&gt;You're just about ready to deploy the function to Azure! But just before you do that, update the &lt;a href="https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-timer?tabs=csharp#ncrontab-expressions/"&gt;CRON expression&lt;/a&gt; in the &lt;em&gt;function.json&lt;/em&gt; file. By default, the Azure Function uses the UTC timezone. Therefore, you need to set a time in that timezone that equates to 9AM in your specific timezone. Since I'm in California, I follow Pacific Daylight Time. Therefore, my CRON expression for everyday at 9AM would be: 0 * 17 * * *. For those on the East Coast, the CRON expression would be: 0 * 14 * * *.&lt;/p&gt;

&lt;p&gt;If you fall outside either of those timezones, you can use a &lt;a href="https://www.timeanddate.com/worldclock/converter.html"&gt;time zone converter&lt;/a&gt; to figure out the equivalent to 9AM for UTC in your time zone.&lt;/p&gt;

&lt;h3&gt;
  
  
  13. Deploy to Azure
&lt;/h3&gt;

&lt;p&gt;You're now ready to deploy the function to Azure! In the Azure view, select the deploy icon (it's an up arrow). Visual Studio Code provides a workflow to complete deployment. Enter/select the following for each step of the workflow:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Select Function App&lt;/strong&gt;: Create new Function App in Azure&lt;br&gt;
&lt;strong&gt;Globally Unique Name&lt;/strong&gt;: Provide a unique name for the function&lt;br&gt;
&lt;strong&gt;Version of Python&lt;/strong&gt;: Select the version that was selected earlier when creating the function&lt;br&gt;
&lt;strong&gt;Location for New Resources&lt;/strong&gt;: Select the location selected for the storage account&lt;/p&gt;

&lt;p&gt;Azure then begins to deploy the function. After the function is deployed, you can anticipate receiving a SMS at your desired time interval. If you need to modify anything related to the function, you can do so within the project files in Visual Studio Code.&lt;/p&gt;

&lt;p&gt;Need to stop the function? You can do so in the &lt;a href="https://portal.azure.com"&gt;Azure portal&lt;/a&gt;. Navigate to &lt;strong&gt;Resource Groups&lt;/strong&gt; and select the resource group used for the function. Select &lt;strong&gt;Delete resource group&lt;/strong&gt; and follow the instructions to delete the resource.&lt;/p&gt;

&lt;p&gt;And that's it! If you're feeling a little shaky on Azure Functions or would like to learn more about the service, check out the &lt;a href="https://docs.microsoft.com/en-us/learn/modules/create-serverless-logic-with-azure-functions/?WT.mc_id=python-10758-apspeigh"&gt;Microsoft Learn module&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Watch for content on all things Python at Microsoft between the 16th and 20th of November. Stay tuned here at dev.to for all kinds of content ranging from IoT, to Machine Learning and much more! 🐍&lt;/p&gt;

</description>
      <category>pythonfunbites</category>
      <category>azure</category>
      <category>python</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Development Platforms for XR</title>
      <dc:creator>April Speight</dc:creator>
      <pubDate>Fri, 18 Sep 2020 17:06:57 +0000</pubDate>
      <link>https://dev.to/aprilspeight/development-platforms-for-xr-556j</link>
      <guid>https://dev.to/aprilspeight/development-platforms-for-xr-556j</guid>
      <description>&lt;p&gt;Whether you prefer an engine or directly using APIs, there's a solution for you to discover and try when building AR, VR or MR apps! However, before we dive into platforms, let's talk languages.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which Programming Language(s) Should You Know?
&lt;/h2&gt;

&lt;p&gt;When I started out with XR development, I only knew Python. Having an understanding of another programming language was relatively helpful given that I had to learn a new language. The languages used in XR development are C#, C++, or JavaScript. I personally chose the C# route since I prefer to use Unity for my development. If you're new to C#, I would suggest starting with the &lt;a href="https://docs.microsoft.com/learn/paths/csharp-first-steps/?WT.mc_id=mixedreality-devto-apspeigh"&gt;Take Your First Steps with C#&lt;/a&gt; learning path on Microsoft Learn. If you're more of a visual learner, check out the &lt;a href="https://channel9.msdn.com/Series/CSharp-101/?WT.mc_id=mixedreality-devto-apspeigh"&gt;C# 101&lt;/a&gt; video series available on Channel 9.&lt;/p&gt;

&lt;p&gt;Codecademy has a &lt;a href="https://www.codecademy.com/learn/learn-c-plus-plus"&gt;C++ course&lt;/a&gt; available for beginners in which I'd recommend giving a try. However, JavaScript isn't a bad choice either! I opted for learning JavaScript on &lt;a href="https://www.codecademy.com/learn/introduction-to-javascript"&gt;Codecademy&lt;/a&gt; as well.&lt;/p&gt;

&lt;p&gt;Whether you choose C#, C++, or JavaScript may be a matter of comfort. What do I mean by comfort? Well, which language are you more comfortable with learning? I personally started with C# and then learned JavaScript. Although I still prefer C#, that may very well have been influenced by the fact that I prefer Unity scripting for development. So with that in mind, let's talk about Unity!&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Unity?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://unity.com/"&gt;Unity&lt;/a&gt; is a real-time development platform that's great for creating 2D, 3D, AR &amp;amp; VR experiences. Like learning any new technology platform, the learning curve can be relatively steep if you've never used the platform for development. Fortunately, Unity provides a &lt;a href="https://learn.unity.com/"&gt;Learn&lt;/a&gt; platform that's pretty helpful for getting familiar with the interface as well as &lt;a href="https://learn.unity.com/project/beginner-gameplay-scripting"&gt;Unity Scripting&lt;/a&gt;. You can also choose to focus on specific areas of Unity development if you're already familiar with the platform. My advice would be to start with learning how to create for 2D first and then transition to 3D. C# knowledge comes in handy here given that you'll use C# for Unity scripting.&lt;/p&gt;

&lt;p&gt;Alas, Unity isn't the only engine available. There's also Unreal.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Unreal?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.unrealengine.com/en-US/"&gt;Unreal&lt;/a&gt; is real-time engine for 3D development. More often, I find that XR developers prefer one platform over the other. Unreal provides a variety of free &lt;a href="https://www.unrealengine.com/onlinelearning-courses"&gt;online learning courses&lt;/a&gt; for getting started with the platform. Their written documentation in the &lt;a href="https://docs.unrealengine.com/Engine/Editor/index.html"&gt;Unreal Editor Manual&lt;/a&gt; is also pretty extensive as well for getting started. C++ comes in handy here given that you'll use C++ for Unreal scripting.&lt;/p&gt;

&lt;p&gt;Although I prefer to stick with Unity, I can honestly say that I've at least given Unreal try. However, I believe I'm biased because it took me a while to get used to Unity and now I couldn't imagine starting over. You may certainly have a different experience so definitely consider an intro course for both engines before settling on one.&lt;/p&gt;

&lt;p&gt;But if working with a game engine and getting to know the UI isn't your cup of tea, there's always the web!&lt;/p&gt;

&lt;h2&gt;
  
  
  What Options are Available for the web?
&lt;/h2&gt;

&lt;p&gt;Love options? Great - because there are plenty! For starters, if JavaScript is your preferred programming language, then web may be just right for you. There are a few JavaScript libraries available to build 3D experiences:&lt;br&gt;
    • &lt;a href="https://doc.babylonjs.com/"&gt;Babylon.js&lt;/a&gt;&lt;br&gt;
    • &lt;a href="https://aframe.io/"&gt;A-Frame&lt;/a&gt;&lt;br&gt;
    • &lt;a href="https://threejs.org/"&gt;Three.js&lt;/a&gt;&lt;br&gt;
    • &lt;a href="https://developer.mozilla.org/docs/Web/API/WebGL_API/Tutorial/Getting_started_with_WebGL"&gt;WebGL&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What's great about taking the web approach is that there's no need to get yourself acclimated with an engine UI such as Unity or Unreal. You can code in your preferred editor and view your creations in the browser. I've personally only ever given Babylon.js a try. For a complete JavaScript newbie, I felt that it was approachable.&lt;/p&gt;

&lt;p&gt;If you aren't quite sure as to where to get started, Microsoft provides some guidance on &lt;a href="https://docs.microsoft.com/windows/mixed-reality/develop/development/?WT.mc_id=mixedreality-devto-apspeigh"&gt;choosing a technology path&lt;/a&gt; as it relates to Mixed Reality.&lt;/p&gt;

&lt;p&gt;Curious to learn more about realities? Follow the &lt;a href="https://dev.to/t/mixedreality"&gt;#MixedReality&lt;/a&gt; tag!&lt;/p&gt;

</description>
      <category>mixedreality</category>
      <category>beginners</category>
    </item>
    <item>
      <title>The Realities Explained</title>
      <dc:creator>April Speight</dc:creator>
      <pubDate>Fri, 18 Sep 2020 17:06:41 +0000</pubDate>
      <link>https://dev.to/aprilspeight/the-realities-explained-3k9g</link>
      <guid>https://dev.to/aprilspeight/the-realities-explained-3k9g</guid>
      <description>&lt;p&gt;Feeling out of touch with reality? No, not &lt;em&gt;that&lt;/em&gt; reality. I'm talking about the realities under the umbrella of Extended Reality (XR)! Extended Reality is the umbrella term that covers Augmented Reality (AR), Virtual Reality (VR) and Mixed Reality (MR). Understanding which reality term should be used can be confusing -- especially since the terms are often mistakenly used interchangeably. Here's a short over-view on the difference between Augmented Reality, Virtual Reality and Mixed Reality.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Augmented Reality (AR)?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.pokemongo.com/"&gt;Pokémon GO&lt;/a&gt; and &lt;a href="https://www.snapchat.com/create"&gt;Snapchat Filters&lt;/a&gt; -- sound familiar? If not, then congratulations, you've successfully avoided social media in the modern age! However, there's so many more practical uses of Augmented Reality in which you may have experienced but let's first define what AR even is. AR enables us to see the real-world surrounding us while displaying digital objects directly on top of our view. Have you ever tried the 'See it In Your Space' feature on &lt;a href="https://www.target.com/c/see-it-in-your-space/-/N-9ciy7?Nao=0"&gt;Target&lt;/a&gt;? That and similar experiences on other websites use AR technology!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Za1raDWI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/b7zrewuvw9fi1zxhg2oq.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Za1raDWI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/b7zrewuvw9fi1zxhg2oq.gif" alt="A gif of an A R furniture experience. The user is placing a 3 D model of a sofa in their real world environment using a mobile device."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There's a lot of interesting uses for AR and it's not always only used for games or to make it look like we have dog ears. &lt;a href="https://arvrtips.com/augmented-reality-examples/#:~:text=%20Entertainment%20Augmented%20Reality%20Examples%20%201%20Phone,with%20face%20filters%20that%20allow%20you...%20More%20"&gt;ARVR Tips&lt;/a&gt; provides an extensive list of how AR is used across various industries. Explore the list if you have a moment - there's some pretty interesting use cases.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Virtual Reality (VR)?
&lt;/h2&gt;

&lt;p&gt;Ever put on a head mounted device and magically escaped into a new virtual world? If so, you've experienced the magic of Virtual Reality. VR is a simulated experience in which the user is immersed into a virtual world. Once immersed, the user can no longer view their real-world. You may have seen videos of folks playing VR games such as &lt;a href="https://www.beatsaber.com/"&gt;Beat Saber&lt;/a&gt; or &lt;a href="https://get-vr.superhotgame.com/"&gt;SUPERHOT VR&lt;/a&gt; (a personal fave). VR has come quite a long way given that we can now interact with virtual objects using more than controllers. We can use our hands, voice and amazingly enough even &lt;a href="https://www.youtube.com/watch?v=Rn-hKI5eNdQ"&gt;VR haptic bodysuits&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JNQSDcKW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/16n81bx8warpt11uvt1e.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JNQSDcKW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/16n81bx8warpt11uvt1e.gif" alt="A gif of the game Beat Saber."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Like AR, VR is used for more than gaming. &lt;a href="https://www.livescience.com/53392-virtual-reality-tech-uses-beyond-gaming.html#:~:text=Virtual-reality%20%28VR%29%20headsets%20are%20now%20being%20used%20in,Reality%20Puts%20Adults%20in%20a%20Child%27s%20World%5D%20Entertainment."&gt;Live Science&lt;/a&gt; explores some fascinating uses for VR beyond gaming. I'm personally a fan of VR story-telling!&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Mixed Reality (MR)?
&lt;/h2&gt;

&lt;p&gt;So then there's Mixed Reality. &lt;a href="https://docs.microsoft.com/windows/mixed-reality/discover/mixed-reality/?WT.mc_id=mixedreality-devto-apspeigh"&gt;Mixed Reality&lt;/a&gt; is a blend between the physical and digital world. In fact, when we talk about MR, we think of the reality as a spectrum known as the virtuality continuum -- &lt;em&gt;oo fancy word&lt;/em&gt;! On one end of the spectrum is the physical world and the other, the digital world. Between that spectrum lies Augmented Reality and Virtual Reality.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--n8BEuglG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/w8g574nfhy3q0rmhfagi.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--n8BEuglG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/w8g574nfhy3q0rmhfagi.gif" alt="A gif of two people wearing a HoloLens. The people are looking at a holographic robot walking in their direction. A holographic alien creature is standing to the right of the people.."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One drawback to AR and VR experiences is that they're not instinctually environmentally aware. Let's take the 'See it In Your Space' feature that Target offers. Suppose I'm in the market for flower vases and I happen to come across a vase that looks to be perfect for my home. Using the 'See it In Your Space' feature, I can view the vase in my home, however, the AR feature wouldn't prevent me from placing the vase in the middle of a real-life object. The AR feature wouldn't be aware of the 'real' furniture and/or surfaces in my home. &lt;/p&gt;

&lt;p&gt;With MR, you can build experiences that have environmental understanding capabilities. In a MR experience, I could try out the vase in my home and the vase would only snap to flat surfaces. The experience would be aware of the surfaces in my home because of &lt;a href="https://docs.microsoft.com/windows/mixed-reality/design/spatial-mapping/?WT.mc_id=mixedreality-devto-apspeigh"&gt;spatial mapping&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Curious to learn more about realities? Follow the &lt;a href="https://dev.to/t/mixedreality"&gt;#MixedReality&lt;/a&gt; tag!&lt;/p&gt;

</description>
      <category>mixedreality</category>
      <category>beginners</category>
    </item>
    <item>
      <title>2D vs. 3D</title>
      <dc:creator>April Speight</dc:creator>
      <pubDate>Fri, 18 Sep 2020 17:06:07 +0000</pubDate>
      <link>https://dev.to/aprilspeight/2d-vs-3d-22c8</link>
      <guid>https://dev.to/aprilspeight/2d-vs-3d-22c8</guid>
      <description>&lt;p&gt;As you build Extended Reality (XR) experiences, you'll find yourself working in a 3D space. This can become a challenge for some beginners as there's now a whole new dimension to consider when building scenes and interactions. Before you dust off the ol' keyboard and open your favorite engine for development, take a moment to learn the difference between 2D vs. 3D.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Dimension?
&lt;/h2&gt;

&lt;p&gt;A dimension is a measure of one direction. In our every day lives, we're surrounded by examples of the first three dimensions (some may argue first four). These dimensions are defined by width (x), height (y), and depth (z). Although scientists believe that there are 10 dimensions (hello time and parallel universes!), when working with XR, we focus mostly on the second and third.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is 1D?
&lt;/h2&gt;

&lt;p&gt;The first dimension is defined by width (x). For example, consider a straight line on a piece of paper. The line only goes in 1 direction.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SSG2bwB2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/dlj6iswzkrw154rxvf9v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SSG2bwB2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/dlj6iswzkrw154rxvf9v.png" alt="A straight horizontal line is drawn to represent a one dimensional direction. The direction is on the x axis."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is 2D?
&lt;/h2&gt;

&lt;p&gt;The second dimension is defined by width (x) and height (y). Starting to sound like math?  This concept may sound familiar if you've ever looked at a chart with plotted points. Taking the straight line from earlier, we can add another direction to reflect width.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aPBiMTtY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gt2nyzvy6jm8th5tvgo4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aPBiMTtY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gt2nyzvy6jm8th5tvgo4.png" alt="A vertical and horizontal line are drawn to represent two dimensional directions. The horizontal line is on the x axis. The vertical line is on the y axis."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We often see 2D in retro video games such as &lt;a href="https://wikipedia.org/wiki/Pac-Man"&gt;Pac-Man&lt;/a&gt;. Objects in a 2D space are flat in the sense that there's no depth to the object. 2D objects only have a width and height.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---JhpSbS3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hjtxc4f22rmvvj1narfs.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---JhpSbS3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hjtxc4f22rmvvj1narfs.gif" alt="A gif of Pacman heading in the direction of a pink ghost."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is 3D?
&lt;/h2&gt;

&lt;p&gt;The third dimension is defined by width (x), height (y), and depth (z). Depth is the direction of going from front to back. Using the lines from earlier, we can add a third dimension to the line to reflect depth.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XAYaz_Pi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/x763rqjixsxxvw8lw7mb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XAYaz_Pi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/x763rqjixsxxvw8lw7mb.png" alt="A vertical, horizontal, and diagonal line are drawn to represent three dimensional directions. The horizontal line is on the x axis. The vertical line is on the y axis. The diagonal line is on the z axis."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's look at this in a practical example - &lt;a href="https://wikipedia.org/wiki/Donkey_Kong"&gt;Donkey Kong&lt;/a&gt;! In the original arcade version of Donkey Kong, Donkey Kong is presented as a 2D gorilla. He has no depth to his design. However, if we look at his character in Donkey Kong Country, well, we can view the gorilla from all sides. He has height, width, and depth.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ItV1YMZn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zvt8hc58t75bul60grjq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ItV1YMZn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zvt8hc58t75bul60grjq.png" alt="A 2 D version of Donkey Kong displays on the left. A 3 D version of Donkey Kong displays on the right."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As this all relates to XR, you can have both 2D and 3D objects in a XR experience. More often, UI elements such as text is displayed in 2D (although you could include 3D text). The holograms in which users interact with are in 3D. &lt;/p&gt;

&lt;p&gt;Curious to learn more about realities? Follow the &lt;a href="https://dev.to/t/mixedreality"&gt;#MixedReality&lt;/a&gt; tag!&lt;/p&gt;

</description>
      <category>mixedreality</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
