<?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: Darrin Deal</title>
    <description>The latest articles on DEV Community by Darrin Deal (@darrinndeal).</description>
    <link>https://dev.to/darrinndeal</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%2F676410%2Fe37872c5-dc36-4795-859b-36a447f63c16.PNG</url>
      <title>DEV Community: Darrin Deal</title>
      <link>https://dev.to/darrinndeal</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/darrinndeal"/>
    <language>en</language>
    <item>
      <title>How to deploy your website using the Laravel Process Facade and Github Webhooks</title>
      <dc:creator>Darrin Deal</dc:creator>
      <pubDate>Wed, 15 Feb 2023 19:20:05 +0000</pubDate>
      <link>https://dev.to/darrinndeal/how-to-deploy-your-website-using-the-laravel-process-facade-and-github-webhooks-5h15</link>
      <guid>https://dev.to/darrinndeal/how-to-deploy-your-website-using-the-laravel-process-facade-and-github-webhooks-5h15</guid>
      <description>&lt;p&gt;Laravel 10 was recently released and along with that came a new facade that is an abstraction around the Symfony Process component. This facade makes it easy to run command line scripts right from Laravel. This abstraction makes the action of using Process to be more familiar to the laravel developer.&lt;/p&gt;

&lt;p&gt;In this post I am going to walk you through how you can use this new facade along with GitHub webhooks and queue workers to run a deployment script for your site. This is a very simple way to automate your site deployments and only the beginning of what you can do with this new facade. Let’s get started in implementing this idea.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;There are some assumptions made and topics left out intentionally to focus on task at hand. Those assumptions are that you already have a Laravel 10 project up and running on your server, that you have the infrastructure to run queue jobs, and your project is managed in a GitHub repository. &lt;/p&gt;

&lt;p&gt;For the sake of this tutorial I will also assume that your deployments are done manually by pulling down the code via git and running the needed commands every time you deploy new code. In this tutorial we will compile those commands in a shell script to be ran by the new process facade. Let’s get started by creating a new route for our webhook.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create A Route
&lt;/h2&gt;

