<?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: Brett Codes</title>
    <description>The latest articles on DEV Community by Brett Codes (@brettcodes).</description>
    <link>https://dev.to/brettcodes</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%2F937667%2F6d874a20-6957-4d6d-b9dc-3bea3156f7c2.jpg</url>
      <title>DEV Community: Brett Codes</title>
      <link>https://dev.to/brettcodes</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/brettcodes"/>
    <language>en</language>
    <item>
      <title>Over 100 project ideas for developers learning any new programming language</title>
      <dc:creator>Brett Codes</dc:creator>
      <pubDate>Mon, 17 Oct 2022 13:53:38 +0000</pubDate>
      <link>https://dev.to/brettcodes/over-100-project-ideas-for-developers-learning-any-new-programming-language-22gm</link>
      <guid>https://dev.to/brettcodes/over-100-project-ideas-for-developers-learning-any-new-programming-language-22gm</guid>
      <description>&lt;p&gt;I've kept a private list of ideas for programming projects for years. These projects aren't dream ideas for striking it rich. No. They're projects for learning. Little projects. Things I'd like to see exist. Projects that would stretch my skills a bit but not require working another 20 hours a week.&lt;/p&gt;

&lt;p&gt;I know I learn best by building things, trying to figure out what I don't know, and doing online research when I'm stuck. &lt;/p&gt;

&lt;p&gt;When it comes to learning a new programming language, library, or framework, knowing what an appropriate project is for learning can be overwhelming on top of learning the new thing! So I've collected over 100 project ideas of varying difficulty and type into a free book called &lt;a href="https://projectbook.code.brettchalupa.com/" rel="noopener noreferrer"&gt;&lt;em&gt;Projectbook&lt;/em&gt;&lt;/a&gt;. It's free and &lt;a href="https://github.com/brettchalupa/projectbook" rel="noopener noreferrer"&gt;open source&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;The projects contain specifications, concepts, examples, and mock-ups I designed to get you inspired and building things. From CLIs to apps to games, I've collected all of the projects I'm personally interested in building.&lt;/p&gt;

&lt;p&gt;📺 Prefer a video intro?&lt;/p&gt;

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

&lt;p&gt;Okay, let's dig into some examples of some of the projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  HTTPal CLI
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The gist:&lt;/strong&gt; write a CLI that makes HTTP network requests and responds with the output.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;curl&lt;/code&gt; and &lt;code&gt;wget&lt;/code&gt; are common programs used to transfer data to or from a server, like downloading a file over HTTP. This project is writing something similar to them. Start with just GET requests and then go from there.&lt;/p&gt;

&lt;p&gt;I always call this idea &lt;code&gt;httpal&lt;/code&gt; because it's kinda fun. It's your buddy for making requests!&lt;/p&gt;

&lt;h3&gt;
  
  
  Spec
&lt;/h3&gt;

&lt;p&gt;This could look something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;httpal https://openlibrary.org/books/OL7353617M.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That would make a GET request to that API endpoint for &lt;em&gt;Fantastic Mr. Fox&lt;/em&gt; and return the JSON, which could then be output to a file like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;httpal https://openlibrary.org/books/OL7353617M.json &amp;gt; fmf.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Concepts
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Making network requests, often times available within the standard library of a language&lt;/li&gt;
&lt;li&gt;Outputting the response body&lt;/li&gt;
&lt;li&gt;Basic CLI interactions&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Extra Credit
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Follow redirects&lt;/li&gt;
&lt;li&gt;Support different forms of authentication and request headers&lt;/li&gt;
&lt;li&gt;Support other HTTP methods like PUT, POST, and DELETE&lt;/li&gt;
&lt;li&gt;Support specifying a request body file, like a JSON file, to include in the request body&lt;/li&gt;
&lt;li&gt;Support other protocols! Maybe a better name would be &lt;code&gt;reqbud&lt;/code&gt;. 😬&lt;/li&gt;
&lt;li&gt;What if program specifically catered to those interacting with GraphQL APIs? That means it would always POST to the same endpoint but allow for configurable requests and variables. &lt;code&gt;gqlpal&lt;/code&gt;???&lt;/li&gt;
&lt;li&gt;What if there was a way to load requests for a project from a variety of spec files and easily make those requests? Like a CLI version of &lt;a href="https://www.postman.com" rel="noopener noreferrer"&gt;Postman&lt;/a&gt; or &lt;a href="https://paw.cloud" rel="noopener noreferrer"&gt;Paw&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  RecipeHub
&lt;/h2&gt;

