<?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: Jaken Herman</title>
    <description>The latest articles on DEV Community by Jaken Herman (@jakenherman).</description>
    <link>https://dev.to/jakenherman</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%2F173675%2F9a4d833f-302e-4122-953e-cab9010817af.jpeg</url>
      <title>DEV Community: Jaken Herman</title>
      <link>https://dev.to/jakenherman</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jakenherman"/>
    <language>en</language>
    <item>
      <title>Extending a CLI Program with Subcommands in Rust</title>
      <dc:creator>Jaken Herman</dc:creator>
      <pubDate>Thu, 17 Oct 2024 18:04:05 +0000</pubDate>
      <link>https://dev.to/jakenherman/extending-a-cli-program-with-subcommands-in-rust-40j2</link>
      <guid>https://dev.to/jakenherman/extending-a-cli-program-with-subcommands-in-rust-40j2</guid>
      <description>&lt;p&gt;&lt;a href="https://medium.com/@JakenH/how-to-build-a-command-line-interface-cli-in-rust-3b2d3136874f?source=rss-ea578af2ea5e------2" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2600%2F0%2A7M5nkBXXnnCu4KSd" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With Rust’s emphasis on performance and safety, it’s an excellent choice for building CLIs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/@JakenH/how-to-build-a-command-line-interface-cli-in-rust-3b2d3136874f?source=rss-ea578af2ea5e------2" rel="noopener noreferrer"&gt;Continue reading on Medium »&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cli</category>
      <category>rust</category>
      <category>clap</category>
      <category>commandline</category>
    </item>
    <item>
      <title>Getting Started with Rocket and Rust for REST APIs (Building a To-Do App)</title>
      <dc:creator>Jaken Herman</dc:creator>
      <pubDate>Thu, 17 Oct 2024 06:19:03 +0000</pubDate>
      <link>https://dev.to/jakenherman/getting-started-with-rocket-and-rust-for-rest-apis-building-a-to-do-app-47m2</link>
      <guid>https://dev.to/jakenherman/getting-started-with-rocket-and-rust-for-rest-apis-building-a-to-do-app-47m2</guid>
      <description>&lt;p&gt;In this blog post, we’ll begin building a simple to-do application using Rust and the Rocket web framework. Rocket provides a high-level API for building web applications and REST APIs, making it a great choice for developers who want to get up and running quickly. If you make it to the end of this post (and the end of this three-part series, you’ll have a basic REST API set up with Rocket that handles HTTP requests - which should set up a solid foundation for you to venture forward in making a fully-fledged to-do application (I know, I know - who needs &lt;em&gt;another&lt;/em&gt; to-do application?)&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What You'll Learn&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Setting up a Rust project and adding Rocket as a dependency.&lt;/li&gt;
&lt;li&gt;Creating a basic Rocket server.&lt;/li&gt;
&lt;li&gt;Handling HTTP GET requests.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Prerequisites&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Make sure you have Rust installed&lt;/p&gt;

&lt;p&gt;💡&lt;/p&gt;

&lt;p&gt;You can skip the project setup step, if you’d like, by cloning my &lt;a href="https://github.com/JakenHerman/dooly" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt;, just make sure that if you do, you’re on the &lt;a href="https://github.com/JakenHerman/dooly/tree/jaken/post-1" rel="noopener noreferrer"&gt;correct branch for this specific post. The branch is &lt;code&gt;post-1&lt;/code&gt;&lt;/a&gt;. So once you’ve cloned, be sure to run &lt;code&gt;git checkout post-1&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Setting up the Project&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Let’s start by creating a new Rust project for the to-do app. I’m going to name mine &lt;code&gt;dooly&lt;/code&gt;. You should modify the command below to replace &lt;code&gt;dooly&lt;/code&gt; with whatever you’d like to name your application. Run the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cargo new dooly &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd &lt;/span&gt;dooly
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, we’ll need to add a few dependencies. Run &lt;code&gt;cargo add rocket serde serde_json&lt;/code&gt;. Now, open the &lt;code&gt;Cargo.toml&lt;/code&gt; file and add modify your dependencies to include the &lt;code&gt;derive&lt;/code&gt; and &lt;code&gt;json&lt;/code&gt; features, like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="nn"&gt;[dependencies]&lt;/span&gt;
&lt;span class="py"&gt;rocket&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="py"&gt;version&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"0.5.1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="py"&gt;features&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"json"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="py"&gt;serde&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="py"&gt;version&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"1.0.210"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="py"&gt;features&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"derive"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="py"&gt;serde_json&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"1.0.128"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Setting Up a Basic Rocket Server&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;With the dependencies ready, let's write our initial Rocket server. Open &lt;code&gt;src/main.rs&lt;/code&gt; and replace the content with the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="nd"&gt;#[macro_use]&lt;/span&gt; &lt;span class="k"&gt;extern&lt;/span&gt; &lt;span class="k"&gt;crate&lt;/span&gt; &lt;span class="n"&gt;rocket&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nd"&gt;#[get(&lt;/span&gt;&lt;span class="s"&gt;"/"&lt;/span&gt;&lt;span class="nd"&gt;)]&lt;/span&gt;
&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;index&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;'static&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s"&gt;"Welcome to the Rust To-Do API!"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nd"&gt;#[launch]&lt;/span&gt;
&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;rocket&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nn"&gt;rocket&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.mount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nd"&gt;routes!&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let’s break this down:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;#[macro_use] extern crate rocket;&lt;/code&gt; is required to use Rocket’s macros.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;#[get("/")]&lt;/code&gt; is an attribute that defines a route handler for GET requests to the root (&lt;code&gt;/&lt;/code&gt;) of the server.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rocket::build()&lt;/code&gt; initializes the Rocket server, and &lt;code&gt;.mount("/", routes![index])&lt;/code&gt; mounts the route (&lt;code&gt;index()&lt;/code&gt;) at the root URL (&lt;code&gt;/&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, run the server using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cargo run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see Rocket's launch sequence, and the server will start on &lt;code&gt;localhost:8000&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;🚀 Rocket has launched from http://localhost:8000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open your browser and visit &lt;code&gt;http://localhost:8000&lt;/code&gt;. You should see:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Welcome to the Rust To-Do API!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Handling Basic GET Requests for To-Do Items&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Now let’s add a route to retrieve a list of to-do items. For now, we’ll return a static list of hardcoded items in JSON format. This can be supplemented with a list of items retrieved from a database or other storage method at a later time.&lt;/p&gt;

&lt;p&gt;Replace the contents of &lt;code&gt;src/main.rs&lt;/code&gt; with the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="nd"&gt;#[macro_use]&lt;/span&gt; &lt;span class="k"&gt;extern&lt;/span&gt; &lt;span class="k"&gt;crate&lt;/span&gt; &lt;span class="n"&gt;rocket&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;rocket&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nn"&gt;serde&lt;/span&gt;&lt;span class="p"&gt;::{&lt;/span&gt;&lt;span class="n"&gt;Serialize&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nn"&gt;json&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Json&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="nd"&gt;#[derive(Serialize)]&lt;/span&gt;
&lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;TodoItem&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;u32&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"String,"&lt;/span&gt;
    &lt;span class="n"&gt;completed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nd"&gt;#[get(&lt;/span&gt;&lt;span class="s"&gt;"/todos"&lt;/span&gt;&lt;span class="nd"&gt;)]&lt;/span&gt;
&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;get_todos&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Json&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;Vec&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;TodoItem&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;todos&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nd"&gt;vec!&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="n"&gt;TodoItem&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;Learn Rust&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;.to_string(), completed: false },"&lt;/span&gt;
        &lt;span class="n"&gt;TodoItem&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;Build a REST API&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;.to_string(), completed: false },"&lt;/span&gt;
    &lt;span class="p"&gt;];&lt;/span&gt;
    &lt;span class="nf"&gt;Json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;todos&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nd"&gt;#[launch]&lt;/span&gt;
