<?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: Adam</title>
    <description>The latest articles on DEV Community by Adam (@adamlearns).</description>
    <link>https://dev.to/adamlearns</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%2F393692%2Fa342b923-cdac-4810-8451-dfdf8dceb6b8.jpg</url>
      <title>DEV Community: Adam</title>
      <link>https://dev.to/adamlearns</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/adamlearns"/>
    <language>en</language>
    <item>
      <title>Creating your own dynamic stream overlay</title>
      <dc:creator>Adam</dc:creator>
      <pubDate>Thu, 18 Jun 2020 15:53:43 +0000</pubDate>
      <link>https://dev.to/adamlearns/creating-your-own-dynamic-stream-overlay-2bf4</link>
      <guid>https://dev.to/adamlearns/creating-your-own-dynamic-stream-overlay-2bf4</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;This post is for people who want a custom, dynamic overlay and know how to program.&lt;/p&gt;

&lt;p&gt;As for why you'd want an overlay in the first place, here are common uses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Displaying information

&lt;ul&gt;
&lt;li&gt;Latest followers&lt;/li&gt;
&lt;li&gt;Commands of interest like &lt;code&gt;!game&lt;/code&gt; or &lt;code&gt;!help&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Advertising your social-media platforms&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Adding pizzazz

&lt;ul&gt;
&lt;li&gt;Fanfare for a new subscriber&lt;/li&gt;
&lt;li&gt;Bursts of emotes&lt;/li&gt;
&lt;li&gt;Playing sounds or music&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Regarding the &lt;strong&gt;dynamic&lt;/strong&gt; aspect—your streaming software can already render text and graphics. However, it may not allow for event-based triggers or animations. For example, I made a custom overlay that reads a file from my system, fades in a marquee with that text every so often, then fades it out when enough time has elapsed. With my streaming software, I only would have been able to render static text on the stream.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do overlays work?
&lt;/h2&gt;

&lt;p&gt;I use &lt;a href="https://obsproject.com/" rel="noopener noreferrer"&gt;OBS&lt;/a&gt;, so I'll talk about its specifics here, but software like &lt;a href="https://www.xsplit.com" rel="noopener noreferrer"&gt;XSplit&lt;/a&gt; also supports this method.&lt;/p&gt;

&lt;p&gt;OBS has a built-in "Browser" source that lets you show the contents of a webpage:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8fway2ga2nyhp5fxs45e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8fway2ga2nyhp5fxs45e.png" alt="How to add a browser source in OBS" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From there, you type in a file path or URL, and OBS will render whatever you would see if you had pointed your actual browser at the same page:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhksgi2til6c1g4l5jl1a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhksgi2til6c1g4l5jl1a.png" alt="Customizing the browser source in OBS" width="721" height="887"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That means that you "only" have to make a webpage with your overlay's contents. If you wanted something basic enough, you could write a simple HTML file with CSS animations. However, this is where game engines really shine since they're built to handle graphics, animations, and even sounds! As long as the game engine can export to HTML, then you can use it to make overlays.&lt;/p&gt;

&lt;p&gt;I prefer to use &lt;a href="https://phaser.io/" rel="noopener noreferrer"&gt;Phaser&lt;/a&gt; since it's relatively easy to learn. It's also specifically intended for WebGL games, which means you can just save your JavaScript file as you're working and click "refresh cache of current page" in OBS to see your changes (as opposed to having to export a build from your game engine).&lt;/p&gt;

&lt;h3&gt;
  
  
  Setting up your webpage
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://phaser.io/download/stable" rel="noopener noreferrer"&gt;Phaser itself can be loaded as a single JavaScript file&lt;/a&gt;. There are three ways you can set up your webpage:&lt;/p&gt;

&lt;h4&gt;
  
  
  Single HTML file
&lt;/h4&gt;

&lt;p&gt;If you put everything into a standalone HTML file and load Phaser from a CDN, you won't need a web server running anywhere. On the flip side, it also means that you can't read any files from your hard drive, including JavaScript files, so you'll need to place all of your JavaScript inside the HTML file itself.&lt;/p&gt;

&lt;p&gt;This HTML snippet will float the word "Hello" from the bottom of the screen to the top:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://cdn.jsdelivr.net/npm/phaser@3.23.0/dist/phaser.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;style&amp;gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;textObject&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;width&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1920&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1080&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;phaserGame&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;Phaser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Game&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Phaser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;WEBGL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Phaser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Scale&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;FIT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;transparent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;scene&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;update&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;create&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;time&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;delta&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;textObject&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt; &lt;span class="o"&gt;-=&lt;/span&gt; &lt;span class="nx"&gt;delta&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;textObject&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello world&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;font&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;64px Lato&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#0000ff&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
      &lt;span class="p"&gt;});&lt;/span&gt;

      &lt;span class="nx"&gt;textObject&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;width&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;textObject&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;displayWidth&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nx"&gt;textObject&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;textObject&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;displayHeight&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can use this as a foundational overlay via any of these three methods that I'm outlining here by saving the contents as &lt;code&gt;index.html&lt;/code&gt; and pointing OBS at it.&lt;/p&gt;

&lt;h4&gt;
  
  
  Local server
&lt;/h4&gt;

&lt;p&gt;Using any web server (e.g. &lt;a href="https://www.npmjs.com/package/http-server" rel="noopener noreferrer"&gt;http-server for Node.js&lt;/a&gt;, &lt;a href="https://pythonbasics.org/webserver/" rel="noopener noreferrer"&gt;Python's http.server&lt;/a&gt;, or even something heavier like &lt;a href="https://httpd.apache.org/" rel="noopener noreferrer"&gt;Apache's HTTP server&lt;/a&gt;), you can serve a directory from your hard drive and point OBS at the resulting local URL. For example, I run Node.js's server via&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http-server -p 5896 .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, I can point OBS at &lt;code&gt;http://127.0.0.1:5896&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Running a web server allows you to load files from the directory that you're serving. This means that you can separate out the JavaScript from the HTML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"phaser_3_23_0.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"main.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This has an added benefit of fetching Phaser directly from your hard drive rather than a CDN, so it will load faster.&lt;/p&gt;