&lt;p&gt;Want to build a full-stack web app? Okay!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The gist&lt;/strong&gt;: GitHub for recipes! But for food, not software.&lt;/p&gt;

&lt;p&gt;I love cooking and baking. It's seriously so fun and creative. I love taking recipes and adjusting and tweaking them to my liking. The neat thing about recipes is that they're not observed by copyright! The photos, the descriptions, etc. are, but the actual ingredients and steps aren't. That always gets me thinking about how awesome it would be if there was a web application for people to share their recipes on. It would be centered around loading quickly, browsing by tags, collecting your favorites, and copying and modifying others' recipes.&lt;/p&gt;

&lt;p&gt;I'm hungry and excited just writing this!&lt;/p&gt;

&lt;h3&gt;
  
  
  Mock-Ups
&lt;/h3&gt;

&lt;p&gt;There are a lot of features that could exist for this app, and mocking them all up would be a lot, but here's a gist of what some of the key elements of the UI could be like (viewing your recipes, viewing a recipe, and the recipe form):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxpkknymg5pbk45be04va.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxpkknymg5pbk45be04va.png" alt="RecipeHub mobile mock-ups. First view: site title/logo, " title=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Specs
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;User accounts (authentication)&lt;/li&gt;
&lt;li&gt;Recipe management

&lt;ul&gt;
&lt;li&gt;Data model for a recipe:

&lt;ul&gt;
&lt;li&gt;Name&lt;/li&gt;
&lt;li&gt;Description&lt;/li&gt;
&lt;li&gt;Ingredients&lt;/li&gt;
&lt;li&gt;Instructions&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;Viewing another user's recipes&lt;/li&gt;

&lt;li&gt;Fork a recipe (make a copy to edit and adjust to your liking, but maintain an association to the original)&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Concepts
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Authentication&lt;/li&gt;
&lt;li&gt;Permissions&lt;/li&gt;
&lt;li&gt;Data management&lt;/li&gt;
&lt;li&gt;Network graph&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Extra Credit
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Add ability to favorite another user's recipes &amp;amp; view your favorites&lt;/li&gt;
&lt;li&gt;More metadata like prep time and cooking time (and thus total time)&lt;/li&gt;
&lt;li&gt;Image upload for a recipe&lt;/li&gt;
&lt;li&gt;Tags for things like vegan, breakfast, etc. where you can discover similar recipes&lt;/li&gt;
&lt;li&gt;If you build the back-end with an API, you could then build out a mobile app that consumes it! That would be pretty handy when cooking in the kitchen

&lt;ul&gt;
&lt;li&gt;Dream feature: when viewing a recipe on the mobile app, prevent the phone from sleeping&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;p&gt;Find over 100 more projects in &lt;a href="https://projectbook.code.brettchalupa.com/" rel="noopener noreferrer"&gt;&lt;em&gt;Projectbook&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Let me know what you think and if it inspires you to build anything.&lt;/p&gt;

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

