<?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 Peter Dominick Fontana, Jr. on Medium]]></title>
        <description><![CDATA[Stories by Peter Dominick Fontana, Jr. on Medium]]></description>
        <link>https://medium.com/@peterdominickfontanajr?source=rss-1219d85e4cee------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*OSPJucjnldIooP8CZ5iMoA@2x.jpeg</url>
            <title>Stories by Peter Dominick Fontana, Jr. on Medium</title>
            <link>https://medium.com/@peterdominickfontanajr?source=rss-1219d85e4cee------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 10:40:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@peterdominickfontanajr/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[Ranking the Code Languages/Frameworks I’ve Learned]]></title>
            <link>https://medium.com/@peterdominickfontanajr/ranking-the-code-languages-frameworks-ive-learned-852d816374e8?source=rss-1219d85e4cee------2</link>
            <guid isPermaLink="false">https://medium.com/p/852d816374e8</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[flatiron-school]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Peter Dominick Fontana, Jr.]]></dc:creator>
            <pubDate>Mon, 13 Dec 2021 10:25:45 GMT</pubDate>
            <atom:updated>2021-12-13T10:26:20.613Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/620/0*6SJvgqDMbshRtb4Z" /></figure><p>I’m nearing the end of my time at Flatiron School, where I’ve been learning Software Engineering for the past few months. In this blog I’ll be taking the opportunity to talk about what languages/frameworks I’ve learned and ranking those things based on personal preference and also how much I think they’ll be useful going forward. I’ll be ranking them from worst to best.</p><p><strong><em>6. Plain Old JavaScript</em></strong></p><p>Coming in at dead last is regular JavaScript. Now, technically speaking, I think this was maybe the most important thing that we learned about, as it set a very important groundwork for learning how to code and how to learn new code languages. However, it is extremely verbose and unwieldy. I hope that I never have to work with it again. And I don’t imagine there are many modern projects that would use plain old JavaScript, and would instead opt to use something more friendly, like React for example.</p><p><strong><em>5. Ruby</em></strong></p><p>In some ways I view Ruby and its framework, Rails, as pretty much tied. To me it felt like Rails just reorganized the things I was doing in Ruby. However, I’ll have to give the edge to Rails because overall it’s easier to use. But I want to point out that the gap between this and P.O. JavaScript is very large. I can tell that Ruby was made by someone who was tired of writing lots of code to do simple things. And I appreciate that work! See one of my <a href="https://medium.com/@peterdominickfontanajr/syntactic-sugar-spice-and-everything-nice-98dcc5f5c326">previous blogs</a> about Ruby’s “syntactic sugar”.</p><p><strong><em>4. (Ruby on) Rails</em></strong></p><p>Obviously, I think frameworks have an advantage over their “vanilla” languages underneath. However, to me this is mostly a technicality as I think Ruby by itself is great, but I don’t really see a reason not to use the Rails framework. So much busywork can be cut out by taking advantage of what Rails can do. This might seem fairly low on the list, but at the end of the day working with Ruby/Rails is like making invisible roads for invisible cars. It’s super important but hard to appreciate what has been done without a good frontend.</p><p><strong><em>3. HTML</em></strong></p><p>We didn’t spend that much time with HTML itself, except that it is heavily involved in React code, but I think HTML is very easy to use and intuitive. Which is also why I like writing in React! And at the end of the day, all you need is an HTML file to have a web page.</p><p><strong><em>2. CSS</em></strong></p><p>I know that some people have a troubled relationship with CSS, but to me this is probably the most fun I have when I’m making an app. It turns my boring, all-business site into a beautiful place that you want to be at. Realistically, it can’t take the top spot though because it’s so reliant on an underlying functional app. Make your site as pretty as you want, if it doesn’t work no one will care.</p><p><strong><em>1.</em></strong> <strong><em>React</em></strong></p><p>From worst to first. React completely transforms JavaScript into something that is easy to use and totally freeing in what is possible. It takes a minute to get used to the way React apps are organized, but besides that I don’t think I can ever look back to regular JS. The way that React uses HTML as a baseline to make coding your apps simple and intuitive is genius, in my opinion. React, for me, is a perfect representation of the power programmers have to create something from nothing.</p><p>These are, of course, all just my opinions. For the new coder or software engineer out there, I hope this might serve as a guide to check out some languages/frameworks or even just get you thinking about what languages/frameworks you know and what you like and dislike about them.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=852d816374e8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Syntactic Sugar, Spice, and Everything Nice]]></title>
            <link>https://medium.com/@peterdominickfontanajr/syntactic-sugar-spice-and-everything-nice-98dcc5f5c326?source=rss-1219d85e4cee------2</link>
            <guid isPermaLink="false">https://medium.com/p/98dcc5f5c326</guid>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[flatiron-school]]></category>
            <dc:creator><![CDATA[Peter Dominick Fontana, Jr.]]></dc:creator>
            <pubDate>Wed, 17 Nov 2021 18:21:25 GMT</pubDate>
            <atom:updated>2021-11-17T18:21:25.453Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*ZStXLtHtocGo_riT9o5HRg.gif" /></figure><p>Over the past couple of weeks I have been learning Ruby, a programming language that is mostly used for backend server logic. In the past few days, I have returned to React/JavaScript, which is mostly a frontend language. In that return, I have come to — even more than I already had — appreciate Ruby’s simple wording and “syntactic sugar”.</p><p>React is, of course, heavy on syntactic sugar. And it’s much preferable to writing plain ole JavaScript. But Ruby is on another level of simple, easy to understand, easy to write syntax. Let’s look at a very simple example of where Ruby drops a lot of the “formalities” and lets you just write the dang code.</p><pre>function sayHello() {<br>     console.log(&quot;Hello&quot;)<br>}</pre><p>Here is a very simple function that simply prints “Hello” into the console. Let;s do the same thing in a Ruby method:</p><pre>def sayHello<br>     puts &quot;Hello&quot;<br>end</pre><p>Now, maybe this isn’t the best example, seeing as how both of these are very short — but you can already see that the Ruby code is simpler. In JS/React there is a lot of time spent on making sure that parentheses and brackets and so on and so forth are in the right place, and even when they seem like they may not be needed, they have to be there. Ruby does so much heavy lifting in its syntactic sugar to allow you to just type and go and not have to worry about all these symbols and separators. Now extrapolate this example to nearly every line and every facet of the code and you can start to imagine the benefits in larger apps.</p><p>Now, obviously JS/React is always going to be a bit more code, but that makes it all the more noticeable that it’s more “verbose”.</p><p>I don’t actually have anything else to say about this — I don’t have a tutorial on how to do something interesting here, I just felt the need to put it out there that I appreciate the work that is done to make this stuff easier to write. Sometimes when I’m working with JS/React I will get daunted by the amount of writing I’m going to have to do in order to make something work. In Ruby I can spend less time worrying about how much I’m going to write and instead can solely think about how I’m going to get something to work.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98dcc5f5c326" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s Make a Cool Button (in React)]]></title>
            <link>https://medium.com/@peterdominickfontanajr/lets-make-a-cool-button-in-react-8fcf3aeaed6c?source=rss-1219d85e4cee------2</link>
            <guid isPermaLink="false">https://medium.com/p/8fcf3aeaed6c</guid>
            <category><![CDATA[css]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[flatiron-school]]></category>
            <dc:creator><![CDATA[Peter Dominick Fontana, Jr.]]></dc:creator>
            <pubDate>Wed, 27 Oct 2021 15:35:34 GMT</pubDate>
            <atom:updated>2021-10-28T15:32:34.698Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/560/0*x4XUjiOJamx-xw98.png" /></figure><p>In this blog I wanted to take a look at a button I made just recently, and walk through the process to get it to the final product, which I feel pretty happy with.</p><p>Let’s start with a look at the final product:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/164/1*diamKptUWspt1GV33bCw0A.gif" /></figure><p>Pretty neat, huh? It’s not mind-blowing but as an amateur coder who’s only been doing this for 5 or 6 weeks I feel pretty good about it.</p><p>Now let’s look at the code (written in React JSX):</p><pre>&lt;p</pre><pre>     className=&quot;bookshelfButton&quot;</pre><pre>     title={clicked <br>           <br>            ? <br>                 &quot;Remove from Bookshelf&quot; <br>            : <br>                 &quot;Add to Bookshelf&quot;<br>            } <br>     <br>     onClick={() =&gt; {setClicked(!clicked); handleClick(book)}}</pre><pre>&gt;</pre><pre>     {clicked <br>     <br>     ? <br>          &lt;img className=&quot;icon&quot; src={bookIcon} <br>          onMouseOver={() =&gt; setBookIcon(bookRemove)} <br>          onMouseOut={() =&gt; setBookIcon(bookAdded)} <br>          /&gt;</pre><pre>     :</pre><pre>          &lt;img className=&quot;icon&quot; src={bookAdd} /&gt;<br>     }</pre><pre>&lt;/p&gt;</pre><p>Let’s dive deep into everything that’s going on here (I reformatted the code to hopefully make it easier to read here on Medium).</p><p>First up let’s talk about the &lt;p&gt; tag that it’s wrapped around in. You could probably refactor this &lt;p&gt; out, but I think it makes it easier for logic that I want to apply to any image that might appear inside of the &lt;p&gt; tag. In this example I’m using conditional logic to display one &lt;img&gt; tag or the other — if I didn’t have the &lt;p&gt; I’d have to reapply logic to each individually.</p><p>Looking even closer we see that I have a “title” property with a conditional value. I created the state “clicked” as a boolean, when I click the icon it flips it to either true or false. In this case it changes what message is displayed when hovering on the button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/166/1*680wJwXTPHwHoc0qiDw3rQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/198/1*Efkk3xxb33PXVjinfa3jYw.png" /></figure><p>Before it has been clicked, we see the message “Add to Bookshelf” (the button’s purpose is to add or remove books from your “bookshelf”) and after you click it, it changes to “Remove from Bookshelf”.</p><p>As you can see on the very next line is the onClick event that handles setting the new “clicked” state as well as the function that handles actually adding or removing the selected book from your bookshelf (which I won’t be getting into).</p><p>Now here’s where it gets good: inside the &lt;p&gt; tag. Here’s the code that’s just inside the tag:</p><pre>{clicked </pre><pre>? <br>     &lt;img className=&quot;icon&quot; src={bookIcon} <br>     onMouseOver={() =&gt; setBookIcon(bookRemove)} <br>     onMouseOut={() =&gt; setBookIcon(bookAdded)} <br>     /&gt;</pre><pre>:</pre><pre>     &lt;img className=&quot;icon&quot; src={bookAdd} /&gt;<br>}</pre><p>It’s another conditional rendering, again using the “clicked” state to determine what to render. Let’s start with the false condition. By default books are not on your bookshelf (in the book object the bookshelf key’s value is set to false by default). So, as you load the page for the first time (assuming no one has updated the database beforehand) all books should display the false condition, which is the “bookAdd” icon. Nothing too crazy here, although there is some styling added using the “icon” class, which I will show soon.</p><p>In the truth condition, a bit more of a complex set of things are happening. For the “src” property I have actually set it to a state. The default state is the “bookAdded” icon, which is the version with the checkmark. However, I have added an onMouseOver event listener that sets the “bookIcon” state to a different icon, the “bookRemove” icon, which is the version with the crossout symbol on it, whenever you mouse over the icon. I have also set up an onMouseOut event listener, which will switch the “bookIcon” state back to the “bookAdded” icon when your mouse leaves the icon.</p><p>A note to make here is that if you are using emojis, some or most of this code is not necessary, and pretty much all of this functionality can be done using CSS only. But when I decided to look for outside sourced icons, which turned out to be PNGs, I had to find this solution.</p><p>Now, let’s take a quick look at the CSS styling:</p><pre>.bookshelfButton:hover {</pre><pre>     cursor: pointer;</pre><pre>}<br></pre><pre>.icon {</pre><pre>     position: absolute;</pre><pre>     transform: scale(0.1);</pre><pre>     top: -210px;</pre><pre>     bottom: 325px;</pre><pre>     left: 90px;</pre><pre>     right: -220px;</pre><pre>}<br></pre><pre>.icon:hover {</pre><pre>     transition: all .1s ease-in-out;</pre><pre>     transform: scale(0.12);</pre><pre>}</pre><p>I’ll point out immediately that putting the “cursor: pointer” property on the &lt;p&gt; tag is not necessary, but through all my code iterations that property ended up being attached to the &lt;p&gt; tag, and I haven’t bothered to refactor. In case it isn’t obvious, this CSS makes it so that when you hover over the icon it changes your cursor from the default arrow to the finger pointer, which seems pretty standard across the web.</p><p>Quickly I’ll go over what’s happening with the “icon” CSS. First, I have CSS that positions the icon in a particular spot (I won’t go super deep into the “position” property for now, as it is a bit of a complicated subject). I have it set to the top right position of each book “card” on the page. I also have the transform property making the icon a usable size. As you can see, without the transform property making it 0.1 scale, it would be enormous on the page.</p><p>Next, using the hover subclass, I have the icon set to transform to be slightly bigger when hovering over it. I have set up a transition property to set how long and what type of transitioning animation will occur, in this case it will take .1 seconds to transition and it’s the ease-in-out style, which makes the animation smoother.</p><p>Here’s one last look at the finished product:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/164/1*diamKptUWspt1GV33bCw0A.gif" /></figure><p>I hope that this blog might help someone out there to make their own cool little button, and further iterate and even make a better one!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8fcf3aeaed6c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CSS: Coding is Creation]]></title>
            <link>https://medium.com/@peterdominickfontanajr/css-coding-is-creation-b098c6e176eb?source=rss-1219d85e4cee------2</link>
            <guid isPermaLink="false">https://medium.com/p/b098c6e176eb</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[codingbootcamp]]></category>
            <dc:creator><![CDATA[Peter Dominick Fontana, Jr.]]></dc:creator>
            <pubDate>Wed, 06 Oct 2021 03:48:41 GMT</pubDate>
            <atom:updated>2021-10-06T03:48:41.544Z</atom:updated>
            <content:encoded><![CDATA[<p>As a new software engineering student, everything I’m being introduced to creates a certain amount of wonder and bewilderment. Sometimes when you raise the curtain on something it loses its magic, but when it comes to coding I think it’s a rare case where it still feels pretty magical — I’m just somewhat of a wizard now. I’m learning the incantations that summon a webpage.</p><p>Not every line of code is exciting or magical — HTML documentation in particular is pretty straightforward. Javascript has some amount of magical feeling to it, but ultimately JS is all about making the thing work. It doesn’t feel like magic until it works, and by that time you may have thought your way out of that magic feeling. But CSS (cascading style sheet) really does feel like you’re wielding a great power that allows you to make imagination into reality.</p><p>I mean, the difference is astounding. Let’s take a look at a little app I made as part of a one day class I had taken:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/1*IFVQV1NAsszsoBC5CcE04A.png" /></figure><p>This is how the app looks with CSS styling applied. It’s not mind blowing but I think it looks pretty appealing with a nice cool color palette and some nice styling on the input boxes and buttons. Now let’s take a look at how it looks with no CSS styling:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*37mYw-ebDeei9IFnYJzf5w.png" /></figure><p>It’s functional but it doesn’t invite you in. It doesn’t feel like a place you want to be. The power of CSS is creating that place people want to be and want to look at.</p><p>Let’s take a close look at just the code that defines how the input fields are displayed on my little app:</p><pre>input {</pre><pre>display: block;</pre><pre>margin: 10px auto;</pre><pre>width: 200px;</pre><pre>height: 20px;</pre><pre>border-radius: 4px;</pre><pre>border: 1px solid lightgray;</pre><pre>font-family: &#39;Segoe UI&#39;, Tahoma, sans-serif;</pre><pre>font-size: 1em;</pre><pre>padding: 10px;</pre><pre>}</pre><p>At a glance it might seem like a lot — but when you dig in it’s not all that hard to grasp. Let’s go one by one:</p><p>display: block — this is code that describes what type of thing this should be displayed as, in this case we’ve selected “block”, which w3schools describes with “Displays an element as a block element (like &lt;p&gt;). It starts on a new line, and takes up the whole width”. This essentially decides default display settings and in some cases allows/disallows certain other CSS properties to be used.</p><p>margin: 10px auto; — the margin property describes how much space is created around a certain element. In this case there are two values, which is important to how it is implemented. With two values, the first value applies to both the top and bottom of the element and the second value applies to the left and right sides. In this example, the top and bottom have a margin of 10 pixels, and the left and right margins are automatically created, filling out the container it’s in.</p><p>width: 200px — this one is pretty straightforward. It specifies the width of the input box. In this case it is 200 pixels wide.</p><p>height: 20px — another straightforward piece of code. The input box is 20 pixels tall.</p><p>border-radius: 4px — this is cool. This is creating those curved edges you see instead of the default sharp corners. The value determines the radius of the curve on the corners. This CSS property can also take multiple values, like margin. It allows you to have asymmetrical rounded corners on your element.</p><p>border: 1px solid lightgray — this property is doing a lot of work. In many cases it would create a border around the element, in this case it is modifying the default border around the input box. Going from left to right, the first value, 1px, is specifying that the border should be 1 pixel wide. Higher numbers will create thicker lines. Then, solid is specifying the way the border line actually looks. You could also do something like dotted to make a dotted line instead of just a normal solid line. Finally, lightgray is specifying the color of the border.</p><p>font-family: &#39;Segoe UI&#39;, Tahoma, sans-serif — this is a fairly simple property that just specifies the font that should be used for the text inside of the element. You might notice there are 3 fonts listed here. This is a failsafe, so that if for some reason the first or second font are unavailable it will use the third. If in some strange circumstance all of your specified fonts are not available it would still display the text in some default font.</p><p>font-size: 1em — this property just specifies how large the font will display as. In this case, em is a relative unit, which means that it is dependent on some other value. 1em essentially just means 1 times the size of the current font.</p><p>padding: 10px — this property is specifying how much space there should be around the text inside the input box. This means that there is at least 10 pixels of space between the text and the border of the box. This is another property that can take multiple values, letting you choose how much space there is on all four sides of the content inside of your element.</p><p>As you can see, it may seem a little daunting at first, but once you get to know each property, the ideas and implementations can really start flying. The sky is the limit with CSS, and the options are so incredibly robust. This is a fairly simple implementation of CSS but it does so much already to make the user experience on your web page so much better.</p><p>To wrap this up, I think my main point is that CSS really is the part of the process for me where it feels like the whole thing is coming together. And when it feels like it’s coming together, it really feels like I’ve created something totally new out of thin air. That feeling is super cool and something that attracts me to coding in general.</p><p>If you’re struggling with your CSS code I highly recommend you use w3schools vast list of reference material, which I used occasionally to write this blog.</p><p><a href="https://www.w3schools.com/cssref/default.asp">CSS Reference (w3schools.com)</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b098c6e176eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>