<?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: dcrane604</title>
    <description>The latest articles on DEV Community by dcrane604 (@dcrane604).</description>
    <link>https://dev.to/dcrane604</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%2F197986%2Ffdb199fb-17f2-4db8-9337-379c8987856a.png</url>
      <title>DEV Community: dcrane604</title>
      <link>https://dev.to/dcrane604</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dcrane604"/>
    <language>en</language>
    <item>
      <title>Our Software Supply Chain Security Survey Is Back. See How You Stack Up!</title>
      <dc:creator>dcrane604</dc:creator>
      <pubDate>Tue, 06 Jun 2023 22:32:05 +0000</pubDate>
      <link>https://dev.to/dcrane604/our-software-supply-chain-security-survey-is-back-see-how-you-stack-up-1p1m</link>
      <guid>https://dev.to/dcrane604/our-software-supply-chain-security-survey-is-back-see-how-you-stack-up-1p1m</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JCyrYzLy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3xp8mqim99cio4a2e1dw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JCyrYzLy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3xp8mqim99cio4a2e1dw.png" alt="Image description" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
It’s back! In 2021 we asked you to help us assess the state of software supply chain security, and we would love it if you could help us do it again by joining our 2-minute/10-question 2023 survey:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.surveymonkey.com/r/BNGZPH6"&gt;Take the 2023 Software Supply Chain Security Survey&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This time around we’ve changed a few questions and added one more to focus on emerging threats and new solutions. At the end of the survey, you’ll be given a score that reflects how far along the &lt;a href="https://www.activestate.com/resources/white-papers/the-journey-to-software-supply-chain-security/"&gt;journey&lt;/a&gt; your organization is toward creating a secure software supply chain. &lt;/p&gt;

&lt;p&gt;Thanks in advance for your help!&lt;/p&gt;

&lt;p&gt;If you want to understand how things have changed since our last survey, read on.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problems with Securing the Software Supply Chain
&lt;/h2&gt;

&lt;p&gt;Two years ago, ActiveState took the barometer of where more than 1500 companies of every shape and size around the globe stood when it came to implementing software supply chain security. &lt;/p&gt;

&lt;p&gt;Unfortunately, the &lt;a href="https://www.activestate.com/resources/datasheets/software-supply-chain-security-survey-report/"&gt;results were not encouraging&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Of course, back then, the concept of supply chain security was little known. It was primarily exemplified by the &lt;a href="https://www.activestate.com/blog/how-to-avoid-becoming-the-next-solarwinds/"&gt;Solarwinds hack&lt;/a&gt;, which effectively undermined the trust in signed software and kicked off a tidal wave of copycats. The result has been &amp;gt;740% increase in software supply chain attacks over the past three years. &lt;/p&gt;

&lt;p&gt;Nowadays, the term “software supply chain security” is more of a buzzword. Thanks to President Biden’s &lt;a href="https://www.activestate.com/blog/president-biden-secure-your-software-supply-chain/"&gt;Executive Order&lt;/a&gt; 14028, US government &lt;a href="https://www.activestate.com/blog/sboms-attestations-us-government-deadlines-for-implementation/"&gt;supplier requirements&lt;/a&gt;, and worldwide pending software supply chain &lt;a href="https://www.activestate.com/blog/understanding-secure-software-supply-chain-legislations-around-the-world/"&gt;legislation&lt;/a&gt;, more and more software vendors have become aware of the need to address weaknesses in their software supply chain. &lt;/p&gt;

&lt;p&gt;Unfortunately, that awareness has not extended to those that matter the most: open source software maintainers. According to a recent &lt;a href="https://www.tidelift.com/open-source-maintainer-survey-2023"&gt;survey&lt;/a&gt; by Tidelift, less than half of all maintainers have even heard of (let alone plan to implement) software supply chain security standards:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tfAD3gIM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5byif7ohtalzqu4r8w06.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tfAD3gIM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5byif7ohtalzqu4r8w06.png" alt="Image description" width="800" height="264"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Maintainer Awareness
&lt;/h2&gt;

&lt;p&gt;That’s the good guys. The bad guys are continuing to try and take advantage of supply chain weaknesses to the degree that this past week the Python Package Index (PyPI) was forced to suspend the creation of new projects:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rIFXw5ei--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g7hsuprfzgw0j8vagkwl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rIFXw5ei--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g7hsuprfzgw0j8vagkwl.png" alt="Image description" width="424" height="683"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;PyPI suspends new projects&lt;br&gt;
And as SAP has &lt;a href="https://sap.github.io/risk-explorer-for-software-supply-chains/"&gt;highlighted&lt;/a&gt;, the vectors of attack used by bad actors just keep expanding:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ApuD2SGY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/43ygj02dhorkv4877csj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ApuD2SGY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/43ygj02dhorkv4877csj.png" alt="Image description" width="800" height="231"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The attack tree shown above organizes attacks and techniques that inject malicious code into open-source software projects, starting from abstract, top-level goals and drilling down to known/ attack techniques.&lt;/p&gt;