&lt;p&gt;Create a new function in one of our controllers or a new that will handle our webhook. I created a new controller that will hold all of our webhook code called HooksController. You can create this by running the following command.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;php artisan make:controller HooksController&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In the new controller or where you would like we will create the function to handle the webhook.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//1
public function handleGithubWebhookForDeploy(Request $request){
        // 2
        $requestHash = $request-&amp;gt;header('x-hub-signature-256') ?? '';
        //3
        $payload = $request-&amp;gt;getContent();


        // 4
        return response()-&amp;gt;json(['success' =&amp;gt; 'success'], 200);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I added some code that we will need later here is what its doing.&lt;/p&gt;

&lt;p&gt;We need the request object to create our hashed secrets. &lt;br&gt;
We are going to pull the GitHub generated hash from the headers.&lt;br&gt;
We need the json string sent to us by GitHub to generate our hash.&lt;br&gt;
The command will always return a 200 unless the hashes don’t match or it’s a webhook for a different branch than we want.&lt;/p&gt;

&lt;p&gt;We will go over these in more detail in a bit. Now in the web routes file add a new post route. Here is what I would add for the example above.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use App\Http\Controller HooksController;

Route::post('/hooks/deploy'. [HooksController::class, 'handleGithubWebhookForDeploy']);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Create GitHub Webhook
&lt;/h2&gt;

&lt;p&gt;To have Github send us a webhook when we push our code up we need to create a webhook reference in our repository’s settings page. Click on the settings link in the repository actions bar.&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%2Fuploads%2Farticles%2Fp7ygystjg8bh4vv7tuid.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%2Fuploads%2Farticles%2Fp7ygystjg8bh4vv7tuid.png" alt=" " width="800" height="62"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once there, under Code and Automation you will se a link to webhooks. Click there and it will take you to a page where you can manage the webhooks your repo sends.&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%2Fuploads%2Farticles%2Fgzf6tviur0a22wqbh3u7.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%2Fuploads%2Farticles%2Fgzf6tviur0a22wqbh3u7.png" alt=" " width="800" height="605"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the right hand side of the page you will see an Add Webhook button. Click the button to add your new webhook. In the form add the following.&lt;/p&gt;

&lt;p&gt;Payload Url - The url to your site with the path. Mine would be &lt;a href="https://example.com/hooks/deploy" rel="noopener noreferrer"&gt;https://example.com/hooks/deploy&lt;/a&gt;&lt;br&gt;
Content Type - application/json&lt;br&gt;
Secret - Add a random secret. Keep this for later as this is how we will secure our route.&lt;br&gt;
Leave all the other defaults&lt;/p&gt;

&lt;p&gt;Once that is all filled out you can click the add webhook. Now if you push new code to the repo and refresh that page you should see the recent webhook deliveries. This shows you the status  of the webhook response and what was sent in the request. This page is helpful in debugging the route&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%2Fuploads%2Farticles%2Fqdf1tc4xz055yie4froz.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%2Fuploads%2Farticles%2Fqdf1tc4xz055yie4froz.png" alt=" " width="800" height="227"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that we have our webhook we can implement our handler to make sure GitHub is the only one who has access to our route.&lt;/p&gt;
&lt;h2&gt;
  
  
  Handle GitHub Webhook Verification
&lt;/h2&gt;

&lt;p&gt;When we receive a webhook from Github it sends along a payload and headers, like every other web request. In the headers it includes a HMAC sha256 hash of our secret. To verify that GitHub sent us this request we will generate our own version of the has with our secret that we setup and the payload of the request to compare.&lt;/p&gt;

&lt;p&gt;In our boilerplate function we got all the parts that we need to generate our hash. I recommend adding your secret to your env and pulling it in that way so you don’t commit your secret. Below the requestHash variable add the following. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;$localHash = 'sha256='.hash_hmac('sha256', $payload, &amp;lt;Your Secret String&amp;gt;);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We are adding the sha256 to the beginning of the string so that it matches what we get from GitHub.&lt;br&gt;
We then use the hash_hamac function to generate our hash.&lt;br&gt;
The first argument it the algorithm. In our instance it is sha256&lt;br&gt;
The second is our key. Github uses the json string of the payload.&lt;br&gt;
The third argument is the secret. I recommend pulling this from the env or config.&lt;/p&gt;

&lt;p&gt;We will use this hash to verify the Webhook Request. Let’s add the following below to run our check.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//1
if(!hash_equals($localHash, $requestHash)){            
    return abort(404);        
}
//2

$json = json_decode($payload);        
if( $json-&amp;gt;ref != "refs/heads/main"){
    return response()-&amp;gt;json(['success' =&amp;gt; 'not-main'], 200);        }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We are checking if the hashes match. We use the hash_equals function to protect against timing attacks. We also are returning a 404 if the hashes don’t match. That means someone, not GitHub, is sending the request.&lt;br&gt;
We are converting the json string to something useable and checking which branch the webhook was generated for. In this example we are using main but this could be for whatever branch you would like. If it’s not that branch we return 200 and call it a day.&lt;/p&gt;

&lt;p&gt;It’s important to return a 200 to GitHub because if you don’t they will stop sending you webhooks and you will be back to deploying code by hand. Let’s move on to creating our deployment script.&lt;/p&gt;
&lt;h2&gt;
  
  
  Create A Deployment Script
&lt;/h2&gt;

&lt;p&gt;This is the easiest part of this tutorial. Somewhere on your server create a new sh file. In this file you will want to include all the steps that you would manually do in a deployment. Here is an example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git pull origin main
php artisan migrate --force
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keep track of where this file is on the server. You will need it in the final step.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup Queue Job To Handle The Deployment Step
&lt;/h2&gt;

&lt;p&gt;One small hiccup in this process is that the GitHub webhook expects a near instant response. In my experience the deployment script takes longer that GitHub likes. To handle this we need to offload the action of running the deployment script. The solution that I came up with was to handle that in a queue job. Laravel has some great documentation on how to set up your queue works. I recommend looking through that if you don’t already have a queue worker up and running. Let’s create a job that we can dispatch in our webhook handler. Run the following artisan command.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;php artisan make:job ProcessDeplymentWebhook&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This will create a new file for us that we will fill out in the next section. For now let’s have our route dispatch a new job when our webhook handler is called. In our route handler add the following:&lt;/p&gt;

&lt;p&gt;At the top&lt;br&gt;
&lt;code&gt;use App\Jobs\ProcessDeplymentWebhook;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;And below the branch check in out webhook handler&lt;br&gt;
&lt;code&gt;ProcessDeplymentWebhook::dispatch();&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This will dispatch our queue job and allow us to bypass the slowness of running our deployment steps. Here is our final route handler.&lt;/p&gt;
&lt;h2&gt;
  
  
  Use The Process Facade
&lt;/h2&gt;

&lt;p&gt;We have our webhook setup and our queue to handle the deployment the only item left is to call our deployment script in the queue. To do this we will use the new Process facade in Laravel 10. Like I said the is an abstraction around the Symfony Process component. The facade makes it super simple to use. Let’s autoload the facade into our queue job class with the following.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;use Illuminate\Support\Facades\Process;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In the handle function we will add the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//1
$script = "bash " . config('app.deploy_script'); 

//2
Process::run($script);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here we are creating the script we want to run. Think of this as the command you would type into the terminal if you were running this manually.&lt;br&gt;
Finally, we call the run method on the Process facade. This will complete and end our job.&lt;/p&gt;

&lt;p&gt;Super simple right! You can also add a function to log out the output in realtime if you would like. This is one simple way that we can use this facade and I am excited to see more and more going out of the community in the future with the process facade.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where To Go Next
&lt;/h2&gt;

&lt;p&gt;That’s it! Checkout out the documentation for this new facade and see all the things you can do with it. I am really excited to see what the community does with this. What ideas do you have with using this facade?&lt;/p&gt;

&lt;p&gt;This post was originally posted on my website &lt;a href="https://darrindeal.dev/posts/how-to-deploy-your-website-using-the-laravel-process-facade-and-github-webhooks" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>welcome</category>
    </item>
    <item>
      <title>The Best Programming Advice I've Been Given, EVER</title>
      <dc:creator>Darrin Deal</dc:creator>
      <pubDate>Mon, 10 Oct 2022 18:55:34 +0000</pubDate>
      <link>https://dev.to/darrinndeal/the-best-programming-advice-ive-been-given-ever-a9</link>
      <guid>https://dev.to/darrinndeal/the-best-programming-advice-ive-been-given-ever-a9</guid>
      <description>&lt;p&gt;Today I launched a youtube channel. It's been nerve racking process but I am here and I posted my first video. It's all about the best programming advice that I've ever been given. If you watch it, give me feed back, and I'll provide better content in the future!&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/PUS_9w9P-cM"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Setting Mac hot corners in the terminal</title>
      <dc:creator>Darrin Deal</dc:creator>
      <pubDate>Thu, 06 Oct 2022 22:07:09 +0000</pubDate>
      <link>https://dev.to/darrinndeal/setting-mac-hot-corners-in-the-terminal-3de</link>
      <guid>https://dev.to/darrinndeal/setting-mac-hot-corners-in-the-terminal-3de</guid>
      <description>&lt;p&gt;Last night I thought it would be a great idea to reset my Mac. Its not uncommon for me the do this every once and a while. I backed up my files and started the process to bring my mac to it's factory settings. Sometimes it's good to start from a clean slate.&lt;/p&gt;

&lt;p&gt;With a fresh install of macOS I started downloading everything I use as a developer. Visual Studio Code, Docker, Xcode, iTerm2 and Homebrew just to name a few tools that were downloaded. I do all this manually and should probably automate the install and setup of what I can. I had the thought of working on just that as I was setting up my mac this time around.&lt;/p&gt;

&lt;p&gt;I got to the point of setting my mac preferences and I started thinking of how I could set the hot corners with a bash script. Hot corners are one of the only mac preferences I truly care about. I constantly swipe to the bottom left to open launchpad to open programs. After a bit of digging I found there is a way.&lt;/p&gt;

&lt;p&gt;I found a &lt;a href="https://blog.jiayu.co/2018/12/quickly-configuring-hot-corners-on-macos/"&gt;blog post&lt;/a&gt; about setting hot corners in a paired programming situation. They used bash scripts to set and disable hot corners. This is exactly what I needed. Let me show you how to do it as well.&lt;/p&gt;

&lt;h2&gt;
  
  
  Writing The Command
&lt;/h2&gt;

&lt;p&gt;We use the defaults to write the different macOS configuration. The configuration for hot corners is found in &lt;code&gt;com.apple.dock&lt;/code&gt;. You can write configuration for the hot corners by setting &lt;code&gt;wvous-*-corner&lt;/code&gt;. The asterisk can be replaced with &lt;code&gt;tl&lt;/code&gt; (top left), &lt;code&gt;tr&lt;/code&gt; (top right), &lt;code&gt;bl&lt;/code&gt; (top left), and &lt;code&gt;br&lt;/code&gt;(bottom right). To set a specific option you will use an int to define the option. It will be one of the following.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0: No Option
2: Mission Control
3: Show application windows
4: Desktop
5: Start screen saver
6: Disable screen saver
7: Dashboard
10: Put display to sleep
11: Launchpad
12: Notification Center
13: Lock Screen
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can pull everything into the command to set the corner value. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;defaults write com.apple.dock wvous-tl-corner -int 5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command will set the top left hot corner to the action of starting the screen saver.&lt;/p&gt;

&lt;h2&gt;
  
  
  Saving The Changes
&lt;/h2&gt;

&lt;p&gt;Now that we have set the preference we need to save the change. To do this we need to restart the dock. To do this you can run the following command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;killall Dock
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your desktop will go black and your dock will disappear. This is expected and will return to normal shortly after. &lt;/p&gt;

&lt;h2&gt;
  
  
  Modifiers
&lt;/h2&gt;

&lt;p&gt;Now to take this one step further we can set a modifier. A modifier in the context of hot corners is before a hot corner will be activated a key must be held as you trigger the hot corner. Modifiers are set using the &lt;code&gt;wvous-*-modifier&lt;/code&gt; setting. The asterisk is replaced like it is for the corner.&lt;/p&gt;

&lt;p&gt;To set the modifier you can use one of the following.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0: No Modifier
131072: Shift Key
262144: Control Key
524288: Option Key
1048576: Command Key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example, you could set the screen saver to start when the shift key is pressed and top left hot corner is triggered with these commands.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;defaults write com.apple.dock wvous-tl-corner -int 5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;defaults write com.apple.dock wvous-tl-modifier -int 131072
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;killall Dock
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What's Next?
&lt;/h2&gt;

&lt;p&gt;I will use this till Apple decides to change things on me. One day I might just get that set up script done and you will see it in there. Until that comes to pass maybe you can find an awesome way to use this knowledge for your use case.&lt;/p&gt;

&lt;p&gt;Let me know what you do with this in the comments below. It would me the world to me if you liked this article and if you want more articles like this give my account a follow.&lt;/p&gt;

&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/mathiasbynens/dotfiles/blob/master/.macos"&gt;https://github.com/mathiasbynens/dotfiles/blob/master/.macos&lt;/a&gt;&lt;br&gt;
&lt;a href="https://blog.jiayu.co/2018/12/quickly-configuring-hot-corners-on-macos/"&gt;https://blog.jiayu.co/2018/12/quickly-configuring-hot-corners-on-macos/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>macos</category>
      <category>systemsetup</category>
      <category>terminal</category>
    </item>
    <item>
      <title>Keeping all those passwords secure... What do you to save all your tool/server keys and passwords?</title>
      <dc:creator>Darrin Deal</dc:creator>
      <pubDate>Wed, 31 Aug 2022 14:47:20 +0000</pubDate>
      <link>https://dev.to/darrinndeal/keeping-all-those-passwords-secure-what-do-you-to-save-all-your-toolserver-keys-and-passwords-17lh</link>
      <guid>https://dev.to/darrinndeal/keeping-all-those-passwords-secure-what-do-you-to-save-all-your-toolserver-keys-and-passwords-17lh</guid>
      <description>&lt;p&gt;Recently, I found myself in need of storing passwords for multiple applications. They range from client passwords to internal tools. Managing these passwords has been a pain. I love LastPass but was wondering what is everyone else's solution?&lt;/p&gt;

&lt;p&gt;Our current process is pass secure data around using AWS KMS but once it gets to me I then need to store that somewhere. It would be nice to have a tool that easily separated secure data by client or internal. Thoughts? &lt;/p&gt;

</description>
      <category>discuss</category>
      <category>security</category>
      <category>tooling</category>
    </item>
    <item>
      <title>The return statement that keep me silent</title>
      <dc:creator>Darrin Deal</dc:creator>
      <pubDate>Thu, 26 May 2022 14:10:56 +0000</pubDate>
      <link>https://dev.to/darrinndeal/the-return-statement-that-keep-me-silent-1gif</link>
      <guid>https://dev.to/darrinndeal/the-return-statement-that-keep-me-silent-1gif</guid>
      <description>&lt;p&gt;When I first started in development I was in college. One of the first languages that I was learning was C#. I had no clue what a return statement was except that it was making my method stop. There was code below this damning return statement and I was so sure that this section of code should be running. I was sure of it.&lt;/p&gt;

&lt;p&gt;When this took place I had just learned about StackOverflow. It had helped me with other issues and I was sure that it could help me here. Previously, I had only used other contributors questions to come up with solutions for my problem. This time I wanted to contribute my own question. (Can you see where this is going?)&lt;/p&gt;

&lt;p&gt;I had so much joy in contributing my question, "Why does the return statement end my method?". Ten plus years later this question seems so naive and if I had looked in my textbook I would have found the answer, but nevertheless I was proud to contribute to community.&lt;/p&gt;

&lt;p&gt;As you might guess there were very few responses back to my question. There was one that I am still recovering from to this day. Not in a it caused me to tailspin out of joining the development community way but rather a caution when posting online kind of way. The response was a sarcastic, snarky response when boiled down came with this message. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;That's what it is supposed to do, newbie. Asking dumb questions gets dumb responses.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;While this is harmless and I have a successful career in development it has kept me from posting online for all these years. I was so proud to contribute when I got this answer it defeated me in letting my voice be heard in the community. &lt;/p&gt;

&lt;p&gt;Most recently, I had left a comment on a post here on dev.to, one of the first since I was in college. I found myself thinking the comment was negative towards me when in reality it wasn't, it was actually helpful. I am realizing that I placed the pain of the encounter ten plus years ago on this helpful commentator. That was not fair to them.&lt;/p&gt;

&lt;p&gt;So, now that story time is over I have a few questions for you.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Have you experienced a similar situation and have not joined into the conversation of development online/in-person?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If so, have you overcome that fear and feeling of defeat? How?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How can we help younger developers join in the conversation and let their voice be heard in the community?&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's discuss below. &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>discuss</category>
    </item>
    <item>
      <title>5 Tips For Learning Programming in 2022</title>
      <dc:creator>Darrin Deal</dc:creator>
      <pubDate>Wed, 24 Nov 2021 14:32:37 +0000</pubDate>
      <link>https://dev.to/darrinndeal/5-tips-for-learning-programming-in-2022-2hfm</link>
      <guid>https://dev.to/darrinndeal/5-tips-for-learning-programming-in-2022-2hfm</guid>
      <description>&lt;p&gt;Hello Dev.to! I am excited to share with you my first post. I know how intimidating the field of computer programming can be when you are first starting out. In this post I will share my top 5 tips for beginners. If you read this post and find it helpful, please send it to your friends who are also learning. Let's get started with tip number one.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Set SMART Goals
&lt;/h3&gt;

&lt;p&gt;You have probably hear of SMART goals but if not SMART stands for specific, measurable, attainable, relevant, and time-based. &lt;/p&gt;

&lt;p&gt;What is it that you want to do? Just get started? Start with learning a specific language (JavaScript, C, Python, Java). Set how you are going to measure your learning. For example you might get a book or course. Your measurement could be the number of chapters or sections that you complete with doing all the exercises.&lt;/p&gt;

&lt;p&gt;Make these goals attainable your SMART goal should not build the next Meta or Google. Those can be larger goals but not for learning. An attainable goal in our example would be that "I completed all the exercises in my book/course."&lt;/p&gt;

&lt;p&gt;To make this goal relevant look at what job postings are out there even if you are not looking for a job. Companies will list out technologies/languages that they are using in their tech stack.&lt;/p&gt;

&lt;p&gt;Finally, your goals should have an expiration date. Say to yourself "I want to learn xyz in 6 months.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Learn The Basics
&lt;/h3&gt;

&lt;p&gt;This is the most important tip in my opinion. If you are an absolute beginner DO NOT jump into a framework. Look at what frameworks are popular and catch your attention, but if you don't know how to set a variable or write a for loop in the language the framework is useless to you. &lt;/p&gt;

&lt;p&gt;Start learning the language. The skills that you learn in language learning will transfer other languages, not so much in learning frameworks.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Build, Build, Build
&lt;/h3&gt;

&lt;p&gt;Once you have gone through the process of learning a language start building with it. Here is where I would then jump into frameworks. The question then be comes "What should I build?"&lt;/p&gt;

&lt;p&gt;What you should build is ultimately up to you but here are some ideas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ToDo List App&lt;/li&gt;
&lt;li&gt;Tip Calculator App&lt;/li&gt;
&lt;li&gt;Date Reminder App&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are just a few examples of what you could build. Let me know below if you do build one of these. I would love to know&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Find Awesome Resources
&lt;/h3&gt;

&lt;p&gt;When learning anything find communities of learning to help you. In programming there are so many communities that you will find that will help speed up you learning. A few of my favorites is &lt;a href="https://dev.to/"&gt;Dev.to&lt;/a&gt;, &lt;a href="https://wesbos.com/"&gt;Wes Bos&lt;/a&gt;, and &lt;a href="https://nostarch.com/"&gt;No Starch Press books&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Start Tackling Imposter Syndrome Right Now
&lt;/h3&gt;

&lt;p&gt;You may not know it but one of the hardest things to overcome in programming is imposter syndrome. What is imposter syndrome? Here's a definition. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The persistent inability to believe that one's success is deserved or has been legitimately achieved as a result of one's own efforts or skills.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This feeling is common and many developers have had to go through the process of defeating imposter syndrome when they started their carriers. Here are three tips on punching imposter syndrome in the face.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start believing you are a developer before you start coding&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I know this sounds like believe it and it will come stuff, because it actually is. I have seen many students use this tip and with it alone conquer imposter syndrome.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keep visual log of what you are building&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This tip will help you remember how far you have come. When you look at this visual log you can say "Wow! look what I have accomplished!" My recommendation is to use instagram for a public log or notion for a private log.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Surround yourself with other who are learning&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is also super important. Community is very important when starting to learn. You will find that you are not alone and together you will punch imposter syndrome in the face.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Now?
&lt;/h2&gt;

&lt;p&gt;Wow! You made it through my first post. I hope you have found this post helpful. If you took any of the tips I proposed let me know in the comments below. Also, If you have any other tips add them to the comments as well. &lt;/p&gt;

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