</description>
      <category>beginners</category>
      <category>showdev</category>
      <category>tutorials</category>
    </item>
    <item>
      <title>RSpec's spec_helper vs rails_helper Explained</title>
      <dc:creator>Brett Codes</dc:creator>
      <pubDate>Thu, 06 Oct 2022 12:00:00 +0000</pubDate>
      <link>https://dev.to/brettcodes/rspecs-spechelper-vs-railshelper-explained-na4</link>
      <guid>https://dev.to/brettcodes/rspecs-spechelper-vs-railshelper-explained-na4</guid>
      <description>&lt;p&gt;When you install RSpec in your Rails application, two of the files it generates are &lt;code&gt;spec/spec_helper.rb&lt;/code&gt; and &lt;code&gt;spec/rails_helper.rb&lt;/code&gt;. The generated source contains a lot of helpful comments, but it might not be immediately clear why there are two helpers instead of one.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Intro to the helpers
&lt;/h2&gt;

&lt;p&gt;When you write specs in your Rails app, at the top of each file you require a helper that loads RSpec and other dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s2"&gt;"spec_helper"&lt;/span&gt;
&lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s2"&gt;"word_count"&lt;/span&gt;

&lt;span class="no"&gt;RSpec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt; &lt;span class="no"&gt;WordCount&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="c1"&gt;# your specs here&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or with &lt;code&gt;rails_helper&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s2"&gt;"rails_helper"&lt;/span&gt;

&lt;span class="no"&gt;RSpec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt; &lt;span class="no"&gt;User&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="c1"&gt;# your specs here for the User model&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Which file you choose to require has implications when it comes to running unit tests for a given file or directory. Let's dig into what those implications are and the differences between them.&lt;/p&gt;

&lt;h2&gt;
  
  
  spec_helper’s purpose
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;spec_helper&lt;/code&gt; is intended to be the most lightweight, fast RSpec config in your app. It's great for testing plain old Ruby objects (POROs) that don't require Rails. Even if those POROs require a gem or other classes, if they don't need Rails, you can use &lt;code&gt;spec_helper&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;spec_helper&lt;/code&gt; is what you'd use if you are testing a Ruby gem with RSpec or anything non-Rails. It configures RSpec and that's just about it.&lt;/p&gt;

&lt;h2&gt;
  
  
  rails_helper’s purpose
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;rails_helper&lt;/code&gt; requires &lt;code&gt;spec_helper&lt;/code&gt; at the very top of the file, so it pulls in all of the config from that. So &lt;code&gt;spec_helper&lt;/code&gt; is our base and &lt;code&gt;rails_helper&lt;/code&gt; stacks on top of it.&lt;/p&gt;

&lt;p&gt;You might be thinking, &lt;em&gt;why not just have one helper and keep it easy?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I've certainly worked in codebases that do that, but that was before people understood that keeping them separate is important, especially when it comes to fast TDD cycles.&lt;/p&gt;

&lt;p&gt;Running individual tests that require &lt;code&gt;spec_helper&lt;/code&gt; is &lt;em&gt;much&lt;/em&gt; faster than requiring &lt;code&gt;rails_helper&lt;/code&gt; because it's not loading all of the Rails app and gems. It's just loading RSpec, the spec_helper, and the files required for the test.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;rails_helper&lt;/code&gt; exists to be used with specs that test functionality that can't exist without Rails—controllers, routes, models, views. When testing a model's validations, you'll want to make sure those are happening in the context of Rails and working correctly, so you need to require Rails.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;rails_helper&lt;/code&gt; is also useful for configuring gems and support files needed by those tests, like setting up FactoryBot. It's also where you might want to reset and clean up the database after every test run (an timely operation in the context of fast tests).&lt;/p&gt;

&lt;h2&gt;
  
  
  The speed differences
&lt;/h2&gt;

&lt;p&gt;With a fresh Rails 7 codebase (&lt;a href="https://github.com/brettchalupa/screencasts/tree/main/spec-helper-vs-rails-helper"&gt;source&lt;/a&gt;), here's the difference in speed for testing one plain Ruby class's method that lives in &lt;code&gt;lib&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;spec_helper&lt;/code&gt;: Finished in 0.00182 seconds (files took 0.04228 seconds to load)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rails_helper&lt;/code&gt; (cold run): Finished in 0.01671 seconds (files took 1.07 seconds to load)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rails_helper&lt;/code&gt; (warm run): Finished in 0.01058 seconds (files took 0.45144 seconds to load)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are two values to be aware of. The time it takes to run the specs (the first number) and the time it takes to load the files from disk. They are separate values and their aggregate is the total time it takes to run a given spec (or specs).&lt;/p&gt;