&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;rocket&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nn"&gt;rocket&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.mount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nd"&gt;routes!&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;get_todos&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What’s new?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;TodoItem&lt;/code&gt;: A struct representing a to-do item. We derive &lt;code&gt;Serialize&lt;/code&gt; so it can be converted into JSON.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Json&amp;lt;Vec&amp;lt;TodoItem&amp;gt;&amp;gt;&lt;/code&gt;: Rocket's JSON type is used to return a vector of &lt;code&gt;TodoItem&lt;/code&gt; instances as JSON.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;get_todos&lt;/code&gt; route is defined with the &lt;code&gt;#[get("/todos")]&lt;/code&gt; macro, and it returns a static list of two to-do items.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, restart the server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cargo run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Visit &lt;code&gt;http://localhost:8000/todos&lt;/code&gt; on your browser (or use a tool like &lt;a href="https://insomnia.rest" rel="noopener noreferrer"&gt;Insomnia&lt;/a&gt; or &lt;a href="https://www.postman.com" rel="noopener noreferrer"&gt;Postman&lt;/a&gt; - both great options) and you should see a JSON response:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Learn Rust"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"completed"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Build a REST API"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"completed"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Breaking Down Rocket’s Routing and Response&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;So let’s go over what we &lt;em&gt;really&lt;/em&gt; did here. Rocket makes it simple to define routes. Here's how we defined the &lt;code&gt;/todos&lt;/code&gt; route:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;#[get("/todos")]&lt;/code&gt;: This specifies the HTTP method (&lt;code&gt;GET&lt;/code&gt;) and the path (&lt;code&gt;/todos&lt;/code&gt;) the route responds to.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Json(todos)&lt;/code&gt;: We wrap the list of &lt;code&gt;TodoItem&lt;/code&gt; structs in &lt;code&gt;Json&lt;/code&gt; to automatically serialize it into JSON for the response.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Rocket also handles other HTTP methods like &lt;code&gt;POST&lt;/code&gt;, &lt;code&gt;PUT&lt;/code&gt;, and &lt;code&gt;DELETE&lt;/code&gt;, which we’ll explore in future posts.&lt;/p&gt;