&lt;p&gt;While this works and gives you flexibility, you'll need the web server running any time you want to stream. I solve that particular problem by creating a &lt;code&gt;prestream.cmd&lt;/code&gt; file that I run before each stream. It sets my microphone volume, starts my chat bot, and serves my stream overlays.&lt;/p&gt;

&lt;h4&gt;
  
  
  Online site
&lt;/h4&gt;

&lt;p&gt;OBS supports using an online URL instead of a local path. This is how services like &lt;a href="https://streamlabs.com/" rel="noopener noreferrer"&gt;Streamlabs&lt;/a&gt; work; they host a page for you to use from OBS.&lt;/p&gt;

&lt;p&gt;I only suggest putting a server online if:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You stream from multiple computers and want the same overlay available everywhere.&lt;/li&gt;
&lt;li&gt;You want to make a generic overlay (like how Streamlabs did) that anyone can use.&lt;/li&gt;
&lt;li&gt;You really dislike starting a server every time you have to stream.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Taking it further
&lt;/h2&gt;

&lt;p&gt;A natural next step would be to integrate features from your streaming platform directly into your overlays. For example, when someone follows the channel, you may want to spawn fireworks in your overlay. In order to accomplish this, you would need to connect to the streaming platform's API.&lt;/p&gt;

&lt;p&gt;I want to keep this blog post brief, so I'll just outline one possible solution for this in the form of a stream-event microservice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make a separate server, e.g. in Node.js, that will connect to the Twitch API and detect when there are new followers.&lt;/li&gt;
&lt;li&gt;Connect from the overlay client to this new server via a websocket.&lt;/li&gt;
&lt;li&gt;On the server, listen for a particular API event. When one occurs, emit a message over the websocket to the overlay.&lt;/li&gt;
&lt;li&gt;Spawn an animation in the overlay's code.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Making your own overlay is a great way to achieve a specific effect and stand out from template-users. If you already know a game engine or rendering library that can output to HTML, then there's practically no setup involved. Otherwise, there'll be a bit of a learning curve, so unless you require custom functionality, then it may not be worth pursuing.&lt;/p&gt;

&lt;p&gt;If you enjoyed this post, consider taking a look through &lt;a href="https://adamlearns.com/courses" rel="noopener noreferrer"&gt;the courses that I offer&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
      <category>twitch</category>
      <category>streaming</category>
    </item>
    <item>
      <title>Live-streaming yourself developing</title>
      <dc:creator>Adam</dc:creator>
      <pubDate>Mon, 01 Jun 2020 05:26:17 +0000</pubDate>
      <link>https://dev.to/adamlearns/live-streaming-yourself-developing-3jpg</link>
      <guid>https://dev.to/adamlearns/live-streaming-yourself-developing-3jpg</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Have you ever thought of streaming your own development process? This post covers almost every facet of the streaming process to give you more than enough food for thought.&lt;/p&gt;

&lt;p&gt;As for me, I've streamed more than &lt;strong&gt;five thousand&lt;/strong&gt; hours of my own development &lt;a href="https://twitch.tv/Adam13531" rel="noopener noreferrer"&gt;on Twitch&lt;/a&gt; since 2015. I've had plenty of time to think about what works well and what doesn't.&lt;/p&gt;

&lt;h2&gt;
  
  
  Advantages of streaming
&lt;/h2&gt;

&lt;p&gt;Like most things, streaming has its ups and downs. This section will only consider the advantages.&lt;/p&gt;

&lt;p&gt;Here's what I think are the pros (in order of decreasing importance):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Accountability&lt;/li&gt;
&lt;li&gt;Community / networking&lt;/li&gt;
&lt;li&gt;Rapid feedback loop&lt;/li&gt;
&lt;li&gt;Impact&lt;/li&gt;
&lt;li&gt;Fun&lt;/li&gt;
&lt;li&gt;Extra money&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Accountability
&lt;/h3&gt;

&lt;p&gt;This is the biggest reason that I started streaming back in 2015. I had just quit my job, and I was worried that I'd fall into a pattern of playing games and checking social media all day. When you have a live audience, it's &lt;em&gt;much&lt;/em&gt; easier to avoid those traps.&lt;/p&gt;

&lt;p&gt;In addition, most successul streamers stick to a schedule, which means that you'll form a routine around streaming. For years, I woke up at 7:40, showered, ate breakfast, and prepared for the stream. I wouldn't procrastinate or delay since people were waiting for me to start.&lt;/p&gt;

&lt;h3&gt;
  
  
  Community / networking
&lt;/h3&gt;

&lt;p&gt;In short: your audience will become your friends and/or co-workers. This has a hidden benefit though: you won't go insane.&lt;/p&gt;

&lt;p&gt;Streaming your work almost always implies that you're working from home. If you've never worked remotely before, then you may never have experienced what it's like to be alone for extended periods of time. It's not good. I once had a remote job where I was the only developer, and a series of bad habits led to my work time creeping into my personal time. That, combined with the lack of social contact, twisted my psyche. I've managed to avoid that insanity thanks to streaming.&lt;/p&gt;

&lt;p&gt;One other thing regarding the community: don't be afraid or nervous about showing your code for &lt;strong&gt;quality&lt;/strong&gt; reasons (you have &lt;em&gt;other&lt;/em&gt; reasons to be worried about like leaks/security, but we'll discuss that later). For example, you may feel like you're not a "smart enough" developer or that your code isn't up to snuff. Strike those thoughts from your mind immediately and permanently. Anyone who judges you for your code quality isn't someone you want in your stream.&lt;/p&gt;

&lt;p&gt;I think that the community as a whole is more than helpful. Make sure you're not misconstruing constructive criticism for judgment, and also be sure to set your boundaries. I've had to say to multiple people that I don't appreciate their comments for various reasons, and they'll usually improve after a warning.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rapid feedback loop
&lt;/h3&gt;