&lt;h2&gt;
  
  
  Software Supply Chain Security in 2023
&lt;/h2&gt;

&lt;p&gt;All of which leads us back to the purpose of this post: to understand where the industry now stands with respect to securing their software supply chain.&lt;/p&gt;

&lt;p&gt;The good news is that in 2023, there are a number of market drivers that have recently been gaining strength. For example:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SLSA&lt;/strong&gt; – the security framework known as “Secure Levels for Supply chain Artifacts” or SLSA has reached &lt;a href="https://www.activestate.com/blog/introducing-slsa-1-0-securing-the-code-you-import-build/"&gt;version 1.0&lt;/a&gt;, providing organizations with a roadmap to help them implement supply chain security for the software artifacts they import and build.   &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SBOMs&lt;/strong&gt; – Software Bill Of Materials (SBOMs) seem to be everywhere nowadays. Multiple vendors of traditional AppSec software have embraced SBOMs, and now offer it as part of their solution. This is an important step, because these vendors have a large install base of organizations that have adopted traditional Secure Software Development Frameworks (SSDFs), and are now looking to identify and repair weaknesses in their software supply chain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Provenance&lt;/strong&gt; – software attestations are a new concept that can help organizations understand the security and integrity (and thus the risk) of the artifacts they import, such as open source software. While attestation specifications (such as &lt;a href="https://github.com/in-toto"&gt;in-toto&lt;/a&gt;) are also still very new, a number of vendors are already generating attestations, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/testifysec/witness/"&gt;TestifySec Witness&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://slsa.dev/blog/2022/12/gcb-slsa-verification"&gt;Google Cloud Build&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.blog/2022-04-07-slsa-3-compliance-with-github-actions/"&gt;GitHub Actions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.gitlab.com/ee/ci/runners/configure_runners.html#artifact-attestation"&gt;GitLab Runner Attestations&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.activestate.com/solutions/attestations/"&gt;ActiveState Software Attestations&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Given all these initiatives, as well as the continued rise in supply chain attacks – for better or worse – there really is nowhere to hide from software supply chain security these days.&lt;/p&gt;

</description>
      <category>softwaresupplychain</category>
      <category>security</category>
      <category>slsa</category>
      <category>sboms</category>
    </item>
    <item>
      <title>Customer Support Chatbots: Easier &amp; More Effective Than You Think</title>
      <dc:creator>dcrane604</dc:creator>
      <pubDate>Mon, 29 Jul 2019 21:25:30 +0000</pubDate>
      <link>https://dev.to/dcrane604/customer-support-chatbots-easier-more-effective-than-you-think-n20</link>
      <guid>https://dev.to/dcrane604/customer-support-chatbots-easier-more-effective-than-you-think-n20</guid>
      <description>&lt;p&gt;At the end of this post, you'll be able to use Python to create your own chatbot with just a few commands. But first, you might want to understand why customer service chatbots are so hot right now.&lt;/p&gt;

&lt;p&gt;Opinions are divided over the corporate use of chatbots: surprisingly, most people seem to love them (see below), while others find them annoying. What’s not up for debate is the cost savings and 24×7 customer service chatbots enable. &lt;/p&gt;

&lt;p&gt;Some key points to consider:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;a href="http://www.drift.com/wp-content/uploads/2018/01/2018-state-of-chatbots-report.pdf" rel="noopener noreferrer"&gt;top benefits of chatbots&lt;/a&gt; are 24/7 service, instant responses, and answers to simple questions.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.mindshareworld.com/sites/default/files/MINDSHARE_HUDDLE_HUMANITY_MACHINE_2016_0.pdf" rel="noopener noreferrer"&gt;63% of people prefer online bots&lt;/a&gt; to interacting with a company’s human resources.&lt;/li&gt;
&lt;li&gt;Chatbots will &lt;a href="https://channels.theinnovationenterprise.com/articles/why-including-chatbots-planning-in-big-data-planning-is-becoming-the-need-of-the-hour" rel="noopener noreferrer"&gt;power 85% of customer service&lt;/a&gt; by 2020.&lt;/li&gt;
&lt;li&gt;Chatbots are expected to &lt;a href="https://www.impactbnd.com/blog/chatbots-for-2019-infographic" rel="noopener noreferrer"&gt;cut business costs by $8 billion&lt;/a&gt; by 2022.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While the Machine Learning (ML) technology on which chatbots are based has come a long way, it can’t yet fully replicate natural language comprehension. But there are still many potential applications for chatbots where complete comprehension is not required. It’s becoming commonplace to pay a bill, check an account balance or, as shown in figure 1, track a package with a chatbot. More and more companies turn over simple, routine consumer interactions to bots. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fxnfr792e5wmmtsnhehsn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fxnfr792e5wmmtsnhehsn.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Figure 1: chatbot interaction for tracking package delivery&lt;/p&gt;