&lt;p&gt;In this first post of this three-part series, we’ve set up a simple Rocket server and created a basic route to return a list of to-do items. In the next post, we’ll implement functionality to add, update, and delete to-do items, allowing users to interact with the API using different HTTP methods.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>programming</category>
      <category>restapi</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to Build a Command-Line Interface (CLI) in Rust</title>
      <dc:creator>Jaken Herman</dc:creator>
      <pubDate>Mon, 07 Oct 2024 18:04:05 +0000</pubDate>
      <link>https://dev.to/jakenherman/how-to-build-a-command-line-interface-cli-in-rust-4f0h</link>
      <guid>https://dev.to/jakenherman/how-to-build-a-command-line-interface-cli-in-rust-4f0h</guid>
      <description>&lt;p&gt;&lt;a href="https://medium.com/@JakenH/how-to-build-a-command-line-interface-cli-in-rust-3b2d3136874f?source=rss-ea578af2ea5e------2" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2600%2F0%2A7M5nkBXXnnCu4KSd" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With Rust’s emphasis on performance and safety, it’s an excellent choice for building CLIs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/@JakenH/how-to-build-a-command-line-interface-cli-in-rust-3b2d3136874f?source=rss-ea578af2ea5e------2" rel="noopener noreferrer"&gt;Continue reading on Medium »&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cli</category>
      <category>rust</category>
      <category>clap</category>
      <category>commandline</category>
    </item>
    <item>
      <title>An Attempt to Demystify Rust Lifetimes</title>
      <dc:creator>Jaken Herman</dc:creator>
      <pubDate>Wed, 02 Oct 2024 13:00:00 +0000</pubDate>
      <link>https://dev.to/jakenherman/an-attempt-to-demystify-rust-lifetimes-2130</link>
      <guid>https://dev.to/jakenherman/an-attempt-to-demystify-rust-lifetimes-2130</guid>
      <description>&lt;p&gt;At its core, Rust's lifetimes are markers that define the span of time during which references are valid. Think of lifetimes as a guardrail that ensures you don't access data after it has been deallocated, a safeguard against null pointer dereferences and memory-related mishaps. Each reference has a corresponding lifetime, indicating how long it's allowed to stick around and be referenced. Rust’s obsession with safety is not just about protecting you from the potential pitfalls of programming. It's about providing you with an environment where you can trust your code to run without unexpected crashes or security vulnerabilities. This is one of the great things about Rust - I’m constantly saying that if there are no warnings in the Rust analyzer, I can feel confident that my code will run as-expected.&lt;/p&gt;




&lt;p&gt;Here's why lifetimes are crucial:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Memory Safety&lt;/strong&gt;: Lifetimes prevent dangling pointers and memory leaks, the presence of which are the kiss of death to stable software. They make sure references never outlive the data they point to.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Concurrency Control&lt;/strong&gt;: Rust’s ownership and borrowing model, guided by lifetimes, enables safe and concurrent code execution by eliminating races. Lifetimes guide the compiler to enforce strict borrowing rules.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Predictable Behavior&lt;/strong&gt;: By clearly defining the lifespan of references, lifetimes enhance the predictability of your code. You won't find yourself scratching your head over unexpected side effects.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Efficient Memory Management&lt;/strong&gt;: Rust sidesteps the complexities of garbage collection with its ownership system. Lifetimes are the building blocks of ownership, leading to efficient memory management, which means Rust needs no garbage collector.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Lifetimes in Rust are denoted by a single lowercase letter, typically &lt;code&gt;'a&lt;/code&gt;, &lt;code&gt;'b&lt;/code&gt;, etc., though any valid identifier can be used. These symbols indicate the duration of validity for a reference and are employed in function signatures, structs, enums, and trait definitions.&lt;/p&gt;

&lt;p&gt;Imagine a function that sorts a list of integers and returns a reference to the largest one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="n"&gt;find_largest&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nv"&gt;'a&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;numbers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;'a&lt;/span&gt; &lt;span class="nb"&gt;Vec&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;i32&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;'a&lt;/span&gt; &lt;span class="nb"&gt;i32&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// implementation here&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this scenario, the &lt;code&gt;'a&lt;/code&gt; lifetime specifies that the returned reference will last as long as the reference to the input vector numbers. A typical lifetime annotation has the form &lt;code&gt;&amp;amp;'a T&lt;/code&gt;, where &lt;code&gt;'a&lt;/code&gt; represents the lifetime and &lt;code&gt;T&lt;/code&gt; is the type of the reference.&lt;/p&gt;




&lt;p&gt;Embracing the concept of lifetimes is a hallmark of becoming proficient in Rust. These markers of temporal validity are the cornerstones of safety that Rust guarantees and they play an integral role in building efficient, secure, stable, and predictable software.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>hacktoberfest</category>
    </item>
    <item>
      <title>Show off your coding stats on your GitHub Profile using WakaTime</title>
      <dc:creator>Jaken Herman</dc:creator>
      <pubDate>Wed, 01 Sep 2021 10:54:24 +0000</pubDate>
      <link>https://dev.to/jakenherman/show-off-your-coding-stats-on-your-github-profile-using-wakatime-4od0</link>
      <guid>https://dev.to/jakenherman/show-off-your-coding-stats-on-your-github-profile-using-wakatime-4od0</guid>
      <description>&lt;p&gt;&lt;a href="https://medium.com/@JakenH/show-off-your-coding-stats-on-your-github-profile-using-wakatime-ce3ceb1063b5?source=rss-ea578af2ea5e------2" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foev3oi5w5m5zb6syjbca.png" width="800" height="347"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your GitHub profile tells a story of who you are as a developer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/@JakenH/show-off-your-coding-stats-on-your-github-profile-using-wakatime-ce3ceb1063b5?source=rss-ea578af2ea5e------2" rel="noopener noreferrer"&gt;Continue reading on Medium »&lt;/a&gt;&lt;/p&gt;