&lt;p&gt;By showing your development process to the world, you'll get feedback every step of the way. This manifests in many different ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You don't know about some library/framework/technique and someone recommends it. This has been a massive time-saver for me. In multiple instances, I must have been 5 seconds away from committing to a multiple-hour-long decision that was bypassed entirely thanks to taking a viewer's suggestion.&lt;/li&gt;
&lt;li&gt;You write a bug without realizing it and you're told immediately that there's a problem.&lt;/li&gt;
&lt;li&gt;You make a questionable design decision (e.g. "players should lose money when they fail a mission") and are convinced why it's a bad idea.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of these cases are examples of course-corrections before you've spent weeks or months in a vacuum. Keep in mind that you'll need to be amenable to feedback in order for people to break through to you.&lt;/p&gt;

&lt;h3&gt;
  
  
  Impact
&lt;/h3&gt;

&lt;p&gt;Some people hate the term "influencer" for what it represents, but as an English word, it's just someone who influences. By putting yourself in front of an audience, people seem to immediately assume that you know more than you do. I remember doing my first piano-playing stream and being asked which digital keyboard I'd recommend even though I'd only owned maybe two in my entire life.&lt;/p&gt;

&lt;p&gt;This impact can be nice for a couple of reasons. For one, you can use it to market products (e.g. affiliate marketing to earn more money). The nicer reason is that it gives you insight into what you're doing well beyond what your co-workers or boss might notice. For example, I've been told that I have good organizational and note-taking skills. Knowing that others value such skills would allow me to share it with future teams or even students.&lt;/p&gt;

&lt;p&gt;Likewise, you may discover that a skill you have is uncommon. Maybe you can explain difficult concepts clearly or come up with algorithms quickly. Knowing your strengths lets you play to them!&lt;/p&gt;

&lt;h3&gt;
  
  
  Fun
&lt;/h3&gt;

&lt;p&gt;You never know quite what you're going to get when you start streaming. Will someone else drop by with a huge audience? Will you make a breakthrough and get to celebrate with your viewers? Will you just have a relaxed development day where people are riffing on each other's jokes?&lt;/p&gt;

&lt;p&gt;It's nice to spend moments like that with others. It also makes the occasional absurdities of development easier to bear.&lt;/p&gt;

&lt;h3&gt;
  
  
  Extra money
&lt;/h3&gt;

&lt;p&gt;I've purposely listed this last. Developers, at least in the US, make great salaries. The money that you earn while streaming will likely come &lt;strong&gt;nowhere&lt;/strong&gt; near your salary, but it's still something! If you've already got a comfortable job, then you can at least feel less guilty when you treat yourself to your favorite restaurant or buy a new gadget.&lt;/p&gt;

&lt;h2&gt;
  
  
  Disadvantages of streaming
&lt;/h2&gt;

&lt;p&gt;Before we look at the cons, I want you to consider that many of them vary based on the size of your audience:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you have no viewers whatsoever, then streaming your development process isn't all that different from &lt;em&gt;not&lt;/em&gt; streaming at all.&lt;/li&gt;
&lt;li&gt;At 100 viewers, you'll be able to keep up with chat and respond reasonably well.&lt;/li&gt;
&lt;li&gt;At 1000 viewers, you'll need to drastically cut down your interactions if you want to get anything done.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Again, here's a list in order of decreasing importance:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Productivity hit&lt;/li&gt;
&lt;li&gt;Leaks&lt;/li&gt;
&lt;li&gt;Energy cost&lt;/li&gt;
&lt;li&gt;Security, compliance, and theft&lt;/li&gt;
&lt;li&gt;The rat race&lt;/li&gt;
&lt;li&gt;Internet trolls&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Productivity hit
&lt;/h3&gt;

&lt;p&gt;Developing is hard enough on its own, but once you add people's random thoughts into the mix, you'll find yourself context-switching constantly. Imagine &lt;a href="https://heeris.id.au/2013/this-is-why-you-shouldnt-interrupt-a-programmer/" rel="noopener noreferrer"&gt;this comic&lt;/a&gt; ratcheted up by &lt;code&gt;X&lt;/code&gt;, where &lt;code&gt;X&lt;/code&gt; is the size of your audience. You &lt;strong&gt;will&lt;/strong&gt; lose track and forget things. And yet interactivity is the nature of the platform! If you're not going to interact with people while streaming, then it stands to reason that you could have just recorded yourself programming offline.&lt;/p&gt;

&lt;p&gt;There are some mitigations for this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Write down what you're working on so that you always have that text to anchor you. Alternatively, you can literally replay the last 2-3 minutes to figure out what you were thinking about (this is sort of like having source control for your thoughts!).&lt;/li&gt;
&lt;li&gt;Ignore chat while tackling particularly difficult problems.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Leaks
&lt;/h3&gt;

&lt;p&gt;Whether it's personal (like your address) or technical (like passwords), given enough time, you're going to leak &lt;em&gt;something&lt;/em&gt;. Here are just a few unexpected ways in which I leaked data:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I was testing an HTML input and Chrome tried autocompleting the whole form with my name, address, email, etc.&lt;/li&gt;
&lt;li&gt;Ansible has a verbose flag (&lt;code&gt;-v&lt;/code&gt;), then it has a &lt;em&gt;very&lt;/em&gt; verbose flag (&lt;code&gt;-vvvv&lt;/code&gt;) that prints &lt;strong&gt;everything&lt;/strong&gt; to the console, including the passwords that you're using. I didn't even realize it was doing that for weeks.&lt;/li&gt;
&lt;li&gt;I pasted a password from my password manager into my terminal when it wasn't masking input.&lt;/li&gt;
&lt;li&gt;Many sites and programs assume that you're the only one at your computer screen, so they'll display your data ("you are logged in as &lt;em&gt;&lt;a href="mailto:personal@example.com"&gt;personal@example.com&lt;/a&gt;&lt;/em&gt;"). Twitter is especially egregious; they pop up a dialog every once in a while asking "IS XXX-YYY-ZZZZ STILL YOUR PHONE NUMBER?"&lt;/li&gt;
&lt;li&gt;Searching for seemingly innocuous things (e.g. "grocery store") will typically show a map of exactly where you live.&lt;/li&gt;
&lt;li&gt;...and many more!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Mitigations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Don't ever point out that you leaked something. Most people aren't actively watching every little thing that you're doing, so they won't know to screenshot what they're seeing. Depending on the severity, consider ending the stream and deleting the VOD.&lt;/li&gt;
&lt;li&gt;If the leak is technical, fix it as soon as possible. When I leaked my passwords, I wrote a note on exactly which sites and configuration files I had to modify in order to more quickly recover later (if it ever happened again).&lt;/li&gt;
&lt;li&gt;Use multiple scenes in your streaming software and have a special one for when you're about to show sensitive data. Alternatively, use multiple monitors.&lt;/li&gt;
&lt;li&gt;Look into extensions for your editor (like &lt;a href="https://marketplace.visualstudio.com/items?itemName=johnpapa.vscode-cloak" rel="noopener noreferrer"&gt;Cloak for VSCode&lt;/a&gt;) that can hide secrets automatically.&lt;/li&gt;
&lt;li&gt;Honestly, just get more comfortable with people knowing relatively common things about you like your full name or the general area where you live.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Energy cost
&lt;/h3&gt;

