<?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: Jarret Bryan</title>
    <description>The latest articles on DEV Community by Jarret Bryan (@jaybeekeeper).</description>
    <link>https://dev.to/jaybeekeeper</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%2F76655%2Fd7321bd5-283c-4544-92fd-fad96ea4d618.jpeg</url>
      <title>DEV Community: Jarret Bryan</title>
      <link>https://dev.to/jaybeekeeper</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jaybeekeeper"/>
    <language>en</language>
    <item>
      <title>Getting Started with Gatsby</title>
      <dc:creator>Jarret Bryan</dc:creator>
      <pubDate>Sat, 20 Oct 2018 00:37:14 +0000</pubDate>
      <link>https://dev.to/jaybeekeeper/getting-started-with-gatsby-54n9</link>
      <guid>https://dev.to/jaybeekeeper/getting-started-with-gatsby-54n9</guid>
      <description>&lt;p&gt;So a little while back, I wrote about the basics of starting a site &lt;a href="https://dev.to/jaybeekeeper/getting-started-with-jekyll-3nf9"&gt;using Jekyll&lt;/a&gt;. I built my first personal site using Jekyll! I really liked the simplicity.&lt;/p&gt;

&lt;p&gt;But times have changed. Tastes have changed. I'm rebuilding my site, and this time I'm using Gatsby!&lt;/p&gt;

&lt;p&gt;Like Jekyll, Gatsby can be used as a static site generator. It's great for portfolio sites, blogs, personal sites, etc. And static sites are easy to deploy using Github pages, Netlify, Surge, etc. But what makes Gatsby particularly exciting for me is its a site generator for &lt;em&gt;React&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;If you know React, if you've used React to build build a dynamic web application, you already are in business - Gatsby is using the React library.&lt;/p&gt;

&lt;p&gt;So like I did with Jekyll before, let's do a quick run through to get started with Gatsby.&lt;/p&gt;

&lt;p&gt;Assuming you have Node and Node Package manager all set and ready to go on your machine, let's jump into the command line, and install Gatsby's CLI tool, and generate a new site.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--global&lt;/span&gt; gatsby-cli
&lt;span class="nv"&gt;$ &lt;/span&gt;gatsby new my-new-site https://github.com/gatsbyjs/gatsby-starter-default
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Our first line here just installs the Gatsby CLI package on our machine. Our second line is the interesting bit here:&lt;code&gt;gatsby new&lt;/code&gt;is our command to generate a new site.  'my-new-site' will be the directory name that's generated. And inside this directory we'll have all our tools to get started. And that URL at the end? That's our 'starter'. &lt;a href="https://www.gatsbyjs.org/starters/"&gt;A starter is essentially a theme, or a template for our site.&lt;/a&gt;. We're using the default here.&lt;/p&gt;

&lt;p&gt;Here's the file structure that we're given:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FmIHY-R---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/svftvd59qzibtk0sy81x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FmIHY-R---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/svftvd59qzibtk0sy81x.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It looks a little more complex than a Jekyll set up! &lt;/p&gt;

&lt;p&gt;At this stage we can use a whole set of commands that Gatsby provides us with.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;gatsby develop&lt;/code&gt; - This will set up a local development environment that reloads on every change!&lt;br&gt;
&lt;code&gt;gatsby build&lt;/code&gt;  - This will generate a production build, your static site, to deployed at your service of choice (surge, Netlify, etc.)&lt;br&gt;
&lt;code&gt;gatsby serve&lt;/code&gt;  - This will set up a test environment for your built site. &lt;/p&gt;

&lt;p&gt;Let's focus on &lt;code&gt;gatsby develop&lt;/code&gt;  - run this one, and you'll have a server started at Localhost:8000. Mine looked like this!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IIH2-nCr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/zmksj3wzv8zo777gw6vs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IIH2-nCr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/zmksj3wzv8zo777gw6vs.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All of this content was provided to us using the default Gatsby starter? So how do you drill down and actually do some editing? You can go straight to the src folder, and edit the components, just like any old React App! To illustrate, I'll add a very basic component.&lt;/p&gt;

&lt;p&gt;If you're unfamiliar with React Components, the quick, sloppy explanation is it's just a Javascript function that returns HTML. It's a little more than that, but that will do for our purposes. &lt;/p&gt;