&lt;p&gt;The spec_helper loads the files for testing 25x faster on cold runs! Even on a warm run with the files already loaded, spec_helper is still 10x faster at loading the files!&lt;/p&gt;

&lt;p&gt;On top of that, running the actual code in the specs is 10x faster than both.&lt;/p&gt;

&lt;p&gt;That's a huge difference when it comes to the time it takes and you'll notice it as you're going through the Red -&amp;gt; Green -&amp;gt; Refactor TDD cycle.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why is this?
&lt;/h2&gt;

&lt;p&gt;This happens because the &lt;code&gt;rails_helper&lt;/code&gt; is loading hundreds, potentially thousands of Ruby files and configuring the Rails app. Rails does a lot! Look at your &lt;code&gt;Gemfile.lock&lt;/code&gt; and see the dependency tree. Even if you have only ~15 gems in in your &lt;code&gt;Gemfile&lt;/code&gt;, it's likely there are far more than that because each gem has its own dependencies.&lt;/p&gt;

&lt;p&gt;There's a cost to pulling in dependencies and working with an application framework as large as Rails—it slows things down.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does this mean?
&lt;/h2&gt;

&lt;p&gt;This means that if you want to have faster tests when you're actively writing your code, you'll want to require &lt;code&gt;spec_helper&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  But what does this mean, really? I'm building a Rails app, I need &lt;code&gt;rails_helper&lt;/code&gt;.
&lt;/h2&gt;

&lt;p&gt;I get it. You're writing view, controller, and model code that all needs Rails to test them properly. That's true. And those tests are valuable. But there are still things you can do and should be aware of.&lt;/p&gt;

&lt;h3&gt;
  
  
  Use plain old Ruby objects (POROs)
&lt;/h3&gt;

&lt;p&gt;There comes a point when writing code you actually aren't doing anything related to Rails. Sure, maybe the objects being acted upon are models, but you could use POROs and then in your tests pass in &lt;code&gt;instance_double&lt;/code&gt; and require &lt;code&gt;spec_helper&lt;/code&gt;. When you build complex applications beyond CRUD, you'll begin to write more Ruby code that's not dependent on Rails.&lt;/p&gt;

&lt;p&gt;You'll also be writing more unit tests, which, in general, won't need Rails. So you want to really leverage &lt;code&gt;spec_helper&lt;/code&gt; when writing unit tests for POROs.&lt;/p&gt;

&lt;p&gt;Your POROs can live in &lt;code&gt;lib&lt;/code&gt; or in &lt;code&gt;app&lt;/code&gt;, wherever you want to put them. That's up to you ultimately.&lt;/p&gt;

&lt;h3&gt;
  
  
  Slowest common denominator
&lt;/h3&gt;

&lt;p&gt;It is important to note that the speed of your tests will ultimately come down to the slowest required helper. If you have three spec files that get run and one of them requires &lt;code&gt;rails_helper&lt;/code&gt;, that'll cause all of them to run slower because the file loading time is as slow as the slowest helper.&lt;/p&gt;

&lt;p&gt;Since you're most likely running all of your tests on CI or occassionally on your machine, that's not a big deal. But it's something to be aware of. What you require won't impact the speed of your entire test suite running. For that, you'd need parallelization and a deeper dive into fixing your slowest specs.&lt;/p&gt;

&lt;p&gt;What we're optimizing for is the tests you run while you're actively writing your code. Those individual file test runs &lt;em&gt;need&lt;/em&gt; to be fast. Any friction and slowdown breaks focus.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create other helpers
&lt;/h3&gt;