&lt;p&gt;I'm introverted, and it can take a lot of energy to stream. You have to be "on" the whole time, handle issues with grace, and change contexts like a champion. That's all &lt;em&gt;on top of&lt;/em&gt; your normal development, which is already a mentally draining process.&lt;/p&gt;

&lt;p&gt;Mitigations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Time - your streaming stamina will improve over time.&lt;/li&gt;
&lt;li&gt;Breaks - whether it's a 5-minute break every so often or a proper "streaming vacation", make sure you have work-life balance. Don't be afraid to end streams early if you feel that it's too difficult to continue.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Security, compliance, and theft
&lt;/h3&gt;

&lt;p&gt;This is similar to leaks except that you're intentionally displaying your code to the world. Doing so leads to three issues:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Security - suppose you write a bug into some server-side code that you showed while streaming. People may take note of it without telling you only to later exploit the flaw.&lt;/li&gt;
&lt;li&gt;Compliance - did you use a library or code snippet that you weren't licensed to use? Other people can see that and alert the owners of the software that you've done so.&lt;/li&gt;
&lt;li&gt;Theft - your code is copyrighted as soon as you type it, but that doesn't mean that someone can't steal it anyway. It's hard enough to pursue those cases when the thief is in your country, and it's almost impossible if they're in a different country.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In practice, these shouldn't have a major impact unless people have a reason to go after you, so don't make yourself a target.&lt;/p&gt;

&lt;h3&gt;
  
  
  The rat race
&lt;/h3&gt;

&lt;p&gt;I've seen many people start out streaming saying things like "if I get 1-2 viewers, I'll be happy!" or "I'm just streaming for fun." That's probably true at first. However, we naturally like seeing progress, yet &lt;a href="https://en.wikipedia.org/wiki/Hedonic_treadmill" rel="noopener noreferrer"&gt;we also adapt to our current level of success&lt;/a&gt;, so when we hit a plateau, it's easy to start feeling dejected.&lt;/p&gt;

&lt;p&gt;The biggest mitigation here is to answer &lt;em&gt;why&lt;/em&gt; you want to stream before you even start, then try not to lose sight of those reasons. For me, it was just to stay accountable, and even though I was meeting that goal, I still felt the desire to keep growing my audience.&lt;/p&gt;

&lt;p&gt;That brings us to the mitigation which actually did help me: hide your view count from yourself. There's no real reason to have it showing in the first place since you should always act like you have a captive audience even if no one's there.&lt;/p&gt;

&lt;h3&gt;
  
  
  Internet trolls
&lt;/h3&gt;

&lt;p&gt;Ah, the flip side of the community coin. Trolls generally seek to ruin your day in order to draw attention to themselves. They'll say mean things, spam your chat, or try to get you to say something bannable on-air. The silver lining in this cloud is that for every troll you get, you'll find a hundred nice people.&lt;/p&gt;

&lt;p&gt;Mitigations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Don't hesitate to perform moderation actions. Is someone annoying you? Time them out. Are they still annoying you after being warned? Ban them. You're not just streaming—you're &lt;em&gt;developing&lt;/em&gt;—and you can't do either very well if you're in a bad mood.&lt;/li&gt;
&lt;li&gt;As much as possible, try not to give them attention.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How do I start?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Set expectations
&lt;/h3&gt;

&lt;p&gt;Before doing anything else, you should envision what success looks like for you as a streamer; why do you want to do it? Your reasons are personal, but there's one that I'll specifically argue &lt;em&gt;against:&lt;/em&gt; making it big. It's not that you shouldn't try to grow your audience or make money, but streaming development isn't a get-rich-quick scheme. In my experience, it's been a make-less-than-minimum-wage scheme even though I'm usually toward the top of the category.&lt;/p&gt;

&lt;p&gt;Granted, I could have made more money if I'd pushed for subscribers, but it doesn't change my point: I think it's always good to set reasonable expectations and sporadically reevaluate. Go to the category you'll be streaming in and see what the numbers are like. At the time of writing this post, there are 158 Science &amp;amp; Technology streams on Twitch. 132 of them have fewer than 10 viewers. 121 of those have ≤5. It's likely that you'll end up in that bucket at first (and it could potentially last for a while).&lt;/p&gt;

&lt;p&gt;Finally, be ready to conclude that streaming &lt;em&gt;isn't&lt;/em&gt; meeting your goals. Streaming has its own overhead associated with it: setting up overlays and scenes, researching gear, rewatching your videos, etc. Streaming &lt;em&gt;development&lt;/em&gt; adds to that overhead, e.g. the productivity hit that I mentioned. Thus, if it's not actually helping you, then that's fine! It's not like you're throwing in the towel; it was just a tool that didn't meet your needs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Set up your stream
&lt;/h3&gt;

&lt;p&gt;There are guides online for setting up your software and hardware, so I won't cover specific steps here.&lt;/p&gt;

&lt;p&gt;The bare minimum that you need is streaming software, e.g. &lt;a href="https://obsproject.com/" rel="noopener noreferrer"&gt;OBS&lt;/a&gt;, which I use. For hardware, given that development work is relatively drab to watch, I advise using both a microphone &lt;em&gt;and&lt;/em&gt; a camera. With a microphone, you can think aloud to fill some of the dead space, and the camera will add some personality.&lt;/p&gt;