&lt;p&gt;It’s now possible to complete most routine transactions without having to speak to a real person. Food companies like &lt;a href="http://www.prnewswire.com/news-releases/subway-launches-ordering-of-sandwiches-and-salads-on-facebook-with-a-bot-for-messenger-300441476.html" rel="noopener noreferrer"&gt;Subway&lt;/a&gt;, &lt;a href="https://www.dominos.com.au/inside-dominos/technology" rel="noopener noreferrer"&gt;Dominos&lt;/a&gt; and &lt;a href="https://news.starbucks.com/press-releases/starbucks-debuts-voice-ordering" rel="noopener noreferrer"&gt;Starbucks&lt;/a&gt; are all experimenting with letting people place orders using chatbots in Facebook Messenger (like MobileMonkey), or by verbally telling Amazon’s Alexa to order them a frappuccino. &lt;/p&gt;

&lt;p&gt;And advances in natural language processing are being used to great effect today in relatively simplistic virtual assistants like Amazon’s Alexa, Apple Siri and Microsoft’s Cortana. &lt;a href="https://promo.bankofamerica.com/erica/" rel="noopener noreferrer"&gt;Erica, a Bank of America chatbot&lt;/a&gt; goes a step further, leveraging “predictive analytics and cognitive messaging” to provide financial guidance to their customers.&lt;/p&gt;

&lt;p&gt;Of course, &lt;a href="https://www.theverge.com/2016/3/24/11297050/tay-microsoft-chatbot-racist" rel="noopener noreferrer"&gt;chatbots aren’t infallible&lt;/a&gt;, especially when it comes to things like problem-solving, intuition, and empathy, which is where human interaction can make a tremendous difference to the outcome for a customer. In these cases, chatbots can be used for routine interactions, and then escalate to a real person for more complex interactions. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F8lev1dlshmwh3863v7wl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F8lev1dlshmwh3863v7wl.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Figure 2: chatbot escalation/de-escalation to a real person&lt;/p&gt;

&lt;h3&gt;
  
  
  How Do Chatbots Work?
&lt;/h3&gt;

&lt;p&gt;A chatbot is simply an application that is governed by Machine Learning (ML) models in conjunction with a set of specified rules. Like most applications, chatbots are comprised of an application layer, a database and a set of APIs. &lt;/p&gt;

&lt;p&gt;Chatbots simulate a real-life, two-way conversation when humans interact with it using either a chat or voice interface. Responses are based on the “knowledge” available to it at that point in time. If an interaction introduces a new concept, chatbots are typically trained to either deflect the conversation, or else escalate to a human operator. Logs of discussions between chatbots and customers are saved and dissected by researchers in order to retrain the chatbot. Thus, a chatbot’s interactions will gradually grow in scope and relevance.&lt;/p&gt;

&lt;p&gt;There are generally three types of chatbots based on different classification methods and uses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pattern Matching Bots – these bots parse an input phrase and try to match keywords or key phrases to an entry in its database. If found, the bot can then provide the corresponding response.

&lt;ul&gt;
&lt;li&gt;Best suited for FAQ responses to common customer inquiries&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Natural Language Understanding Bots – these bots link entities (such as “ordering” or “purchasing”) with context (such as pattern matched keywords like “pizza types”) with expectations, which are what the customer is expecting in response to their interaction, such as “a list of toppings.”

&lt;ul&gt;
&lt;li&gt;Best suited for simple transactional inquiries, such as ordering food&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Natural Language Processing (NLP) Bots – these bots convert the user’s speech or text into structured data through a series of processes that parse the language into grammatical entities (verbs, subjects, objects, etc), extract recognized words or phrases (such as product names), identify misspellings, and may even attempt sentiment analysis to understand the customer’s attitude.

&lt;ul&gt;
&lt;li&gt;Best suited to complex customer service interactions&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;While it sounds complex, you may be surprised to learn that implementing a fully functioning chatbot is significantly cheaper than building a cross-platform app, and substantially less expensive than the human alternative (i.e., customer service reps).&lt;/p&gt;

