<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Derek Xiao on Medium]]></title>
        <description><![CDATA[Stories by Derek Xiao on Medium]]></description>
        <link>https://medium.com/@lofiderek?source=rss-42f9e7cb99f6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*hEwG9GzJah8PgXQj5qtRZA.png</url>
            <title>Stories by Derek Xiao on Medium</title>
            <link>https://medium.com/@lofiderek?source=rss-42f9e7cb99f6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 19:08:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@lofiderek/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Create and Deploy a Web App to the Cloud With Python in 20 Minutes]]></title>
            <link>https://medium.com/better-programming/create-and-deploy-a-web-app-to-the-cloud-with-python-in-20-minutes-7e628b28325d?source=rss-42f9e7cb99f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e628b28325d</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Derek Xiao]]></dc:creator>
            <pubDate>Thu, 11 Feb 2021 15:28:11 GMT</pubDate>
            <atom:updated>2021-02-15T19:36:28.167Z</atom:updated>
            <content:encoded><![CDATA[<h4>Build robust apps using Flask, Postgres, and Heroku</h4><figure><img alt="A mockup up a webpage with the URL your-app-name.com and a templated page design that says Your App Name Here with a form below the title." src="https://cdn-images-1.medium.com/max/1024/1*QA65sJJamg6qjJvOAyx9wg.png" /></figure><p>If you’ve been looking to deploy your first web app to the cloud, this article is for you!</p><p>In this tutorial, I’m going to show how to make the web app and database shown in the GIF below and how to deploy it to Heroku so it can be used by anyone.</p><figure><img alt="SQL editor" src="https://cdn-images-1.medium.com/max/1024/1*U7tD0ekj7BJsVfw9XYdDXw.gif" /><figcaption>SQL editor: <a href="https://arctype.com/?utm_campaign=postgres-heroku&amp;utm_medium=blog&amp;utm_source=medium">Arctype</a></figcaption></figure><p>The article is divided into three sections:</p><ol><li>Creating a Flask app (web application for submitting the form)</li><li>Setting up a Postgres database with Python (store the data from the submitted forms)</li><li>Deploying the application to Heroku (hosting the application in the cloud so anyone can use it)</li></ol><p>I provide a brief overview of each technology at the beginning of each section, so don’t be deterred if you aren’t familiar with some of these.</p><p>If you hit any issues as you go through the tutorial, we’ve created a Discord channel to answer any questions for new programmers: <a href="https://discord.gg/YaZQzBen">Join here</a>.</p><h4>Technical requirements</h4><p>This guide is targeted toward beginner to intermediate programmers with some familiarity with programming and using the command line.</p><p>You’ll need the following to get started:</p><ul><li><strong>PostgreSQL</strong>: You need to <a href="https://www.postgresql.org/download/">download and install Postgres</a> on your local computer</li><li><strong>Python 3.6 or newer</strong>: Python installers for different versions and operating systems are available for download <a href="https://www.python.org/">here</a></li><li><strong>Heroku account</strong>: You need to <a href="https://signup.heroku.com/">create a free Heroku account</a> if you don’t already have one. This is where we’ll deploy the Flask app and connect it to a remote Postgres database.</li></ul><p>Once you have all the above installed, we can start by setting up our development environment.</p><h3>Creating a Flask App for a Registration Form</h3><figure><img alt="SQL editor" src="https://cdn-images-1.medium.com/max/880/0*OlgwAPO5tjo_ToVE.gif" /><figcaption>SQL editor: <a href="https://arctype.com/?utm_campaign=postgres-heroku&amp;utm_medium=blog&amp;utm_source=medium">Arctype</a></figcaption></figure><p>In this section, we’re going to create the Flask app shown above.</p><p>I’ve already created an example Flask app that renders a simple registration form used to collect information from a user.</p><p>Flask is one of the most popular web frameworks written in Python. The Flask application I made first makes a request to the endpoints defined in the app/routes.py file to retrieve the data displayed in the registration form.</p><p>It then renders the HTML pages contained in the Template folder using the <a href="https://jinja.palletsprojects.com/en/2.11.x/templates/">Jinja template library</a>.</p><p>Instead of starting from scratch, let’s make a copy of the Flask app I created by cloning the GitHub repo.</p><p>Open a command-line tool, and run the following commands:</p><pre>git clone https://github.com/ToluClassics/Web_Registration_Form.git<br>cd web_registration_form</pre><p>If you ever get lost, you can view the completed project here: <a href="https://github.com/ToluClassics/flask_postgres">flask-postgres app</a>.</p><p>Next, we’re going to create a virtual environment for this project and install the required dependencies. A <em>virtual environment </em>is an isolated environment for different Python projects. They’re helpful for keeping packages and dependencies separate between different projects.</p><p>Depending on your computer’s operating system, run the following commands:</p><pre>Windows:<br><strong>$</strong> python3 -m venv env<br><strong>$</strong> source env/scripts/activate<br>(env) $ pip install -r requirements.txt</pre><pre>MacOS and UNIX:<br><strong>$</strong> python -m venv env<br><strong>$</strong> source env/bin/activate<br>(env) $ pip install -r requirements.txt</pre><p>To test if our environment is properly set up, let’s try launching the application by entering flask run in the virtual environment.</p><pre>(env) derekxiao@Dereks-MBP Web_Registration_Form % flask run<br> * Environment: production<br>   WARNING: This is a development server. Do not use it in a production deployment.<br>   Use a production WSGI server instead.<br> * Debug mode: off<br> * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)</pre><p>Now you can enter the URL above in any browser and view the web form.</p><h3>Adding Input Validations for the Registration Form</h3><p>To get more familiar with the code, let’s add input validations to the form class.</p><p>We want our app to prevent users from filling out the form with the same username or email address multiple times.</p><p>With wtforms, you can create a custom validator that’s automatically added to each field by creating a method with the name validate_&lt;field_name&gt;. In the app/form.py file, we’ll add two methods: validate_email and validate_username. We’ll query the Registrations table (we’ll create this table later), username, and email entered by the user. If it returns a value, we’ll raise a validation error.</p><p>Open the form.py file, and import Registrations from the models.py file (we’ll add this file later).</p><pre>from app.models import Registration</pre><p>And in the RegistrationForm class, add the following validation methods:</p><pre>def validate_email(self, email):<br>	user = Registration.query.filter_by(email = email.data).first()<br>	if user is not None:<br>		raise ValidationError(&#39;Please use a different email address&#39;)<br>    <br>def validate_username(self, username):<br>	user = Registration.query.filter_by(username = username.data).first()<br>	if user is not None:<br>		raise ValidationError(&#39;Please use a different email address&#39;)</pre><p>Now let’s add in the models.py file so we can test the input validation.</p><h3>Creating a PostgreSQL Database</h3><p>First, we need to create the database that models.py will connect to.</p><p>For this tutorial, we’ll be using a PostgreSQL database. PostgreSQL is an open-source, <a href="https://blog.arctype.com/postgres-ordbms-explainer?utm_campaign=postgres-heroku&amp;utm_medium=blog&amp;utm_source=dev.to">object-relational database</a>. And the best part: It’s completely free.</p><p>Let’s start by creating a new Postgres database to store the data from submitted registration forms. If you already have a Postgres database, feel free to jump to the next section to start connecting your Flask app to the database.</p><p>If you haven’t yet, <a href="https://www.postgresql.org/download/">download and install Postgres</a> on your computer.</p><p>Now open a new command-line window and type psql. psql is a terminal-based interface to manage your Postgres databases.</p><p>Run the command create database [database name]; to create a new database.</p><p>Below is a list of popular psql commands to manage your database:</p><ul><li>\l : List all available databases</li><li>dt : List all tables</li><li>\d table_name: Describe a table, showing its columns, column type, etc.</li><li>\du : List all users and their roles</li><li>\?: Get a list of all psql commands</li><li>\q: To quit psql terminal</li></ul><p>Alternatively, you can avoid memorizing the different psql commands and use Arctype’s <a href="https://arctype.com/?utm_campaign=postgres-heroku&amp;utm_medium=blog&amp;utm_source=medium">free SQL editor</a> that provides a modern interface for managing both Postgres and MySQL databases:</p><figure><img alt="SQL editor" src="https://cdn-images-1.medium.com/max/1024/1*NGuWfCAl7gkFOPavD4BmTQ.gif" /><figcaption>SQL editor: <a href="https://arctype.com/?utm_campaign=postgres-heroku&amp;utm_medium=blog&amp;utm_source=medium">Arctype</a></figcaption></figure><h3>Connecting a Flask App to a Local Postgres Database</h3><p>Next, we’ll create the database connection to our new Postgres database that’ll be used inside our models.py file. To get started, there are three packages to install:</p><ul><li>flask-sqlalchemy: A Python extension for managing databases</li><li>flask-migrate: For making updates to an existing database</li><li>Pyscopg2: A PostgreSQL database adapter for Python</li></ul><p>In the activated virtual-environment terminal, run (env) $ pip install flask-sqlalchemy flask-migrate pyscopg2 to install the packages listed above. If you hit an error installing pyscopg2, you may need to install psycopg2-binary instead.</p><p>In the following sections, I’ll show how to use each package to configure and integrate our Postgres database with our Flask application. The end result will be a Flask app that’s able to add new entries to a Postgres table.</p><h4>Manage Postgres databases from Python with SQLAlchemy</h4><p><a href="https://www.sqlalchemy.org/">SQLAlchemy</a> is a library that provides a way to seamlessly integrate Python programs and databases. We’ll use SQLAlchemy as an object-relational mapper to convert Python classes to tables in our Postgres database.</p><p>Flask-SQLAlchemy automatically translates the created models to the syntax of any database (Postgres in our case).</p><p>To interact with our database from the application, we need to add the following configuration variables to the config file:</p><ul><li>SQLALCHEMY_DATABASE_URI: This is the connection string that tells our Flask app which database to connect to. The usual form of the Postgres database connection string is postgresql://localhost/[YOUR_DATABASE_NAME]. If your Postgres user has a password, you’ll need to use a different <a href="https://www.postgresql.org/docs/9.3/libpq-connect.html#:~:text=The%20general%20form%20for%20a,param1%3Dvalue1%26...%5D&amp;text=Percent%2Dencoding%20may%20be%20used,words%20listed%20in%20Section%2031.1.">URI variant</a>.</li><li>SQLALCHEMY_TRACK_MODIFICATIONS: We set this to False so we don’t get a warning from Flask every time we make a change to the application</li></ul><p>To make the above changes, open the config.py file and add the following variables to the Config class:</p><pre>SQLALCHEMY_DATABASE_URI = os.environ.get(&#39;SQLALCHEMY_DATABASE_URI&#39;) or \<br>    &#39;postgresql://localhost/[YOUR_DATABASE_NAME]&#39;<br><br>SQLALCHEMY_TRACK_MODIFICATIONS = False</pre><p>In the next session, we’ll use the flask-migrate package to seamlessly handle changes to our database structure.</p><h4>Setting up Flask-Migrate to manage database structures</h4><p>As we scale our application, we may need to make structural changes to our tables without losing all the data already in the database. <a href="https://flask-migrate.readthedocs.io/">Flask-Migrate</a> is a Python extension that handles SQLAlchemy database migrations automatically using Alembic. It also supports multiple database migrations and other functionalities.</p><p>Now, we’ll add a database object that represents our database and also create an instance of the migration class to handle database migrations.</p><p>Open app/ __init__.py, and import the flask_migrate and SQLAlchemy packages:</p><pre>from flask_migrate import Migrate<br>from flask_sqlalchemy import SQLAlchemy</pre><p>Then add the following variables:</p><pre>db = SQLAlchemy(app) ## Create DB object<br>migrate = Migrate(app,db) ## Create migration object</pre><h3>Set Up the PostgreSQL Database Model</h3><p>Now we’re finally ready to create the models.py file to set up our database model. Database models are used to represent tables and their structures in the database; they determine the schema of the table.</p><p>models.py will define the structure of our tables and other necessary table information. We need to create a model (class) whose attributes are the same as the data fields we intend to store in the database tables.</p><p>Then, create a class with the attributes for each data field in the registration form:</p><pre>class Registration(db.Model):<br>    id = db.Column(db.Integer, primary_key = True)<br>    first_name = db.Column(db.String(64))<br>    last_name = db.Column(db.String(64))<br>    username = db.Column(db.String(64))<br>    company = db.Column(db.String(64))<br>    contact_no = db.Column(db.String(64))<br>    email = db.Column(db.String(120), index=True, unique=True)<br>    <br>    def __repr__(self):<br>        return &#39;&lt;User {}&gt;&#39;.format(self.username)</pre><p>The last step is importing the model into the app\ __init__.py file: from app import models.</p><p>If you’re working with your own database, we’ve created a free tool to <a href="https://blog.arctype.com/erd-builder?utm_campaign=postgres-heroku&amp;utm_medium=blog&amp;utm_source=dev.to">design database schemas</a>.</p><h3>Creating a New Registrations Table in Postgres Using Flask</h3><p>Next, we’ll instantiate the database from the command line by running flask db init in the virtual environment.</p><p>First, ensure that your FLASK_APP environment variable is set before you run this command. You can run the following commands to check:</p><pre>(env) $ python                   <br>Python 3.8.2 (default, Dec 21 2020, 15:06:04) <br>[Clang 12.0.0 (clang-1200.0.32.29)] on darwin<br>Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.<br>&gt;&gt;&gt; import os<br>&gt;&gt;&gt; print(os.environ[&#39;FLASK_APP&#39;])<br>app.py<br>&gt;&gt;&gt; quit()</pre><p>After you run flask db init, you should see the following output:</p><pre>(env)  $ flask db init<br>	Creating directory /Users/mac/Desktop/Web_Registration_Form/migrations ...  done<br>  Creating directory /Users/mac/Desktop/Web_Registration_Form/migrations/versions ...  done<br>  Generating /Users/mac/Desktop/Web_Registration_Form/migrations/script.py.mako ...  done<br>  Generating /Users/mac/Desktop/Web_Registration_Form/migrations/env.py ...  done<br>  Generating /Users/mac/Desktop/Web_Registration_Form/migrations/README ...  done<br>  Generating /Users/mac/Desktop/Web_Registration_Form/migrations/alembic.ini ...  done<br>  Please edit configuration/connection/logging settings in<br>  &#39;/Users/mac/Desktop/Web_Registration_Form/migrations/alembic.ini&#39; before proceeding.</pre><p>From the command logs, we can see that a migrations folder has been created in our application. This folder contains files that are needed to migrate tables and update table schemas on our database.</p><p>Now that we have a migrations repository, it’s time to migrate the Registration table to the database using the flask-migrate extension.</p><p>Ensure your Postgres server is up; then run the flask db migrate command to automatically migrate our SQLAlchemy database to the Postgres database that we assigned earlier with the URI in the config file.</p><pre>(env)  $ flask db migrate -m &quot;registrations table&quot;<br>INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.<br>INFO  [alembic.runtime.migration] Will assume transactional DDL.<br>INFO  [alembic.autogenerate.compare] Detected added table &#39;registration&#39;<br>INFO  [alembic.autogenerate.compare] Detected added index &#39;ix_registration_email&#39; on &#39;[&#39;email&#39;]&#39;<br>  Generating /Users/mac/Desktop/Web_Registration_Form/migrations/versions/eccfa5d8a3f6_registrations_table.py ...  done</pre><p>flask db migrate doesn’t make any changes to the database — it only generates the migration script. To make the changes, we use the flask db upgrade command. You can also revert the changes by using flask db downgrade.</p><pre>(env) $ flask db upgrade<br>INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.<br>INFO  [alembic.runtime.migration] Will assume transactional DDL.<br>INFO  [alembic.runtime.migration] Running upgrade  -&gt; eccfa5d8a3f6, registrations table</pre><p>Now we can open <a href="https://arctype.com/?utm_campaign=postgres-heroku&amp;utm_medium=blog&amp;utm_source=medium">Arctype </a>and check if the table was successfully migrated to the local Postgres database.</p><figure><img alt="Arctype SQL editor" src="https://cdn-images-1.medium.com/max/1024/1*S6wltTnfuc4N6QEVzKODSQ.png" /><figcaption>SQL editor: <a href="https://arctype.com/?utm_campaign=postgres-heroku&amp;utm_medium=blog&amp;utm_source=medium">Arctype</a></figcaption></figure><h3>Inserting Data From a Flask App in Postgres</h3><p>In this section, we’ll update our route function to add the data collected from the webpage to the database.</p><p>First, we’ll update our imports by including our database instance and table model in the app\routes.py file:</p><pre>from app.models import Registration<br>from app import db<br>from flask import redirect, url_for</pre><p>In the route function, we’ll create an instance of the Registration class and update it with information collected from the form. We then proceed to add and commit the instance to the database.</p><p>Add the following if statement inside the index() function in routes.py:</p><pre>if form.validate_on_submit(): <br>        reg_form = Registration(username=form.username.data,email=form.email.data, first_name=form.first_name.data,last_name=form.last_name.data, company=form.company.data,contact_no=form.contact_no.data)<br>        db.session.add(reg_form)<br>        db.session.commit()<br>        return redirect(url_for(&#39;index&#39;))</pre><h3>Testing if the Flask App Is Inserting Data in Postgres</h3><p>Let’s test our application locally one more time before deploying to Heroku:</p><pre>(env) $ flask run<br> * Environment: production<br>   WARNING: This is a development server. Do not use it in a production deployment.<br>   Use a production WSGI server instead.<br> * Debug mode: off<br> * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)</pre><p>Navigate to <a href="http://127.0.0.1:5000/">http://127.0.0.1:5000/</a>, and submit the form.</p><p>After submitting the form, you can check that a new entry was added to your database by checking the Registrations table in <a href="https://arctype.com/?utm_campaign=postgres-heroku&amp;utm_medium=blog&amp;utm_source=medium">Arctype</a>:</p><figure><img alt="After submitting the form, you can check that a new entry was added to your database by checking the Registrations table in Arctype." src="https://cdn-images-1.medium.com/max/1024/1*yBNN_o9nX-0gjCV86r-r6Q.gif" /></figure><h3>Deploying the Flask app and Postgres Database to Heroku</h3><p>Now that we’ve tested our application locally, it’s time to deploy the application and our Postgres database to Heroku so we can access it from anywhere.</p><p>The first step is <a href="https://devcenter.heroku.com/articles/heroku-cli">downloading and installing the Heroku CLI</a>.</p><p>Then we can log into Heroku from the command line with Heroku login.</p><p>Once we’re logged in, we can <a href="https://devcenter.heroku.com/articles/creating-apps">create a new app on Heroku</a> with Heroku create [app-name]. Heroku apps are in a global namespace — therefore, you need to choose a unique name for your application. If you don’t specify a name for your application, Heroku will generate a random name for your application.</p><pre>(env) $ Heroku create arctype-registration-app<br>Creating ⬢ arctype-registration-app... done<br>https://arctype-registration-app.herokuapp.com/ | https://git.heroku.com/arctype-registration-app.git</pre><p>Run pip freeze &gt; requirements.txt to update the requirements file. This defines processes based using the following format &lt;process type&gt;: &lt;command&gt;. Since our application contains a web server (gunicorn), the process type is web, and the command will launch the gunicorn server. Therefore, we need to run the command below on the terminal to create the Procfile:</p><p>echo web: gunicorn app:app &gt; Procfile</p><p>Heroku has different <a href="https://devcenter.heroku.com/articles/heroku-postgres-plans#hobby-tier">service plans</a> for its PostgreSQL offering. Choosing a plan for your application depends on the characteristics of your application and its bandwidth for service downtimes. In this tutorial, we’ll use the <a href="https://devcenter.heroku.com/articles/heroku-postgres-plans#hobby-tier">hobby-dev plan</a>, which is free and serves the purpose we need it for.</p><p>Now, we’ll create a hobby-dev Postgres database for our application using the heroku addons:create heroku-postgresql:hobby-dev --app app-name command:</p><pre>(env) $ heroku addons:create heroku-postgresql:hobby-dev --app arctype-registration-app<br>Creating heroku-postgresql:hobby-dev on ⬢ arctype-registration-app... free<br>Database has been created and is available<br> ! This database is empty. If upgrading, you can transfer<br> ! data from another database with pg:copy<br>Created postgresql-slippery-96960 as DATABASE_URL<br>Use heroku addons:docs heroku-postgresql to view documentation</pre><p>More information on working with Postgres databases can be <a href="https://devcenter.heroku.com/articles/heroku-postgresql#connecting-in-python">found here</a>.</p><p>Now that we’ve created a remote Postgres database for our application on Heroku, we need to update the SQLALCHEMY_DATABASE_URI variable in the config.py file with the new database URI. To retrieve the remote database URI, we’ll use the heroku config --app app-name command.</p><p>Once the URI is updated, the final step is deploying our application to Heroku’s servers.</p><p>First, we’ll commit all of our files and push them to the Heroku master branch. Run git add . and git commit -m “heroku commit” and then git push heroku main to deploy to Heroku.</p><p>Your app is now live at <a href="https://app-name.herokuapp.com/">https://your-app-name.herokuapp.com</a>.</p><figure><img alt="Flask web app hosted in the cloud" src="https://cdn-images-1.medium.com/max/880/0*jniLyns4Daombj6l" /><figcaption>Flask web app hosted in the cloud</figcaption></figure><h3>Migrating Tables From a Local Postgres Database to Heroku</h3><p>The last step is migrating the Registrations table we created in our local Postgres database to the new Heroku database instance. We can do this by running db create_all() from the Heroku Python terminal:</p><pre>(env) $ heroku run python<br>Running python on ⬢ arctype-registration-app... up, run.9023 (Free)<br>Python 3.6.12 (default, Sep 29 2020, 17:50:28) <br>[GCC 9.3.0] on linux<br>Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.<br>&gt;&gt;&gt; from app import db<br>&gt;&gt;&gt; db.create_all()</pre><p>To check if the Registrations table was successfully created, connect to the Heroku database from Arctype, and you should see the Registrations table.</p><h3>Congratulations!</h3><p>You’re now the proud owner of a web app that anyone with internet access can use from anywhere in the world. Let’s zoom out and review what we covered:</p><ol><li>How a Flask app works</li><li>Creating a Postgres database</li><li>Creating a database model in Python using SQLAlchemy</li><li>Migrating a database in Python using flask-migrate</li><li>Inserting data into a Postgres database from a Flask app</li><li>Deploying a Flask app and Postgres database to Heroku</li></ol><p>Flask, Postgres, and Heroku together are a powerful combination for creating a robust web application quickly.</p><p>Now go create your own web apps, and if you get stuck you can join the <a href="https://discord.gg/YaZQzBen">Discord community</a> to receive help from other developers.</p><p><em>Originally published at </em><a href="https://blog.arctype.com/postgres-heroku/"><em>https://arctype.com</em></a><em> on Feb. 11, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e628b28325d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/better-programming/create-and-deploy-a-web-app-to-the-cloud-with-python-in-20-minutes-7e628b28325d">Create and Deploy a Web App to the Cloud With Python in 20 Minutes</a> was originally published in <a href="https://betterprogramming.pub/">Better Programming</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Increased Traffic by 300%: My First 30 Days as a Growth Lead]]></title>
            <link>https://lofiderek.medium.com/how-i-increased-traffic-by-300-my-first-30-days-as-a-growth-lead-84ce8c56efee?source=rss-42f9e7cb99f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/84ce8c56efee</guid>
            <category><![CDATA[strategy]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[content-marketing]]></category>
            <category><![CDATA[growth-hacking]]></category>
            <category><![CDATA[growth]]></category>
            <dc:creator><![CDATA[Derek Xiao]]></dc:creator>
            <pubDate>Sat, 30 Jan 2021 17:32:53 GMT</pubDate>
            <atom:updated>2021-01-30T17:32:53.104Z</atom:updated>
            <content:encoded><![CDATA[<p>The Franken-strat: a 3-step framework to drive results</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*STCoQD5GxLW_8xvO7QGOTA.png" /><figcaption>Franken-strat results</figcaption></figure><p>I’m going to share the exact framework I used to increase the number of unique pageviews at <a href="https://arctype.com/?utm_campaign=one-month-growth&amp;utm_medium=blog&amp;utm_source=medium">arctype.com</a> by 300% in 30 days — the <strong>Franken-strat</strong>.</p><p>If you’re looking for a quick growth hack, this is <strong>not</strong> that.</p><p>I started implementing this framework on my first day (12/21) to create a “content machine”, and as you can see in the graph above we didn’t see results until 4 weeks later.</p><p>I called it the Franken-strat because it involves moving quickly to bring a self-sustaining “machine” to life, and then improving it over time.</p><p>Before I joined the company, the CEO told me my job was to “own the active user KPI.”</p><p>Honestly, I didn’t really know how to do that. I had some vague ideas, but I had studied computer science and finance in school, not marketing.</p><p>Thankfully during my time at Capital One I picked up some rules for <a href="https://lofiderek.medium.com/a-reflection-on-my-time-at-capital-one-b72e711a4cc6">how to <em>think</em> about problem solving</a>. The Franken-strat is a set of principles to help anyone create quick and consistent results in a space where they have limited experience.</p><p>Here’s the Franken-strat:</p><ol><li>Strategy: Accept an 80/20 strategy</li><li>Processes: Build machines, hire operators</li><li>Tuning: Measure results in weeks, not months</li></ol><h3>1. Applying The 80/20 Rule to Strategy</h3><figure><img alt="Framework for Knowns-Unknowns. Four-quadrants including unknown-unknown, known-unknown, unknown-known, and known-known." src="https://cdn-images-1.medium.com/max/1024/1*1k-CtVpAinllXVxkjRoQ0g.png" /><figcaption>Known-Unknown Framework</figcaption></figure><p>Okay time to increase the number of Arctype users… okay how do I do that…</p><p>I quickly realized that <em>I didn’t know what I didn’t know</em>.</p><p>When you’re put in front of a new problem, you’ll probably find yourself in the bottom left of the <a href="https://uxdesign.cc/the-knowns-and-unknowns-framework-for-design-thinking-6537787de2c5">known-unknown grid</a>.</p><p>In order to get out of this quadrant, I created an <strong>80/20 strategy.</strong></p><p>The goal is not to try to jump to known-knowns, because we’ll probably miss. The goal is to learn enough to know what you don’t know <em>as fast as possible, </em>and then come up with a bunch of hypotheses to test.</p><p>I came up with the 80/20 strategy because I couldn’t afford to invest months to come up with the “perfect” strategy.</p><p>I view strategy as a plan to get from A to B. I didn’t need the full 4K map with live traffic updates. I just needed some high-quality <em>constraints </em>to keep me in the right direction and help me make <em>faster decisions</em>.</p><p>Here are three tips for creating a 20% strategy that will get you 80% of the way:</p><ol><li>Timebox the process</li><li>Dedicate 50% to research</li><li>Steal from the best</li></ol><h4><strong>Timebox the process</strong></h4><p>Coming up with a new strategy can feel overwhelming because there’s an infinite number of ways to get from A to B.</p><p>To fight this decision paralysis, I created a forcing function for myself.</p><p>The ingredients were simple:</p><ol><li>A defined output (i.e. a deck that defines our growth strategy for the next 6 months)</li><li>A deadline that you want to deliver it by (i.e. next month’s strategy meeting)</li></ol><p>You won’t be completely happy with the output. But you’ll have enough to get started, and then you can improve it over time as you collect data.</p><h4><strong>Take 50% of the time for due diligence</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VlYK-pKMb-RhTjjj9bGf0g.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@rssemfam?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Russ Ward</a> on <a href="https://unsplash.com/s/photos/research?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>We can’t talk about strategy until we’re safely out of the bottom left quadrant.</p><p>To make this transition, I dedicate 50% of the time I gave myself to focus on <em>learning</em>.</p><blockquote>“At smaller companies there’s less permission needed to learn more things” — Vinod Khosla</blockquote><p>This was my favorite part in the entire process. It highlighted what I’ve loved about being at a startup, the velocity of learning.</p><p>But back to the Franken-strat, the research period lasted around 1 week. During that time I focused exclusively on reading books, blogs, case studies- any content I could find about accelerating growth that passed my quality filter.</p><p>And I put all my takeaways into one long<strong> </strong>word doc (I think it ended up with 25+ pages).</p><p>Don’t worry yet about organizing it, finding themes, or figuring out how it applies to your strategy. Right now you just want to absorb as much information as possible, and then you can use this information to create a strategy in the second half of the process.</p><h4><strong>Steal from the best</strong></h4><p>At Capital One we had a team of 50+ analysts solely focused on the company’s strategy. The bad news as a startup is you won’t have the resources to compete with this.</p><p>But the good news is you don’t need to.</p><p>The large players have invested years of capital to get their strategy to 100%. We’re just looking for that high return, 20% strategy.</p><p>And in order to get there, we can and should steal ruthlessly. Stalk your direct competitors, adjacent companies, and companies you admire in completely different companies. Find the case studies, tweet threads, company blogs, industry talks, etc that break down the strategies they used.</p><p>And then combine the best of what you find to create a beautiful monster, I mean franken-strat.</p><h3>2. Build a machine, hire operators</h3><p>I always give new PMs the same advice: fall in love with the minutiae.</p><p>We all love the exciting, whiteboard, free space, sticky note, order-in-lunch, won’t-get-prioritized-until-next-year, design thinking sessions. But honestly I think that’s the easy part.</p><p>The best PMs I’ve seen focus on flawless execution: prioritized backlogs with well-groomed stories, defined sprint goals, meeting agendas, monthly one-on-ones with engineering, UAT validation processes, documented release plans… if you’re a PM or engineer then you probably got at least a little excited reading that list.</p><p>I was ready to bring this delivery mentality to Arctype, but I quickly realized that as a leader at an early stage startup my job was not to run the machine- it’s to <em>build the machine</em>.</p><h4>How I built a content machine</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KjRXRRceouA1hzfNWGmiJw.png" /><figcaption><a href="http://blog.arctype.com/">Arctype Blog</a></figcaption></figure><p>After I shared the 80/20 growth strategy with the team, we agreed that we wanted to focus on content for our first acquisition channel. We specifically focused on <a href="https://blog.arctype.com/sql-50-years/">long-form, technical blogs</a>.</p><p>There were a lot of things that had to come together: writing, timelines, editing, publishing, distributing, analytics, etc.</p><p>I started with the mentality that I could write the blogs myself, but the CEO pushed me to create a more sustainable model.</p><p>This is how I switched from being an operator to creating a content machine:</p><ul><li>Writing-&gt; <a href="https://blog.arctype.com/contribute">Hiring process for freelance writers</a></li><li>Timelines -&gt; <a href="https://airtable.com/templates/content-production/exp3FNmOkdHZvprXB/digital-content-calendar">Editorial calendar</a> in Airtable</li><li>Editing -&gt; <a href="https://blog.arctype.com/style-guide">Arctype editorial guide</a></li><li>Publishing -&gt; <a href="https://ghost.org/">Ghost CMS</a></li><li>Distribution -&gt; <a href="https://www.blackship.one/content-distribution/">Distribution checklist</a></li><li>Analytics -&gt; <a href="https://arctype.com/?utm_campaign=one-month-growth&amp;utm_medium=blog&amp;utm_source=medium">Arctype dashboard</a></li></ul><p>After setting up the processes, make sure you run through at least one iteration yourself. Putting the machine through a QA cycle will help you find any major bugs and potential improvements before you ask someone else to use it.</p><p>But once everything is done and calibrated, now you can hire anyone and start consistently producing high-quality outputs.</p><h3>3. Measure results in weeks, not months</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DtCowQAF68Esqt0m1jv87w.png" /><figcaption>Arctype posting schedule</figcaption></figure><blockquote>“If you’re not embarrassed by the first version of your product, then you’ve launched too late” — Reed Hoffman, founder of LinkedIn</blockquote><p>On my first day, the CEO asked me to give weekly updates on key metrics. This was a fantastic forcing function to deliver outputs early and often.</p><p>If you’re expected to improve a metric in the next 7 days, you can’t afford to not ship something. And as you can see in the graph above, sometimes even when I did ship something it wouldn’t improve any metrics. But that didn’t matter.</p><p>Those early articles taught me valuable lessons about what people wanted to read, how to work with writers, and where we needed to distribute.</p><p>And from there, you can see by our third post we had finally found the right mix of ingredients to drive results.</p><p>If we had waited until our content strategy was perfect and every part of the content machine was complete, then that first post would probably still be unpublished.</p><h3>Achieving Success with the Franken-strat</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*STCoQD5GxLW_8xvO7QGOTA.png" /><figcaption>Franken-strat</figcaption></figure><p>I started with near 0 knowledge about marketing, and in ~4 weeks I was able to increase traffic to the <a href="https://arctype.com/?utm_campaign=one-month-growth&amp;utm_medium=blog&amp;utm_source=medium">Arctype</a> site by 300% by following the Franken-strat:</p><ol><li>Strategy: Accept an 80/20 strategy</li><li>Processes: Build machines, hire operators</li><li>Execution: Measure results in weeks</li></ol><p>My first month at <a href="https://arctype.com/?utm_campaign=one-month-growth&amp;utm_medium=blog&amp;utm_source=medium">Arctype</a> has been an amazing learning experience. If you’re interested in learning more about driving growth at a startup, follow me on Twitter <a href="https://twitter.com/lofiderek">@lofiderek</a> or join my monthly newsletter- <a href="https://shipped.substack.com/">Shipped</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84ce8c56efee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NLP with Python: Biden vs Trump Inauguration Speech Top 20 Words]]></title>
            <link>https://blog.devgenius.io/nlp-with-python-biden-vs-trump-inauguration-speech-top-20-words-3394d2a8b37?source=rss-42f9e7cb99f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/3394d2a8b37</guid>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Derek Xiao]]></dc:creator>
            <pubDate>Thu, 21 Jan 2021 05:34:52 GMT</pubDate>
            <atom:updated>2021-01-28T12:02:44.629Z</atom:updated>
            <content:encoded><![CDATA[<h3>Learn NLP in Python: Top 20 Words in Biden’s vs Trump’s Inauguration Speeches</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*l_wDzdUr80jYiIOO.png" /></figure><p>Can Python unite the nation?</p><p>Yesterday we saw our country’s 45th successful transfer of the presidency.</p><p>This marked the end of a highly contested election during which our nation at times felt more divided than ever.</p><p>But as I sat in my living room today with my parents and watched Biden’s inaugural address, I felt hopeful.</p><blockquote><em>“Some days you need a hand. There are other days when we’re called to lend a hand. That’s how it has to be, that’s what we do for one another. And if we are that way our country will be stronger, more prosperous, more ready for the future. And we can still disagree.” — </em><a href="https://www.yahoo.com/now/full-transcript-joe-bidens-inauguration-175723360.html"><em>Joe Biden, 2021 Inaugural Address</em></a></blockquote><p>As a citizen, I was inspired by Joe’s promise for a united nation.</p><p>But as a developer I started to wonder- could I quantify this hope?</p><p>The inaugural address is a president’s first speech to the nation. The speech is meticulously written by a team of writers to capture the mood of the nation and the most pressing issues that we face.</p><p>Could the specific words used in this speech give us insight into the path ahead?</p><p>I compared the top 20 most common words in Biden’s speech with the top 20 words in Trump’s 2017 inaugural address to compare where our country is now versus four years ago, and what to expect over the next four years.</p><h3>Using Python to Find the Top 20 Most Common Words</h3><p>This next section is a tutorial for the Python analysis. If natural language processing doesn’t get you excited, then you may want to jump to the end (but it’s also only 20 lines of code so could be fun to learn!)</p><p>The goal for this analysis is to take each inaugural address and find the most common words. The analysis consists of two parts:</p><ol><li>Scraping the speech from the web using Beautiful Soup</li><li>Processing the words using NLKT</li></ol><p>If you want to run the code at home, this is what you’ll need to do to get set up:</p><ol><li><a href="https://www.python.org/downloads/">Install python 3</a></li><li>Install requests, BeautifulSoup and nltk with pip3 install</li><li>brew install jupyter and then open a <a href="https://jupyter.org/">jupyter notebook</a> by running jupyter notebook. Now you can run all of the commands below in the jupyter notebook!</li></ol><p>If you want to skip the scraping and cleaning, <a href="https://arctype.com/?utm_campaign=speech-analysis&amp;utm_medium=blog&amp;utm_source=medium">download Arctype</a> and use the database credentials at the end to access the data.</p><h4>1. Web Scraping with Beautiful Soup</h4><p><a href="https://realpython.com/beautiful-soup-web-scraper-python/">Web scraping</a> is the process of collecting information from the web. In this scenario, we’re going to be scraping transcripts of each president’s inauguration speech.</p><p>You can find each president’s speech at these websites:</p><p>We first use the requests package to scrape the entire HTML code from each website.</p><pre>import requests</pre><pre>URL = &#39;https://www.yahoo.com/now/full-transcript-joe-bidens-inauguration-175723360.html&#39;</pre><pre>page = requests.get(URL)</pre><p>Congrats you’ve built your first web scraper!</p><p>This code is making a HTTP request to retrieve the HTML code from the server that the speech is stored at.</p><p>Now we have to take this mess of HTML and find just the text from each president’s speech. We can do this easily with Python’s Beautiful Soup package.</p><pre>from bs4 import BeautifulSoup</pre><pre>biden_speech = BeautifulSoup(page.content, &#39;html.parser&#39;)</pre><p>In the code above we’ve converted the HTML from earlier into a beautiful soup object that is easily parseable.</p><p>Now we have to find the specific HTML block that contains the text we’re looking for. We can do this using the browser’s DevTools console.</p><p>Open the speech in a new tab in your browser and press cmd+option+I to open the DevTools console. Highlight the text you&#39;re looking for, and you&#39;ll be able to see the HTML tag that contains that text in the console on the right.</p><p>For Biden’s speech, we can see that it’s contained in a &lt;div&gt; tag labelled with a caas-body class name. Switching back to Python, we can find that tag using the find_all method with our beautiful soup object from before.</p><pre>biden_speech_content = biden_speech.find_all(&#39;div&#39;, class_=&#39;caas-body&#39;)</pre><p>When we look at the biden_speech_content object, we&#39;ll still find other html tags that aren&#39;t related to the speech such as:</p><pre>&lt;div class=&quot;caas-readmore caas-readmore-collapse&quot;&gt;<br>   &lt;button aria-label=&quot;&quot; class=&quot;link rapid-noclick-resp caas-button collapse-button&quot; data-ylk=&quot;elm:readmore;slk:Story continues&quot; title=&quot;&quot;&gt;<br>    Story continues<br>   &lt;/button&gt;<br>&lt;/div&gt;</pre><p>In order to find just the text from Biden’s speech, we can filter for the &lt;p&gt; tags that aren&#39;t labelled with a class:</p><pre>biden_speech_content_v2 = biden_speech_content[0].find_all(&#39;p&#39;, attrs={&#39;class&#39;: None})</pre><p>Now we have all the text, but the string &lt;p&gt; is appended to the beginning of every sentence. We can remove these HTML tags with the Beautiful Soup get_text method:</p><pre>biden_speech_str = &quot;&quot;</pre><pre>for sentence in biden_speech_content_v2:<br>   text = sentence.get_text() biden_speech_str = biden_speech_str + &quot; &quot; + text</pre><p>Finally, we should be left with a clean speech that we can analyze with the nlkt package.</p><h4>2. Finding Word Frequency with NLKT</h4><p>We’re getting close to the end now! The final steps are doing some basic natural language processing (NLP) techniques using the Python NLP package, NLKT.</p><p>We could do a frequency analysis of the speech now, but this would show words like “I”, “We”, and “The” as the most common words. In natural language processing these are called <em>stop words.</em></p><p>We can use NLKT’s <a href="https://gist.github.com/sebleier/554280">list of English stop words</a> to find just the words that we’re interested in.</p><pre>from nltk.tokenize import word_tokenize<br>from nltk.corpus import stopwords<br>from nltk import FreqDist</pre><pre>biden_words = word_tokenize(biden_speech_str.lower())</pre><pre>filtered_biden_speech = [w for w in biden_words if not w in stop_words and w.isalpha()]</pre><p>Lets break down what the code is doing:</p><ol><li>Using .lower() to cast the entire speech to lower case so it can be compared to the stop words</li><li>Separating the string into individual words with word_tokenize</li><li>Removing stop words: if not w in stop_words</li><li>Removing punctuation like periods and commas: w.isalpha()</li></ol><p>Now we have a list of words that we can count!</p><pre>freq = FreqDist(filtered_biden_speech)</pre><pre>print (freq.most_common(20))</pre><p>But what you might find as you look through the list is that there are separate counts for similar words such as “country” and “countries”. In order to count these as one word, we have to the list so that every word is converted to its base word.</p><pre>from nltk.stem import WordNetLemmatizer</pre><pre>lemmatized_biden = [wordnet_lemmatizer.lemmatize(word) for word in filtered_biden_speech]</pre><pre>freq_lemma = FreqDist(lemmatized_biden)<br>print (freq_lemma.most_common(20))</pre><p>Done! You’ve successfully scraped data from the web and analyzed it with NLP all while supporting democracy. Let’s take a look at the results.</p><h3>Biden’s vs. Trump’s Inauguration Speeches: Most Frequent Words</h3><pre>k,v = zip(*freq_lemma.most_common(10))</pre><pre>fig = px.bar(x=v,y=k, orientation=&#39;h&#39;) fig.update_layout(yaxis=dict(autorange=&quot;reversed&quot;))<br>fig.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ca9fckVOdiDUjuNLr4hAbw.png" /><figcaption>Top 10 Most Frequent Words from Biden’s Inauguration Speech</figcaption></figure><p>The top word was distorted by the lemmatizer, but the word was “us”.</p><p>These were the top 10 words from Trump’s speech in 2017:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*da7-wQCdx9Zi6yn5_A-K8g.png" /><figcaption>Top 10 Most Frequent Words from Trump’s 2017 Inauguration Speech</figcaption></figure><p>What stood out to me is that 50% of the top 10 words in for both presidents were the same:</p><p>The optimistic side in me looks at this data and sees a nation that shares common values. We care about our country, and we care about each other.</p><p>But at the same time, we are all facing our own unique issues. If we look at the next 10 most common words for each president’s speech we begin to see some differences.</p><p><strong>Biden’s Speech:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6SmUDX42DS0zEByOwPPBSA.png" /><figcaption>Biden’s Top 10–20 Most Common Words</figcaption></figure><p><strong>Trump’s Speech:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FKgkyIZDAQa881MkilBjgg.png" /><figcaption>Trump’s Top 10–20 Most Common Words</figcaption></figure><p>Biden’s speech was undeniably a call to bring our nation together in unity. On the other side, we can see Trump appealing to Americans whose job[s] are under threat and need to protect their livelihood and families.</p><p>The data shows two groups of people facing their own challenges, but I also see one nation with common values.</p><p>We set off to see if we could quantify “hope”. And I believe we found an answer.</p><p>If two presidents with polar opposite political views can appeal to their supporters with 50% of the same vocabulary, then there is still hope to unite around our similarities.</p><blockquote><em>What are the common objects we as Americans love, that define us as Americans? I think we know. Opportunity, security, liberty, dignity, respect, honor, and yes, the truth. — Joe Biden, 2021 Inaugural Address</em></blockquote><h3>A Full Speech Comparison with Arctype</h3><p>I shared the top 20 words, but there were more than 500 unique words in Biden’s inauguration speech. If you want to see more analysis, we’ve uploaded all the speech data to <a href="https://arctype.com/?utm_campaign=speech-analysis&amp;utm_medium=blog&amp;utm_source=medium">Arctype</a> so you can skip the scraping and cleaning.</p><p>The dataset includes 2 tables:</p><ul><li><strong>Frequencies table</strong>: full list of the word frequencies for both speeches</li><li><strong>Sentences tables</strong>: cleaned sentences for both speeches so you can do your own analysis</li></ul><p>Here’s how to connect to the data:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0WzojvhQiDS206SmNZgUrQ.png" /></figure><ol><li>Download the free <a href="https://arctype.com/?utm_campaign=speech-analysis&amp;utm_medium=blog&amp;utm_source=medium">Arctype SQL Client</a></li><li>Input the credentials below in Arctype to connect to the database</li><li>Run a query!</li></ol><p><strong>Database credentials</strong>:</p><ul><li>host: arctype-pg-demo.c4i5p0deezvq.us-west-2.rds.amazonaws.com</li><li>port: 5432</li><li>user: root</li><li>password: HC9x0OkI9vVO4wqprscg</li><li>database: inauguration_2021</li></ul><p>After you look at the data, leave a comment below with your own takeaways!</p><p><em>Originally published at </em><a href="https://blog.arctype.com/python-analysis-inauguration-speech/"><em>https://blog.arctype.com</em></a><em> on January 21, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3394d2a8b37" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/nlp-with-python-biden-vs-trump-inauguration-speech-top-20-words-3394d2a8b37">NLP with Python: Biden vs Trump Inauguration Speech Top 20 Words</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What I Learned After 4 Years at Capital One]]></title>
            <link>https://lofiderek.medium.com/a-reflection-on-my-time-at-capital-one-b72e711a4cc6?source=rss-42f9e7cb99f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/b72e711a4cc6</guid>
            <category><![CDATA[careers]]></category>
            <category><![CDATA[growth]]></category>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[personal-development]]></category>
            <category><![CDATA[problem-solving]]></category>
            <dc:creator><![CDATA[Derek Xiao]]></dc:creator>
            <pubDate>Sat, 19 Dec 2020 00:28:54 GMT</pubDate>
            <atom:updated>2021-01-21T16:40:24.218Z</atom:updated>
            <content:encoded><![CDATA[<h3>A reflection on my time at Capital One</h3><p>I started my career with Capital One when I was a sophomore in college.</p><p>That first internship was the start of almost a four year journey. During that time I’ve worked on four different teams, tried three different roles, and met countless people who have inspired me to be my best.</p><p>I’ve been able to continue solving new challenges, which made leaving an incredibly difficult decision. I have bittersweet news to share that today was my last day at Capital One.</p><p>One of my mentors at the company holds a personal philosophy that resonated with me — “growth happens in the space between” (thank you Hameto).</p><p>Before starting the next phase of my career, I wanted to write this article to reflect on my experiences over the past four years and share <strong>35 principles for problem-solving that I learned along the way.</strong></p><h3>From then to now</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*pQa1D41lrLUkPQQhKIzeJA.jpeg" /><figcaption>Winter 2016 — Capital One externship</figcaption></figure><p>In the fall of 2016, I was a sophomore in college searching for a summer internship. No company wanted sophomore interns, so I started applying for “externship” programs en masse.</p><p>To be honest, I had never heard of Capital One when I was invited to the phone interview.</p><p>Luckily I did well enough to be accepted into the program. I spent one week at the Plano, Texas campus, and I was stunned.</p><p>I saw a mission-driven company that put its people first. I discovered a framework for thinking that was customer-centric, design-oriented, and analytical. And most importantly, I met people who lived by inspiring, shared values.</p><p>After the externship, I had an opportunity to do a final round interview for the summer analyst program. I was walking across my college campus heading towards the business school after the interview when I received a call from my recruiter.</p><p>I was probably the first candidate to ever accept an offer on the spot.</p><p>My experience that summer confirmed what I had seen during the externship. The next summer I returned to the company and rotated to the New York office.</p><p>When I came back to school my senior year I didn’t think I would return to Capital One because I wanted to transition into product management.</p><p>And then one day I received a call from my recruiter. The company had created an APM program, and they wanted me to be part of the inaugural class of ten associates. I again happily accepted.</p><p>Since starting full time in August 2019, I’ve had the opportunity to lead multiple development teams, ship two new products, and work with countless talented individuals across the company. And as I solved each unique challenge, I began to develop a universal framework for problem-solving.</p><h3>A framework for thinking</h3><p>One of the most impressive aspects of the Capital One culture is teaching people <strong><em>how</em></strong><em> </em>to solve problems.</p><p>Underlying every decision is a foundation of systematic, structured thinking that can be traced back to the founder and CEO’s career in consulting. Learning frameworks allows you to apply a small set of heuristics across a broad range of problems.</p><p>As a tribute to the <a href="https://www.mckinsey.com/alumni/news-and-insights/global-news/alumni-news/barbara-minto-mece-i-invented-it-so-i-get-to-say-how-to-pronounce-it">MECE framework</a> (maybe 80% MECE), I’ve grouped my learnings into five categories: Strategy, Execution, Storytelling, Influence, and Leadership.</p><p>As I put this list together I tried to avoid the infinite number of platitudes that exist in each category. Next to some, I’ve also included the names of colleagues and mentors who guided me along the way.</p><h4>Strategy</h4><ol><li><strong>Start at the end</strong></li><li>Find the leverage (learned from Amanda B.)</li><li>Fall in love with problems not solutions (learned from Teague H.)</li><li>Where are we going? Where are we now?</li><li>A good idea is worth ~$0.01 (learned from Jennifer L.)</li><li>Universally applicable framework: Main point -&gt; 3 supporting pillars -&gt; Evidence (every deck ever made)</li></ol><h4>Execution</h4><ol><li><strong>Execution &gt; Strategy </strong>(learned from David S.)</li><li>Don’t be comfortable with ambiguity… remove it</li><li>Clear goals inspire action (learned from Ben Z.)</li><li>Make inductive leaps</li><li>Test then invest (learned from Aram T.)</li><li>Flare, focus, repeat</li><li>Great artists steal (credit: Picasso)</li><li>Constraints breed creativity (learned from Jennifer L.)</li><li>The key to finishing is starting</li><li>Document process and decisions (learned from David S.)</li></ol><h4>Storytelling</h4><ol><li>Write the storyline first (learned from Michael S.)</li><li>Ask yourself “… so what?” to define takeaways (learned from Michael S.)</li><li>Data craves narrative</li><li>Why waste time say lot word when few word do trick</li><li>Use silence to create emphasis (also Michael S, very excellent narrator)</li></ol><h4>Influence</h4><ol><li>Share context (learned from Oliver D.)</li><li>State assumptions</li><li>Understand before you’re understood (learned from Oliver D.)</li><li>Choose your battles / give and take</li><li>Develop personal relationships (learned from Michelle J.)</li><li>Respond with “Yes… and” (learned from Michael M.)</li></ol><h4>Leadership</h4><ol><li><strong>Your job is to create clarity </strong>(credit: <a href="https://sippey.medium.com/">Michael Sippey</a>)</li><li>Set goals as a team (learned from Ben Z.)</li><li>Communicate the why (learned from Hameto B.)</li><li>Clear is kind, unclear is unkind (credit: <a href="https://brenebrown.com/blog/">Brené Brown</a>)</li><li>Build momentum</li><li>Celebrate the team’s achievements</li><li>Create psychological safety (learned from Tom D.)</li><li>Acknowledge your ego (learned from Steven Z.)</li></ol><h3>The next chapter</h3><p>I‘ve learned an incredible amount during my time at Capital One that I know I will carry with me throughout my career.</p><p>I ultimately decided to leave so that I could continue to tackle new and larger challenges. In order to achieve that, I’ve decided to join <a href="http://www.arctype.com/">Arctype</a> and lead their growth efforts.</p><p>Arctype is an early stage startup creating a collaborative SQL editor for teams. There are some exciting things happening, and I’m looking forward to sharing more in a later post.</p><blockquote>“You’ll never regret taking a bet on yourself” — Mike K, mentor</blockquote><p>Capital One provides bank accounts and credit cards, but it creates critical thinkers, problem solvers, and storytellers.</p><p>In the interest of brevity I was only able to list each principle at a high level, but I plan to dive into each category in depth in future posts. I am setting a goal for myself to write more and share my learnings as I start this next chapter.</p><p>If you are interested in product, growth, or startups, you can follow along by subscribing to my newsletter — <a href="https://shipped.substack.com/p/coming-soon">Shipped</a>. I am excited to join the <a href="http://www.arctype.com/">Arctype</a> team, and to everyone that I worked with at Capital One — thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b72e711a4cc6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>