&lt;p&gt;In my opinion, the only other hardware to consider getting at first is another monitor if you don't already have two; it's nice to put OBS, chat, and any private windows on it so that you don't distract from the development process while viewing those.&lt;/p&gt;

&lt;p&gt;Don't consider investing in an expensive setup until you know that you enjoy streaming. Over the years, I've upgraded lots of my gear. The best piece of advice I have around that is to upgrade the weakest link. For me, it was my webcam; I went from a Logitech C310 to a C922x and felt like it was a huge leap in quality.&lt;/p&gt;

&lt;p&gt;Whatever you end up with, make sure to test it out by watching your own videos. How do you sound with no typing or with music? Are you physically obscuring your code with your webcam's output? Is it hard to hear you when you turn your head?&lt;/p&gt;

&lt;h3&gt;
  
  
  Choose a platform
&lt;/h3&gt;

&lt;p&gt;I actually don't think there's a choice here; you have to go where the audience is, which is Twitch (as opposed to Mixer, YouTube, etc.). There's a non-obvious reason why I wanted to mention this: depending on how far you progress with a streaming platform, you may eventually end up signing an exclusivity contract. I signed one when I became a Twitch partner, and it now prevents me from streaming on other services.&lt;/p&gt;

&lt;p&gt;For now, this isn't important. In the future though, other streaming services may become more appealing for developers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Figure out why people should watch you
&lt;/h3&gt;

&lt;p&gt;There are a few primary reasons to watch someone's development stream:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Personality - are you entertaining? Nice? Positive?&lt;/li&gt;
&lt;li&gt;Skills - are you good at your IDE? Your operating system? The language you're using?&lt;/li&gt;
&lt;li&gt;Community - is chat friendly? Are &lt;em&gt;they&lt;/em&gt; knowledgeable?&lt;/li&gt;
&lt;li&gt;Project - is it interesting? Easy to jump in to? Note that most people who watch aren't glued to their screen as you type each line of code. As a result, I don't see someone's project being &lt;em&gt;too&lt;/em&gt; important, but it will attract or repel certain viewers. For example, I had people watch me while I was creating an NES ROM, but they didn't stick around when I did web development.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here are some general tips on how to make your stream more enjoyable for viewers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make sure your font is readable. You may be able to comfortably see ~70 lines on your monitor, but there's no guarantee that someone watching in 480p on their phone can read them.&lt;/li&gt;
&lt;li&gt;Talk! If there are only a couple of people chatting, then you should probably engage them. What are &lt;em&gt;they&lt;/em&gt; working on? What suggestions do they have for you? How long have they been coding? If you don't have an audience, then act like you have one and narrate what you're doing and why. At the very least, it'll put you in the habit of doing so when you &lt;em&gt;do&lt;/em&gt; have an audience.&lt;/li&gt;
&lt;li&gt;Work on your speaking skills. Cut down on verbalized hesitations ("uh", "um"), mumbling, etc.&lt;/li&gt;
&lt;li&gt;Work on your development skills. For one, you'll &lt;em&gt;be&lt;/em&gt; more competent, so your development itself should benefit. However, you'll also &lt;em&gt;look&lt;/em&gt; more competent, which will go a long way with new viewers.&lt;/li&gt;
&lt;li&gt;Set a schedule. People want to know when to expect you online.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I wouldn't worry about which part of the development process you're streaming. There's always going to be someone out there who wants to watch! I've streamed myself documenting, designing, testing, refactoring, etc.&lt;/p&gt;

&lt;h2&gt;
  
  
  Growth and interaction
&lt;/h2&gt;

&lt;p&gt;As I've touched on, growth isn't necessarily a good thing depending on your goals. If you only want to be held accountable, then having ten active viewers is better than having ten thousand.&lt;/p&gt;

&lt;p&gt;There's a site called &lt;a href="https://sullygnome.com/" rel="noopener noreferrer"&gt;SullyGnome&lt;/a&gt; that tracks Twitch statistics. You can check out your favorite streamer there or even an entire category's stats.&lt;/p&gt;

&lt;p&gt;Growth can come from several sources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The platform - either people are looking for streams in your category or the platform specifically recommended you to someone.&lt;/li&gt;
&lt;li&gt;Networking - you bond with another streamer or community and gain viewers through them. This is why you should always host or raid another streamer at the end of your stream. Follow or join their stream/Twitter/Discord, chat in their channel, etc. Essentially, do what you'd want those streamers to do in your channel or with your community.&lt;/li&gt;
&lt;li&gt;Promotion - most people aren't outright buying ads for their channel, but if you're comfortable with a particular community, they'll usually be okay with you posting your stream link. Follow-for-follow schemes are a waste of your time since they don't provide any lasting benefit.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once a viewer is in your stream, it's your job to captivate them so that they want to come back. Let's say you split your time on-stream so that you're developing for about 80% of the time and interacting with chat for the other 20%. In a 5-hour stream, that would mean that you're spending an hour interacting. When you have a small audience, that hour goes a long way. You can make a real, personal connection with each individual chatter.&lt;/p&gt;

&lt;p&gt;As you start to get tens or hundreds of viewers, you'll only be able to say "hi" to each person and maybe remember some basic, broad details about them. This tension between interaction and productivity is core to growth as a development streamer. After all, the biggest difference between a live stream and a prerecorded video is interactivity!&lt;/p&gt;

&lt;p&gt;You'll have to discover techniques to maximize your interaction time:&lt;/p&gt;

&lt;h3&gt;
  
  
  Make commands
&lt;/h3&gt;

&lt;p&gt;One technique that I use is to have commands for frequently asked questions, that way I'm not answering "which keyboard do you use" twenty times per day. However, when a new viewer asks that question, &lt;em&gt;they&lt;/em&gt; don't know that it's already been asked repeatedly in the last few minutes, so they may be put-off by not getting a personal answer. This is the give and take of streaming, and you'll have to test different strategies to strike a nice balance.&lt;/p&gt;

&lt;h3&gt;
  
  
  Identify dead-ends
&lt;/h3&gt;