&lt;h3&gt;
  
  
  Make Your Own Chatbot
&lt;/h3&gt;

&lt;p&gt;Now that you understand the importance and utility of chatbots, you may be inspired to see if you can create one for yourself. Daniel Kukiela has a Python-based implementation of a &lt;a href="https://github.com/daniel-kukiela/nmt-chatbot" rel="noopener noreferrer"&gt;chatbot on Github&lt;/a&gt; that you can try “out of the box” with just a few commands to setup your environment and clone the repo. &lt;/p&gt;

&lt;p&gt;The Requirements.txt is pretty basic, and includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;tensorflow-gpu&amp;gt;=1.4.0

&lt;ul&gt;
&lt;li&gt;Utilizes TensorFlow’s Neural Machine Translation (seq2seq) capabilities to perform natural language processing&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;tqdm

&lt;ul&gt;
&lt;li&gt;Implements a progress bar&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;colorama

&lt;ul&gt;
&lt;li&gt;For producing colored terminal text and cursor positioning&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;regex

&lt;ul&gt;
&lt;li&gt;For parsing text&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;python-Levenshtein

&lt;ul&gt;
&lt;li&gt;For manipulating strings, including determining string similarity, median and average&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;requests

&lt;ul&gt;
&lt;li&gt;The de facto standard for making HTTP requests in Python&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;All of these packages are supported on the ActiveState Platform (except for the GPU-based  version of TensorFlow which is replaced with the standard CPU version). If you’d like to try making Kukiela’s chatbot, the easiest way to set up your development environment is to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://platform.activestate.com/Pizza-Team/Chatbot/auto-fork" rel="noopener noreferrer"&gt;Fork my “Chatbot” runtime environment&lt;/a&gt; on the ActiveState Platform into your account (you’ll be prompted to create an account if you don’t already have one) &lt;/li&gt;
&lt;li&gt;&lt;a href="sh%20&amp;lt;(curl%20-q%20https://platform.activestate.com/dl/cli/install.sh)"&gt;Install the State Tool&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Install the runtime on your system with ActiveState’s State Tool, which will automatically:

&lt;ul&gt;
&lt;li&gt;Create a virtual environment, and then&lt;/li&gt;
&lt;li&gt;Install the chatbot’s Python runtime into it (i.e., all 6 packages in Kukiela’s Requirements.txt plus their 50 dependencies)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To install the runtime, follow the instructions listed under the “Use via Command Line” heading. For example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Flfwqusthu9n1gj4vmwh8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Flfwqusthu9n1gj4vmwh8.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that your chatbot project’s environment is ready to go, you can grab Kukiela’s code and use the included training data to give it a try. Just issue the following commands from your new virtual environment:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git clone --branch v0.1 --recursive https://github.com/daniel-kukiela/nmt-chatbot.git
$ cd nmt-chatbot/
$ cd setup
$ python3 prepare_data.py
$ cd ..
$ python3 train.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;And now the hard part: waiting. Eventually the chatbot will chew through the training data and you’ll have a trained demo that’s ready to deploy and test out. &lt;/p&gt;

&lt;p&gt;Happy chatting!&lt;/p&gt;

&lt;p&gt;Got a Github project you’d like to simplify the setup for by offering a pre-built environment? Sign up for a &lt;a href="https://platform.activestate.com/create-account" rel="noopener noreferrer"&gt;free ActiveState Platform account&lt;/a&gt; and see how easy it can be.&lt;/p&gt;

</description>
      <category>python</category>
      <category>machinelearning</category>
      <category>tensorflow</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How To Learn Python Without First Needing To Learn Python</title>
      <dc:creator>dcrane604</dc:creator>
      <pubDate>Fri, 19 Jul 2019 17:03:43 +0000</pubDate>
      <link>https://dev.to/dcrane604/how-to-learn-python-without-first-needing-to-learn-python-9je</link>
      <guid>https://dev.to/dcrane604/how-to-learn-python-without-first-needing-to-learn-python-9je</guid>
      <description>&lt;p&gt;When it comes to driving, we don’t make the student assemble the car before learning how to drive. Yet when it comes to learning Python, users first need to learn how to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install Python, preferably in a virtual environment&lt;/li&gt;
