<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Yersel Hurtado on Medium]]></title>
        <description><![CDATA[Stories by Yersel Hurtado on Medium]]></description>
        <link>https://medium.com/@yersel500?source=rss-c6b4be48a4a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*hum_K6_LUcOl-FpCmcM1MQ.jpeg</url>
            <title>Stories by Yersel Hurtado on Medium</title>
            <link>https://medium.com/@yersel500?source=rss-c6b4be48a4a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 00:25:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yersel500/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Format your Django Templates easily with djLint]]></title>
            <link>https://yersel500.medium.com/format-django-templates-48b51652d65a?source=rss-c6b4be48a4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/48b51652d65a</guid>
            <dc:creator><![CDATA[Yersel Hurtado]]></dc:creator>
            <pubDate>Fri, 08 Sep 2023 18:22:37 GMT</pubDate>
            <atom:updated>2023-09-08T18:23:59.604Z</atom:updated>
            <content:encoded><![CDATA[<ol><li>Install Djlint locally with this command:</li></ol><pre>python -m pip install -U djlint</pre><p>If this code doesn’t work, try with:</p><pre>python3 -m pip install -U djlint</pre><p>Remember, you previously should have installed python3 and pip</p><p>2. Install the Djlint extension in vscode:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fvfJpcOXrcfjTCrf0yFAOg.png" /><figcaption>djLint Extension</figcaption></figure><p>3. Create a .vscodefolder in the root of your project, and inside this folder a file named settings.json :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/377/1*sps4KnZ_huYZHSO-RDNONw.png" /></figure><p>4. Add this code in the settings.json file:</p><pre>{<br>  &quot;[python]&quot;: {<br>    &quot;editor.defaultFormatter&quot;: &quot;ms-python.autopep8&quot;<br>  },<br>  &quot;[html][django-html][handlebars][hbs][mustache][jinja][jinja-html][nj][njk][nunjucks][twig]&quot;: {<br>    &quot;editor.defaultFormatter&quot;: &quot;monosans.djlint&quot;<br>  }<br>}</pre><p>If you see the code, I’m using autopep8 to format my python code. You can easily install the extesion in vscode. If you use another formatter, you can just delete this line from the settings.json file.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48b51652d65a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Add Sendgrid to Rails 7]]></title>
            <link>https://yersel500.medium.com/add-sendgrid-to-rails-7-3bca9e8e5876?source=rss-c6b4be48a4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/3bca9e8e5876</guid>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[rails]]></category>
            <category><![CDATA[smtp]]></category>
            <category><![CDATA[email]]></category>
            <category><![CDATA[sendgrid]]></category>
            <dc:creator><![CDATA[Yersel Hurtado]]></dc:creator>
            <pubDate>Sat, 22 Oct 2022 07:07:48 GMT</pubDate>
            <atom:updated>2022-10-23T21:58:29.083Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FkITX9udjp3TTexU" /><figcaption>Photo by <a href="https://unsplash.com/ja/@brett_jordan?utm_source=medium&amp;utm_medium=referral">Brett Jordan</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>This is a tutorial to show you how to add a Sendgrid email server with your rails app to handle emails.</p><ol><li>Create an account on sendgrid.com</li><li>Generate and API-KEY on sendgrid</li></ol><p>Go to settings, and then to the API Key section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*E33V_IAWNLu-d9xDBfbfxQ.png" /></figure><p>Then click create API Key:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BrAdKxQxiY6yts60eU4Nzw.png" /></figure><p>The setup should be:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x30IkZ9uyQPxq-X4h3UwKg.png" /></figure><p>Then copy the key sendgrid provide in a safe place.</p><p>3. We will use the gem ‘dotenv-rails’ to use the environment variables. Add it to your gemfile and then run bundle install:</p><pre>gem ‘dotenv-rails’</pre><p>4. Create a .env file on the root path. Then add:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/592b5a2e3a49fd1df5215083ffb8f5c6/href">https://medium.com/media/592b5a2e3a49fd1df5215083ffb8f5c6/href</a></iframe><p>Remember to add your .env file to your .gitignore before any push to Github:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8370649d5cbf9fe034d826d96465c040/href">https://medium.com/media/8370649d5cbf9fe034d826d96465c040/href</a></iframe><p>5. In config/environment.rb specify your ActionMailer settings to point to SendGrid&#39;s servers.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/312854f8596e48a789a91ae10f09bed2/href">https://medium.com/media/312854f8596e48a789a91ae10f09bed2/href</a></iframe><p>6. Add in config/enviroment/development, approximately in line 40:</p><pre>config.action_mailer.default_url_options = { host: &#39;localhost&#39;, port: 3000 }</pre><p>5. Add in config/enviroment/production , approximately in line 40:</p><pre>config.action_mailer.default_url_options = { host: &#39;your_app_url&#39; }</pre><p>7. Update the sender email to the config/initializers/devise.rb, approximately line 45:</p><pre>config.mailer_sender = &#39;your-sender-email@mail.com&#39;</pre><p>This email address should be verified on the Sendgrid account to be enabled to send emails.</p><p>8. Provide your Sendgrid API Key in the server you deployed the app. It’s necessary because your .env file only works locally to avoid someone else can access this information.</p><p><strong>Note:</strong> This setup is to work in a production environment. It means you have a URL where your app is deployed, and you need to use it to update the URL in the previous steps. If you want to test locally, we suggest using the gem ‘letter-opener’:<a href="https://github.com/ryanb/letter_opener">https://github.com/ryanb/letter_opener</a></p><p>After these steps, your app is ready to send emails to 2-step-verification emails, recover passwords, etc.</p><p>You can check more details of the integration between Sengrid and Rails in the official article here: <a href="https://docs.sendgrid.com/for-developers/sending-email/rubyonrails">https://docs.sendgrid.com/for-developers/sending-email/rubyonrails</a></p><p>Thanks for reading, and see you in another tutorial.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3bca9e8e5876" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Customize Devise Auth with Rails 7]]></title>
            <link>https://yersel500.medium.com/customize-devise-auth-with-rails-7-6a9fec1932d2?source=rss-c6b4be48a4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a9fec1932d2</guid>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[devise]]></category>
            <dc:creator><![CDATA[Yersel Hurtado]]></dc:creator>
            <pubDate>Tue, 13 Sep 2022 14:38:32 GMT</pubDate>
            <atom:updated>2022-09-13T14:38:32.191Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Customize devise in Rails 7" src="https://cdn-images-1.medium.com/max/1024/0*PBROnijqKtnm6_pV" /><figcaption>Photo by <a href="https://unsplash.com/@flyd2069?utm_source=medium&amp;utm_medium=referral">FLY:D</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>The main goal of this tutorial is to show you how to add a custom field to the authentication process. By default, the devise gem provides only two fields: emailand password.We will add in this tutorial a new famous field: username.</p><p>Many tutorials show how to set up Devise to default configurations. We assume here that you have installed devise gem. If not, don’t worry. First, follow this tutorial for initial setup: <a href="https://medium.com/better-programming/devise-auth-setup-in-rails-7-44240aaed4be">https://medium.com/better-programming/devise-auth-setup-in-rails-7-44240aaed4be</a></p><p>After completing the tutorial, you can follow the next steps:</p><h4><strong>1. Force the Authentication</strong></h4><p>Here, we will force authentication on all users that want to access our website.</p><p>To do that, add in theapp/controller/aplication_controller.rb:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/101b4fb587ed5ff3ed5cb3cbdb3c4220/href">https://medium.com/media/101b4fb587ed5ff3ed5cb3cbdb3c4220/href</a></iframe><p>It redirects to the sign-in page for every user that wants to access your website.</p><h4><strong><em>2. Allow the new parameter at the controller level</em></strong></h4><p>We will notify at the controller level that we’ll add a new field: username</p><p>In theapp/controller/application_controller.rb file, add:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ff06e94683f2e22a9abaca8820e59e9c/href">https://medium.com/media/ff06e94683f2e22a9abaca8820e59e9c/href</a></iframe><h4><strong><em>3. Add the new field to the database</em></strong></h4><p>Now, we need to create the field at the database level.</p><p>Go to the migration file: db/##any-number##.devise_create_users.rb and add the username parameter:</p><pre>t.string :username, null: false, default: &#39;&#39;</pre><p>Now, your file is similar to the following structure:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ea741419c3afc9a5e8ea3d7444d66d51/href">https://medium.com/media/ea741419c3afc9a5e8ea3d7444d66d51/href</a></iframe><p>Then run:</p><pre>rails db:migrate:reset</pre><p>This last command resets your database, that’s why you should only use it if you are in a development environment, for production you need to do that in another way. Be careful.</p><h4>4. Add the new field to the sign-up form in views</h4><p>Then you need to add the field to the sign-up form in the view, to do that, first, you should generate the views for devise. Just run:</p><pre>rails g devise:views</pre><p>Now ,go to app/views/devise/registrations/new and add:</p><pre>&lt;div class=&quot;field&quot;&gt;</pre><pre>  &lt;%= f.label :username %&gt;&lt;br /&gt;</pre><pre>  &lt;%= f.text_field :username, autofocus: true, autocomplete: &quot;username&quot; %&gt;</pre><pre>&lt;/div&gt;</pre><p>Your registration file will look like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a692eb804a38d326252e5d83831a29ef/href">https://medium.com/media/a692eb804a38d326252e5d83831a29ef/href</a></iframe><p>This is all you need. With these steps, you already have a new field in the registration process.</p><p>Thanks for reading, and see you in another tutorial.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a9fec1932d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Free Heroku is gone? Deploy your Rails App on Fly.io]]></title>
            <link>https://yersel500.medium.com/heroku-free-is-gone-deploy-your-rails-app-on-fly-io-d6771675fc12?source=rss-c6b4be48a4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6771675fc12</guid>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[heroku]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <dc:creator><![CDATA[Yersel Hurtado]]></dc:creator>
            <pubDate>Fri, 02 Sep 2022 12:35:05 GMT</pubDate>
            <atom:updated>2022-10-28T11:51:44.790Z</atom:updated>
            <content:encoded><![CDATA[<p>A few days ago, Heroku informed the community that the free version will be removed on November 2022. It really cause a big impact on the developer community, especially Rails developers, because it is usually the first option you have to deploy easily and free your Rails Application. After de announcement, the immediate question was: Where will I publish my websites now?</p><figure><img alt="Heroku alternative: Time to say goodbye" src="https://cdn-images-1.medium.com/max/1024/1*DHGO9zJM7WWMbNf0cAFj0w.jpeg" /><figcaption>Photo by <a href="https://pixabay.com/users/geralt-9301/">Gerald</a> on <a href="https://pixabay.com/photos/farewell-say-goodbye-bye-road-sign-3258939/">Pixabay</a></figcaption></figure><p>There are some options in the market, but in this post, we will focus on Fly.io which allow us to deploy our Rails app in a friendly way.</p><p>We start now with step by steps process to deploy your application:</p><ol><li>Go to <a href="https://fly.io/">https://fly.io/</a> and create a free account</li><li>To install Fly CLI, open your terminal and run:</li></ol><p>In Linux:</p><pre>curl -L <a href="https://fly.io/install.sh">https://fly.io/install.sh</a> | sh</pre><p>On a Mac:</p><pre>brew install flyctl</pre><p>3. Authenticate from the terminal:</p><pre>flyctl auth login</pre><p>This command opens your browser and asks you to log in, after it, you can close your browser and return to the terminal.</p><p>4. Go to your rails project folder and then run:</p><pre>cd ~/my-rails-app<br>fly launch</pre><p>This command setup a new application, and ask you to give a name for the app:</p><figure><img alt="flyctl launch command — App name" src="https://cdn-images-1.medium.com/max/927/1*GVM6gxyH8RU0oIIfZhccLQ.png" /><figcaption>App name</figcaption></figure><p>As you can read, you can leave blank by just pressing enter and the name will be auto-generated. Then it will ask you the location where you want to deploy your app:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*w72nfMHFbT-rojqeL_TNKQ.png" /><figcaption>Select region to deploy</figcaption></figure><p>You have many options to choose from, pick one and press enter. In my case. I selected Miami. Then, it asks if you want to set up PostgreSQL, and the answer is obvious: Yes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*D-wqB4J0-BUIcQ2Fp7fN9g.png" /><figcaption>Set up Postgresql</figcaption></figure><p>Now, it asks to choose the configuration, just select the first (this is the free option)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3Hq3Ow_pRZ52YbNZP1xqpw.png" /><figcaption>Select configuration</figcaption></figure><p>And that’s all for this step, just let fly finish the setup. When it finishes, you will see this message at the end:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/1*n7WRsyCSui1UZHQ6uwI1mA.png" /></figure><p>5. In this step, we are ready to deploy the app:</p><pre>fly deploy</pre><p>It could take some minutes to deploy, just wait and in the end, you will receive the next message if all is good:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*J0trOsIBHWOxSrAOypvHXw.png" /><figcaption>Finish de deployment</figcaption></figure><p>6. Go to your <a href="https://fly.io/">https://fly.io/</a> and check your dashboard:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*YgQ3I393mLRsqaKxiJ7IoA.png" /><figcaption>Application</figcaption></figure><p>The first is the application and the second is the database. Click on the first row:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5ZbZc7U9H_HrDRKw9rjPiw.png" /><figcaption>Hostname link</figcaption></figure><p>Click on the hostname and boom! Your app is live.</p><p>You can also open your application with this command in the terminal:</p><pre>fly open</pre><p>7. If you need to provide environment variables like SUPER_SECRET_KEY:</p><pre>fly secrets set SUPER_SECRET_KEY=password1234</pre><p>8. [Optional step]: If you want to use the rails console to write information in your live app, it’s possible but many people face issues due to the memory of the server: 256MB. My recommendation is first, scale your server to 512MB (both the app and database server)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jl45SiGJCSIC5xhAT0HnpQ.png" /><figcaption>Scale your server</figcaption></figure><p>Then, run:</p><pre>fly ssh console -C “app/bin/rails console”</pre><p>After it, you can play with irb:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NS9xFxMo61CpmuiJJVGl_A.png" /></figure><p>But be careful, you are in a production environment.</p><p>If the previous command doesn’t work for you, you can try with:</p><pre>fly ssh console <br>bash <br>cd /app <br>bin/rails c</pre><p>This is an alternative way to access the console.</p><p>Hope you enjoy this tutorial, feel free to share it. Thank you for reading and see you in next articles!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d6771675fc12" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What actions will I take if I start from scratch my career as a software engineer?]]></title>
            <link>https://yersel500.medium.com/what-actions-will-i-take-if-i-start-from-scratch-my-career-as-a-software-engineer-137144cdabad?source=rss-c6b4be48a4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/137144cdabad</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Yersel Hurtado]]></dc:creator>
            <pubDate>Sat, 02 Apr 2022 03:41:40 GMT</pubDate>
            <atom:updated>2022-04-02T03:41:40.447Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*INfjPtQvb9etMGLVuS0YMw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@6heinz3r?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Gabriel Heinzer</a> on <a href="https://unsplash.com/s/photos/coding?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p><em>A week ago I was thinking about how much I learned during my career as a software engineer. I notice that I made mistakes that cost me a lot to revert then. That’s why I asked myself: Why not share it with the new aspiring developers?. Here you have 3 suggestions that I’m sure will boost your career as a developer:</em></p><ol><li><em>The first suggestion is: Start learning the most demanded languages like JavaScript, Python, or Ruby. As you know, our world works based on offer and demand. If you start learning a strange language with low demand, will be very difficult for you to find a job in a short period of time, and you don’t find a job, as a consequence, you don’t receive a salary and things can become worse up to the point you need to work in another field by necessity.</em></li></ol><p><em>If you want to become a Front-End Developer, I suggest the next path:</em></p><ul><li><em>Learn HTML and CSS: These are the basis to give the structure and style to webpages.</em></li><li><em>Javascript: This language allows you to add interactions on your webpage based on the behavior of the client.</em></li><li><em>React: This is a library that is fully supported by Facebook. It helps you to build robust applications with less effort.</em></li></ul><p><em>2. The second suggestion Work-based on SMART goals. In this way, you will have a specific time to achieve your goals. This step is very important to stay organized with a clear objective at a specific time. I meet many people that want to become a developer 2 years ago and until now They don’t manage well any programming language.</em></p><p><em>If you are really committed to becoming a software developer you need to have a specific plan to achieve it.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X_12RuZwnBGB9DjxS9w8yg.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@goumbik?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Lukas Blazek</a> on <a href="https://unsplash.com/s/photos/schedule?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p><em>3. The third and last suggestion is Join to a digital school where you can learn with an organized curriculum. But not every school is good, you need to filter it based on the next criteria:</em></p><ul><li><em>It should offer a clear curriculum to become a Full-stack developer.</em></li><li><em>It should have a specific duration to complete the program.</em></li><li><em>It should allow work in pair programming with other students. This is a strong skill you need to develop to show your future employees that You are trained to work in a team.</em></li><li><em>It should have past students that are actually working as a developer in good companies. This proves that the program work.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O8ka3YKUeClSXmbjqF8SZA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@alvarordesign?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Alvaro Reyes</a> on <a href="https://unsplash.com/s/photos/pair-programming?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p><em>There are many options for that but review carefully if they meet the requirement I listed. One school I can recommend is </em><a href="https://www.microverse.org/?grsf=o6supz"><em>microverse</em></a><em>, it meets all the requirements and the best part is that you pay nothing until you get a job as a developer ( this guarantees that the program must be good enough for you to be prepared to get a job, otherwise they don’t earn anything).</em></p><p><em>I will end by encouraging you to leverage my past experiences to help you become a better developer. And as for personal recommendations, if you want a program that fits perfectly with the suggestions I gave, I strongly recommend applying to join </em><a href="https://www.microverse.org/?grsf=o6supz"><em>microverse</em></a><em>.</em></p><p><em>See you in my next article.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=137144cdabad" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>