&lt;p&gt;Sometimes, a conversation is destined to go nowhere. You'll have to spot patterns in these so that you don't spend too much time on them. The patterns that I've noticed repeatedly are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Conversations that just aren't suited for live-streaming&lt;/strong&gt;. For example, if a design discussion spans 6 hours and someone joins halfway through, you likely can't get them up-to-speed without spending 5-10 minutes on them (this is partially because very few people will read any public documents that you share). Without that context, they'll start proposing ideas that you've already discussed, but you also don't want to sound dismissive by saying not to ask questions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;People who can't contribute&lt;/strong&gt;. Some people mean well but have no realistic way to contribute. For example, they may not even be technical, or maybe they don't know your particular stack very well.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Overly opinionated people&lt;/strong&gt;. This &lt;em&gt;seems&lt;/em&gt; like trolling sometimes, but it's actually just someone who has a very strong opinion on something. For example, I had someone say that I shouldn't be using Windows. I asked them why, and they said they hated it. I don't really care if people like or hate the technology that I use, but a personal distaste is not a reason for someone &lt;em&gt;else&lt;/em&gt; to switch.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Delegate
&lt;/h3&gt;

&lt;p&gt;By shifting some of the onus onto your community, you'll free yourself up for the work that doesn't scale. Encourage them to welcome new viewers and answer their questions. Elect moderators to help out with this.&lt;/p&gt;

&lt;h2&gt;
  
  
  Miscellaneous
&lt;/h2&gt;

&lt;p&gt;Here are some random tips that didn't fit anywhere else:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Avoid variety streaming (e.g. streaming development &lt;em&gt;and&lt;/em&gt; gaming) unless you want to brand yourself as a variety streamer from the start. If you &lt;em&gt;haven't&lt;/em&gt; branded yourself as a variety streamer, then you'll see a tremendous dip in your audience's interest when you switch from your main activity to a secondary one.&lt;/li&gt;
&lt;li&gt;I find it frustrating when I enter a stream and the streamer isn't even present. From my point of view, I don't know if it's a 10-second water break or a 20-minute lunch break. For that reason, I almost always put up a "BRB" screen with an estimated time of when I'll return.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;(I know this is a short section for now; I'll likely add links to specific blog posts that I have planned for the future, e.g. making overlays in OBS)&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Streaming is just a tool. If you want it to work for you, then you'll need to know your audience and capitalize on your own strengths. You should expect &lt;em&gt;very&lt;/em&gt; slow growth unless you're already e-famous, but remember that growth isn't everything! Twitch is and likely always will be a platform primarily associated with playing games.&lt;/p&gt;

&lt;p&gt;My own goals with Twitch have changed drastically since I started 5 years ago, so rather than link my stream again, here's something that will help us both: &lt;a href="https://adamlearns.com/courses/development-efficiency" rel="noopener noreferrer"&gt;my Development Efficiency course&lt;/a&gt;! Astound your new audience with your impressive efficiency. ⚡&lt;/p&gt;

</description>
      <category>programming</category>
      <category>development</category>
      <category>developer</category>
      <category>twitch</category>
    </item>
    <item>
      <title>So you want to learn how to program?</title>
      <dc:creator>Adam</dc:creator>
      <pubDate>Mon, 25 May 2020 16:42:57 +0000</pubDate>
      <link>https://dev.to/adamlearns/so-you-want-to-learn-how-to-program-3p0i</link>
      <guid>https://dev.to/adamlearns/so-you-want-to-learn-how-to-program-3p0i</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;This post is for people who want to learn how to program but don't know where to start. I won't talk about the specifics of any particular language; this is more about getting you into the right mindset.&lt;/p&gt;

&lt;p&gt;As for me, I've been programming professionally for many years, five of which were live-streamed on Twitch, so I've gotten my share of questions on the topic. The most common ones are:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Question: can anyone learn how to program?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you can understand this blog post, then you can learn how to program.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Question: does programming involve a lot of math?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;From a practical perspective, no. Programming is entirely based on logic, and while I &lt;em&gt;do&lt;/em&gt; look at logic as being part of math, it's not the kind of math that people usually mean (e.g. calculus). Still, basic math skills and algebra will help.&lt;/p&gt;

&lt;p&gt;For another point of view, think of a programming language like a human language—just because you know English doesn't mean that you can speak with authority on any topic! Programming is the same way; you may need to know biology in order to make medical software, music theory to code a sequencer, and math for data analysis.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting expectations
&lt;/h2&gt;

&lt;p&gt;Without the right expectations, it's easy to get demotivated before you can build any momentum. The biggest expectation to set up-front is that you probably won't be making interesting programs for a while (at least a month or two). They'll more likely be small, console-based programs to help build the fundamentals.&lt;/p&gt;

&lt;p&gt;Those fundamentals are typically concepts like variables, &lt;code&gt;if&lt;/code&gt; statements, and outputting text. They are &lt;em&gt;not&lt;/em&gt; things like adding fiery swords into games or building a social-media network. Nobody goes from writing their first program to coding World of Warcraft, and that's okay!&lt;/p&gt;

&lt;p&gt;This is why I suggest focusing on exactly two things as you get started:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Are you learning?&lt;/li&gt;
&lt;li&gt;Are you having fun?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If either answer is "no" for longer than a week, then you're probably going to lose focus (this post should help you find fun and effective ways to learn).&lt;/p&gt;

&lt;p&gt;The coding landscape &lt;em&gt;has&lt;/em&gt; changed a lot in the last 10 years or so. Coding bootcamps started popping up around 2011. They serve as a focused, immersive way of learning coding quickly, and even then, it takes 3-6 months of full-time (sometimes &lt;em&gt;more&lt;/em&gt; than full-time) learning.&lt;/p&gt;

&lt;p&gt;In addition, tools for programming have become much more accessible. I mentioned that you won't be adding a fiery sword to a game, but thanks to game engines and modding, you actually &lt;em&gt;could&lt;/em&gt; add one without even writing a single line of code. However, that's sort of like saying that you can lift a car so long as you have access to a crane; the tool takes time to learn and use, but it's doing the heavy lifting for you.&lt;/p&gt;

&lt;p&gt;Don't get me wrong—I don't say this to delegitimize game engines or the work that people do. Instead, I'm saying that if you want to &lt;strong&gt;learn programming&lt;/strong&gt;, then at some point, you'll have to learn what goes into making those tools. By all means, start your programming journey with Minecraft mods or the Unity game engine.&lt;/p&gt;

&lt;p&gt;This brings us to the last question that I get all the time:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Question: which programming language should I learn first?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Alternatively, I hear this as "is Language A better than Language B?"&lt;/p&gt;

&lt;p&gt;This is the beauty of learning programming: &lt;em&gt;it doesn't matter!&lt;/em&gt; Here's why:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You need to start somewhere.&lt;/li&gt;
&lt;li&gt;You will likely learn many languages if you continue programming.&lt;/li&gt;
&lt;li&gt;Technology changes rapidly enough where the popularity of languages will also change over time. This even leads to the death of some languages or environments (e.g. Flash), thus forcing you to move away from the specifics that you've learned.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In my opinion, the time you spend debating on which language to learn is time wasted. If you want someone to pick for you, then go with Python:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;There are tons of Python resources out there, so you'll be able to find support online for any problems you run into.&lt;/li&gt;
&lt;li&gt;It's still actively used in the professional world.&lt;/li&gt;
&lt;li&gt;It can be set up in roughly a minute on any operating system.&lt;/li&gt;
&lt;li&gt;It reads almost like English in some cases.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to go about learning
&lt;/h2&gt;

&lt;p&gt;In general, learning programming is no different from learning anything else. It's some combination of studying, practicing, and talking to other people (e.g. teachers and coders). Studying and practicing will help you internalize the skills and come up with questions to further your knowledge. Talking to others will prevent you from building bad habits.&lt;/p&gt;

&lt;p&gt;More specifically, there are lots of resources out there. People ask me which ones I recommend, but unless it's a resource that I used in the last couple of years, it could be out-of-date and I wouldn't know! Instead, I suggest looking at something like &lt;a href="https://github.com/EbookFoundation/free-programming-books/blob/master/free-programming-books.md" rel="noopener noreferrer"&gt;this absolutely massive list of free programming books&lt;/a&gt;. Augment that with YouTube videos, general Internet searches, and the resources that your friends and teachers recommend, and you should be set.&lt;/p&gt;

&lt;p&gt;At some point early on, you'll probably ask, "what project should I work on next?" It's crucial to pick the right project, because if you don't like it, you'll simply stop working on it. If that happens early enough into your programming endeavors, then you may stop learning altogether.&lt;/p&gt;

&lt;p&gt;The sections below contain important notes on how to choose a project.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scope
&lt;/h3&gt;

&lt;p&gt;Always pick a project that is &lt;em&gt;slightly&lt;/em&gt; beyond your current skill level. This concept is called &lt;strong&gt;scoping&lt;/strong&gt; the project. An overzealous scope is the biggest killer that I've seen for personal projects. It's tempting to put in a couple of weeks of time learning the basics and then jump right into making that game or site that you've always wanted to build. It's much better to prune that idea down to just one or two systems.&lt;/p&gt;

&lt;p&gt;For example, suppose you were interested in making your own version of Twitter. Here are some projects of various sizes that you could implement:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A "tweet typer" that counts your characters as you type and warns you when you've gone over the limit&lt;/li&gt;
&lt;li&gt;A site where text blobs get downloaded from a server as you scroll down the page&lt;/li&gt;
&lt;li&gt;A sign-in system&lt;/li&gt;
&lt;li&gt;A mobile app that renders a website&lt;/li&gt;
&lt;li&gt;A link-shortener service&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I didn't spend a long time typing that list, and I didn't even cover 10% of what Twitter actually does.&lt;/p&gt;

&lt;p&gt;If you find yourself on a project whose scope ends up being larger than you thought, then don't hesitate to cut features completely. Remember that your primary goals should be learning and having fun, so try not to add pressure to yourself by tackling a project that intimidates you.&lt;/p&gt;

&lt;h3&gt;
  
  
  Domain
&lt;/h3&gt;

&lt;p&gt;Do you like games? Sites? Graphics? Networking? Algorithms? Utilities?&lt;/p&gt;

&lt;p&gt;There are hundreds of domains from which to choose a project, and I can't answer &lt;em&gt;for&lt;/em&gt; you what you'll find interesting or fun. Going back to the Twitter-clone example, suppose you didn't want to make a sign-in system, but you felt that it was too important to skip. The good news is that someone out there has already made the system for you! You can look into what they did and incorporate it into your project (although be careful about licensing; I'm not advocating for plagiarism or theft!).&lt;/p&gt;