</description>
      <category>github</category>
      <category>coding</category>
      <category>programming</category>
      <category>wakatime</category>
    </item>
    <item>
      <title>Visualizing Percentile Data with d3</title>
      <dc:creator>Jaken Herman</dc:creator>
      <pubDate>Sun, 13 Dec 2020 06:12:37 +0000</pubDate>
      <link>https://dev.to/jakenherman/visualizing-percentile-data-with-d3-319b</link>
      <guid>https://dev.to/jakenherman/visualizing-percentile-data-with-d3-319b</guid>
      <description>&lt;p&gt;&lt;a href="https://medium.com/@JakenH/visualizing-percentile-data-with-d3-db7f8dfed6d8?source=rss-ea578af2ea5e------2" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Finh5rznw040obuxkvn92.jpeg" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Recreating Baseball Savant’s Percentile Ranking Visualization&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/@JakenH/visualizing-percentile-data-with-d3-db7f8dfed6d8?source=rss-ea578af2ea5e------2" rel="noopener noreferrer"&gt;Continue reading on Medium »&lt;/a&gt;&lt;/p&gt;

</description>
      <category>d3js</category>
      <category>datavisualization</category>
      <category>statistics</category>
      <category>baseball</category>
    </item>
    <item>
      <title>Configuring + Installing Chadwick for Parsing Retrosheet Data</title>
      <dc:creator>Jaken Herman</dc:creator>
      <pubDate>Thu, 03 Sep 2020 07:01:39 +0000</pubDate>
      <link>https://dev.to/jakenherman/configuring-installing-chadwick-for-parsing-retrosheet-data-546o</link>
      <guid>https://dev.to/jakenherman/configuring-installing-chadwick-for-parsing-retrosheet-data-546o</guid>
      <description>&lt;p&gt;This post assumes you've set up VirtualBox &amp;amp; Vagrant. If you have not completed this step, follow the steps outlined in my previous blog post: &lt;a href="https://dev.to/jakenherman/setting-up-virtualbox-vagrant-5bm2"&gt;https://dev.to/jakenherman/setting-up-virtualbox-vagrant-5bm2&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The first thing we're going to do is open up our terminal and run &lt;code&gt;cd baseball&lt;/code&gt;, which is the directory we created in the previous post.&lt;/p&gt;

&lt;p&gt;After than, we need to get the &lt;code&gt;.tar.gz&lt;/code&gt; that contains the Chadwick software installer and configuration files. To download this, go to the chadwickbureau GitHub page, the Chadwick repository, and navigate to the "Releases" page. Here's a quick link to take you there directly: &lt;a href="https://github.com/chadwickbureau/chadwick/releases" rel="noopener noreferrer"&gt;https://github.com/chadwickbureau/chadwick/releases&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Take the latest release in the &lt;code&gt;.tar.gz&lt;/code&gt; format, and move that file into your baseball directory. Once the tar file is in your baseball directory, in your terminal run the command &lt;code&gt;vagrant up&lt;/code&gt;, followed by &lt;code&gt;vagrant ssh&lt;/code&gt; . &lt;/p&gt;