&lt;li&gt;Use pip to install all requirements&lt;/li&gt;
&lt;li&gt;Resolve any dependency conflicts, as needed&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Before they can even begin to start their Python course. This approach assumes the user has some familiarity with Python before they’ve even installed it, which can be both a false assumption by the course creator, and intimidating for the student. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which Python version should I use? The Readme for the course doesn’t look like it’s been updated in a while and is recommending an older version, but shouldn’t I use the latest version?&lt;/li&gt;
&lt;li&gt;Which distribution should I use? The older one that’s pre-installed on my OS? Or should I download a newer version from python.org, or just get Anaconda? Will these conflict with my OS-installed one?&lt;/li&gt;
&lt;li&gt;I heard I should be using a virtual environment – how do I do that?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All good arguments why new users should get a good Python book or else a teacher/adviser before you start. But there’s another way to lower the barrier to entry for new users of Python: ActiveState’s State Tool.&lt;/p&gt;

&lt;h3&gt;
  
  
  Simple Python Installations
&lt;/h3&gt;

&lt;p&gt;The State Tool can install a Python runtime into a virtual environment on Linux or Windows with a single command, simplifying the deployment of Python:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;On a developer’s workstation&lt;/li&gt;
&lt;li&gt;On any/all instances across your CI/CD chain&lt;/li&gt;
&lt;li&gt;In production&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s also ideal for first time users since it automates the creation of their Python environment without requiring any previous knowledge. For example, take the popular “Learn Python” repository created by Oleksii Trekhleb on Github &lt;a href="https://github.com/trekhleb/learn-python"&gt;trekhleb/learn-python&lt;/a&gt;. The Readme has this to say about environment setup:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;“Make sure that you have Python3 installed on your machine” with a link to RealPython’s website to explain the process in detail.&lt;/li&gt;
&lt;li&gt;“You might want to use venv standard Python library to create virtual environments…”&lt;/li&gt;
&lt;li&gt;“Install all dependencies that are required for the project by running:” 
pip install -r requirements.txt&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Alternatively, you could install the State Tool and run the “state activate” command to get started in just a few seconds without requiring any prior knowledge of Python.&lt;/p&gt;

&lt;p&gt;In fact, you can do just that right here: &lt;a href="https://github.com/shnewto/learn-python"&gt;https://github.com/shnewto/learn-python&lt;/a&gt;. That link goes to a fork of Trekhleb’s repo that we’ve created to show off the simple yet powerful capabilities of the State Tool. In this case, you just need to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://docs.activestate.com/platform/start/state.html"&gt;Download the State Tool&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/shnewto/learn-python"&gt;Clone the Repo&lt;/a&gt; and cd into it&lt;/li&gt;
&lt;li&gt;Type state activate&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;From the point of view of an end user, the State Tool dramatically reduces the amount of language-specific knowledge you require in order to set up your environment before you can get to what you really want to do: coding.&lt;/p&gt;

&lt;p&gt;But for Github repository owners, it also means your users and contributors get started working with your project much faster, which may result in a lot more code contributions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Reducing The Readme
&lt;/h3&gt;

&lt;p&gt;To simplify the environment setup for your project, you can do exactly what we did for the Learn Python project: create a Python runtime on the ActiveState Platform, and include a YAML file in your repo that points to it. Let’s take it one step at a time:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://platform.activestate.com/create-account"&gt;Create a free ActiveState Platform account&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Create a new project for Python on Linux or Windows&lt;/li&gt;
&lt;li&gt;Add the packages required for your project, and let the Platform automatically pull in all the dependencies, resolve them, and create an installer for you in just a few minutes&lt;/li&gt;
&lt;li&gt;Create an activestate.yaml file and add it to your repository. The file contains four lines:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;name:  (enter the name of your project from step 2)&lt;/li&gt;
&lt;li&gt;owner: (enter the username you entered during step 1)&lt;/li&gt;
&lt;li&gt;languages: (this line is currently left blank)&lt;/li&gt;
&lt;li&gt;name: (enter python if it's a Python project)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Don’t forget to add a link in your Readme to &lt;a href="https://docs.activestate.com/platform/start/state.html"&gt;download the State Tool&lt;/a&gt;, as well as the instructions to clone your repo, cd into it and issue the “state activate” command.&lt;/p&gt;

&lt;p&gt;While there may be other steps you require in your Readme, such as setting up a database, the State Tool lets you dramatically reduce the number of hoops your users have to jump through before they can start working on your project. Or if you’re an educator, it can make setting up a classroom full of Python environments every semester as simple as writing a script to delete the old virtual environment and “state activate” a new one on each system.&lt;/p&gt;

&lt;p&gt;Want to see how the ActiveState Platform allows developers to build Python distros in minutes instead of weeks? Watch this &lt;a href="https://www.activestate.com/resources/videos/activestate-platform-trailer/"&gt;short video&lt;/a&gt; or &lt;a href="https://platform.activestate.com/create-account"&gt;create a free account&lt;/a&gt;.&lt;/p&gt;

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