&lt;p&gt;If you didn't want to go that route, then just take a shortcut to where you feel like you'll learn and have fun. When I didn't want to code sign-in systems, I just made buttons that said "Adam1" and "Adam2". Clicking them would &lt;em&gt;act&lt;/em&gt; like I'd signed in, but I didn't need to make name/password inputs or even send that information to a server.&lt;/p&gt;

&lt;h3&gt;
  
  
  Design
&lt;/h3&gt;

&lt;p&gt;Programming and product design are filled with microdecisions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How should the site look as you shrink the browser?&lt;/li&gt;
&lt;li&gt;Will users understand what I'm trying to convey here?&lt;/li&gt;
&lt;li&gt;Is this game more fun without this system?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can't ever completely remove decision-making from the equation, but you can drastically cut it down by reinventing the wheel. For example, if you wanted to learn game programming by making your own game, you just made &lt;strong&gt;two&lt;/strong&gt; tasks for yourself: designing a game &lt;em&gt;and&lt;/em&gt; learning how to develop that game. If you instead recreate an existing game like Tetris or Pong, then you can focus solely on the code (obviously don't actually claim other people's work as your own or try to sell it).&lt;/p&gt;

&lt;p&gt;I've done this before where I wanted to learn a new language or framework without having to come up with my own unique project, and it's so refreshing to bypass all of those decisions that would typically nag at me.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to learn
&lt;/h2&gt;

&lt;p&gt;I talked about &lt;em&gt;how&lt;/em&gt; to learn by making use of all available resources and picking the right project, but here's &lt;em&gt;what&lt;/em&gt; you should learn regardless of which language you start with.&lt;/p&gt;

&lt;h3&gt;
  
  
  Self-sufficiency
