<?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 Kristin Ponsonby on Medium]]></title>
        <description><![CDATA[Stories by Kristin Ponsonby on Medium]]></description>
        <link>https://medium.com/@kponsonberry?source=rss-de289e15059e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*XMWMnLRbo82J_i5HAWsB1g.jpeg</url>
            <title>Stories by Kristin Ponsonby on Medium</title>
            <link>https://medium.com/@kponsonberry?source=rss-de289e15059e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 12:50:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kponsonberry/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[Node.js and Express: A Lightweight Minimalist Framework]]></title>
            <link>https://kponsonberry.medium.com/node-js-not-a-language-not-a-framework-not-a-library-what-gives-1a5ae93a7e04?source=rss-de289e15059e------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a5ae93a7e04</guid>
            <category><![CDATA[express]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Kristin Ponsonby]]></dc:creator>
            <pubDate>Sat, 29 Jan 2022 19:45:57 GMT</pubDate>
            <atom:updated>2022-01-30T17:30:55.233Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RzXO3vmc_WF_s_MF5_7AsQ.png" /></figure><p>Since graduating from bootcamp, I’ve been learning a few different new technologies and frameworks to keep my skills sharp and stay on top of my game. One I kept running across was Node.js. Unlike JavaScript or Ruby, Node.js is not in fact a framework or language. It is actually a <em>runtime environment</em>. In simple terms, Node.js is just a way to run JavaScript outside the browser. JavaScript is traditionally a client side language. What Node enables you to do is run Javascript <em>server</em> side. The most common use case for Node.js is to create a simple web server for a JS application. In this article we will take a closer look at some of the basic features of Node.js and a framework called Express.</p><h3>Getting Started</h3><p>Getting a Node.js server up and running is actually quite simple. In this example we are going to use Express as our skeleton. From inside your JavaScript project folder, create a file. Let’s call it, app.js. You are going to use the require keyword to enable the request library. Then you will create a port variable that tells your server what port to listen to. Lastly create your app variable to run express. In this example, I made a simple fetch request to the Fruityvice public API.</p><pre>const express = require(“express”);<br>var request = require(“request”);<br>const app = express();<br>const port = 3001</pre><pre>app.get(&quot;/fruits&quot;, (req, res) =&gt; {<br>  request(&quot;https://fruityvice.com/api/fruit/all&quot;,<br>      function(error, response, body) {<br>    if (!error &amp;&amp; response.statusCode == 200) {<br>      var parsedBody = JSON.parse(body);<br>      res.send(parsedBody);<br>    }<br>  })<br>});</pre><pre>app.listen(port, () =&gt; {<br>  console.log(`starting on ${port}`);<br>});</pre><p>To boot up your shiny new server simply run:</p><pre>$node app.js</pre><h3>The Global Object</h3><p>So you’re probably familiar with the term global scope. In Node, variables and functions are not automatically added to the global object. They are only available in the local file they are defined in. We want to avoid defining variables and functions in the global scope so we implement something called modules. This way, two functions or variables in different files with the same name don’t overwrite each other. Those variables and functions are private to that file, in object-oriented programming terms.</p><h3>Modules</h3><p>In Node, every file is a <em>module</em>. The variables and functions inside that file are scoped to that module, they are not available outside of that module. For example, App.js may be your ‘main module’. You would have to add module.export.(function) or (variable) to make those variables or functions available outside of the App.js module.</p><h3>Implementation</h3><p>To load a module we use the ‘require’ function. One important thing to note is that we don’t have this function in browsers.</p><pre><br>require(‘path-of-file’)</pre><p>When loading a module, it is considered best practice to store the results in ‘const’. Because again, we don’t want to accidentally overwrite the value of our module.</p><h3>The Events Module</h3><p>One of the core concepts in Node.js is the events module. Events are basically a signal that something has happened in our application.</p><pre><br>const EventEmitter = require(‘events’) // a class<br>const emitter = new EventEmitter(); //an actual object, or an instant of the class EventEmitter</pre><pre>//Register a listener<br>emitter.on(‘messageLogged’, function(arg){. // or e<br> console.log(‘Listener called’);<br>});</pre><pre>//or ECMA6 syntax with arrow function:<br>emitter.on(‘messageLogged’, (arg) =&gt; {<br> console.log(‘Listener called’);<br>});</pre><pre>//Raise an event<br>emitter.emit(‘messageLogged, {id: 1, url: ‘http://..’});<br>//emit means producing a noise, signaling.</pre><pre>//Order matters. the listener must be defined before raising the event.</pre><pre>//Raise: logging (data: message)</pre><h3>Working with Express: A Lightweight Minimalist Framework</h3><p>Express is a web application framework for Node that gives our app a skeleton-a structure. It is useful for working with API’s and building single-page or multi-page applications. Express makes it super quick and easy to get a backend server up and running.</p><p>Once you’ve got the code above in your app.js file, there’s a few different things you could do next. The first thing you’ll want to do is install a dependency called Nodemon by running:</p><pre>$node i -D nodemon</pre><p>If you’ve played around with your server a bit you probably noticed you have to restart your sever every time you make changes to your files. This makes for super tedious development. Nodemon automatically monitors your source code and restarts your server when you make changes. Neat!</p><h3>Basic Routing</h3><p>According to the Express documentation, “<strong><em>Routing</em></strong> refers to determining how an application responds to a client request to a particular endpoint, which is a URI (or path) and a specific HTTP request method (GET, POST, and so on).” So if you’ve worked with Ruby on Rails for example, this should be a pretty familiar concept. Defining a route in Express is simple:</p><pre>app.METHOD(PATH, HANDLER)</pre><p>app is just your instance of express, method refers to the type of HTTP request you want to make, path is your path on the server, and lastly handler is the function you want to run when the route is matched. Here is a simple example of a route in an Express application:</p><pre>app.get(&#39;/&#39;, function (req, res) {<br>  res.send(&#39;Hello World!&#39;)<br>})</pre><p>This code will respond with ‘Hello World’ in your browser.</p><h3>Template Engines</h3><p>View engines, or template engines, are very useful in Express applications for for rendering HTML web pages. There are many template engines out there you could use for your application. Pug, EJS, Mustache, to name a few. The most commonly used is probably EJS, which stands for embedded JavaScript. With this engine, you can generate HTML with vanilla JavaScript. The first thing you will do is create a ‘Views’ folder inside your applications directory. Then create a file called index.ejs. Populate your file with some boilerplate to test it out. Before this will work, you will need to set up your view engine. For this example we’ll use EJS.</p><p>In your app.js file we created earlier, write the following code:</p><pre>app.set(&#39;view engine&#39;, ejs)</pre><p>Save your file and restart your server. You should see in your browser the HTML you wrote in index.js. Cool!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F8vpeyWA3OWOhG%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F8vpeyWA3OWOhG%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F8vpeyWA3OWOhG%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="239" frameborder="0" scrolling="no"><a href="https://medium.com/media/32c3e5fd1acc6683cfc09b6da1c3a320/href">https://medium.com/media/32c3e5fd1acc6683cfc09b6da1c3a320/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a5ae93a7e04" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pupstagram: An Instagram-ish React App with a Rails Backend]]></title>
            <link>https://kponsonberry.medium.com/pupstagram-an-instagram-ish-react-app-with-a-rails-backend-da14c63de68d?source=rss-de289e15059e------2</link>
            <guid isPermaLink="false">https://medium.com/p/da14c63de68d</guid>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[redux]]></category>
            <dc:creator><![CDATA[Kristin Ponsonby]]></dc:creator>
            <pubDate>Wed, 01 Dec 2021 16:25:18 GMT</pubDate>
            <atom:updated>2021-12-04T16:52:51.412Z</atom:updated>
            <content:encoded><![CDATA[<p>The last ten months have flown by! We are in the last phase of our program at Flat Iron and wrapping up the React/Redux curriculum. For my final project, I decided to build an Instagram clone…. for doggos!</p><p>The application has a similar user interface to Instagram. When a user is logged in, the home page they see is the index of all posts by all users. But unlike Instagram, I decided to incorporate a feature where a user can browse dog parks in their area via the Yelp API.</p><p>I built this application with a React/Redux front end and a rails backend with a SQL database. I plan to eventually convert the database to PostgreSQL and then deploy to Heroku. Long term, I will convert my application to React native to make it a full fledged mobile app.</p><p>The first thing I did of course was initialize my front end using create-react-app and backend using rails new. I always try to code out the next thing I want to see on the screen. So I started with the Yelp API feature. I set up my API key, necessary controllers and service class. I was mainly focused on fetching dog park data in a certain zip code. I didn’t set up any views on the rails side because I wanted to do all my front end displays using React.</p><p>Once that was completed I set up my user authentication. In this app, a user can log in, sign up, and log out. I also created an auto-login method to keep a user logged in as they navigate throughout the application. I incorporated Material UI to create modals for the log in and sign up forms. I LOVE material UI because it’s a great work to create professional looking components in React that are free, fast, and light weight. I also used material UI for my buttons and various other text fields.</p><p>This application features a few main pages. The home page displays an index of all posts from the backend. A post object, similar to Instagram, features a username with an avatar, a photo, and a caption next to the username. The home page is also where the new post uploader lives. This was actually one of the bigger challenges of building out this application. I really wanted to learn how to incorporate a file uploader so users can upload a jpg file from their local machine, instead of just an image url, which is what I have done in previous applications. I found a couple of tutorials online to incorporate this feature. After a few slightly painful and rocky sessions of debugging, I was finally able to get it functional. The main challenge for me was figuring out how to pass over the image data correctly to the back end, and then retrieve it on the front end on the post index page.</p><p>The find a dog park page displays a grid of all dog parks from the Yelp API, and then each card takes the user to the show page for that dog park. The show page features a link where the user can go the Yelp link to find more information on that particular dog park.</p><p>The last page I created is a profile page. This page is where all the user data lives. It populates with the username, bio, breed, and birthdate of the logged in user.</p><p>This app was a great experience in understanding how to properly use the Redux store. Redux is a powerful tool in React but can be very tricky to understand at first. There’s a lot of moving parts and it’s not always clear what’s happening under the hood. Building this application was a valuable learning experience in getting comfortable coding in React and and learning new tools like Material UI and how to include a file uploader.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da14c63de68d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sweet Tooth: A Gluten-Free Baking App]]></title>
            <link>https://kponsonberry.medium.com/sweet-tooth-a-gluten-free-baking-app-951baade1ed5?source=rss-de289e15059e------2</link>
            <guid isPermaLink="false">https://medium.com/p/951baade1ed5</guid>
            <category><![CDATA[asynchronous-javascript]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[rails]]></category>
            <category><![CDATA[single-page-applications]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <dc:creator><![CDATA[Kristin Ponsonby]]></dc:creator>
            <pubDate>Tue, 21 Sep 2021 21:55:02 GMT</pubDate>
            <atom:updated>2021-09-21T21:57:04.693Z</atom:updated>
            <content:encoded><![CDATA[<p>We are coming to the end of Phase 4 of 5 at Flatiron. I honestly can’t believe we’re this close to the end. My time in this program has flown by. When they tell you at the beginning that this bootcamp is “like drinking water from a fire hose”, they’re not joking! This phase we switched gears and dove headfirst into JavaScript land. This was the phase I was the most excited for because my goal is to be a front-end software engineer. I’m planning on learning Vue and React post graduation. For this project, we we’re tasked with creating a single page application or game using vanilla JavaScript, HTML, and CSS for the front end and a Rails API backend. Let’s get into it!</p><h3>Sweet Tooth</h3><p>For my project, I decided to create a single page application called Sweet Tooth. I want to eventually turn this into a mobile app, but for now it’s a web based application. As someone with a gluten-allergy and a love for baking, I’ve struggled to find solid gluten-free dessert recipe’s that are actually edible. If you’ve ever had a store-bought gluten free cupcake, I’m sorry.</p><p>The basic idea for the app is to create a curated space for GOOD gluten-free baking recipes. A user can sign up( I didn’t use authorization for this project, but will add Google authentication later), view a single page of recipe cards with the title, image, and category of each item, and then click the card to view the recipe instructions and other details. The app also allows users to add a recipe they find to the database.</p><h3>The Beginnings</h3><p>For this project, I started with building the bones of the front end. I created a simple HTML file with the title and subtitle of the app. I then created my index.js file to house my API service calls and other basic functionality. Because we we’re also required to used Object Oriented Design, I then created my recipe.js file. This file houses all code related to my recipes object(s). Once I had the bones of my front end built out, I moved on to building out my backend API so I could get some recipe json objects up on the server.</p><h3>The Backend</h3><p>Because I plan to eventually deploy this project, I created totally separate folders and Git repos. So once I had my repo set up, I created my various migrations and seeded my database. My plan was to have a recipe, user, and detail model. I created the recipe model and controller first because that was what needed to appear on the page next. I knew I wanted an index action that would eventually correspond to my fetch call to load all recipes in my database. I also was going to need a create action to allow users to create a new recipe object.</p><h3>Defining the Relationship</h3><p>To meet the requirements of this project, we needed to have one has-many and one belongs-to relationship. My recipe model has-many details and my detail model belongs to a recipe. The detail model was awkward to name, but essentially I wanted the detail migration to include the cook time, difficulty level, and instructions for each recipe. So once I had those relationships defined I finished coding out my controller actions in the recipe model and seeded my database so I could get the server up and running.</p><p>Once that was done, I fired up the server and lo and behold, recipe json objects!</p><h3>Back to JavaScript Land</h3><p>Next I built out my modal.js and detail.js files. The purpose of the modal file is to house the code related to my pop-up form for users to submit new recipes. I had to add functions with event listeners to open and close the modal. The detail file is short and sweet. This file simply contains the code to render the detail information from the Rails API.</p><p>Lastly, I created a CSS file and tweaked the styling of my many components. JavaScript is a fun, albeit intimidating programming language because it provides for so much flexibility. This project was an excellent way to get your feet wet and understand the fundamentals of vanilla JavaScript.</p><p>I have big plans for this little app!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=951baade1ed5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Street Eats: a Food Truck Application Built with Rai]]></title>
            <link>https://kponsonberry.medium.com/street-eats-a-food-truck-application-built-with-rai-136615daec84?source=rss-de289e15059e------2</link>
            <guid isPermaLink="false">https://medium.com/p/136615daec84</guid>
            <category><![CDATA[rails]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[food-truck]]></category>
            <category><![CDATA[tech]]></category>
            <dc:creator><![CDATA[Kristin Ponsonby]]></dc:creator>
            <pubDate>Fri, 23 Jul 2021 15:02:30 GMT</pubDate>
            <atom:updated>2021-07-26T14:35:07.461Z</atom:updated>
            <content:encoded><![CDATA[<h3>Street Eats: A Rails Web App for Browsing Food Trucks</h3><p>One of my favorite inventions of the last decade is the food truck. Okay, I’m sure they were are around before, but their gain in popularity in the last ten years is undeniable. You can visit almost any city and you’ll find a gourmet grilled cheese truck parked outside of a busy office building, a tamale truck posted up in front of a brewery, or a wood fired pizza truck at a private wedding. Food trucks are everywhere. In Knoxville, TN, where I live, there are tons of amazing food trucks to choose from. Yelp search results returns 104 trucks in Knoxville alone. Wow, that’s a lot of burgers and tacos.</p><p>One thing I hate, and I’m sure I’m not the only one, is the lack of an efficient way to figure out the schedule. In Knoxville, some trucks post their weekly schedules on their Instagram, Facebook, or website. That’s three different websites and platforms I have to check just to find <a href="https://www.facebook.com/captainmuchachos/&#39;">Captain Muchachos!</a> So I decided to build a simple web application to make it easier to find my beloved Korean beef tacos.</p><h4>Behold, Street Eats</h4><p>I built Street Eats as one of my portfolio projects for our Rails module at The Flatiron School. For this blog post I want to give you a quick tour of the app and my design process. To start, I mapped out the flow of the application, what models I’d need, and their associations. I used Draw.io for this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*Sb1UHJOXRW4jsCm1jU2S-Q.png" /></figure><p>This step really helps me to conceptualize and get my bearings before I jump right in and start writing code. It acts as a road map and helps give me a place to start. I decided I would need User, Food Truck, Reviews, and Favorites models, and their corresponding controllers. A user should be able to log in, view an index of all food trucks, review a food truck, search by cuisine, and see all their reviews.</p><h4>Seed the Database and Create Migrations</h4><p>For this app, I decided to manually seed my database with the most popular food trucks in Knoxville, rather than use the Yelp API. I did this for a couple of reasons. There’s a bunch of food trucks on Yelp that aren’t active and I wanted my app to provide some specific information I had to track down manually, like the link to their schedules. Once I had my top 20 food trucks in my seeds file and the information I wanted for each, I moved on to my migrations. I created tables for food trucks, reviews, and users. Once I generated those tables I ran the migrations and seeded the database.</p><h4><strong>Generate Models</strong></h4><p>Next I moved on to generating my models. I created the User model and defined it’s associations. A user has many reviews and has many food trucks <em>through</em> reviews. I also added validations for username and email. The food truck model has many reviews and has many users <em>through</em> reviews. And finally the reviews model, which is the join table, belongs to a user and belongs to a food truck. I also added validations for content and title. I didn’t want users leaving blank reviews after all!</p><h4>Omniauth Strategy: Google</h4><p>The first thing I wanted to do was create my log in feature. I used Omniauth to allow a user to sign in with Google. I followed the <a href="https://github.com/zquestz/omniauth-google-oauth2">instructions and documentation here</a>. This piece was fairly straightforward.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZrkcDCFvgisW1L8zMb2awQ.png" /></figure><p>The first thing you have to do is sign into to Google and get your API key. Add gem ‘omniauth-google-oauth2 ‘to your gem file and then follow the instructions for the API setup. &#39;Though do be forewarned, when you first get it set up and go to test it out, you will get a bunch of crazy looking errors because it can apparently take up to an hour for the functionality to work. So don’t do what I did- which was to panic for a full hour scouring the internet trying to figure out why your sign in with Google isn’t working. Do yoga. Go for a walk. Maybe eat a snack.</p><h4><strong>Set up Those Controllers</strong></h4><p>To finish the Omniauth functionality, you will need to create a Sessions controller and add a method that lets other developers know what it is you&#39;re doing. My sessions controller looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RIypLitphW3L-BOhnI9f3Q.png" /></figure><p>This creates a new session and also clears an existing session. After this was taken care of, I got my Users, Food Trucks, Reviews controllers set up. For this step, I really had to think about what views I ultimately wanted. The food trucks controller was the logical place to start. I wanted my home page to just be the index of all food trucks. So I built out an index method as well as a show method. For me, the tricky thing about rails is that there is a LOT of abstraction going under the hood. The “magic” as it’s called. This is great because Rails takes care of a lot of things for you, but it also makes debugging difficult at times because it’s not always clear where the issue with your code lies.</p><h4>Views, Forms, and Scopes</h4><p>The views was where things got tricky. I had to do a lot of debugging and byebug-ing on this project to figure out why certain forms weren’t working or why I kept getting errors. Especially when you’ve got various associations, nested resources and routes, things get complicated quick. So I started with some basic views. I need a Profile Page, aka a show page for the user, a My Reviews page, which was a show page for the reviews, and an All Food Trucks page, which was an index page of food trucks. The search feature on the index page is for querying the database and returning only food trucks that match certain params, in this case cuisine and name. I used a scope method, which is just syntactic sugar for a class method, to build out this functionality.</p><p>This app was a lot of fun and also really challenging to build out. In the future I’ll add some java script, integrate the Google Maps API, and add more CSS and styling. The best part of this app for me is having all the schedules for my favorite food trucks all in one place. You can check out the <a href="https://github.com/kristinponsonby/street-eats-app">git repo here.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=136615daec84" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[VOL 2: Syntactic Sugar, Sharp Knives, and Ruby Magic]]></title>
            <link>https://medium.com/codex/vol-2-syntactic-sugar-sharp-knives-and-ruby-magic-8b2951cdd4e9?source=rss-de289e15059e------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b2951cdd4e9</guid>
            <category><![CDATA[development]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[syntactic-sugar]]></category>
            <dc:creator><![CDATA[Kristin Ponsonby]]></dc:creator>
            <pubDate>Thu, 22 Jul 2021 14:57:50 GMT</pubDate>
            <atom:updated>2021-07-23T15:24:48.068Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*jRs4yIXJEuQdMe_26Ts-ig.png" /><figcaption>Ruby, Pawel Olek</figcaption></figure><p>So far in my journey learning to code, Ruby on Rails has been my favorite language to dive into. Ruby on Rails is an incredibly powerful and flexible open-source programming language. As someone that loves structure, I love RoR because the documentation is so comprehensive and the language itself is pretty straightforward and human-friendly. Unlike Java Script, which I’ve found to have a lot more of a learning curve because it’s more of an “anything goes” language. The wild west of code. But not Ruby. It’s such a powerful language because in a matter of hours, you can go from a blank slate to a fully functioning multi-page application complete with login and logout capability, multiple models, and routes. It’s pretty crazy when you think about it.</p><p>In fact, many of the websites you use on a daily basis are actually powered by Rails. AirBnb, Shopify, Twitter, Kickstarter, Hulu, Github, just to name a few. As you can tell this language is most popular with companies with a social media aspect to them. Sometimes Rails get’s a bad rap for being “slow”, but honestly I think it’s more about you as the developer choosing the right tool for the job. There are definitely situations where Rails is not the right language for the job, but you could make that argument about Java Script, Python, Django, or any other programming language. They each have their own sets of strengths and weaknesses.</p><p>One of the things that most intrigued me about Rails was how I kept coming across the phrase, “Ruby magic”. I would see this phrase on StackOverflow or on forums when debugging an issue with my code. And I never quite understood what everyone was talking about. But the phrase intrigued me and made me very curious about the language’s origins. After spending the last few months really digging in and mastering the language, I get it now. And let me tell you, Ruby <em>is</em> magic.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FpI2paNxecnUNW%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fharry-potter-hermione-granger-ronald-weasley-pI2paNxecnUNW&amp;image=https%3A%2F%2Fmedia4.giphy.com%2Fmedia%2FpI2paNxecnUNW%2F200.gif%3Fcid%3D790b761195b8423e7db9d8941e15a919a3221d182f289c3b%26rid%3D200.gif%26ct%3Dg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="257" frameborder="0" scrolling="no"><a href="https://medium.com/media/b8e46c75c87cdb6ab8c9f98f6c2f2de3/href">https://medium.com/media/b8e46c75c87cdb6ab8c9f98f6c2f2de3/href</a></iframe><h4>What is Ruby Magic?</h4><p>So to answer this question, let me give you a brief overview of the history and inception of the language. Ruby was designed and created by a Japanese computer scientist name <a href="https://en.wikipedia.org/wiki/Yukihiro_Matsumoto">Yukihiro Matsumoto</a>, aka “Matz” in 1995.</p><blockquote>His demeanor has brought about a motto in the Ruby community: “Matz is nice and so we are nice,” commonly abbreviated as MINASWAN.</blockquote><p>Then, in 2004, along came a Danish programmer by the name of <a href="https://en.wikipedia.org/wiki/David_Heinemeier_Hansson">David Heinemeier Hansson. </a>At the time, Hansson was actually working on building a project management tool with another developer which later became Basecamp. During the development of this tool, Hansson used Ruby to create a custom web development framework which he later released as the open-source language Ruby on Rails, and thus Rails was born- a happy accident. Reading the Rails doctrine is a very different experience from reading the documentation for other other languages. Hansson doctrine is full of expressive, even religious language declaring the guiding principles behind this language.</p><h4>The 9 Pillars of The Rails Doctrine</h4><ol><li><a href="https://rubyonrails.org/doctrine/#optimize-for-programmer-happiness">Optimize for programmer happiness</a></li><li><a href="https://rubyonrails.org/doctrine/#convention-over-configuration">Convention over Configuration</a></li><li><a href="https://rubyonrails.org/doctrine/#omakase">The menu is omakase</a></li><li><a href="https://rubyonrails.org/doctrine/#no-one-paradigm">No one paradigm</a></li><li><a href="https://rubyonrails.org/doctrine/#beautiful-code">Exalt beautiful code</a></li><li><a href="https://rubyonrails.org/doctrine/#provide-sharp-knives">Provide sharp knives</a></li><li><a href="https://rubyonrails.org/doctrine/#integrated-systems">Value integrated systems</a></li><li><a href="https://rubyonrails.org/doctrine/#progress-over-stability">Progress over stability</a></li><li><a href="https://rubyonrails.org/doctrine/#big-tent">Push up a big tent</a></li></ol><p>We won’t go into too much detail on each pillar, but I’ll hit the highlights. Rails was designed to be<em> fun, </em>a novel concept in programming at the time.</p><p>Hansson says, “Ruby took to not only recognize but accommodate and elevate programmer feelings. Whether they be of inadequacy, whimsy, or joy. Matz jumped implementational hurdles of astounding complexity to make the machine appear to smile at and flatter its human co-conspirator. Ruby is full of optical illusions where that which seems simple, clear, and beautiful to our mind’s eye actually is an acrobatic mess of wires under the hood.”</p><p>This is about the best summary of Rails I’ve read. These “optical illusions” are where the phrase Ruby magic comes from.</p><p>To be more specific, what he means by “optical illusions”, are really just simple and thoughtful bits of code that make your application a lot more elegant and intuitive. Let me give you can example. Rails follows the principle of convention over configuration. This isn’t just a stylistic decision. Convention over configuration means that in Rails, your app and its files and folders follow a specific naming and organizational convention. The reason for this is that there is so much going on under the hood. In order for your models, views, and controllers, to all work together as they should, they must be named appropriately for the magic to work. The conventions you follow are signaling to Rails what you want your app to do.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-R_PAKjSNE6tkKArt1WxUg.jpeg" /><figcaption>Krzywda 2020</figcaption></figure><p>Like anything, this type of language definitely comes with its downsides. For one, when there is so much “rails magic” happening behind the scenes, things can get pretty abstract fast. You as the programmer have to have an in depth knowledge of what is actually going on. For this reason, Rails can be hard debug. Secondly, if you’re looking at someone else’s Rails code, it can a little unclear what that person intended that method or view to accomplish. How you name your methods, controllers, views, and routes is super critical when building Rails apps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*siu2Pl_NIY_YCT6DhOPrHA.jpeg" /></figure><h4><strong>Syntactic Sugar</strong></h4><p>Enter syntactic sugar. This is one of those terms in programming that I thought was cute and nice but didn’t know what it meant. Syntactic sugar, as it turns out, is hugely helpful in the world of Rails, (and pretty much all programming languages.) All it really is, is some extra syntax sprinkled throughout your code to make your code “sweeter” and more human-readable. I’ll give you a very basic example. Let’s say you have the following line of code: x = x + 5</p><p>If you want to add 5 to the variable x, the ‘sweeter’ version of this code would be to just write x += 5.</p><p>Neat, huh?</p><p>The ternary operator is one of the more common and widely used examples of sugary syntax. Here’s how to use a ternary:</p><pre>if apple_stock &gt; 1</pre><pre><em>:eat_apple</em></pre><pre>else</pre><pre><em>:buy_apple</em></pre><pre>end</pre><p>These 5 lines of code can actually be expressed as just one:</p><pre>apple_stock &gt; 1 ? :eat_apple : :buy_apple</pre><p>Wow!</p><p>The reason it’s referred to as “syntactic sugar” is because while it doesn’t directly effect the functionality of your code, it is much more aesthetically pleasing for other developers to read and understand. Additionally, the bigger and more complex your app becomes, the longer and longer your code can get. So these little shortcuts are the perfect tool to ensure your code is clean, concise, and sweet!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b2951cdd4e9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/vol-2-syntactic-sugar-sharp-knives-and-ruby-magic-8b2951cdd4e9">VOL 2: Syntactic Sugar, Sharp Knives, and Ruby Magic</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[VOl 1: How The Internet Works and Other Rabbit Holes]]></title>
            <link>https://kponsonberry.medium.com/how-the-internet-works-and-other-rabbit-holes-a1a5bc7e112?source=rss-de289e15059e------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1a5bc7e112</guid>
            <category><![CDATA[how-the-internet-works]]></category>
            <category><![CDATA[dns-servers]]></category>
            <category><![CDATA[dns]]></category>
            <category><![CDATA[internet]]></category>
            <category><![CDATA[nameserver]]></category>
            <dc:creator><![CDATA[Kristin Ponsonby]]></dc:creator>
            <pubDate>Tue, 20 Jul 2021 18:38:11 GMT</pubDate>
            <atom:updated>2021-07-21T15:26:04.179Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever wondered what happens when you type <a href="http://www.google.com/">www.google.com</a> into your browser, and in a blink of an eye, bam! You’re on Google’s home page? It’s pretty amazing how such a complicated process can just look like magic to a user. We do this lots of times throughout the day. We make what’s called HTTP requests using our browser. And then in under a second, a LOT is going on under the hood. We take it for granted and most people don’t even think about how it actually works.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yv2LDvxENHr9xTOF" /><figcaption>Photo by <a href="https://unsplash.com/@nathanareboucas?utm_source=medium&amp;utm_medium=referral">Nathana Rebouças</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>If you posed this question to a software engineer, you might get one of a hundred different answers. You can answer this question in one sentence or a hundred pages. I think this is a popular question to ask software engineers in technical interviews for a couple of reasons.</p><p>One, it gives the interviewer a sense of how comfortable you are with ambiguity. Two, it gives the interviewer an idea of your educational background. If you have a Masters degree in computer science, you’re probably going to give a much more technical and in depth response than a bootcamp graduate with no background in computer science, for example. And then three, the way you respond gives the interviewer and idea of how good you are communicating technical information in a non technical way-how good you are at teaching and explaining what you know-a very valuable skill in computer science.</p><h3>So Let’s Get Into It. How D<em>oes</em> The Internet Work?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*PVlj7-rE4NuYXVczEkMuKw.png" /><figcaption>How the internet works</figcaption></figure><ol><li>The first thing that happens is you, the user, types in a web address into your browser. Let’s say you’re navigating to <a href="http://www.youtube.com/">www.youtube.com</a> to watch some cute videos of dogs.</li><li>That request first travels to your router, and then to your modem.</li><li>Your modem then sends that request to another machine, something called the name server(more on that in a bit). But essentially, the name servers job is to determine what kind of request you’re making. I.e. are you looking for a website, an email, or did you type a string of characters into your browser as more of a search query.</li><li>Since we’re trying to navigate to Youtube’s website, the name server sends our request to a datacenter.</li><li>The datacenter then routes those packets of information to the destination server, which hosts the website we are visiting.</li><li>The host server then executes the request and returns code in HTML format to you the user, or the “client”.</li><li>Your web browser receives the information and then renders that HTML code into the visual page you’re looking for.</li></ol><p>Voila! Seems simple enough right? This is a highly condensed explanation of the basics. But if you want to impress your friends, being able to explain the basics of how the internet works is a pretty cool party trick.</p><h3>Nameservers</h3><p>A name server helps connect URLs with the IP address of web servers. Name servers are an important part of <a href="https://kinsta.com/knowledgebase/what-is-dns/">the Domain Name System (DNS)</a>, which many people call the “phone book of the internet”. One of the most important jobs of the DNS is to translate the domain name you type in to your browser, i.e. youtube.com, into the corresponding IP address. As humans, it would be pretty difficult to remember 208.65.153.23 every time you wanted to watch cute puppy videos. (That string of numbers is in fact the IP address of Youtube. Thus domain names were created to make things more human-friendly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Pm-tMqVB-HTBTHLa" /><figcaption>Photo by <a href="https://unsplash.com/@daseine?utm_source=medium&amp;utm_medium=referral">Fitore Fazliu</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Another way to think about it is, name servers help organize and route traffic across the internet. It’s easy to get name servers and the DNS confused but they are actually not interchangeable terms. An easy way to conceptualize it is to think of the name server as the library and the DNS records as the catalog.</p><h3>Okay, but Where are These Data Centers?</h3><p>If you’ve got an afternoon to kill, I would highly encourage you to look up some of the <a href="https://www.datacenters.com/news/and-the-title-of-the-largest-data-center-in-the-world-and-largest-data-center-in">biggest data centers in the world</a>. It is a truly fascinating internet rabbit hole to venture down. After all, all that data on the web <em>does</em> have to be stored somewhere. In the US, the Lakeside Technology Center in Chicago is the largest data center by far. The LTC is housed in a historic building that contains over 1.1 million square feet and spans an entire city block. Wow, that’s a lot of bits and bytes and dog videos. So why do we have these data centers? And what goes on there?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*zgF2BkHIZuQszhNFe19Mtw.png" /><figcaption>Lakeside Data Center, Chicago, IL. Courtesy of Lakeside Technology.</figcaption></figure><p>We have data centers for a couple of reasons. Large companies, government organizations, and financial institutions typically have a lot of sensitive information and data they need somewhere safe to store. Even the age of cloud computing can’t eliminate the need for physical spaces to house and secure sensitive information. Hosting your information “in the cloud” simply means the data is being stored at some other location, and then that company or individual is able to access that data remotely.</p><p>Data centers vary greatly in size and scale, depending on the size of organization and what kind of information is being housed. But larger data centers can house tens of thousands of servers, computers, cooling equipment, and other necessary hardware. Usually data centers also have a small staff to run and monitor all these servers and equipment. At some of the larger tech companies, the numbers get big pretty fast. Google reportedly houses over 50,000 servers at just one of their data centers. Pretty crazy right? As users of the internet, it’s easy to forget just how much data is flying around “in the cloud” all the time. But behind the scenes, there is some truly astounding technology at work.</p><p>The internet is a fascinating subject because of it’s ever evolving nature and rapid rate of change. It can get complicated pretty quick, trying to understand how it all works. What makes the internet so elegant is how simple it is to type “pit bull snoring” into Youtube.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Z-G4bhWhzm6RMt8s" /><figcaption>Photo by <a href="https://unsplash.com/@themikeburke?utm_source=medium&amp;utm_medium=referral">Mike Burke</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1a5bc7e112" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Discovering the Joy of {Code}: A Series]]></title>
            <link>https://kponsonberry.medium.com/discovering-the-magic-of-code-a-series-cfaf6fcb5247?source=rss-de289e15059e------2</link>
            <guid isPermaLink="false">https://medium.com/p/cfaf6fcb5247</guid>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[women-in-tech]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Kristin Ponsonby]]></dc:creator>
            <pubDate>Tue, 22 Jun 2021 20:20:03 GMT</pubDate>
            <atom:updated>2021-07-22T14:59:58.499Z</atom:updated>
            <content:encoded><![CDATA[<p>So now that I’m in my 3rd phase (of 5) of my bootcamp program at <a href="https://flatironschool.com/">Flat Iron School</a>, I’m starting to feel like my head is above water enough to start digging a little deeper into other topics in computer science besides just object oriented programming. It’s becoming apparent to me that what I’ve learned in the last few months, while it’s felt like drinking water from a fire hose, is actually only the tip of the computer science iceberg. Wild, huh?</p><p>I thought it would be fun to do a weekly series called Discovering the Magic of Code. As someone entering tech from a non-traditional background, I am by no means claiming to be an expert, but I certainly know far more than I did 6 months ago. Each week I’ll be writing on one topic I find interesting or noteworthy. I’ve always heard the best the way to learn something is to teach it! So here we go. Let’s learn some fundamentals together. In this series you can expect posts on specific programming languages, data structures, algorithms, AI, the internet, computational complexity, and other topics as I discover them and get excited about them. Thanks for joining me on this wild ride that is entering the tech space. Stay tuned!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*5-VFUU-hDIr2prQZcP07CQ.png" /><figcaption><a href="https://www.codelikeagirl.com/">https://www.codelikeagirl.com/</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cfaf6fcb5247" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Romp! A Sinatra CMS Application]]></title>
            <link>https://kponsonberry.medium.com/romp-a-sinatra-cms-application-de1cf230b59b?source=rss-de289e15059e------2</link>
            <guid isPermaLink="false">https://medium.com/p/de1cf230b59b</guid>
            <category><![CDATA[sinatra]]></category>
            <category><![CDATA[activerecord]]></category>
            <category><![CDATA[flatiron-school]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[ruby]]></category>
            <dc:creator><![CDATA[Kristin Ponsonby]]></dc:creator>
            <pubDate>Mon, 17 May 2021 19:01:13 GMT</pubDate>
            <atom:updated>2021-05-19T20:15:45.781Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W6X5Wr_z8IaWvyn34_4z9Q.png" /><figcaption>Welcome page of Romp!</figcaption></figure><p>Whew! Phase 2 of my software engineering program at <a href="https://flatironschool.com/">Flat Iron</a> got here fast. We are approaching the end of this phase which means one thing: project mode. We have been learnings tons of fun new things this phase- from CSS and HTML basics to ActiveRecord, <a href="https://www.w3schools.com/sql/&#39;">SQL</a>, and finally Sinatra. For this project, we were instructed to use Sinatra to build a content management system application. Our app must meet the following requirements:</p><ol><li>Build a <a href="http://sinatrarb.com/">Sinatra</a> app using models, views, and controllers</li><li>Use <a href="https://guides.rubyonrails.org/active_record_basics.html">ActiveRecord</a></li><li>Use multiple models</li><li>Utilize “has-many” and “belongs-to” relationships</li><li>Users must be able to sign up, sign in, and sign out</li><li>Validate uniqueness of user login attributes</li><li>Use <a href="https://guides.rubyonrails.org/active_record_basics.html#crud-reading-and-writing-data">CRUD</a> actions in models</li><li>Ensure users can only edit their <em>own</em> resources</li><li>Validate user input</li></ol><h3>What is Sinatra?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8a50poOjmEE_ZyxGG5SCKg.png" /></figure><p>Sinatra is a DSL, or domain-specific language, for building simple and elegant web interface ruby applications. In all its simplicity, Sinatra is actually a pretty powerful resource.</p><p>Sunny Ripert created this cool app, <a href="https://github.com/sunny/so-nice">“So Nice”</a>, to play, pause, change volume, or skip the currently playing song in iTunes, Spotify, and other media players.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*sfbIHYeJ5QHgBtFttjeEAw.png" /></figure><p>After reading the Sinatra documentation, I started brainstorming what I wanted my app to do. I asked myself, “what problem will this web application solve?”</p><p>I have a foster turned rescue dog named Juna. She is the sweetest creature on four legs and we love taking her to the dog park. In DC, there are probably 25+ different dog parks in the metro area. The problem we run into, is that we can never remember which ones we’ve been to and liked, which ones have water available, and how big or small they are. So I decided to create an app that would allow me to track my favorite DC dog parks.</p><h3>Getting Started</h3><p>The first thing I did was create a rough site map for my app in a Google doc. I wanted to just get on paper the basics of what routes or pages it would have, what my models would be, and what controllers I would need.</p><p>The next thing I did was install the <a href="https://www.rubydoc.info/gems/corneal/0.1.0">Corneal gem</a> to set up the structure of my files within my app. This gem was created by another Flat Iron student and was a huge time saver.</p><h3>Models</h3><p>I determined I would need a dog park model and a user model for my app. So first I created my user model to add validations for my username and password, as well as establish my “has-many” dog parks relationship.</p><h3>Controllers</h3><p>Next, I got to work on my controllers. I created an application controller, a dog parks controller, a sessions controller, and a user controller. My application controller is where I created a route to my welcome page and created two helper methods; one for checking to see if a user is logged in and one for checking for the current user. Then I got to work on my sessions controller to enable a user to log in and log out. Next, I created my dog parks controller; which is where I stubbed out my routes to satisfy the CRUD action requirements -create, read, update, and destroy. Finally, I created my user controller to allow a user to sign up, view all other users or navigate to a specific user page.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1b13211cae97f3dfd8612c3e974c1eac/href">https://medium.com/media/1b13211cae97f3dfd8612c3e974c1eac/href</a></iframe><h3>Views</h3><p>I worked on each view one at a time, as I built out the route in the corresponding controller. This app involved creating several forms, an edit feature, and a search feature. For my dog parks views, I created HTML docs that allow a user to see an index of all dog parks, create a new dog park, and edit or delete dog parks.</p><h3>CSS and Layout</h3><p>Admittedly, the most challenging part of this project for me was actually the CSS work. I’m a bit of a perfectionist and I really wanted the app to be user-friendly and look great. CSS was not even a requirement for this project, it was just something I personally wanted to work on. So I tweaked my fonts, colors, navbar layout, and added lots of fun photos of dog parks and cute dogs. Like I was warned, the most frustrating thing about CSS is trying to center an image. But alas, I preserved.</p><h3>About Romp!</h3><p>So, all in all, I’m very happy with the finished product of this web app. The welcome page is simple and clean and makes it very clear to the user what this app does and who it’s for.</p><p>From the welcome page, a user may sign up or log in. Once logged in, additional options appear in the navbar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XUScBiqcgo_Pc5plyFxeSA.png" /></figure><p>A logged-in user now has the option to view their profile, log a new dog park, view all dog parks(not just their own!) view other users, or log out.</p><p>To track a new dog park, a user must fill in the following form.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K7yzLV4iE9TkV8qrymGwSA.png" /></figure><p>The validations I have in place ensure a user cannot leave a field blank or they will get an error message.</p><p>If you navigate to the All Dog Parks menu option, you will see a list of all dog parks that have been logged in the app. Each park is a link that a user may click on to see more information about that park.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ivHnjp2bK73DrpeFTkKeOg.png" /></figure><p>The search feature allows a user to search for a particular dog park. Don’t remember the full name of the park? Not to worry! I have set up the search feature to allow a user to type in a few letters or part of the word and the dog park should still pop up.</p><h4>Please try out <a href="https://github.com/kristinponsonby/Romp-app">Romp!</a> and let me know what you think. I hope you find this app as delightful as I do.</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de1cf230b59b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cats of Studio Ghibli: A Ruby CLI Gem]]></title>
            <link>https://kponsonberry.medium.com/cats-of-studio-ghibli-a-ruby-cli-gem-a27ddb2f5115?source=rss-de289e15059e------2</link>
            <guid isPermaLink="false">https://medium.com/p/a27ddb2f5115</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[cli]]></category>
            <category><![CDATA[rubygems]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[studio-ghibli]]></category>
            <dc:creator><![CDATA[Kristin Ponsonby]]></dc:creator>
            <pubDate>Wed, 24 Mar 2021 18:51:22 GMT</pubDate>
            <atom:updated>2021-03-24T18:51:22.643Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MZWMsepJGZ_CYZs1hvZ6qw.jpeg" /><figcaption>My Neighbor Totoro, 1988</figcaption></figure><p>I have always been a huge fan of the Japanese illustrator and director <a href="https://www.imdb.com/name/nm0594503/">Hayao Miyazaki.</a> He has made many beloved films such as Spirited Away, Howl’s Moving Castle, My Neighbor Totoro and Kiki’s Delivery Service to name a few. For my first CLI Ruby gem, I thought it would be a lot of fun to use the public Studio Ghibli API to display all of the cat characters in the Studio Ghibli universe, and then allow a user to interact with them in different ways.</p><p><strong>What Will Your App Allow A User to Do?</strong></p><p>The app allows a user to view all the cat characters from the database found at this <a href="https://ghibliapi.herokuapp.com/#tag/People%2Fpaths%2F~1people%2Fget.">Studio Ghibli API link.</a></p><p>The app will then provide a list of options for the user to choose from. A user can view all the cat characters in list form by name, and then select a particular cat to view their details such as age, gender, eye and hair colors, and which films they appeared in. Then the user can go an additional level deep by following the prompts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JZFAppRvX8VivyMUq1w2jw.png" /><figcaption>The Studio Ghibli API (v1.01)</figcaption></figure><p>The best part of the app, in my opinion is that it returns all the best quotes from each cat! The user chooses “See Favorite Quotes” and bam! they get see Jiji say, “ You’d think they’d never seen a girl and a cat on a broomstick before.”</p><p><strong>Steps I Followed To Create This Gem:</strong></p><p>The first thing I did was set up my directory. I created two folders: “config” and “models”. In config I created an environment file and a seeds file. Then in models I created cat.rb, cli.rb, ghibliapi.rb, quotes.rb and then finally a run.rb file. In order to follow good object orientation design principals, I created several different classes that each had their own job and I tried to keep their functionality relatively narrow.</p><p>The most challenging part of creating this app was pulling the specific data I needed from the Studio Ghibli API. The studio Ghibli API lists the cat characters under “species”, and then for some reason, under “people” so it took a bit of finagling to get that part right. I used HTTParty to access the specific end point I needed.</p><p>The main job of the Cat class is to create a “cat” object for all all the specific instances of “cat” in the API. I assigned them instance variables of @name, @gender, @age, @eye color, @hair color, and @films. I also created methods to find a cat by name, print the details of each cat, and assign famous quotes to each cat.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*vf3XyJQ0UU27iGXTjwMsug.jpeg" /><figcaption>inlovewithjapan.tumblr.com</figcaption></figure><p><strong>The CLI Controller:</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e7cc25d229880967239482a67ff8b37d/href">https://medium.com/media/e7cc25d229880967239482a67ff8b37d/href</a></iframe><p>The CLI controller is where I defined what options a user interacting with the app will have. I wanted the user to be able to select from a list of options so I used TTYPrompt to enable this functionality. I essentially created a loop where you can enter the app and then exit the app based on what options you select.</p><p>Lastly, the Quotes class is where I simply assigned specific quotes, located in the seeds folder, to specific instances of each cat.</p><p>This app was tons of fun to create and I hope you enjoy it as much as I do. To view the code and download Cats of Studio Ghibli please visit <a href="https://github.com/kristinponsonby/cats-of-studio-ghibli">https://github.com/kristinponsonby/cats-of-studio-ghibli</a></p><p>Thanks for stopping by!</p><p>-K</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a27ddb2f5115" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why I Became A Software Engineer]]></title>
            <link>https://kponsonberry.medium.com/why-i-became-a-software-engineer-180050856951?source=rss-de289e15059e------2</link>
            <guid isPermaLink="false">https://medium.com/p/180050856951</guid>
            <dc:creator><![CDATA[Kristin Ponsonby]]></dc:creator>
            <pubDate>Sun, 14 Feb 2021 20:28:40 GMT</pubDate>
            <atom:updated>2021-02-14T20:28:40.368Z</atom:updated>
            <content:encoded><![CDATA[<p>Throughout my 20’s and into my 30’s, there has been one and only one constant: change. My 20’s were tumultuous, to say the least. When I graduated college in Texas, I moved to Tennessee, on a whim, because I was looking for an adventure. I lived in both Nashville and Knoxville and met lots of wonderful friends and had tons of amazing experiences.</p><p>In Knoxville, I opened a small business as a custom cake designer under the name Milk + Honey. That business was my baby and I gave it everything I had, but unfortunately it was not financially successful and I had to find a more stable career path. I LOVED the creativity of the baking world and the freedom I had as a small business owner. I did not love struggling to make ends meet and never knowing if i’d make enough money to pay off my student loan debt. I’ve also always had a passion for education so next I found myself working as an assistant teacher at a Montessori school. I learned so much and loved that role, but unfortunately I ran into the same problem once again. It was not and never would be a financially lucrative job. So again, I had to choose money and stability over a job I loved.</p><p>Next I found myself stumbling into the world of digital marketing. I had a friend at a marketing firm that knew I was looking for my next career move, so he offered me a position. This was my first experience in a tech/digital company. I worked as a social media manager and digital marketer. I learned a lot about SEO, some very basic HTML and CSS as well as the basics of web design. I loved the culture of tech. I worked remotely, we had core working hours, but I was ultimately trusted and empowered to do my job well. About a year into this role, the company wasn’t doing great and I was unfortunately laid off. So back to the job hunt I went.</p><p>Next came real estate. My childhood best friend is a Realtor in Texas and she seemed to be having a lot of financial success, had the ability to travel all over the world, and seemed to have a lot of freedom. All of these things we’re really attractive to me, and I didn’t feel like I had a lot to loose so I decided to give it a try. Look, I know tons of realtors that are VERY successful, but if I’m being totally honest those were the hardest 2 and 1/2 years of my life and I have never been so broke. This was the first time I chased the money instead of the job itself. Sales simply is not for me. There is no stereotype of sales that I fit into. In fact you could probably argue my personality is the exact opposite of what a successful agent typically possess.(It’s actually funny now.)</p><p>So, that’s a super abridged version of the last 10 years of my life. Cut to the present. I, once again, found myself looking for what was next. I knew the real estate life wasn’t sustainable for me and I was going to have to figure something else out. I was beginning to feel like a modern day Goldilocks. So I took some time to do some serious self-inventory of what I truly want out of life and a career. Turns out, it’s a pretty short list. I want to travel and have tons of amazing experiences. I want to see my friends and family in other cities and states more often. I want to have work that is challenging, engaging, and can offer benefits, healthcare, and paid time off. And that’s when I discovered the world of tech, specifically, software engineering.</p><p>I started researching software engineering as a career and became totally fascinated. It seemed to check a lot of boxes, but I honestly wasn’t sure if I could learn to program and become a developer. I had little to no experience programming. But if I’ve proven anything to myself, it’s that I will never say no to a challenge. I’m not afraid to try new things. I felt like I FINALLY found a career path that ticked all the boxes and that I was truly excited about. In the past, I’ve chosen jobs for EITHER the money or the love of the work, but I had never found a job where I could have both. I started to think that job didn’t exist for me. I am so happy I discovered this career path. My only regret is that I didn’t pursue it sooner in my life.</p><p>I am so excited to dive head first into this crazy, challenging, and rewarding field. I became a software engineer because I never settled for something that wasn’t right for me. I am reminded of one of my favorite lines from the, “The Year of Magical Thinking” by Joan Didion:</p><p>“We were not having any fun, he had recently begun pointing out. I would take exception (didn’t we do this, didn’t we do that) but I had also known what he meant. He meant doing things not because we were expected to do them or had always done them or should do them but because we wanted to do them. He meant wanting. He meant living.”</p><p>I am a firm believer in having fun, and to never stop chasing your joy until you find it. Goldilocks found her joy in just three tries. It took me closer to 10. But I’m so glad I never gave up on myself. And I’m so excited to jump into this crazy challenging amazing world of software engineering.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=180050856951" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>