<?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 Blake Runyon on Medium]]></title>
        <description><![CDATA[Stories by Blake Runyon on Medium]]></description>
        <link>https://medium.com/@blakerunyon?source=rss-a57af6cb4f92------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*0x29Gu8sJYTokpSY-ni_Ow.png</url>
            <title>Stories by Blake Runyon on Medium</title>
            <link>https://medium.com/@blakerunyon?source=rss-a57af6cb4f92------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 16:49:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@blakerunyon/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[Tailwind — Core Concepts]]></title>
            <link>https://blakerunyon.medium.com/tailwind-core-concepts-74d785fd1c74?source=rss-a57af6cb4f92------2</link>
            <guid isPermaLink="false">https://medium.com/p/74d785fd1c74</guid>
            <category><![CDATA[tailwind-css]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Blake Runyon]]></dc:creator>
            <pubDate>Mon, 26 Apr 2021 05:01:51 GMT</pubDate>
            <atom:updated>2021-04-26T21:07:45.733Z</atom:updated>
            <content:encoded><![CDATA[<h3>Tailwind — Core Concepts</h3><p><a href="https://tailwindcss.com/docs/utility-first">Tailwind</a> is a utility-first CSS framework packed with classes that can be composed to build any design, directly in your markup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8Y4pLxV6y4ctyPxvgMvCzg.png" /></figure><p>So why use tailwind?</p><p><strong>Utility-First</strong></p><p>Traditional CSS has you writing pure CSS while using selectors and classes to add styles.</p><pre>//index.html<br>&lt;button class=&quot;std-btn&quot;&gt;Click Here&lt;/button&gt;</pre><pre>//styles.css<br>.std-btn {<br>   border-radius: 5px;<br>   background-color: salmon;<br>   color: white;<br>   font-weight: bold;<br>}</pre><p>But with tailwind you can apply inline styles through classes.</p><pre>&lt;button class=&quot;border-radius-sm bg-salmon text-white font-bold&quot;&gt;Click Here&lt;/button&gt;</pre><p><strong>Responsive Design</strong></p><p>Tailwind allows you to apply all styles at matching breakpoints.</p><pre>&lt;section class=&quot;flex flex-col md:flex-row&quot;&gt;<br>   //inner html<br>&lt;/section&gt;</pre><p>The above example will default to flex column, but break to flex row at 768px.</p><p><strong>Inline State Management</strong></p><p>You can also set several pseudo class styles within inline Tailwind.</p><pre>&lt;button class=&quot;bg-red hover:bg-green focus:g-blue&gt;Click Me&lt;/button&gt;</pre><p><strong>Fully Customizable</strong></p><p>Within your Tailwind build file you can free declare base styles and create new classes.</p><pre>@tailwind base;<br>@tailwind components;<br>@tailwind utilities;<br><br>@layer base {<br>  img {<br>    @apply w-4;<br>  }<br>  strong {<br>    @apply font-bold;<br>  }<br>}</pre><pre>.btn {<br>   @apply bg-red<br>}</pre><p>Tailwind also features a fully extendable config file that let’s you customize any styles native to Tailwind. Below is an example from Tailwinds docs on some config options but there are many more available.</p><pre>// Example `tailwind.config.js` file<br>const colors = require(&#39;tailwindcss/colors&#39;)<br><br>module.exports = {<br>  theme: {<br>    colors: {<br>      gray: colors.coolGray,<br>      blue: colors.lightBlue,<br>      red: colors.rose,<br>      pink: colors.fuchsia,<br>    },<br>    fontFamily: {<br>      sans: [&#39;Graphik&#39;, &#39;sans-serif&#39;],<br>      serif: [&#39;Merriweather&#39;, &#39;serif&#39;],<br>    },<br>    extend: {<br>      spacing: {<br>        &#39;128&#39;: &#39;32rem&#39;,<br>        &#39;144&#39;: &#39;36rem&#39;,<br>      },<br>      borderRadius: {<br>        &#39;4xl&#39;: &#39;2rem&#39;,<br>      }<br>    }<br>  },<br>  variants: {<br>    extend: {<br>      borderColor: [&#39;focus-visible&#39;],<br>      opacity: [&#39;disabled&#39;],<br>    }<br>  }<br>}</pre><p>Hope you enjoyed learning a bit about the core concepts that up Tailwind.</p><p>Best of luck!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=74d785fd1c74" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to write Knex Queries.]]></title>
            <link>https://blakerunyon.medium.com/how-to-write-knex-queries-c70ac80f14e1?source=rss-a57af6cb4f92------2</link>
            <guid isPermaLink="false">https://medium.com/p/c70ac80f14e1</guid>
            <category><![CDATA[node]]></category>
            <category><![CDATA[knexjs]]></category>
            <category><![CDATA[express]]></category>
            <category><![CDATA[knex]]></category>
            <category><![CDATA[postgres]]></category>
            <dc:creator><![CDATA[Blake Runyon]]></dc:creator>
            <pubDate>Fri, 23 Apr 2021 18:19:18 GMT</pubDate>
            <atom:updated>2021-04-23T18:19:18.649Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="http://knexjs.org/">Knex</a> is a query builder that sits on top of SQL databases. It allows for easier dynamic querying than straight SQL, while remaining lightweight in comparison to a full ORM.</p><p><a href="https://www.w3schools.com/sql/">SQL</a> is a language meant to retrieve, manipulate, and store data within a relational database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*IQbdHPoKw4KaAzDrG1l_kA.png" /></figure><p><a href="https://blakerunyon.medium.com/create-a-knexjs-app-in-5-minutes-122283429a25"><strong><em>If you’re looking for instructions on spinning up a knex app, check out the blog I wrote on that.</em></strong></a></p><p>Alright let’s take a look at 4 knex query examples.</p><p><strong><em>INDEX Query</em></strong></p><p>Here’s an example of calling down all rows from a table.</p><pre>app.get(&#39;/api/surfers&#39;, (_, res) =&gt; {<br>   return database(&#39;surfers&#39;)<br>   .then(surfers =&gt; res.send(surfers))<br>   .catch(console.error)<br>})</pre><p>So this one is pretty simple. When hitting the /api/surfers path, return the database table ‘surfers’, then send those surfers back as the response. If this fails, catch the error and put it in the console.</p><p><strong><em>SHOW Query</em></strong></p><p>Here’s an example of pulling down one row.</p><pre>app.get(&#39;/api/surfers/:id&#39;, (req, res) =&gt; {<br>   const { id } = req.param</pre><pre>return database(&#39;surfers&#39;)<br>   .where(&#39;id&#39;, id)<br>   .then(surfer =&gt; res.send(surfer)<br>})</pre><p>This one is a little more complex. When hitting /api/surfers/10 as an example, pull out the /:id of 10. Then pull out id from req.param. Once the app has the id, return a surfer row, where id equals our request. Then send that row back as the response.</p><p><strong><em>SHOW Query (Raw)</em></strong></p><p>You can also write your where statements with raw SQL.</p><pre>app.get(&#39;/api/surfers/:id&#39;, (req, res) =&gt; {<br>   const { id } = req.param</pre><pre>return database(&#39;surfers&#39;)<br>   .whereRaw(&#39;id = ?&#39;, id)<br>   .then(surfer =&gt; res.send(surfer)<br>})</pre><p><strong><em>SEARCH Query</em></strong></p><p>Let’s imagine you have a search bar function that may pass an age or date of birth.</p><pre>app.get(&#39;/api/search&#39;, (req, res) =&gt; {<br>   const { query }= req.param.body</pre><pre>return database(&#39;surfers&#39;)<br>   .where(function() {<br>      this<br>         .where(&#39;age&#39;, query)<br>         .orWhere(&#39;yearOfBirth&#39;, query)<br>   })<br>   .then(surfers =&gt; res.send(surfers)<br>})</pre><p>So again, grab the request body, grab the surfers table, then run your queries on it. Starting to see a pattern yet? :D</p><p>That’s pretty much the basics of building knex queries. There are tons of other where types and options.</p><pre>// Search several criteria<br>.where({age: &#39;20&#39;, name: &#39;Bobby&#39;})</pre><pre>// Search a range<br>.whereIn(&#39;age&#39;, [10, 12, 14])</pre><pre>// Search negative criteria<br>.whereNot(&#39;age&#39;, 15)</pre><pre>// Search ranges<br>.whereBetween(&#39;age&#39;, [30, 40])</pre><p>As you can see, especially if you already know SQL, knex makes for a very powerful querying tool.</p><p>Best of luck!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c70ac80f14e1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Semantic HTML & Why?]]></title>
            <link>https://blakerunyon.medium.com/semantic-html-why-61e1459afbd?source=rss-a57af6cb4f92------2</link>
            <guid isPermaLink="false">https://medium.com/p/61e1459afbd</guid>
            <category><![CDATA[html]]></category>
            <category><![CDATA[semantic-html]]></category>
            <category><![CDATA[html5]]></category>
            <dc:creator><![CDATA[Blake Runyon]]></dc:creator>
            <pubDate>Tue, 20 Apr 2021 17:02:32 GMT</pubDate>
            <atom:updated>2021-04-20T17:02:32.125Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Two big reasons to adopted semantic HTML.</strong></p><ol><li>There’s a group of users on your website that can’t see it. This is primarily made up of search engine crawlers (SEO) but you should also consider the visually impaired community here, who use screen readers.</li><li>Think of future developers! You ever see 35 nested div tags… Now where is the nav bar… Ok, is this the nav or the sidebar… what’s going on here? Have fun figuring it out.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*8_z664Y7BPxJH78bjnL1zw.png" /></figure><p><strong>Let’s look at some of the common semantic HTML elements and when to use them.</strong></p><p>There are a few tags that make up <strong><em>content sections</em></strong> of the website. These are all block elements.</p><p><em>&lt;header&gt;</em></p><p>The header tag should represent introductory content: logo, search bar. This element is also typically universal across your site.</p><p><em>&lt;main&gt;</em></p><p>The main tag should represent the primary content area of your webpage. This is where the bulk of the content would exist, not related to navigation.</p><p><em>&lt;footer&gt;</em></p><p>The footer tag typically will represent the bottom section of your website. It generally contains legal copy, some utility links, and other relevant organization information.</p><p><em>&lt;section&gt;</em></p><p>A section tag is a general grouping of content that can’t be further specificed with another tag. It’s different from a div tag though because it’s a top level block that represents a group of content. You shouldn’t use section tags within another section tag.</p><p><em>&lt;aside&gt;</em></p><p>An aside tag is generally used for sidebar navigation, but it can be more widely used for any content that is indirectly connected to the page’s main content.</p><p><em>&lt;nav&gt;</em></p><p>The nav tag should only represent navigational elements. When using this tag make sure your nav links are the direct children of the element. You don’t want to wrap nav around links that are nested a few layers deeper.</p><p><em>&lt;article&gt;</em></p><p>Article tags are meant to wrap around content that is reusable in other places. These could be cards, blog content, or biographical content. In other words, the content should be independent, reusable, and unique.</p><p>There are a few more tags that represent <strong><em>text content</em></strong> on a website. These are a mix of block and inline elements.</p><p><em>&lt;h1&gt;, …&lt;h6&gt;</em></p><p>Heading tags are probably the most misused tag in HTML. There are <strong><em>strictly</em></strong> used to show a content hierarchy on your webpage. They should not be used for styling. Your heading tags should also form themselves like pyramid. You typically only want one h1, a few h2s, maybe some more h3s, and so on.</p><p><em>&lt;blockquote&gt;</em></p><p>The blockquote tag is typically used to enclose a quote that needs citited. They are almost always style by default with an indentation, but don’t use them to get an indentation… :D</p><p><em>&lt;figcaption&gt;</em></p><p>The figcaption element is used to wrap a caption or legend that describes it’s parent element. These tags should always be used in conjunction with the figure tag.</p><p><em>&lt;figure&gt;</em></p><p>A figure is general a piece of visual content on your website that can include the optional figcaption. A few usage examples are code blocks, videos, audio clips, and charts.</p><p><em>&lt;hr&gt;</em></p><p>The horizontal rule or hr tag comes from the writing world. It generally represents a shift in the content or a change in scene. It is also typically visually represented by a horizontal line break, but it should be used solely for that purpose.</p><p><em>&lt;ul&gt;</em></p><p>The unordered list or ul tag is used to wrap a list of items that aren’t sequential. These are generally represented as a bulleted list, but again they can be represented in any way visually.</p><p><em>&lt;ol&gt;</em></p><p>The ordered list or ol tag is used to wrap a list of item that are sequential. These are generally represented as a numbered list, but you can also remove these numbers.</p><p><em>&lt;li&gt;</em></p><p>A list item or li tag is a single item of an unordered or ordered list. The li tag must be nested in a ul, ol, or menu container.</p><p>I hope you enjoyed learning a bit about semantic html. And I hope your adopted this practice in your coding, for web crawlers, for the visually impaired, and for your future colleagues.</p><p>Best of luck!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61e1459afbd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create a Knexjs App in 5 Minutes]]></title>
            <link>https://blakerunyon.medium.com/create-a-knexjs-app-in-5-minutes-122283429a25?source=rss-a57af6cb4f92------2</link>
            <guid isPermaLink="false">https://medium.com/p/122283429a25</guid>
            <dc:creator><![CDATA[Blake Runyon]]></dc:creator>
            <pubDate>Mon, 19 Apr 2021 19:42:13 GMT</pubDate>
            <atom:updated>2021-04-27T18:19:30.824Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://nodejs.dev/"><strong>Node</strong></a><strong> </strong>is a JavaScript runtime environment. It basically packages up everything needed to run JavaScript.</p><p><a href="https://expressjs.com/"><strong>Express</strong></a><strong> </strong>is a web-app framework. It will allow you to handle requests, set up middleware, and potentially provide views.</p><p><a href="http://knexjs.org/"><strong>Knex</strong></a> is a query builder for SQL databases. It will allow you to create schema, query your database, and seed/create new rows.</p><p><a href="https://www.postgresql.org/"><strong>Postgres</strong></a><strong> </strong>is an object-relation database build on SQL.</p><p><a href="https://www.npmjs.com/package/nodemon"><strong>Nodemon</strong></a> is application tool that listens for changes to your node application and restarts the server.</p><ol><li>Install Node. Easiest way is to follow this <a href="https://nodejs.org/en/">link</a>, download, and follow the prompts. There are many alternatives you can find <a href="https://nodejs.org/en/download/package-manager/">here</a>.</li><li>Test Node in your terminal, to make sure you’ve installed it.</li></ol><p>$ node -v</p><p>3. Create a new initialize a Node project and create an index.js file.</p><p>$ npm init &amp;&amp; touch index.js</p><p>4. Install your dependencies.</p><p>$ npm i express knex pg nodemon</p><p>5. Create a server with Express in your index.js file.</p><pre>const express = require(&#39;express&#39;)<br>const app = express()<br>const PORT = process.env.PORT || 8080</pre><pre>app.listen(PORT, () =&gt; console.log(`Serving on PORT ${PORT}`)</pre><p>This is boiler plate code that you’ll see in all your applications. The callback function on app.listen is optional. Also, process.env.PORT is an optional set up for Heroku. So that may vary depending on where you’re serving your node app.</p><p>6. Create a sample route.</p><pre>app.get(&#39;/&#39;, (req, res) =&gt; {<br>res.send(&#39;Cha.&#39;)<br>})</pre><p>As you can see, you just call your method off the app variable. The method function then takes two arguments: request, response. From there you can start building your routes in the body.</p><p>7. Boot your app, and test a route in your terminal.</p><pre>$ nodemon index.js</pre><p>Then head over to <a href="http://localhost:8080/">http://localhost:8080/</a> and you should see “Cha.”</p><p>8. Create a Database. Let’s use surfers for this example.</p><pre>$ createdb surfers<br>$ knex init</pre><p>This will create a postgres db, and a knex config file. If you’d like to see your postgres dbs, you can install the <a href="https://postgresapp.com/">postgres app</a>.</p><p>9. Update your knexfile.</p><pre>module.exports = {<br>   development: {<br>      client: &#39;pg&#39;,<br>      connection: &#39;postgres:///surfers&#39;<br>   },<br>   production: {<br>      client: &#39;pg&#39;,<br>      connection: process.env.DATABASE_URL,<br>   migrations: {<br>      directory: &#39;./migrations&#39;,<br>   },<br>      seeds: { directory: &#39;./seeds&#39; },<br>   }<br>}</pre><p>This file is just setting your db locations, setting the db type, pointing to your future migration, and your future seeds.</p><p>Now jump over to your index.js and bring in your config file.</p><pre>const databaseConfig = require(&#39;./knexfile&#39;)[process.env.DB_ENV || &#39;development&#39;]<br>const database = require(&#39;knex&#39;)(databaseConfig)</pre><p>9. Create a Migration.</p><pre>$ knex migrate:make create_surfers_table</pre><p>You can find this file in /migrations/&lt;timestamp&gt;_create_surfers_table.js</p><p>10. Create Schema.</p><pre>exports.up = function(knex){<br>   return knex.schema.createTable(&#39;surfers&#39;, (table) =&gt; {<br>      table.increments(&#39;id&#39;)<br>      table.string(&#39;name&#39;)<br>      table.integer(&#39;age&#39;)<br>   })<br>}</pre><pre>exports.down = function(knex){<br>   return knex.schema.dropTableIfExists(&#39;surfers&#39;)<br>}</pre><p>For this example we’ll create a surfers table, with an id/name/age. You must <em>return</em> the schema. Also you’ll always want to provide up/down instructions so that you can rollback your db if needed.</p><pre>$ knex migrate:latest</pre><p>11. Create Seeds.</p><pre>$ knex seed:make 01_surfers</pre><p>You can find this file in /seeds/01_surfers.js</p><pre>export.seeds = function(knex) {<br>   return knex(&#39;surfers&#39;).del()<br>   .then(function() {<br>      return knex(&#39;surfers&#39;).insert([<br>         {name: &quot;BeeBee Surfstand&quot;, age: 27},<br>         {name: &quot;Jobee Flipstation&quot;, age: 31}<br>      ])<br>   }<br>}</pre><p>Run seeds.</p><pre>$ npm knex seed:</pre><p>12. Set Up a Query</p><pre>app.get(&#39;api/surfers/:id&#39;, (req, res) =&gt; {<br>   const { id } = req.params</pre><pre>   return database(&#39;surfers&#39;)<br>   .where(&#39;id&#39;, id)<br>   .then(surfer =&gt; res.send(survivor))<br>})</pre><p>This is a standard show request. The controller will receive an id from the client, it will then find the id in the table and return the appropriate row.</p><p>Well those are the basics. From there you can refer to the <a href="http://knexjs.org/">knexjs.org</a> and <a href="https://expressjs.com/">expressjs.com</a> docs for more info on advanced queries, organizing your routes, and general best practices.</p><p><a href="https://blakerunyon.medium.com/how-to-write-knex-queries-c70ac80f14e1">Checkout part two for a little more on how to write queries.</a></p><p>Best of luck!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=122283429a25" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Math? (For Rubyists)]]></title>
            <link>https://blakerunyon.medium.com/what-is-math-for-rubyists-acc6922b271c?source=rss-a57af6cb4f92------2</link>
            <guid isPermaLink="false">https://medium.com/p/acc6922b271c</guid>
            <category><![CDATA[class]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[math]]></category>
            <category><![CDATA[modules]]></category>
            <dc:creator><![CDATA[Blake Runyon]]></dc:creator>
            <pubDate>Mon, 01 Mar 2021 22:33:23 GMT</pubDate>
            <atom:updated>2021-03-03T03:06:35.959Z</atom:updated>
            <content:encoded><![CDATA[<p>In Ruby we call Math:</p><p>“The <a href="https://ruby-doc.org/core-2.6/Math.html">Math</a> module contains module functions for basic trigonometric and transcendental functions.”</p><p>Ahh <strong><em>transcendental functions</em></strong> and <strong><em>basic trigonometrics</em></strong>, those things we’ve all come to love over the years. Let’s break this down for those of us who have less than a 0% understanding of what that sentence means.</p><p>After some googling I found the following definitions:</p><p><strong><em>Transcendental Functions: </em></strong>This area of math deals with equations that can’t be expressed in algebra; exponential function, logarithm, and trigonometric functions.</p><p><strong><em>Trigonometric Functions:</em></strong> These functions are the area of math dealing with triangles; sine, cosine, tangent, etc.</p><p>Ok… cool.</p><p>So again, our definition is:</p><p>“The Math <strong><em>module</em></strong> contains module functions for basic trigonometric and transcendental functions.”</p><p>Well, what is a module?</p><p>A module is very similar to a class in Ruby. The only difference is, you can’t actually instantiate a new instance of a module. In other words, you can’t call Math.new(…)</p><p>The power of modules is their ability to group functions together, and include them in your class.</p><p>So check this code out:</p><pre>module Math_test</pre><pre>  PI = 3.14</pre><pre>  def acos num<br>    Math::PI/2<br>  end<br>end</pre><pre>class Object<br>  include Math_test<br>end</pre><pre>new_Object = Object.new</pre><pre>new_Object.acos 12 =&gt; 1.57</pre><pre>Object::PI =&gt; 3.14</pre><p>Let’s go through a few lines of note:</p><p>This module is just a place where we can group all our math functions.</p><pre>module Math_test</pre><p>This is a constant in our module. Constants are just variables that can not be changed. They’re declared with all capital letters.</p><pre>PI = 3.14</pre><p>Here we have a module function that we can access later.</p><pre>def acos num<br>  Math::PI/2<br>end</pre><p>Now we’re declaring a class, and including our module (which will give us all those functions and constants we created.</p><pre>class Object<br>  include Math_test<br>end</pre><p>Finally, we can create a new instance of our class. Then call our new methods on it!</p><pre>new_Object = Object.new</pre><pre>new_Object.acos 12 =&gt; 1.57</pre><pre>Object::PI =&gt; 3.14</pre><p>Simple :D</p><p>So how does this work in Ruby at scale? Well for our TL:DR</p><ol><li>Ruby has a <strong><em>BasicObject</em></strong> class at the very top of it’s structure.</li><li>A child of the <strong><em>BasicObject</em></strong> class is our <strong><em>Object</em></strong> class.</li><li>Now included in this <strong><em>Object</em></strong> class is the module called <strong><em>Kernel</em></strong>.</li><li>The <strong><em>Kernel</em></strong> gives the <strong><em>Object</em></strong> class access to all of our typical Ruby stuff: Array, String, Float, Enumerables, etc.</li><li>The <strong><em>Kernel</em></strong> is also where the <strong><em>Math</em></strong> module is included!</li><li>But keep in mind, <strong><em>Math</em></strong> is it’s own module, and it’s included in the <strong><em>Kernel</em></strong>.</li></ol><p>That means when we’re writing the majority of our Ruby code, we’re working within the the Object class, and using the Kernel module.</p><p>Then when we call Math::PI, we’re accessing our Object Class, which is using the Kernel Module, which is using the Math Module…</p><p>The reason for all this nesting? It’s so those of use who aren’t yet well-grounded rubyists, don’t mess up our code in an irreversible way.</p><p>Well my brain is broken now. So to sum it all up.</p><ol><li>Math is module in Ruby code that gives us access to a few constants and several high level math methods.</li><li>Our two constants are: PI &amp; E</li><li>Our methods can be categorized as Trig and Calculus focused.</li><li>Ruby comes with a lot of class inheritance and methods fresh out of the box.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=acc6922b271c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>