&lt;p&gt;Just like how rspec-rails creates two helpers from the get-go, you can do the same! Do you use Capybara for acceptance tests? Create &lt;code&gt;spec/acceptance_helper.rb&lt;/code&gt; that requires &lt;code&gt;rails_helper&lt;/code&gt; (thus also requiring &lt;code&gt;spec_helper&lt;/code&gt;) that configures Capybara and then in those specs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s2"&gt;"acceptance_helper"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There's no reason to slow down all of your Rails unit tests with the loading and configuring of even more code.&lt;/p&gt;

&lt;p&gt;You can create whatever helpers you want. If you've got a directory of POROs in &lt;code&gt;lib&lt;/code&gt; that all require a common set up, create a helper for them that requires &lt;code&gt;spec_helper&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  In summary
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Optimize for fast single file test runs, which is where speed matters most with TDD&lt;/li&gt;
&lt;li&gt;Keep &lt;code&gt;spec_helper&lt;/code&gt; as minimal as possible, basically only configure the core of RSpec in it&lt;/li&gt;
&lt;li&gt;Be mindful of what you &lt;code&gt;require&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Use POROs when possible for their clarity, their single responsibility, and faster unit tests&lt;/li&gt;
&lt;li&gt;Create separate helpers for different needs in your app, don't make single file test runs slower just because you need something loaded and configured in other specs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Managing your spec helpers and being intentional about them and understanding the difference is a major part in having fast, maintainable tests with Rails and RSpec.&lt;/p&gt;

</description>
      <category>rspec</category>
      <category>ruby</category>
      <category>rails</category>
      <category>tdd</category>
    </item>
    <item>
      <title>Why I'm Learning Rust</title>
      <dc:creator>Brett Codes</dc:creator>
      <pubDate>Wed, 05 Oct 2022 13:51:09 +0000</pubDate>
      <link>https://dev.to/brettcodes/why-im-learning-rust-39pm</link>
      <guid>https://dev.to/brettcodes/why-im-learning-rust-39pm</guid>
      <description>&lt;p&gt;I keep asking myself: Why learn Rust when there are so many other languages I could learn? Why not learn Go instead? Everyone seems to pit them against each other. Why not double-down on TypeScript? Why even bother learning a new language or framework if it's unlikely I'll get to use it for anything aside from hobby projects?&lt;/p&gt;

&lt;p&gt;These questions are valid ones, but they are based upon a flawed premise. It is 100% okay for someone to learn anything without any good reason! Learning can be purely just for fun, based on a hunch, based on an intuition. So while I don't have great answers to those questions, I at least have some hopes and dreams and a few motivating factors.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Rust
&lt;/h2&gt;

&lt;p&gt;My first programming language was Java. My computer science teacher in high school made us print out our code to grade it. I'm not sure why, but that's what he wanted.&lt;/p&gt;

&lt;p&gt;Then I started programming in C# because XNA (Microsoft's game engine for indie Xbox 360 development) required it. Then I dabbled in ActionScript 3 for Flash programming, C++ for college classes, a bit of PHP, and somehow landed on using Ruby and JavaScript. Then 10 years flew by. Strange how time works. I've dabbled a bit here and there. A little Go. A little Haxe. But nothing aside from a few weeks or months of experimenting.&lt;/p&gt;

&lt;p&gt;As I've grown as a developer, I've found myself longing to get a bit lower level. I'm thinking a lot more about performance and memory. I'm a bit tired of the slowness and memory usage of Ruby (and Rails). Sure, they work and are mature. But they are, in many ways, resource hogs. They don't encourage thinking about program structure and correctness. Performance just seems like less of a priority and concern. But I'd like to write more performant code. I'd like to understand threading and memory usage more. I'd like to build cross-platform tools and games and code.&lt;/p&gt;