&lt;p&gt;Your terminal instance will now be running on your VirtualBox virtual machine. What we need to do now is move the tar file we downloaded earlier into the &lt;code&gt;usr/local/src directory&lt;/code&gt; (this file will currently be sitting in &lt;code&gt;~/vagrant&lt;/code&gt;). We'll first navigate to the directory we're moving the file into by running the command &lt;code&gt;cd /usr/local/src&lt;/code&gt;, then run the command below to copy the Chadwick tar file into the current directory (keep in mind, my file's version number is 0.8.1, but yours may be different - update your command accordingly):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fvhi7e5ynohapspetf6y2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fvhi7e5ynohapspetf6y2.png" alt="Copy and Unpack the Chadwick Tar File" width="800" height="269"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that Chadwick has been copied and unpacked, we need to configure the software and complete the installation. To do this, run the &lt;code&gt;configure&lt;/code&gt; file that you can see in the &lt;code&gt;chadwick-0.8.1&lt;/code&gt; directory when you run &lt;code&gt;ls&lt;/code&gt;, then &lt;code&gt;make&lt;/code&gt; to compile, &lt;code&gt;make install&lt;/code&gt; to install the software to our virtual machine, and &lt;code&gt;ldconfig&lt;/code&gt; to make sure the program can link to the libraries it needs:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fj7qizoyp4b3yzfsvn60e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fj7qizoyp4b3yzfsvn60e.png" alt="Configure, Make, Install, and Link the new Chadwick Files" width="800" height="382"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To test that Chadwick was properly installed, run the &lt;code&gt;cwevent&lt;/code&gt; command, and you should get the following output:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnlpnjo2qwgm9t2isql63.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnlpnjo2qwgm9t2isql63.png" alt="cwevent should succesfully fail (what a strange sentance)" width="800" height="306"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While this is technically an error, it means the installation was a success. &lt;code&gt;cwevent&lt;/code&gt; is a command that Chadwick uses to parse Retrosheet event files, and since we've not yet provided one - we get this warning.&lt;/p&gt;

&lt;p&gt;I hope this was helpful to you in your quest to begin working with Chadwick and Retrosheet. In the next post, we'll download our first few Retrosheet files and begin exploring.&lt;/p&gt;

</description>
      <category>datascience</category>
    </item>
    <item>
      <title>Setting up VirtualBox+Vagrant</title>
      <dc:creator>Jaken Herman</dc:creator>
      <pubDate>Sat, 22 Aug 2020 10:08:46 +0000</pubDate>
      <link>https://dev.to/jakenherman/setting-up-virtualbox-vagrant-5bm2</link>
      <guid>https://dev.to/jakenherman/setting-up-virtualbox-vagrant-5bm2</guid>
      <description>&lt;p&gt;Setting up VirtualBox and Vagrant is not only a breeze, but it's also free. This combo is great for simple projects, much like the project we're working on in this series (should you choose to finish this full series) - parsing Retrosheet baseball data using Chadwick in order to create useful R data frames for visualization.&lt;/p&gt;




&lt;p&gt;Keep in mind throughout this post that your download+setup process may vary slightly, but the main process will remain similar enough to follow.&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 1: Download and Install VirtualBox
&lt;/h1&gt;

&lt;p&gt;Navigate to the VirtualBox download page here: &lt;a href="https://www.virtualbox.org/wiki/Downloads" rel="noopener noreferrer"&gt;https://www.virtualbox.org/wiki/Downloads&lt;/a&gt;, and select the download that is appropriate for your current operating system.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpwkc6gg8kmra6x6nstpx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpwkc6gg8kmra6x6nstpx.png" alt="Alt Text" width="800" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Run your installer and complete the standard installation process you follow for any other software.&lt;/p&gt;

&lt;p&gt;MacOS Users: An issue may occur where your installation is being blocked by your Security &amp;amp; Privacy settings. If this occurs, do the following:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fz1252icud2np8z5ull0k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fz1252icud2np8z5ull0k.png" alt="Alt Text" width="650" height="559"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open System Preferences&lt;/li&gt;
&lt;li&gt;Go to Security &amp;amp; Privacy&lt;/li&gt;
&lt;li&gt;There will be a message that saysSystem software from developer "Oracle America, Inc." was blocked from loading.&lt;/li&gt;
&lt;li&gt;Click the lock icon in the bottom left of the window &amp;amp; enter your password&lt;/li&gt;
&lt;li&gt;Click the Allow button&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Step 2: Download &amp;amp; Install Vagrant
&lt;/h1&gt;

&lt;p&gt;Navigate to the Vagrant download page here: &lt;a href="https://www.vagrantup.com/downloads" rel="noopener noreferrer"&gt;https://www.vagrantup.com/downloads&lt;/a&gt;, and select the download that is appropriate for your current operating system.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6a5v4lkqpngu8risc3yo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6a5v4lkqpngu8risc3yo.png" alt="Alt Text" width="800" height="368"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Run your installer and complete the standard installation process you follow for any other software.&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 3: Set up Directory and Initialize Vagrant Box
&lt;/h1&gt;

&lt;p&gt;Now that we have VirtualBox and Vagrant installed, we need to set up a directory to use the two together. Keep in mind, we'll never explicitly open the VirtualBox application, we only downloaded and installed it so Vagrant would be able to use it in the background.&lt;/p&gt;

&lt;p&gt;Open up your terminal, make a new directory (in this example I named mine baseball), then initialize a Vagrant box of your choice (boxes listed here: &lt;br&gt;
&lt;a href="https://app.vagrantup.com/boxes/search" rel="noopener noreferrer"&gt;https://app.vagrantup.com/boxes/search&lt;/a&gt;). In this example, I'm using ubuntu/trusty64:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbargh9zft55dp8hj7vaa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbargh9zft55dp8hj7vaa.png" alt="Alt Text" width="800" height="455"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;vagrant init ...&lt;/code&gt; command could take up to an hour to run, so grab a cup of joe ☕, it may be a while!&lt;br&gt;
When your initialization is complete, you'll notice a file called &lt;code&gt;Vagrantfile&lt;/code&gt; in your baseball directory. As described by the Vagrant website:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The primary function of the Vagrantfile is to describe the type of machine required for a project, and how to configure and provision these machines.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Step 4: Run Vagrant + SSH In
&lt;/h1&gt;

&lt;p&gt;Once your Vagrant box has been initialized, the next step is easy - just run vagrant up to spool up your VirtualBox background process and SSH in:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxfa1itfg5n4itx99x0ce.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxfa1itfg5n4itx99x0ce.png" alt="Alt Text" width="800" height="314"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You'll now be in your virtual machine! Keep in mind when using this that if you create a file in the directory &lt;code&gt;/vagrant&lt;/code&gt;, the files will be added to your non-virtual &lt;code&gt;baseball&lt;/code&gt; directory.&lt;br&gt;
Thanks for reading. Check back in the next post and we'll get Chadwick downloaded and configured so we can begin playing around with Retrosheet data!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>MLB Draft '20 by the Numbers</title>
      <dc:creator>Jaken Herman</dc:creator>
      <pubDate>Sat, 13 Jun 2020 08:01:13 +0000</pubDate>
      <link>https://dev.to/jakenherman/mlb-draft-20-by-the-numbers-3fpl</link>
      <guid>https://dev.to/jakenherman/mlb-draft-20-by-the-numbers-3fpl</guid>
      <description>&lt;p&gt;With no baseball being played so far in 2020, there hasn't been anything incredibly interesting to analyze or look at besides historical data (in the MLB at least). On June 10th and June 11th, however, we finally got our first bit of new MLB information to play around with - the draft. I've taken data from Rounds 1-5 and compiled them into some (hopefully) interesting visuals.&lt;/p&gt;

&lt;h1&gt;Picks by State&lt;/h1&gt;

&lt;p&gt;Let's start with a simple question. What state produced the most sought after baseball talent this year? California. The values used for the visual below may not reflect where a player was born and raised, rather it is the location of the high school or college the player was drafted from. This also excludes Owen Caissie and David Calabrese of Ontario, Canada.&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/9h3b5"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




&lt;h1&gt;Picks by Position&lt;/h1&gt;

&lt;p&gt;Next, let's look at draft picks by position. This includes every single pick - all 159 of them. As you can see in the chart below, pitchers were definitely shown some love while first basemen lagged behind (Although the #1 pick Spencer Torkelson played 1B, his primary position was marked as OF on MLB. This is likely the case for many utility players).&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/z3g7e"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;So who &lt;strong&gt;didn't&lt;/strong&gt; take any pitchers? Only &lt;em&gt;three&lt;/em&gt; teams! The Detroit Tigers, Tampa Bay Rays, and Milwaukee Brewers.&lt;/p&gt;




&lt;p&gt;With all of these pitchers being picked, let's see how the top 5 picks compare to one another using WHIP, ERA, BB/9, HR/9, and H/9. Not that these metrics alone tell you the sole offensive value of a pitcher, I just chose them for fun. (FYI for non-baseball fans, for all of these metrics a lower number is preferable).&lt;/p&gt;

&lt;h1&gt;Top 5 Pitcher Metrics Heatmap&lt;/h1&gt;

&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/kwx6p"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;I'd love to do many more draft visualizations and maybe even dip into some KBO numbers, but for now I'm going to call it a night! Thanks for stopping by.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>dataviz</category>
    </item>
    <item>
      <title>🛠️ Dynamic HTML Titles in React with NFL's Helmet</title>
      <dc:creator>Jaken Herman</dc:creator>
      <pubDate>Fri, 27 Sep 2019 05:19:46 +0000</pubDate>
      <link>https://dev.to/jakenherman/dynamic-html-titles-in-react-with-nfl-s-helmet-2nln</link>
      <guid>https://dev.to/jakenherman/dynamic-html-titles-in-react-with-nfl-s-helmet-2nln</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This post was originally published on my website at jakenherman.com&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Using React through &lt;code&gt;create-react-app&lt;/code&gt; is great, but when we consider that it will create a single-page application, &lt;br&gt;
we begin to realize that changing properties in the document head of our html file is seemingly not so easy to do - but that&lt;br&gt;
could not be further from the truth. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;react-helmet&lt;/code&gt; is a reusable React component created by the NFL that can manage all of your changes to the document head, and it could&lt;br&gt;
not be any simpler to use. It supports server-side rendering, and while this blog post is focused solely on changing HTML &lt;code&gt;title&lt;/code&gt; tags,&lt;br&gt;
&lt;code&gt;react-helmet&lt;/code&gt; supports all valid head tags: &lt;code&gt;title&lt;/code&gt;, &lt;code&gt;base&lt;/code&gt;, &lt;code&gt;meta&lt;/code&gt;, &lt;code&gt;link&lt;/code&gt;, &lt;code&gt;script&lt;/code&gt;, &lt;code&gt;noscript&lt;/code&gt;, and &lt;code&gt;style&lt;/code&gt; tags.&lt;/p&gt;

&lt;p&gt;Let's quit talking about it and let's get into the code. First, create a new &lt;code&gt;create-react-app&lt;/code&gt; application (named whatever you want) and open it up in your favorite&lt;br&gt;
text editor (if you don't know how to do this, see the official &lt;code&gt;create-react-app&lt;/code&gt; &lt;a href="https://create-react-app.dev/docs/getting-started" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that you're in your project, delete the content from the pre-generated  &lt;code&gt;App.js&lt;/code&gt; file and replace the file with this:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react';
import './App.css';

function App() {
  return (
    &amp;lt;div className="App"&amp;gt;
      &amp;lt;h1&amp;gt;Hello World&amp;lt;/h1&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;export default App;&lt;/p&gt;

&lt;p&gt;Because we haven't made any modifications to the document title yet, the title within the tab should be "React App" by default. For this simple example, we're going to change the title based on a certain &lt;code&gt;state&lt;/code&gt; within our &lt;code&gt;App&lt;/code&gt; component. So, let's modify our functional component &lt;code&gt;App&lt;/code&gt; to be a class component, and give it a state object that will hold the value we'd like our title to be:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react';
import './App.css';

class App extends React.Component {

  constructor(props) {
    super(props);
    this.state = {
      titleName: ''
    };
  }

  render () {
    return (
      &amp;lt;div className="App"&amp;gt;
        &amp;lt;h1&amp;gt;Hello World&amp;lt;/h1&amp;gt;
      &amp;lt;/div&amp;gt;
    );
  }
}

export default App;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now this will, of course, make no change to the title at this point (after all, we haven't even installed &lt;code&gt;react-helmet&lt;/code&gt; yet!), but we're just setting up our project so when we get to the &lt;code&gt;react-helmet&lt;/code&gt; part, it's much more satisfying. What I'd like to do is add an input field that allows the user to type in what they would like the title of the tab to be. So we're going to create an input and in the &lt;code&gt;onChange&lt;/code&gt; of that input, we're going to update our &lt;code&gt;state&lt;/code&gt;'s &lt;code&gt;titleName&lt;/code&gt; key's value to the value within the input, like so:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class App extends React.Component {

  constructor(props) {
    super(props);
    this.state = {
      titleName: ''
    };
  }

  changeTitle(ev) {
    this.setState({
      titleName: ev.target.value
    });
  }

  render () {
    return (
      &amp;lt;div className="App"&amp;gt;
        &amp;lt;h1&amp;gt;{this.state.titleName}&amp;lt;/h1&amp;gt;
        &amp;lt;input onChange={this.changeTitle.bind(this)}&amp;gt;&amp;lt;/input&amp;gt;
      &amp;lt;/div&amp;gt;
    );
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;As you can see, I threw the &lt;code&gt;this.state.titleName&lt;/code&gt; in an &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; so we would have quick-and-easy proof that our state is being updated when the input's &lt;code&gt;onChange&lt;/code&gt; event is fired.&lt;/p&gt;

&lt;p&gt;Now, for the fun part. Open up your CLI and run the command:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  $ npm i react-helmet

  # or, using Yarn:
  $ yarn add react-helmet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now that &lt;code&gt;react-helmet&lt;/code&gt; has been added to our project, we can add it to our &lt;code&gt;&amp;lt;App /&amp;gt;&lt;/code&gt; component. To do this, we're first going to simply import the component, then just like we would in a typical HTML file, we're going to put the title information at the very top of our &lt;code&gt;render()&lt;/code&gt; return, only instead of wrapping it in a &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; tag, we're going to wrap it in &lt;code&gt;&amp;lt;Helmet&amp;gt;&lt;/code&gt; tags. And of course, for the &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt;'s value, we're going to set it to &lt;code&gt;this.state.titleName&lt;/code&gt;:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react';
import { Helmet } from 'react-helmet';

class App extends React.Component {

  constructor(props) {
    super(props);
    this.state = {
      titleName: ''
    };
  }

  changeTitle(ev) {
    this.setState({
      titleName: ev.target.value
    });
  }

  render () {
    return (
      &amp;lt;div className="App"&amp;gt;
        &amp;lt;Helmet&amp;gt;
          &amp;lt;title&amp;gt;{this.state.titleName}&amp;lt;/title&amp;gt;
        &amp;lt;/Helmet&amp;gt;
        &amp;lt;input onChange={this.changeTitle.bind(this)}&amp;gt;&amp;lt;/input&amp;gt;
      &amp;lt;/div&amp;gt;
    );
  }
}

export default App;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now when changes are made to the input field, you can see the html title changes in the browser tab:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fNgAdHOj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://www.jakenherman.com/img/dynamic_title.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fNgAdHOj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://www.jakenherman.com/img/dynamic_title.gif" alt="Dynamic Titles in React" width="438" height="225"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;Helmet&amp;gt;&lt;/code&gt; can be used on any components, just keep in mind that child components will always override and helmet data passed through their parent components.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Thanks for reading, folks. Hope this taught you something.&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>html</category>
    </item>
    <item>
      <title>Setting up Automatic React Application Deploys on Heroku Dynos</title>
      <dc:creator>Jaken Herman</dc:creator>
      <pubDate>Wed, 25 Sep 2019 21:56:39 +0000</pubDate>
      <link>https://dev.to/jakenherman/setting-up-automatic-react-application-deploys-on-heroku-dynos-3ha4</link>
      <guid>https://dev.to/jakenherman/setting-up-automatic-react-application-deploys-on-heroku-dynos-3ha4</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This post was originally shared on my website jakenherman.com.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Per the sub-title, this is "Part 1". In this series, we're going to build out a community market listing react application for MLB The Show 19 and set up an automatic pipeline to build and deploy our React application from a GitHub repository to a Heroku Dyno. In this post we will scaffold out the react app and get the automatic deployment set up for Heroku, which will prepare ourselves to create the components necessary to list out all listings for MLB The Show 19's Community Market. Why MLB The Show 19? Because... it's &lt;em&gt;baseball&lt;/em&gt;. If you're not familiar with MLB The Show 19 - it's a baseball video game for PlayStation 4 and it has a community market that allows players to list baseball cards, stadiums, and equipment that other players can buy to use for their team. In this project, we will only build out listings for baseball cards (i.e. players), not stadiums or equipment or anything else. If that is something that interests you, I would highly recommend you extend the application to meet your needs.&lt;/p&gt;

&lt;p&gt;The first thing we need to do to get started is to create a GitHub repository to have source control over our application and to have a place to store our code. To do this, go to GitHub.com and create a GitHub repository. Then, to get that repository on your local machine, use either a git GUI program or just use the command line interface and run the following:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://www.github.com/&amp;lt;path_to_your_project&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Then, change directories to your GitHub repository by running:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd &amp;lt;your_project_name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The next thing we need to do is actually get into the meat and potatoes of the application. We need to build something to put on our newly created GitHub repository. To do this, we need to create a new react application. Open up your command line interface and run the command:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; npx create-react-app mlb-the-show-community-market-listings
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This command will install &lt;code&gt;react&lt;/code&gt;, &lt;code&gt;react-dom&lt;/code&gt;,  &lt;code&gt;react-scripts&lt;/code&gt;, and a few other packages that you will find useful. &lt;code&gt;create-react-app&lt;/code&gt; is a facebook-supported way to create single-page React applications that many folks in the front-end community use. Unlike next, razzle, and a few other popular server-side rendering frameworks, CRA renders content on the client-side, which could have some downsides in performance, but we are not necessarily worried about that for the purposes of this project.&lt;/p&gt;

&lt;p&gt;Now that your application has been created, let's just leave it at that - we will make code changes in the next post. For right now, we're going to check in the project as-is. So, via some git GUI or command line, commit your changes and push your code to your GitHub repository:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add .
git commit -m 'initial commit'
git push origin master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;We want our Heroku Dyno to rebuild our application every time a change is made to the &lt;code&gt;master&lt;/code&gt; branch on our GitHub repository. But before we set this up, we need to create a Heroku Pipeline! Assuming you already have a Heroku application created, navigate to dashboard.heroku.com/apps, then select "New" followed by "Create new pipeline". In the pipeline name input field, type 'mlb-the-show-cm-listings'. Next, set yourself to be the Pipeline owner, then in the area that says "Connect to GitHub", connect your GitHub account to this Heroku pipeline. Once you've connected your GitHub account, select the GitHub repository we created earlier in the post by searching for the repository name, then press the "Connect" button. Once your GitHub repository has been connected, press the "Create pipeline" button.&lt;/p&gt;

&lt;p&gt;Once your pipeline has been created, you will see a page that has three "steps": Review Apps, Staging, Production. In the card underneath the "Staging" step, press the "Add app..." button, followed by the purple "Create new app..." button. In the app name, you'll have to think of something on your own, as heroku app names must be unique. Once you've decided on a name, press the "Create app" button to finalize the app creation.&lt;/p&gt;

&lt;p&gt;Now under your "Staging" area, the card you see will contain your newly created app. Click on your app name under the "Staging" area to open the Heroku app, then go to "Settings". Scroll down until you see the section labeled "Buildpacks". Press the purple "Add buildpack" button, then select the &lt;code&gt;nodejs&lt;/code&gt; buildpack from the list of officially supported buildpacks, then press "Save changes".&lt;/p&gt;

&lt;p&gt;Next, navigate away from "Settings" by clicking on the "Deploy" tab. Scroll down until you reach the section labeled "Automatic deploys". Press the gray "Enable Automatic Deploys" button. You will see the text change to read&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Automatic deploys from &lt;code&gt;master&lt;/code&gt; are enabled&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now, we just need to trigger the deploy. Let's make a change to our project and commit/push the changes so our Heroku deploy will be triggered. &lt;/p&gt;

&lt;p&gt;Open the &lt;code&gt;src&lt;/code&gt; folder of your React app we created earlier in this post, and in &lt;code&gt;App.js&lt;/code&gt;, change the line that says:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;p&amp;gt;
  Edit &amp;lt;code&amp;gt;src/App.js&amp;lt;/code&amp;gt; and save to reload.
&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;to &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h1&amp;gt;Hello Heroku!&amp;lt;/h1&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Next, via some git GUI or command line, commit your changes and push your code to your GitHub repository:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add .
git commit -m 'trigger heroku deploy'
git push origin master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now navigate to your heroku app's activity page to see if a build was triggered: &lt;code&gt;https://dashboard.heroku.com/apps/&amp;lt;your_app_name&amp;gt;/activity&lt;/code&gt;. If the build failed due to a message similar to this&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A Node.js app on Heroku requires a 'package.json' at the root of the directory structure.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;then all you need to do is make sure your github repository doesn't consist of another folder containing your react app rather than the repository containing the react app itself.&lt;/p&gt;

&lt;p&gt;Another common issue is having an outdated Yarn lockfile, so if you still get a build failure, go to your command line (within your react app directory), and run the following commands:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn install
git add yarn.lock
git commit -m 'updated yarn lockfile'
git push origin master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If you don't have a failure, you will see "Build in progress..." for a while, which will then change to "Build succeeded". Once you have a "Build succeed", a new activity will be created on your activity feed and it will say "Deployed &lt;code&gt;SHA_OF_YOUR_COMMIT&lt;/code&gt;". &lt;/p&gt;

&lt;p&gt;So that's great - we've set up a Heroku dyno to automatically deploy our react application when a change is made. The only problem is... where does it deploy to? Navigate away from the "Activity" tab and go to "Settings" again. Scroll down until you see "Domains and certificates". In the "Domain" section, you will see a line like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Your app can be found at &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Navigating to that domain address will show your application. Keep in mind, you can add a custom domain at any point.&lt;/p&gt;

&lt;p&gt;Fantastic - now we've got a react app automatically deploying to a Heroku dyno, now we just need that react app to do something cool! In the next post, we'll begin creating the React components necessary to view the Community Market listings.&lt;/p&gt;

</description>
      <category>react</category>
      <category>heroku</category>
      <category>javascript</category>
      <category>devops</category>
    </item>
    <item>
      <title>DailyUI Challenge 002</title>
      <dc:creator>Jaken Herman</dc:creator>
      <pubDate>Wed, 14 Aug 2019 16:32:25 +0000</pubDate>
      <link>https://dev.to/jakenherman/dailyui-challenge-002-1idm</link>
      <guid>https://dev.to/jakenherman/dailyui-challenge-002-1idm</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsn4u10sc5m45g1uobp3g.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsn4u10sc5m45g1uobp3g.PNG" alt="Alt Text" width="800" height="496"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;DailyUI challenge 002 - Design a credit card checkout form or page. Did this one without a wire-framing tool - instead opted to just use HTML, CSS, and JavaScript. I only worked on it for about an hour, so I'm not too upset with the results. The card type icon (Visa, MasterCard, AMEX, etc. does change depending on the start of the card number).&lt;/p&gt;

&lt;p&gt;Things I could improve on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The fonts are pretty ugly, I'd like to spend more time browsing available fonts.&lt;/li&gt;
&lt;li&gt;Responsiveness. Because this was just part of a challenge and not production code, I did not consider mobile viewing in the design.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://lnkd.in/gMr9VTq" rel="noopener noreferrer"&gt;https://lnkd.in/gMr9VTq&lt;/a&gt;&lt;/p&gt;

</description>
      <category>dailyui</category>
      <category>ui</category>
      <category>ux</category>
      <category>css</category>
    </item>
  </channel>
</rss>
