<?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 Paul Rogers on Medium]]></title>
        <description><![CDATA[Stories by Paul Rogers on Medium]]></description>
        <link>https://medium.com/@paulrogers_17239?source=rss-f18f8dde2912------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Zz0GAyZMyoYq7Nmu</url>
            <title>Stories by Paul Rogers on Medium</title>
            <link>https://medium.com/@paulrogers_17239?source=rss-f18f8dde2912------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 04:48:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@paulrogers_17239/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[Refactoring can be a disaster]]></title>
            <link>https://medium.com/@paulrogers_17239/refactoring-can-be-a-disaster-40ea705bb8b8?source=rss-f18f8dde2912------2</link>
            <guid isPermaLink="false">https://medium.com/p/40ea705bb8b8</guid>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Paul Rogers]]></dc:creator>
            <pubDate>Mon, 11 Feb 2019 23:11:46 GMT</pubDate>
            <atom:updated>2019-03-15T23:34:03.425Z</atom:updated>
            <content:encoded><![CDATA[<p>From time to time you may think “I should clean my file structure up…” or “I can do this better”. Maybe organize it correctly so that my client and server will start with the same command. This was the advice we got on our last project. It was good, sound advice for better, cleaner, code and we followed it. Redoing that took pretty much the whole day on the day before the project was due. In retrospect we should have created a new repo and left the one were were currently working in as a fall back in case things went badly with the new one. Of course hindsight is 20/20 and we were in class to learn and that we did.</p><p>Planning is key in every project and we should have stepped back when we 1st considered this and asked what our backup/ recovery plan was but painful lessons are usually the ones best remembered.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40ea705bb8b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Making your code look like code]]></title>
            <link>https://medium.com/@paulrogers_17239/making-your-code-look-like-code-c864c3fd9c33?source=rss-f18f8dde2912------2</link>
            <guid isPermaLink="false">https://medium.com/p/c864c3fd9c33</guid>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Paul Rogers]]></dc:creator>
            <pubDate>Wed, 16 Jan 2019 23:24:02 GMT</pubDate>
            <atom:updated>2019-01-17T00:15:57.357Z</atom:updated>
            <content:encoded><![CDATA[<p>On a recent assignment we created an application called <a href="https://codex-code-snippet-manager.herokuapp.com/">Codex</a> which allows users to store and categorize code snippets. We worked hard on the core elements; logic, page rendering, styling, etc. but it looked a little flat until we included functionality which makes your code look like code as you see it in your code editor (for me Visual Studio).</p><p>To get this to happen we used Highlight.js. To do this is simply a matter of including the following code (we used Handlebars so this was in our main.handlebars file):</p><p>&lt;link rel=”stylesheet” href=”//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/styles/atom-one-dark.min.css”&gt;</p><p>&lt;script src=”//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js”&gt;&lt;/script&gt;</p><p>&lt;script&gt;hljs.initHighlightingOnLoad();&lt;/script&gt;</p><p>See how annoying this is without syntax highlighting? It should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*0yqXZ-2KKvpuXQ4ydajV8g.png" /></figure><p>You then need to wrap any element you want styled this way in tags i.e.&lt;pre&gt;&lt;code&gt; ”text”&lt;/pre&gt;&lt;code&gt;.</p><p>In the stylesheet url “atom-one-dark” is our chosen font — there are many available on h<a href="https://highlightjs.org/">ttps://highlightjs.org/</a>.</p><p>Since our app uses Jquery to dynamically append this content via an event listener and the function we use above gets called on page load we additionally had to call the below from within our function which appended the text:</p><p>$(“pre code”).each(function (i, e) { hljs.highlightBlock(e)});</p><p>or to put it better:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/1*rXEyR850iS9a1qW175sPjA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c864c3fd9c33" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I’m not sure I git this]]></title>
            <link>https://medium.com/@paulrogers_17239/im-not-sure-i-git-this-4b70d72cb7bd?source=rss-f18f8dde2912------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b70d72cb7bd</guid>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Paul Rogers]]></dc:creator>
            <pubDate>Wed, 05 Dec 2018 23:57:38 GMT</pubDate>
            <atom:updated>2018-12-06T05:52:43.855Z</atom:updated>
            <content:encoded><![CDATA[<p>Going into our first team project I thought we would struggle, perhaps wallow, in a variety of deep, esoteric JavaScript algorithms or spend countless hours poring over API developer’s manuals. Thus it was a surprise (though it should not have been) that Github turned out to be our true nemesis. I say it should not have been a surprise because I have managed to wind my way into seemingly inextricable dead ends when I was using Github for homework assignments by myself. This was before the complications that arise from multiple people accessing files, pushing or pulling from individual branches and the need for resolving conflicts in code.</p><p>But though Github doesn’t require the same type of study or even mental capacity as learning a software language, in practice it seems less forgiving. If you make a mistake in JavaScript you open up the console, find the offending line of code, google it and fix it. If you feel like moving on for the time being then you just comment it out and work on the next piece until you’re ready to come back to that challenge. In Github if you run into a problem you are, to put it politely, hosed.</p><p>The resolution to these issues can be effectively googled sometimes but usually the sole remedies are marching to the back of class to solicit a TA rescue or the dreaded -f (forcing whatever it is you are tying to do). The fact that a good number of the solutions found via google end up with a -f is both comforting and troublesome. Comforting in that you are not alone in your tribulations and troublesome for the same reason the ctrl/alt/del is troublesome in Windows. Every PC user knows this key combination by heart because there’s a lot of broken stuff in there.</p><p>I imagine it will be easier next time as we’ve learned a thing or two. Mainly though, because we’ve felt the pain, we’ll just be that more careful to get it right the first time.</p><p>This is my first blog post so be sure to check out future terrible puns like “Don’t look a git horse in the mouth” — this in reference to the fact that Github is a free, open-source platform so I’m grateful for it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b70d72cb7bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>