&lt;p&gt;The thought of writing lower level code that isn't C or C++ is appealing. I enjoyed coding in those languages over a decade ago, but they felt dated in many ways, like writing separate header files. It's been too long for me to have any salient thoughts on them thought. 😅&lt;/p&gt;

&lt;p&gt;Also, through TypeScript, I've been re-exposed to the joys of statically typed languages. Having a great language server with types increases confidence with coding and is much more ergonomic than having to look at the docs online whenever one wants to look something up. The idea of a performant, strongly-typed, modern language is extremely appealing!&lt;/p&gt;

&lt;p&gt;I'm also continually annoyed by dealing with &lt;code&gt;nil&lt;/code&gt; errors in Ruby and &lt;code&gt;null&lt;/code&gt; and and &lt;code&gt;undefined&lt;/code&gt; errors in JavaScript. I understand why they exist, and they can be manageable, but to think that there's another way is interesting to me.&lt;/p&gt;

&lt;h2&gt;
  
  
  Programming Beyond the Web
&lt;/h2&gt;

&lt;p&gt;I've primarily done web application development for the last 13 years. It's enjoyable and ever-changing. But I'd like to do some other types of programming too. There are only so many web forms you can build before it begins to feel a bit rote. Game dev, desktop GUIs, command line tools, networking code—Rust seems like a great for all of them. There's so much breadth to the types of programming out there that it feels like I've barely scratched the surface.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Promise of Polyglot
&lt;/h2&gt;

&lt;p&gt;While there will surely be a bit of overhead of context switching between languages, I think learning a variety of languages will make me a better programmer over all. Rust, so far, seems like it will help me reframe how I think about programs and write my code. That's major! Breaking out of the paradigms of a language and come back with a fresh perspective can be really valuable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is Learning Rust Good for My Career?
&lt;/h2&gt;

&lt;p&gt;Without question, learning a new language is good for anyone's career because you're learning something new and being exposed to other types of programming. Whether or not I'll ever have a full-time job programming Rust or that I'd even want to do that remains to be seen.&lt;/p&gt;

&lt;p&gt;I'm curious to see how Rust feels for building APIs and web applications. That'll be really interesting coming from Rails and Ruby. I'm not sure of the maturity there yet or what to expect.&lt;/p&gt;

&lt;p&gt;But I'd be willing to bet that we'll continue to see more widespread usage of Rust. Even in just the last few years where I've casually followed it, its usage has continued to grow. It's also matured, has a solid package manager, great docs, and a wonderful community. It doesn't seem destined for obscurity. It, in so many ways, seems like an ideal language to have in one's toolkit.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I've Done So Far
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Built a simple open-source CLI driven by tests: &lt;a href="https://github.com/brettchalupa/werds"&gt;https://github.com/brettchalupa/werds&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Reading through &lt;a href="https://doc.rust-lang.org/book/"&gt;The Rust Programming Language Book&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Halfway through the &lt;a href="https://github.com/rust-lang/rustlings"&gt;Rustlings&lt;/a&gt; exercises&lt;/li&gt;
&lt;li&gt;Went through the &lt;a href="https://rust-cli.github.io/book/index.html"&gt;Command Line Applications in Rust&lt;/a&gt; guide &lt;/li&gt;
&lt;li&gt;Reading &lt;em&gt;Hands-On Rust&lt;/em&gt; (really fantastic so far)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Hopes &amp;amp; Dreams
&lt;/h2&gt;

&lt;p&gt;I'd really like to use Rust for building some significant hobby projects! That's my goal at least. We'll see how it goes. Early learning and progress has been promising. I've been enjoying it. It's been clicking. I've got ideas for what I want to build (collected in &lt;em&gt;&lt;a href="https://projectbook.code.brettchalupa.com"&gt;Projectbook&lt;/a&gt;&lt;/em&gt;).&lt;/p&gt;

&lt;p&gt;I'm gonna get to it! I'll share what I learn, what I make, and how it's going.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