&lt;/h3&gt;

&lt;p&gt;Programming has a lot to do with self-sufficiency. If you've ever fixed someone else's computer problem by Googling the issue, then you know how powerful this can be. A good programmer doesn't memorize everything; they just know how to solve problems as they arise. For new programmers, &lt;a href="https://stackoverflow.com/" rel="noopener noreferrer"&gt;StackOverflow&lt;/a&gt; will be a great resource. You'll find anything from basic questions like "what does 'syntax error' mean?" to more advanced ones like "how do I integrate these two systems?"&lt;/p&gt;

&lt;p&gt;I've written that you should use other people as resources, and now I mention that you should be self-sufficient. Which is it? Programming is full of "small" problems that can expand to fill your whole day, and you'll frequently find that you save yourself &lt;em&gt;hours&lt;/em&gt; by just asking someone early on. In the end, it's a judgment call of when to involve other people. For quick, factual questions like "can I make a website with JavaScript?", I think you should almost exclusively be searching the Internet. For more involved programming problems like "why isn't my code working how I want it to?", you sometimes need to sink your teeth into the problem to understand your own thought processes before asking for help.&lt;/p&gt;

&lt;h3&gt;
  
  
  Debugging
&lt;/h3&gt;

&lt;p&gt;Everybody writes bugs. We all strive to write them infrequently and to find and recover from them quickly. Experience will help you with the former, and debugging will help you with the latter.&lt;/p&gt;

&lt;p&gt;Most modern languages have an easy way to debug them (e.g. PyCharm for Python, browsers for JavaScript). The two most significant aspects to learn are how to place breakpoints and how to inspect variables. With breakpoints, you'll be able to stop your program at a specific line of code, that way execution is frozen in time. Then, you can inspect variables to see if your assumptions hold true. I still find myself saying, "this &lt;em&gt;can't&lt;/em&gt; be happening because I turned this flag on" only to debug and see that the flag is really off.&lt;/p&gt;

&lt;p&gt;You haven't fixed a bug until you've fully understood it. The reason why this is so important is because when you come across a bug, you immediately make a bunch of assumptions. Suppose that the bug is a missing image on your site, and your initial hunch is "the image file doesn't exist." You look in the folder that should contain the image and you see it there. Then you think, "maybe one of my libraries got updated and that's having trouble rendering the image." You investigate that and make some changes, and in the process, the bug is solved, but you don't know why.&lt;/p&gt;

&lt;p&gt;If you stop there, it's possible that the bug still exists but that you don't realize it. In this particular example, let's say that the bug was caused by trying to access the file on a Tuesday for some reason. You're clearly going to encounter this bug again, but you'll assume you dealt with it. That's why it's so important to understand the root cause of a bug.&lt;/p&gt;

&lt;p&gt;Whenever you find [and eventually fix] a bug, you should ask yourself these questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Where else might this bug exist in my code?&lt;/li&gt;
&lt;li&gt;How will I prevent myself from hitting this bug in the future?&lt;/li&gt;
&lt;li&gt;What techniques/knowledge did I learn that could help me find any bug faster in the future? For example, maybe you learned that logging is helpful or that you tend to make typos in filenames.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Miscellaneous
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Learn more interactively

&lt;ul&gt;
&lt;li&gt;Take notes to reinforce concepts.&lt;/li&gt;
&lt;li&gt;Test out programs for yourself so that you're not just assuming how they work.&lt;/li&gt;
&lt;li&gt;Don't be afraid to look through code that you don't own. Open-source software is everywhere nowadays, so if you're using an open-source library and you have a problem, then dig in!&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Recognize your accomplishments. &lt;a href="https://en.wikipedia.org/wiki/Impostor_syndrome" rel="noopener noreferrer"&gt;Impostor Syndrome&lt;/a&gt; runs rampant amongst programmers. You &lt;em&gt;will&lt;/em&gt; know more one week into programming than you did when you began, and you'll know &lt;em&gt;much&lt;/em&gt; more after another month or year. It all happens so gradually that it's easy to focus on people more experienced than you and wonder why you're not there yet, but getting there only happens with time and effort.&lt;/li&gt;

&lt;li&gt;Start &lt;strong&gt;NOW&lt;/strong&gt;. You just read this blog post, so you were motivated enough to do that (and good job, by the way!). Carry that momentum over to &lt;a href="https://www.python.org/" rel="noopener noreferrer"&gt;python.org&lt;/a&gt; or any number of other sites and go write your first program! It's completely free and you'll open up a whole new world for yourself.&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why should you learn programming?
&lt;/h2&gt;

&lt;p&gt;I'm putting this section at the end because you had your own reasons for even arriving at this blog, so this section is just to bolster those reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Technology is &lt;em&gt;everywhere&lt;/em&gt;. I went to the store before writing this blog post and saw a barbecue grill with Wi-Fi built-in. I can't believe I'm typing this sentence, but... some amount of programming had to be done to make that grill work. You never know what possibilities might arise in your own lifetime where programming may help.&lt;/li&gt;
&lt;li&gt;It's full of problem-solving, which can be deeply satisfying. There's nothing quite like spending hours investigating a pesky bug only to find out its true cause and then share the results with your co-workers, customers, or annoyed significant other.&lt;/li&gt;
&lt;li&gt;There's so much to explore! You'll go from "software is a mystery" to "how would &lt;strong&gt;I&lt;/strong&gt; have implemented that?" sooner than you think. That opens up doors for you. You may write an application that your friends love, automate parts of your house, or just tinker around with something technical and fun. I combined several of my own interests by &lt;a href="https://www.youtube.com/watch?v=MAYlMcyVZ2k" rel="noopener noreferrer"&gt;learning how to type with a piano keyboard&lt;/a&gt;. Who knows what you'll end up doing?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The biggest takeaway from all of this is that you should &lt;strong&gt;start learning&lt;/strong&gt;! Don't create barriers for yourself by debating which language to choose.&lt;/p&gt;

&lt;p&gt;I've got more specific resources for you to check out eventually at &lt;a href="https://adamlearns.com/courses" rel="noopener noreferrer"&gt;my site where I sell courses&lt;/a&gt;.&lt;/p&gt;

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