&lt;p&gt;So our default layout looks like the below:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xAvd_BhO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/frilis33vafczay3zstv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xAvd_BhO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/frilis33vafczay3zstv.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'm going to create a new .js file in our src/components folder to build this example component like so:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--idvm2zM7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/qeipmzvz6apafxmmk0v8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--idvm2zM7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/qeipmzvz6apafxmmk0v8.png" alt=""&gt;&lt;/a&gt;&lt;br&gt;
(Note that I imported React to build this component! It's all just React.&lt;/p&gt;

&lt;p&gt;Then let's import my new Example Component into my index.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oP38Tx5O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/jt2j94pylj1lswtxd2be.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oP38Tx5O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/jt2j94pylj1lswtxd2be.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That was pretty easy! And what does our site look like now?&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--G1spHQjg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/czcvhf3kfg7in7t45zot.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--G1spHQjg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/czcvhf3kfg7in7t45zot.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ok... so it's not the prettiest - but we see how easy it is to build HTML content and place it on our page! And just like React, we can pass down props to children Components, import libraries, build class based components or functionals ones, and so much more.&lt;/p&gt;

&lt;p&gt;I'm currently building a new portfolio site, so here's a peak at the work in progress, built using Gatsby:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--v_wb6Aid--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/q189lnaggqkzkkeop606.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--v_wb6Aid--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/q189lnaggqkzkkeop606.gif" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'm not done! It's a work in progress. But this was so easy to make because of the modular component structure of the React library, and the flexibility it offers me. It's a simple paradigm, but an incredibly powerful one and lends itself to so much customization. &lt;/p&gt;

&lt;p&gt;When I'm ready, I'll run &lt;code&gt;gatsby build&lt;/code&gt; which will generate a public folder - and I can deploy that to the static service of my choice! It's really that straightforward.&lt;/p&gt;

&lt;p&gt;Dig into the Gatsby and React docs below, and get building!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.gatsbyjs.org/"&gt;Gatsby&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.gatsbyjs.org/tutorial/"&gt;Gatsby Tutorial&lt;/a&gt;&lt;br&gt;
&lt;a href="https://reactjs.org/"&gt;React&lt;/a&gt;&lt;br&gt;
&lt;a href="https://reactjs.org/docs/components-and-props.html"&gt;React Components&lt;/a&gt;&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>staticsite</category>
      <category>javascript</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Byte-Sized: .env Keeping things Secure</title>
      <dc:creator>Jarret Bryan</dc:creator>
      <pubDate>Tue, 31 Jul 2018 12:53:39 +0000</pubDate>
      <link>https://dev.to/jaybeekeeper/byte-sized-env-keeping-things-secure-3ch1</link>
      <guid>https://dev.to/jaybeekeeper/byte-sized-env-keeping-things-secure-3ch1</guid>
      <description>&lt;p&gt;I spent a little time recently looking into how to build a twitter bot with JavaScript; it's actually not super difficult - &lt;a href="https://botwiki.org/learn/#essays"&gt;but it's definitely worth exploring the ethics, intent, potential and ramifications around&lt;/a&gt; - but I came across something that I hadn't been familiar with - .env files.&lt;/p&gt;

&lt;p&gt;I have my bot projected situated on glitch.me - and the project I remixed already had a .env file included. But I wasn't entirely familiar with the idea.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1ivwCz2r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/sgrcpf2nrxy96m74oxnw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1ivwCz2r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/sgrcpf2nrxy96m74oxnw.png" alt="My Glitch Directory"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Glitch is fantastic as a community and a project that I could fork a repository and receive a blank .env file - providing me with the template without betraying the previous repository owner's content and secrets.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9Je7SPdP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/k0tljuxygfcuhcnmku5w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9Je7SPdP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/k0tljuxygfcuhcnmku5w.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But... what is a .env file? And why do I have on Glitch for a twitter bot?&lt;/p&gt;

&lt;p&gt;So .env files are the solution to the problem of - how do I keep my APIkeys secure.&lt;br&gt;
I need to talk to the TwitterAPI to make my Twitter bot. But the case for &lt;em&gt;many&lt;/em&gt; APIs is just that I would need a secure key to talk to the API. And that key needs to &lt;em&gt;stay&lt;/em&gt; secure - I can't just post that to a public repository on Github for the world to see. Anyone could grab it and use it.&lt;/p&gt;

&lt;p&gt;Quick solution is the dotenv npm package - Glitch allows me to have the package on their site, but let's say I'm working locally in JS. Quick install:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install dotenv --save
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that I have the package, I require it as early as possible in my program:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;require('dotenv').config()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And now I can have my APIKey, set in an .env file -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo "API_KEY=secure_API-key_here" &amp;gt;&amp;gt; .env

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And if open up that file, I can see my secure API key, and it doesn't have to be situated in the other files in my repository. I'm in business! dotenv is going to look for a .env file, and when I run my the required .js file for my application, dotenv will read the .env file and make its contents available to my process as an environment variable. I can access that variable with&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;process.env.API_KEY&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
  And if I add my .env file to my .gitignore file, I don't have to commit my secrets for the world to see. Keeping my keys secure, and allowing my code to function.&lt;/p&gt;

&lt;p&gt;Again, I first game across this in the context of Glitch.me. Glitch.me by default keeps the .env file secure - so even if other users view your code, they don't have access to your secure keys. But your program still does!&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>dotenv</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Learning About Dat Protocol and Decentralization </title>
      <dc:creator>Jarret Bryan</dc:creator>
      <pubDate>Tue, 17 Jul 2018 13:17:16 +0000</pubDate>
      <link>https://dev.to/jaybeekeeper/learning-about-dat-protocol-and-decentralization--1ghi</link>
      <guid>https://dev.to/jaybeekeeper/learning-about-dat-protocol-and-decentralization--1ghi</guid>
      <description>&lt;p&gt;This past Sunday, June 15, I got to attend a skillshare hosted by the &lt;a href="https://dwc-tchoi8.hashbase.io/posts/skillshares/" rel="noopener noreferrer"&gt;Distributed Web of Care initiative&lt;/a&gt;. This session included a workshop on Black Feminist art criticism, spearheaded by Jessica Lynne, and a workshop on accessbility spearheaded by Shannon Finnegan. For the last portion &lt;a href="https://twitter.com/_callil" rel="noopener noreferrer"&gt;Callil Capuozzo&lt;/a&gt; gave a brief 20 min introduction to using the &lt;a href="https://www.datprotocol.com/" rel="noopener noreferrer"&gt;Dat protocol&lt;/a&gt;, so I'm going to try to quickly summarize what I've begun learning from that workshop here.&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%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fa%2Fa4%2FDat-data-logo-2017.svg" 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%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fa%2Fa4%2FDat-data-logo-2017.svg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So the (very) quick and dirty summarization of the web in it's current form is that most information is shared in a top down hierarchal fashion from server to client. Things like applications are hosted on remote servers (the cloud) which allows the browser to act as just an interface to access data that is held elsewhere. And we access this data generally using http protocol. This works well for a lot of things, and is generally a successful model but is not without its downsides. Among the downsides to the data being held elsewhere is the potential lack of ownership or privacy over the data that is held. And for things that are inherently user to user, like sending an email, or sending a file, we involve a third party (the server). &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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F04wu9fkbtucsmzwzid31.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F04wu9fkbtucsmzwzid31.png" alt="A Slide from Paul Frazee's Peer2Peer Web Talk"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;h5&gt;
  
  
  &lt;a href="https://www.youtube.com/watch?v=-ep0ZIe6i10" rel="noopener noreferrer"&gt;This image is sourced from Paul Frazee's presentation on the Peer 2 Peer Web at  PDXNode on September 14th, 2017.&lt;/a&gt;
&lt;/h5&gt;
&lt;/blockquote&gt;

&lt;p&gt;The Dat protocol can be thought of an alternative to the http protocol that works on a Decentralized Web to circumvent this problem of server centralization. Decentralization pops up in many forms, notable WebRTC, Blockchain, or IFPS protocol. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://datproject.org/" rel="noopener noreferrer"&gt;Dat&lt;/a&gt; in laymans terms is like if git and bittorrent had a child. &lt;/p&gt;

&lt;p&gt;The abstract of the whitepaper for Dat has the following:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Dat is a protocol designed for syncing folders of data, even if they are large or changing constantly. Dat uses a cryptographically secure register of changes to prove that the requested data version is distributed. A byte range of any file's version can be efficiently streamed from a Dat repository over a network connection. Consumers can choose to fully or partially replicate the contents of a remote Dat repository, and can also subscribe to live changes. To ensure writer and reader privacy, Dat uses public key cryptography to encrypt network traffic. A group of Dat clients can connect to each other to form a public or private decentralized network to exchange data between each other. A reference implementation is provided in JavaScript.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Dat files are distributed peer 2 peer, with networked users contributing bandwidth by rehosting files, and anyone can publish from their local machine. Like bittorrent, the more people who are networked to host a file, the larger the network swarm, and the more bandwidth load is shared among the swarm - which allows another party more resources (more servers) to receive bits of the same dataset from.&lt;/p&gt;

&lt;p&gt;Anyone can get set up with dat very quickly:&lt;/p&gt;

&lt;p&gt;If you have node and npm already installed, installing dat is fairly simple - run the below in your Terminal to install dat on your system:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -g dat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then you'll want to share a file. So let's say I want to share a folder of all my poems with my friend Brad. Really quickly, from my Terminal let me make a folder of .txt files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ mkdir great_poetry
$ cd great_poetry
$ touch deep_poem.txt
$ profound_poem.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And let's pretend I've populated the text files with deep and profound text. And I want to share them now. With dat, within the directory, all I have to do to share it, is enter 'dat share'&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ dat share

dat v13.11.3
Created new dat in /Users/jarretbryan/great_poetry/.dat
dat://71978b78f44efe013e3d34642bd8e4efb7b40e1a83202408ecaa06d5fef4357e
Sharing dat: 2 files (62 B)

0 connections | Download 0 B/s Upload 0 B/s

Watching for file updates


Ctrl+C to Exit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that will initialize a dat repository for me. Essentially, dat share has created a set of hidden metadata files like the below, which will maintain the encrypted key and the version history - essentially if the files are changed. It will simultaneously have my computer act as a miniserver to host the file.&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F14w8nsxuwjt2iok08zg3.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F14w8nsxuwjt2iok08zg3.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If files are changed from the source, the data updates for everyone rehosting this particular document or set of documents, but the previous versions of the data are not maintained - only the fact that the data was changed, making dat dynamic without overburdening the users. Only the source user can edit the files, but any networked user can copy the files, edit them, and then rehost them with a different encrypted key.&lt;/p&gt;

&lt;p&gt;The important bit here now is the line&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dat://71978b78f44efe013e3d34642bd8e4efb7b40e1a83202408ecaa06d5fef4357e
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the encrypted key that points directly to the files. If Brad wants to see my poetry, all he has to do is run in his terminal -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dat clone dat://71978b78f44efe013e3d34642bd8e4efb7b40e1a83202408ecaa06d5fef4357e 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and he will receive the files directly from my hosting computer, and also simultaneously begin rehosting them. Now we share bandwith. Now let's say our friend Alex has heard all the fuss about these profound poems and also wants to receive the files. All Alex has to do is run the same 'dat clone' command, and she will receive the files from &lt;em&gt;both&lt;/em&gt; Brad and I, as long as we both are hosting. She then will also begin rehosting the files. And if our friend Kurt wants access to the files as well, the process repeats, and he will receive bits of the data from Brad, Alex, and I. So the process scales with the user - the larger the network swarm, the more the bandwidth is shared.&lt;/p&gt;

&lt;p&gt;We can see in my above block of code that reflects the hosting that there are 1 connections, but that number will reflect the number of users currently connected. &lt;/p&gt;

&lt;p&gt;At no point in the process are the files hosted on a centralized server - they are distributed among the networked users. And as long as someone is hosting the files, they will be accessible - so I, as the original hoster, can stop hosting for a bit, but in theory there is still access to the networked files, even if they don't reflect changes that I've made locally. &lt;/p&gt;

&lt;p&gt;The example I've given is fairly simple, using just .txt files but - imagine if I instead host .html files? I can host an entire website, or conceivably an entire application via a decentralized web. &lt;/p&gt;

</description>
      <category>peer2peer</category>
      <category>decentralization</category>
      <category>codenewbie</category>
      <category>datprotocol</category>
    </item>
    <item>
      <title>Getting Started with Jekyll</title>
      <dc:creator>Jarret Bryan</dc:creator>
      <pubDate>Tue, 03 Jul 2018 13:54:41 +0000</pubDate>
      <link>https://dev.to/jaybeekeeper/getting-started-with-jekyll-3nf9</link>
      <guid>https://dev.to/jaybeekeeper/getting-started-with-jekyll-3nf9</guid>
      <description>&lt;p&gt;I started working with Jekyll this weekend past; it's exceptionally beginner friendly, and it's essentially just a tool to build out static sites and blogs. It's built off of ruby and can run its own development environment, so it's very easy to make changes and see them rapidly.&lt;/p&gt;

&lt;p&gt;I thought it would be a decent enough staring point since to date, my first experience with Ruby web frameworks was Rails - this is far more lightweight - to the point that making an analogy with Rails actually makes no sense. Since it's so simple, there is no model or database management. Essentially, Jekyll uses a combination of Markdown, HTML, CSS and a template language "Liquid" to render the sites. &lt;/p&gt;

&lt;p&gt;Setting up is very fast - let's assume you already have Ruby ready to use on your machine. &lt;/p&gt;

&lt;p&gt;In the terminal I simply ran&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;gem &lt;span class="nb"&gt;install &lt;/span&gt;bundler jekyll
&lt;span class="nv"&gt;$ &lt;/span&gt;jekyll new blog-post-site
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;where 'blog-post-site' was just the name of the new directory that I was making. That generated a whole lot for me:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; Bundler: Fetching gem metadata from https://rubygems.org/...........
  Bundler: Fetching gem metadata from https://rubygems.org/.
  Bundler: Resolving dependencies...
  Bundler: Using public_suffix 3.0.2
  Bundler: Using addressable 2.5.2
  Bundler: Using bundler 1.16.2
  Bundler: Using colorator 1.1.0
  Bundler: Using concurrent-ruby 1.0.5
  Bundler: Using eventmachine 1.2.7
  Bundler: Using http_parser.rb 0.6.0
  Bundler: Using em-websocket 0.5.1
  Bundler: Using ffi 1.9.25
  Bundler: Using forwardable-extended 2.6.0
  Bundler: Using i18n 0.9.5
  Bundler: Using rb-fsevent 0.10.3
  Bundler: Using rb-inotify 0.9.10
  Bundler: Using sass-listen 4.0.0
  Bundler: Using sass 3.5.6
  Bundler: Using jekyll-sass-converter 1.5.2
  Bundler: Using ruby_dep 1.5.0
  Bundler: Using listen 3.1.5
  Bundler: Using jekyll-watch 2.0.0
  Bundler: Using kramdown 1.17.0
  Bundler: Using liquid 4.0.0
  Bundler: Using mercenary 0.3.6
  Bundler: Using pathutil 0.16.1
  Bundler: Using rouge 3.1.1
  Bundler: Using safe_yaml 1.0.4
  Bundler: Using jekyll 3.8.3
  Bundler: Using jekyll-feed 0.10.0
  Bundler: Using jekyll-seo-tag 2.5.0
  Bundler: Using minima 2.5.0
  Bundler: Bundle &lt;span class="nb"&gt;complete&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt; 4 Gemfile dependencies, 29 gems now installed.
  Bundler: Use &lt;span class="sb"&gt;`&lt;/span&gt;bundle info &lt;span class="o"&gt;[&lt;/span&gt;gemname]&lt;span class="sb"&gt;`&lt;/span&gt; to see where a bundled gem is installed.
New jekyll site installed &lt;span class="k"&gt;in&lt;/span&gt; /Users/jarretbryan/Development/blog-post-site. 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So once I jump into the created directory, the absolute basics of the static site have been created for me. The basic file directory looks like this:&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fzbnup0bpnndg0luqguqn.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fzbnup0bpnndg0luqguqn.png" alt="Basic File Directory"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;The most important file here is the _config.yml, which written in YAML (YAML Ain't Markup Language, the most obnoxious recursive initialism ever) manages settings for the entire site or blog. YAML is just a data oriented language (not unlike JSON) that can manage data structures for web applications - but it's meant to be human friendly.  In theory, you absolutely never have touch HTML or CSS for the rest of the site - it can all be managed through the this config file. &lt;/p&gt;

&lt;p&gt;The default config files looks something like this: &lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F8y0bj3y7mdsgv02s0suq.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F8y0bj3y7mdsgv02s0suq.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and if I run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$jekyll serve --livereload
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;this will setup my server at localhost:4000.&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;$jekyll serve&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 sets up the server, and the livereload flag refreshes it every time an edit is made to any file  that isn't the config. And the page itself at the localhost looks little like this:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fcqwgu7jz83drf9bh1pzb.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fcqwgu7jz83drf9bh1pzb.png" alt="jekyll minima"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And that's a basic static website! It's really that simple. And any content necessary content need can be modified through the config file. &lt;/p&gt;

&lt;p&gt;The file structure allows you to build out the site for blog posts or other pages with static html layouts. The 'posts' default to markdown language, making it exceptionally easy to blog (just like here on dev.to!). Each blog post can just be another markdown page. And since the site is so lightweight, it can be hosted in its entirety on GitHub Pages! I believe it's actually the engine behind GitHub pages&lt;/p&gt;

&lt;p&gt;Now the default theme, which is specified in _config.yml is called 'minima' and while it gets the job done, it's not that interesting. But there is no shortage of themes available (for free or to pay for), put together by other designers and developers, with default file structures and layouts. I did a quick cursory search, and found some, and they're all generally easy to install (provided they are well documented). More often than not, there is an extra line of code provided to add to your gemfile, and then just changing the theme in your YAML config file. Then run $bundle and suddenly your site is transformed!&lt;/p&gt;

&lt;p&gt;Here are some examples of sites I created, and I touched little to no HTML in the process using themes:&lt;br&gt;
&lt;a href="https://github.com/jameshamann/jekyll-material-theme" rel="noopener noreferrer"&gt;Jekyll Material Theme&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F42413iicdmvxkz7ep06p.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F42413iicdmvxkz7ep06p.png"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/broccolini/swiss" rel="noopener noreferrer"&gt;Swiss Theme&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fp2j4d7plvvpqatdfwysk.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fp2j4d7plvvpqatdfwysk.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There's a lot of room for customization that I need to dive into. But Jekyll is so lightweight and flexible that it's really easy to build out the basics of what you need without getting bogged down in web app architecture. &lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>jekyll</category>
      <category>githubpages</category>
      <category>ruby</category>
    </item>
    <item>
      <title>Using ANT to grok OOP</title>
      <dc:creator>Jarret Bryan</dc:creator>
      <pubDate>Tue, 19 Jun 2018 04:47:56 +0000</pubDate>
      <link>https://dev.to/jaybeekeeper/using-ant-to-grok-oop-18jn</link>
      <guid>https://dev.to/jaybeekeeper/using-ant-to-grok-oop-18jn</guid>
      <description>

&lt;h2&gt;
  
  
  OOO &amp;amp; OOP
&lt;/h2&gt;

&lt;p&gt;One of the first things that came to mind when I read that Ruby was an Object Oriented Programming language was Object Oriented Ontology. The first draft of this blog post was a desperate attempt to link Ruby's conception of the Object to &lt;a href="https://en.wikipedia.org/wiki/Bruno_Latour"&gt;Bruno Latour's&lt;/a&gt; &lt;a href="https://www.youtube.com/watch?v=X2YYxS6D-mI"&gt;Actor Network Theory&lt;/a&gt; - I got &lt;em&gt;Reassembling the Social&lt;/em&gt; off of my bookshelf; I thumbed through as much of the text as I could, trying to dig into the particulars of intermediaries and mediators, not privileging human actors over objects, relearning what the five uncertainties are -- &lt;/p&gt;

&lt;p&gt;It was largely a trainwreck, not least because ANT is famously obtuse and difficult to summarize and I really didn't have the time to relearn the particulars of Latour's conception of ontology; so here I want less to draw direct parallels and risk butchering and misunderstanding Bruno Latour's ontological claims and focus more on how the ideas (or maybe the idea of the ideas) allowed me to grok what Ruby's Object Oriented paradigm means for understanding objects and the relations between them through other objects. &lt;/p&gt;

&lt;h2&gt;
  
  
  Everything is an Object
&lt;/h2&gt;

&lt;p&gt;So a concept that I've come across numerous times in my early experiences with Ruby is the idea that everything in Ruby is an object. Depending on who you talk to, there seem to be very minor exceptions (are methods objects? are blocks objects? both can be wrapped in objects?), but they seem to be exceptions that prove the rule more so than undermine it.&lt;/p&gt;

&lt;p&gt;Every singular object is an instance of a Class. Even the object of Class is in instance of the class Class. And by virtue of being a specific kind of class, an object has attributes particular to that class that can be called upon.&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="c1"&gt;#even nil has a class!&lt;/span&gt;
&lt;span class="kp"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;class&lt;/span&gt;
 &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="no"&gt;NilClass&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Object Relations
&lt;/h2&gt;

&lt;p&gt;Therefore, in an object oriented language like Ruby, understanding the relationships among objects is very important - and there is no privileging one object over another. And relationships among objects &lt;em&gt;must&lt;/em&gt; be understood through other objects. It's a level playing field. And so what we might consider objects without agency or conceptions of ownership, suddenly have ownership in relation to other objects. Here's where I wanted to draw parallel's to Latour's conception of the actant:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;To break away from the influence of what could be called 'figurative sociology,' ANT uses the technical word &lt;em&gt;actant&lt;/em&gt; that comes from the study of literature. Here are four ways to figure out the same actant: 'Imperialism strives for unilateralism'; 'The United States wishes to withdraw from the UN'; 'Bush Junior wishes to withdraw from the UN':; 'Many officers from the Army and two dozen neo-con leaders want to withdraw from the UN.' That the first is a structure trait, the second a corporate body, the third an individual, the fourth a loose aggregate of individuals makes a big difference of course to the account, but they all provide different figurations of the same actions. None of the four is more or less 'realist', concrete', 'abstract' or 'artificial' than the others.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Latour, Bruno, &lt;em&gt;Reassembling the Social&lt;/em&gt; Oxford University Press, 2009, 54&lt;/p&gt;

&lt;p&gt;For our purposes, an actant is just anything that enables action or can be the fulcrum of an action.&lt;/p&gt;

&lt;p&gt;This points to an idea of 'generalised symmetry', in which there is no '&lt;em&gt;a priori&lt;/em&gt; asymmetry' among actors (commonly 'subjects) with intentional action and a material world of causal relations. We use the same analytical framework for all actors, whether they are a person, or a computer, or an idea about technology. This can get esoteric fairly esoteric fairly quickly, so let's drill down to how I understood the parallel in Ruby.&lt;/p&gt;

&lt;p&gt;For example, if I make a class "Elevator" with a attribute "name", and "is_functioning" as a boolean that defaults to "true" then I can be sure that anything initialized with that class will have those attributes. &lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Elevator&lt;/span&gt;

    &lt;span class="nb"&gt;attr_reader&lt;/span&gt; &lt;span class="ss"&gt;:name&lt;/span&gt;
    &lt;span class="nb"&gt;attr_accessor&lt;/span&gt; &lt;span class="ss"&gt;:is_functioning&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;initialize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="vi"&gt;@name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;name&lt;/span&gt;
        &lt;span class="vi"&gt;@is_functioning&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kp"&gt;true&lt;/span&gt;
    &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="n"&gt;elevator_9&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Elevator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Elevator No. 9"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;#&amp;lt;Elevator:0x00007ff5ce3bc998 @functioning=true, @name="Elevator No. 9"&amp;gt;&lt;/span&gt;

&lt;span class="n"&gt;elevator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;name&lt;/span&gt;
&lt;span class="c1"&gt;# "Elevator No. 9" &lt;/span&gt;

&lt;span class="n"&gt;elevator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;is_functioning&lt;/span&gt;
&lt;span class="c1"&gt;#true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;I can also make a class "Inspector" with its own set of attributes&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Inspector&lt;/span&gt;
    &lt;span class="nb"&gt;attr_reader&lt;/span&gt; &lt;span class="ss"&gt;:name&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;initialize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;philosophy&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="vi"&gt;@name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;name&lt;/span&gt;
        &lt;span class="vi"&gt;@philosophy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;philosophy&lt;/span&gt;
    &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="n"&gt;lila_mae&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Inspector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Lila Mae Watson"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Intuitionism"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;#&amp;lt;Inspector:0x00007fccd6a0fdc0 @name="Lila Mae Watson", @philosophy="Intuitionism"&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;So I have a class Elevators, and a class Inspectors. There is nothing inherent to the code that implies a direct relationship. But the object oriented paradigm is useful to mapping to real world relationships; the thorn here being that in the real world, an Inspector is a person with agency and can claim ownership over something, while an elevator cannot. But with Ruby, there is no such a priori asymmetry. Both are objects (and both are actors) - so we use the same framework to understand them. And as a result we can say, an Inspector "has many" (or inspects many) elevators.  And an Elevator "has many" (or is inspected by many) inspectors. &lt;/p&gt;

&lt;p&gt;More importantly, we can understand the relationship between the two as an object as well. These two actors (the Ruby objects of the class Elevator and Inspector) form a temporary network, which becomes an assemblage of relations - Latour's "actant." And the point of interaction, the "Elevator Inspection," can be represented as a Ruby Object as well. Picture the below:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;
&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ElevatorInspection&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;initialize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;elevator&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;inspector&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="vi"&gt;@elevator&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;elevator&lt;/span&gt;
            &lt;span class="vi"&gt;@inspector&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;inspector&lt;/span&gt;
    &lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Here we see that every instance of the class ElevatorInspection is initiated with instances of the classes Elevator and Inspector. If within the class we define a class method .all to collect every instance -&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;
&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ElevatorInspection&lt;/span&gt;

    &lt;span class="vc"&gt;@@all&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nc"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt;
        &lt;span class="vc"&gt;@@all&lt;/span&gt;
    &lt;span class="k"&gt;end&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;initialize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;elevator&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;inspector&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="vi"&gt;@elevator&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;elevator&lt;/span&gt;
            &lt;span class="vi"&gt;@inspector&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;inspector&lt;/span&gt;
            &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;class&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;
    &lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;then we can in theory understand the entirety of the relationship between the class Elevators and Inspectors, since every instance of ElevatorInspection class will contain information from the other two. So we understand that Elevators "have many" Inspectors &lt;em&gt;through&lt;/em&gt; the ElevatorInspection class - and vice versa. This object can act as our &lt;a href="https://en.wikipedia.org/wiki/Single_source_of_truth"&gt;"Single Source of Truth"&lt;/a&gt; and I argue parallel's the 'actant,' modifying the actors of Elevator and Inspector by allowing a relationship of 'ownership.' Our entire assemblage can be represented as an object, and, like an actant holds a relevance only particular to this relationship.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Is it coding as ontology?
&lt;/h3&gt;

&lt;p&gt;If I've lost you, or the parallel's seem tenuous, I don't blame you: but the key takeaway for me in drawing these parallels is simply that Ruby's object oriented paradigm allows us to model real world relationships - and these relationships can be understood in terms of objects as well since we do not need to adjust our analytical framework. And since we can assign attributes to any given object in Ruby, by simply identifying the object that can be considered representative in the relationship, we can modify and manipulate that object to understand the entirety of the relationship. We've abstracted the relationship as a Ruby object.  &lt;/p&gt;

&lt;p&gt;So let's finally drill down to what this looks like in Ruby:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Elevator&lt;/span&gt;  
    &lt;span class="nb"&gt;attr_reader&lt;/span&gt; &lt;span class="ss"&gt;:name&lt;/span&gt;
    &lt;span class="nb"&gt;attr_accessor&lt;/span&gt; &lt;span class="ss"&gt;:is_functioning&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;initialize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="vi"&gt;@name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;name&lt;/span&gt;
        &lt;span class="vi"&gt;@is_functioning&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kp"&gt;true&lt;/span&gt;
    &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Inspector&lt;/span&gt;
    &lt;span class="nb"&gt;attr_reader&lt;/span&gt; &lt;span class="ss"&gt;:name&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;initialize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;philosophy&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="vi"&gt;@name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;name&lt;/span&gt;
        &lt;span class="vi"&gt;@philosophy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;philosophy&lt;/span&gt;
    &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ElevatorInspection&lt;/span&gt;
    &lt;span class="vc"&gt;@@all&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nc"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt;
        &lt;span class="vc"&gt;@@all&lt;/span&gt;
    &lt;span class="k"&gt;end&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;initialize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;elevator&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;inspector&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="vi"&gt;@elevator&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;elevator&lt;/span&gt;
        &lt;span class="vi"&gt;@inspector&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;inspector&lt;/span&gt;
        &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;class&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;
    &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="n"&gt;elevator_9&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Elevator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Elevator No. 9"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="c1"&gt;#&amp;lt;Elevator:0x00007fab56b99c00 @is_functioning=true, @name="Elevator No. 9"&amp;gt;&lt;/span&gt;

&lt;span class="n"&gt;lila_mae&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Inspector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Lila Mae Watson"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Intuitionism"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="c1"&gt;#&amp;lt;Inspector:0x00007fab55c6c070 @name="Lila Mae Watson", @philosophy="Intuitionism"&amp;gt;&lt;/span&gt;

 &lt;span class="no"&gt;ElevatorInspection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;elevator_9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;lila_mae&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="c1"&gt;#&amp;lt;ElevatorInspection:0x00007fab56087a10&lt;/span&gt;
 &lt;span class="vi"&gt;@elevator&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="c1"&gt;#&amp;lt;Elevator:0x00007fab56b99c00 @is_functioning=true, @name="Elevator No. 9"&amp;gt;,&lt;/span&gt;
 &lt;span class="vi"&gt;@inspector&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="c1"&gt;#&amp;lt;Inspector:0x00007fab55c6c070 @name="Lila Mae Watson", @philosophy="Intuitionism"&amp;gt;&amp;gt;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Since every instance of the ElevatorInspection class "belongs to" an Elevator and an Inspector, I can find out everything I need about the relationships between the two classes, through the ElevatorInspection Class - you'll notice the ElevatorInspection instance that I've initiated has all the information about both relevant Elevator and Inspector instances. The key is identifying the object that is representative of and maintains the relationship. &lt;/p&gt;

&lt;h2&gt;
  
  
  Further Reading &amp;amp; Sources
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.ruby-lang.org/en/about/"&gt;Ruby, and Seeing Everything as an Object&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://a.co/28xHnHd"&gt;Bruno Latour, &lt;em&gt;Reassembling the Social - An Introduction to Actor Network Theory&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://faculty.georgetown.edu/irvinem/theory/Cressman-ABriefOverviewofANT.pdf"&gt;Darryl Cressman - A Brief Overview of Actor-Network Theory: Punctualization, Heterogeneous Engineering &amp;amp; Translation&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=X2YYxS6D-mI"&gt;Actor Network Theory in Plain English&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Science_and_technology_studies"&gt;Science &amp;amp; Technology Studies Wikipedia Page&lt;/a&gt;&lt;/p&gt;


</description>
      <category>ruby</category>
      <category>codenewbie</category>
      <category>webdev</category>
      <category>sts</category>
    </item>
    <item>
      <title>Byte Size: Changing Habits with the Command Line</title>
      <dc:creator>Jarret Bryan</dc:creator>
      <pubDate>Tue, 19 Jun 2018 03:08:57 +0000</pubDate>
      <link>https://dev.to/jaybeekeeper/byte-size-changing-habits-with-the-command-line-3lil</link>
      <guid>https://dev.to/jaybeekeeper/byte-size-changing-habits-with-the-command-line-3lil</guid>
      <description>

&lt;p&gt;I think one of the more tangible elements of tracking my progress while being a coding beginner is tracking how my habits have changed in the most basic ways as I use my computer. My experience interacting with the UI of my computer has completely shifted relatively quickly.&lt;/p&gt;

&lt;p&gt;Previously, I, like many users, adhered to the user experience of manually clicking through folders, dragging and dropping documents and folders, right clicking for copying and deleting materials, double clicking to open files etc. etc. I stuck with the GUI.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VseGTs3p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://assets.rbl.ms/17266104/980x.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VseGTs3p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://assets.rbl.ms/17266104/980x.gif" alt="Dragging to the trash is now dumb"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  I don't have to do this anymore
&lt;/h6&gt;

&lt;p&gt;Everything has shifted after discovering the terminal and learning some &lt;em&gt;very&lt;/em&gt; basic bash commands.&lt;/p&gt;

&lt;p&gt;Instead of clicking through folders and scrolling manually, I navigate through my file structures just using change directory command and using the "ls" bash command to see what files I'm looking for:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dKibeEtA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/hkf7ddka0rlitwglifuk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dKibeEtA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/hkf7ddka0rlitwglifuk.png" alt="basic bash navigation"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using the command line for navigation has really streamlined my workflow. I end up memorizing file and path names (or at least what they start with), and I spend far less time navigating and resizing menus.&lt;/p&gt;

&lt;p&gt;The bash shell seems to be a really powerful tool with a lot of capabilities I've barely begun to scratch the surface of - after all, it's not just for navigation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://lifehacker.com/5633909/who-needs-a-mouse-learn-to-use-the-command-line-for-almost-anything"&gt;Lifehacker has a really beginner friendly guide on getting used to the command line.&lt;/a&gt;&lt;/p&gt;


</description>
      <category>beginners</category>
      <category>commandline</category>
      <category>terminal</category>
      <category>codenewbie</category>
    </item>
  </channel>
</rss>
