<?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 Thomas Reggi on Medium]]></title>
        <description><![CDATA[Stories by Thomas Reggi on Medium]]></description>
        <link>https://medium.com/@thomasreggi?source=rss-f9c0acbfa46c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*BBN3-6r-yz2xI1zYNt_YEw.jpeg</url>
            <title>Stories by Thomas Reggi on Medium</title>
            <link>https://medium.com/@thomasreggi?source=rss-f9c0acbfa46c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 15:32:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@thomasreggi/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[Yarn Plug’n’Play]]></title>
            <link>https://medium.com/@thomasreggi/yarn-plugn-play-1c398bf3e417?source=rss-f9c0acbfa46c------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c398bf3e417</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[yarn]]></category>
            <category><![CDATA[modules]]></category>
            <category><![CDATA[dependencies]]></category>
            <dc:creator><![CDATA[Thomas Reggi]]></dc:creator>
            <pubDate>Thu, 13 Sep 2018 13:59:51 GMT</pubDate>
            <atom:updated>2018-09-13T13:59:51.165Z</atom:updated>
            <content:encoded><![CDATA[<p>The way that Node.js installs and handles dependencies has been messy since the start. Today a PR by <a href="https://github.com/yarnpkg/rfcs/pull/101">arcanis</a> hopes to change the way that dependencies are installed and the way that node interacts with them.</p><ul><li><a href="https://github.com/yarnpkg/rfcs/pull/101">The PR</a></li><li><a href="https://github.com/yarnpkg/rfcs/files/2378943/Plugnplay.pdf">The Whitepaper</a></li><li><a href="https://news.ycombinator.com/item?id=17977698&amp;ref=hvper.com&amp;utm_source=hvper.com&amp;utm_medium=website">Hacker News Discussion</a></li></ul><p>The gist of the change from what I understand so far is this feature will A) cache all installed modules on the disk and while doing so create a table of where those modules exist, and b) inject a overrides of Module._load .</p><blockquote>If loaded as a preloaded module (node -r ./.pnp.js), it will inject it- self into the Node environment and will transparently cause the require function to load files directly from the right location. The current implementation overrides Module._load, but Node 10 recently released a new API that we plan to use to register into the resolver.</blockquote><p>That’s it.</p><p>With this comes a couple of issues when it comes to postinstall scripts and build processes in general. This generally slows down dependency installs and is a <a href="https://www.google.com/search?q=node-sass+postinstall+node+scripts%2Fbuild.js&amp;rlz=1C5CHFA_enUS813US813&amp;oq=node-sass+postinstall&amp;aqs=chrome.0.0j69i57j0l2.4833j0j1&amp;sourceid=chrome&amp;ie=UTF-8">big bottleneck for installs</a>. One of the proposed solutions here is WebAssembly.</p><blockquote>On the long term we believe that post-install scripts are a problem by themselves (they still need an install step, and can lead to security issues), and we would suggest relying less on this feature in the future, possibly even deprecating it in the long term. While native modules have their usefulness, WebAssembly is becoming a more and more serious candidate for a portable bytecode as the months pass.</blockquote><p>On the whole this doesn’t change much. This idea plays off of the notion that there should only be one version of a module installed on your machine at a time, an idea that <a href="https://pnpm.js.org/">pnp.js</a> has been propagating.</p><p>I’m excited about this idea, and I think that this is a big step in the right direction when it comes to innovating how dependencies are installed and managed. Interested in how this is going to aid in helping <a href="https://github.com/denoland/deno">deno</a>, by simplifying how modules are handled.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c398bf3e417" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Modularity and the Monorepo: Sustainable JavaScript though Composition]]></title>
            <link>https://medium.com/@thomasreggi/modularity-and-the-monorepo-sustainable-javascript-though-composition-a8305b0a8e96?source=rss-f9c0acbfa46c------2</link>
            <guid isPermaLink="false">https://medium.com/p/a8305b0a8e96</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[modular]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[monorepo]]></category>
            <dc:creator><![CDATA[Thomas Reggi]]></dc:creator>
            <pubDate>Fri, 10 Aug 2018 14:09:38 GMT</pubDate>
            <atom:updated>2018-08-10T14:28:56.657Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*to5jc59ABdI0YAcNweLR4g.jpeg" /><figcaption>The AnythingBox (Thomas Reggi) with a NPM sticker and JS sticker (Chris Williams) at Brooklyn Habit.</figcaption></figure><p>Standing on the shoulders of the <a href="https://en.wikipedia.org/wiki/Unix_philosophy">Unix Philosophy</a> and <a href="https://github.com/sindresorhus/ama/issues/10#issuecomment-117766328">influential node developers</a> like sindresorhus, I struggle immensely with the practice of composing software in sustainable individual chunks.</p><p>I’ve been writing JavaScript and been apart of the <a href="https://stackoverflow.com/questions/11708598/wrapping-an-async-function-and-maintain-async">Node.js ecosystem for over 6 years</a> and I’ve always loved how easy it is to build code using existing libraries using NPM. I’ve written a lot of code, <a href="https://github.com/reggi?tab=repositories">some I’ve open sourced</a>, some I’ve written for <a href="https://www.americanexpress.com/us/credit-cards/view-all-personal-cards/">large companies</a> and <a href="https://www.holstee.com/">some for small</a>. A large majority of code I’ve used has gone into the ether, the vast digital graveyard of dead, useless, untested code, full of half-baked ideas.</p><p>However there’s a small chunk, the diamonds in the rough, the code that I reuse over and over again. This code is locked away in projects, and often I find myself about to write a piece of code and some moments into opening the function I get a wave of déjà vu, I’ve already written this before, or something very close to it. Then the pursuit, the attempt to try and find that code, identify it, and eventually <strong>copy and paste</strong>, clean up, and write tests for again. This all assuming I didn’t write it for a private company, right?</p><h3>Working with Monorepos</h3><p>Ok, so you want to reuse code, I get it already. What’s the solution to all this? There’s only one at the moment, Monorepos using Lerna or Yarn workspaces. The idea is put everything on NPM, break every function out into a module.</p><p>One of my most popular repositories is a <a href="https://github.com/reggi/lerna-tutorial">lerna tutorial</a> I put together a couple of years back. There is obviously a strong desire to organize and publish modular code.</p><p><a href="https://github.com/reggi/abide">I have been working with my own Monorepo called <strong>Abide</strong>, (which I just made public)</a> for a couple of months now and It’s been a bit of a pain. Most of the modules in my Monorepo are CLI tools to help build and validate a Monorepo. Right now my Monorepo has 13 build steps in my Jenkins Pipeline to attempt to reliably make sure I don’t mess everything up accidentally.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yb9bQ_DqOiYDwTIo4U1QSw.png" /><figcaption>Jenkins Pipeline for a Monorepo.</figcaption></figure><p>It has been a challenging uphill battle building my own Monorepo and breaking each function down to a core reusable idea.</p><h3>Naming modules</h3><p>One thing I’ve done is I’ve come up with a specific naming convention for all my modules.</p><ol><li>Scope the module name (eg. @reggi)</li><li>Identify the goal of the package (eg. pidgeon-holder (no birds were harmed in the use of this example package name))</li><li>Break the functionality down</li></ol><ul><li>pidgeon-holder.cage</li><li>pidgeon-holder.sachel</li><li>pidgeon-holder.clipper</li></ul><p>The first thing that is really important is that all my modules are scoped so my NPM user @reggi is before the module name, which means I can use any package name.</p><p>Then you have to identify the code purpose of the module in question. This will mainly be thin wrapper for all of the sub-package-modules.</p><pre>// This would be the main package &quot;@reggi/pidgeon-holder&quot;<br>const cage = require(&#39;@reggi/pidgeon-holder.cage&#39;)<br>const sachel = require(&#39;@reggi/pidgeon-holder.sachel&#39;)<br>const clipper = require(&#39;@reggi/pidgeon-holder.clipper&#39;)</pre><pre>export default (pidgeon) =&gt; {<br>  const cagedPidgeon = cage(pidgeon)<br>  const baggedPidgeon = sachel(pidgeon)<br>  const clippedPidgeon = clipper(pidgeon)<br>  return {cagedPidgeon, baggedPidgeon, clippedPidgeon}<br>}</pre><p>How naming convention helps things have a clear origin and purpose. Now and forever sachel will be associated with the package it was created for. But the module is reusable and any other package in the future can use it. Perhaps in the future the sachel package may hold it’s own root-level namespace and I can always publish it without the pidgeon-holder part, which is pretty simple to do later on. It is also easy to create a new “sachel” for a different namespace (eg. rabbit-holder) if you ever want to create one that does something similar to this existing sachel.</p><p>This is important, three levels of specificity are really important.</p><p><strong>&lt;org|user&gt;.&lt;project&gt;.&lt;function&gt;</strong></p><p>NPM doesn’t exactly have a way to define a function within a project namespace, so I am doing the best with what I’ve got.</p><h3>Hard Sell</h3><p>Imagine you wanted to write a novel / book, and you were required by the publisher to take each paragraph, name it, classify it and sort it into the <a href="https://en.wikipedia.org/wiki/Dewey_Decimal_Classification">dewey decimal system</a>. That’s what it feels like to write a Monorepo.</p><p>I actually like the metaphor of code being like a library, where each function you write can be stored and reused. I’ve thought about having <a href="https://code.visualstudio.com/">VS Code</a> or <a href="https://atom.io/">Atom</a> plugins that rather then sort files by file name, would support a side bar being a list of function names. I love the idea that all the code I ever write would be organized and accessible, as well as separated between <em>public</em> and <em>private </em>with distinct buckets for different clients, companies, or organizations. I’ve dreamed that it would also be easier for private companies to choose what libraries to open source if it could be as simple as moving it from one folder to another.</p><h3>Teaching and Learning how to write Modular code</h3><p>I’ve come to the realization that writing a Monorepo and organizing my code in this specific modular format is worth the extra time. How can you convince others to do the same? How can you teach these benefits? It seems that there is too high a barrier to teach people new to learning code all of the things i’ve talked about in this article. How do you break these ideas down easier for children to understand? How do you lower the barrier and make it easier to write code the right way?</p><p>The truth is when someone is learning code, it is most satisfying to get direct and instant feedback to make something happen quick. You want to fulfill your objective quickly and like a football player run as fast as you can through the defensive line to the end goal.</p><h3>The Barrier to Entry</h3><p>I believe the challenge in the full JavaScript ecosystem right now is that there are too many options and too many decisions that have to be made. People just starting out and myself included just at this point want to use a system and not have to make any decisions about that system. Right now I want an easy way to make front-end components and spin up a graphql server. I believe that composition, that is, the way that code is written is most important, and that front-end code (react or vue components) and api endpoints (express middleware, or graphql queries and mutations) as well as generic JavaScript functions all should be composed in the same way.</p><h3>Into The Future</h3><p>I believe that while the JavaScript world is fragmented right now, and will be much more after WebAssembly gains more popularity the coding world in general is going to be more and more fragmented, that the thread that can unify all the different flavors doctrines can be the Monorepo. Is there a way Ruby, JavaScript, Go, and Rust can all be maintained in the same way complied down to WASM? Can we have one WASM package manager to rule them all?</p><h3>Open Questions</h3><ul><li>Could it be easier to compose JavaScript into publishable components?</li><li>Is NPM the way to move forward? (Do we need a new decentralized modern package manager of the future?)</li><li>How do we fix the configuration issues and the tangled web of meta data associated with a small module and it’s dependencies?</li><li>Would better CLI tool help? One then guides the user through creating a package?</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a8305b0a8e96" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Meetings Make it Hard to Write Code]]></title>
            <link>https://medium.com/@thomasreggi/how-meetings-make-it-hard-to-write-code-fb6fb662feb7?source=rss-f9c0acbfa46c------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb6fb662feb7</guid>
            <category><![CDATA[meetings]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[Thomas Reggi]]></dc:creator>
            <pubDate>Mon, 30 Jul 2018 15:51:14 GMT</pubDate>
            <atom:updated>2018-07-30T16:02:34.574Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve heard a lot about how there are two types of people, those who’s job it is to produce with a creative means of expression, and those who are more occupied with interacting with people. In the realm of software development this split is characterized by the relationship between people doing the creative work, developers and designers, and everyone else in the company, from managers, to those on the business side of things, marketing, and product.</p><p>The creative individual needs blocks of uninterrupted time. This means no small questions at the, no email checking, no meetings.</p><p>I have been recently doing a bunch of interviews and back to back hour-long meetings have been scheduled for at from 12pm and go until 2pm for multiple days a week. It is seriously hurting my ability to function as a developer.</p><p>I prefer a days of uninterrupted time, and some way of grouping meetings. I personally don’t like attending meetings in which I do not speak, if I don’t need to speak and I have nothing to contribute. I categorize meetings in which participation by a majority of it’s members as an announcement, which should be much less frequent then a meeting.</p><p>What is the main purpose of a meeting for any developer? I would argue it’s transparency and communication. For many of the people running the show coding is a mysterious black box. Stakeholders (the people who are invested in the thing that your developing) need to have some understanding, hand-holding, and expectations to what is being being built and how time is being spent. I would argue that this is possible without lengthy meetings. A developer can’t go into a hole and not communicate the product of work, what their working on, how far along the process is, and how much time it is going to take.</p><h3>The Importance Taking Meaningful Breaks</h3><p>This may sound like a contradiction but I don’t recommend developers to code 8 hours straight. I do think that taking meaningful breaks is important. For one, we need to eat, I don’t think it’s healthy for developers to eat at their desk everyday.</p><p>During long periods of coding I think it is important to get lunch with a co-worker or friend. I think that the nature of creative work means that you isolate yourself from your surroundings and the people around, pouring your full self into a task at hand, fully immersed. The contrast of that state is to simply interact with others around you, taking a break from that state can leave you feeling more refreshed and ready to come back to the task with a fresh breath.</p><h3>Cory Etzkorn on Twitter</h3><p>Spent 3 hours trying to troubleshoot a bug the other day, slept for 8 hours, and solved it in 5 minutes this morning. +1 for sleep.</p><p>Taking a break from what your working on, discussing it with others, brainstorming, or simply doing something else helps me gain insight and understanding to any hard coding problem or task. Sometimes when we go and on we can get lost and make silly decisions and mistakes.</p><p>I used to do a lot of freewriting exercises. I would write continuously without a goal, the rules were simple, I could not stop writing, and there were no wrong things I could write about, typos, grammar, and spelling mistakes were apart of the process. After I was done I had a picture of my thoughts in a linear progression. A lot of it was junk but there was always some gems in the dirt.</p><p>Similarly when I take photographs, I try and take hundreds of photos and end up with one one or two that are really beautiful.</p><p>The same principles can be said for writing code. The initial code you write is a hurdle, it can be messy and not clear exactly what you need, taking the time to write it all down needs to be a meditative concentrated practice where one is liberated and free, then the rough rock can be polished into a sphere ball.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb6fb662feb7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Interviewing a JavaScript developer.]]></title>
            <link>https://medium.com/@thomasreggi/interviewing-candidates-for-javascript-f803deffa5e3?source=rss-f9c0acbfa46c------2</link>
            <guid isPermaLink="false">https://medium.com/p/f803deffa5e3</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[hiring]]></category>
            <category><![CDATA[interview]]></category>
            <dc:creator><![CDATA[Thomas Reggi]]></dc:creator>
            <pubDate>Fri, 27 Jul 2018 16:12:24 GMT</pubDate>
            <atom:updated>2018-07-28T00:10:45.793Z</atom:updated>
            <content:encoded><![CDATA[<p>I’m a Senior Software Engineer at InRhythm, where we like most tech companies do a lot of interviewing, here’s some isights into my process when it comes to interviewing candidates for JavaScript Roles.</p><p>I’ve been on both sides of the table. It offers a glimpse into the wonderful world of coding and really helps you practice empathy during the difficult processes of interviewing and being the interviewee. So whether you’re a new developer looking for their first role, or a veteran conducting the interview there is always something to learn from the process.</p><p>Here’s how I structure the hour. I usually conduct these meetings over the phone and sometimes in person, but the formula is always the same.</p><h3>Their History with Coding</h3><p>The first portion of the interview is really about building a connection with the candidate. Understanding how they started coding, why, and what it means to them.</p><ol><li>Into, “This is Thomas Reggi from InRhythm calling, hey, how’s your day going?”</li><li>Detailing the structure. “So we have an hour I’d like to start off hearing a little bit about yourself and how you ended up here, on this very call with me, and then I’ll give you a little background about myself.”</li><li>Listening is the most important thing, hear their story and find points and places where you can relate.</li></ol><h3>Their Interest in Coding</h3><p>I have three tech lifestyle questions that allow the candidate to share their enthusiasm for what they do, programming.</p><ul><li>What’s your favorite Open Source project? Something on GitHub, something you’ve been interested in studying or learning, something that you think is going to be the next big thing, the direction that the world is going. This ideally is something more than just “react”, ideally it’s something niche, something that shows that they are interested in coding and passionate about the ecosystem of interesting projects that exist in the world.</li><li>What’s your flavor? Favorite babel / es6, es7, es8 feature? Have you messed around with typescript? What new syntax has changed your work flow in recent years?</li><li>Whats your favorite NPM package? Something you can’t life without? Something that you’ve used once in a pinch and really saved you, or something you use in every project. Have you ever published your own NPM package?</li></ul><h3>The Technical Half</h3><p>Around the 20 to 30 minute mark I try to switch gears, and focus more on whatever the job I’m hiring for is, if it’s Node.js, React, Angular, or just general JavaScript. Try to have a “easy” task, something they can achieve within a half an hour that is easy to convey and easy to execute. For this portion of the interview I usually use a tool like <a href="https://jsbin.com/">JSBin</a> so that there’s no setup on the laptop, everything is done in-browser. This can sometimes be a big shift as far as what the candidate is useful, their ability to thrive in different environments than what they are used shows a certain relentless attitude when it comes to coding. If they complain about not being able to split things into files, you there might be a red flag there.</p><h3>The Wrap Up</h3><p>I try to leave some time at the end of the conversation for the candidate to ask any questions about my role directly or the company which I work for. It allows them to round out the edges and understand the interviewer a little bit more.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f803deffa5e3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Environment Variables]]></title>
            <link>https://medium.com/@thomasreggi/environment-variables-80d3fe938555?source=rss-f9c0acbfa46c------2</link>
            <guid isPermaLink="false">https://medium.com/p/80d3fe938555</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[servers]]></category>
            <dc:creator><![CDATA[Thomas Reggi]]></dc:creator>
            <pubDate>Tue, 19 Jun 2018 15:51:30 GMT</pubDate>
            <atom:updated>2018-06-20T14:26:47.786Z</atom:updated>
            <content:encoded><![CDATA[<p>There are two common methods for passing environment variables to an application.</p><p>What are environment variables? Environment variables are variables that are set depending on what your environment is. An environment is typically what “stage” your application is for instance “local”, “development”, “qa”, “staging” and “production” are typical names for different environments. These can all be different independent servers that your application pass through on it’s way to “production” the final stage where the world interacts with your app.</p><p>An environment variable can be anything but typically is sensitive information that you don’t want to check into git, something that you don’t want to hardcode into your app, like a password, url, ip address, api token.</p><p>I’ll be using node.js below but these ideas are universal across programming languages.</p><h3>The “Unix” Method</h3><p>Variables can be set in unix as following:</p><pre>export PORT=&quot;3000&quot;</pre><p>And you can use them in node like this:</p><pre>process.env.PORT</pre><p>So if you run the following:</p><pre>export PORT=&quot;3000&quot;<br>npm run start</pre><p>You’d have an environment variable set at the machine level, outside of your code.</p><p>This allows you to have different variables on a jenkins server or deployed on different machines using a specific variable tailored for it.</p><p>Here’s an example express app that uses the env to make a request the return the json response.</p><pre>import app from &#39;express&#39;</pre><pre>app.get(&#39;/page&#39;, (req, res, next) =&gt; {<br>  return Promise.resolve()<br>    .then(async () =&gt; {<br>      const data = await fetch(process.env.SOME_URL).then(res =&gt; res.json())<br>      res.json(data)<br>    })<br>    .catch(e =&gt; next(e))<br>  <br>})</pre><pre>export default app</pre><p>There are many tools to help load these environment from a given file before the node process is run, one of those that I recommend is called <a href="https://github.com/strongloop/node-foreman">node-foreman</a>.</p><h3>The “Conditional” Method</h3><p>With this method we conditionally use the domain name of the server to have a switch in the code to help understand what the server should respond with.</p><p>Here’s an example express app that uses the hostname to decide which SOME_URL to use.</p><pre>import app from &#39;express&#39;</pre><pre>const decideUrl = (req) =&gt; {<br>  if (req.hostname.match(/dev/)) return &#39;<a href="http://someurl.com/dev&#39;">http://someurl.com/dev&#39;</a><br>  if (req.hostname.match(/prod/)) return &#39;<a href="http://someurl.com/prod&#39;">http://someurl.com/prod&#39;</a><br>  return null<br>}</pre><pre>app.get(&#39;/page&#39;, (req, res, next) =&gt; {<br>  return Promise.resolve()<br>    .then(async () =&gt; {<br>      const data = await fetch(decideUrl(req)).then(res =&gt; res.json())<br>      res.json(data)<br>    })<br>    .catch(e =&gt; next(e))<br>  <br>})</pre><pre>export default app</pre><h3>The “Env-File” method</h3><p>The idea here is that there is a set of NODE_ENV variables, like LOCAL, DEVELOPMENT, STAGING, PRODUCTION. Then in code there is a conditionally loading config file.</p><pre>const LOCAL = &#39;LOCAL&#39;<br>const DEVELOPMENT = &#39;DEVELOPMENT&#39;<br>const STAGING = &#39;STAGING&#39;<br>const PRODUCTION = &#39;PRODUCTION&#39;</pre><pre>function config (env) {<br>  if (env === LOCAL) return require(&#39;./config/LOCAL.json)<br>  if (env === DEVELOPMENT) return require(&#39;./config/DEVELOPMENT.json)<br>  if (env === STAGING) return require(&#39;./config/STAGING.json)<br>  if (env === PRODUCTION) return require(&#39;./config/PRODUCTION.json)<br>  throw new Error(`invalid env variable ${env}`)<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=80d3fe938555" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enforcing Strict CamelCase]]></title>
            <link>https://medium.com/@thomasreggi/enforcing-strict-camelcase-5332c53a7484?source=rss-f9c0acbfa46c------2</link>
            <guid isPermaLink="false">https://medium.com/p/5332c53a7484</guid>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Thomas Reggi]]></dc:creator>
            <pubDate>Mon, 18 Jun 2018 14:29:44 GMT</pubDate>
            <atom:updated>2018-06-18T14:33:12.968Z</atom:updated>
            <content:encoded><![CDATA[<p>As a JavaScript engineer naming variables can always be a headache. We often use camel case to name variables and JSON properties.</p><p>However naming variables with camel case can also be a pain. This normally happens with acronyms, what should this be?</p><pre>XMLHttpRequest</pre><p>Technically XML and HTTP are both acronyms, but putting them together creates an unreadable mess.</p><pre>XMLHTTPRequest</pre><p>My recommendation:</p><pre>xmlHttpRequest </pre><p>And if it’s a class:</p><pre>XmlHttpRequest</pre><p>The idea being that there should never be two capital letters next to each other. Meaning things should look like this:</p><pre>graphqlRequest</pre><p>Not:</p><pre>graphQLRequest</pre><p>Just some ideas on variable naming.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5332c53a7484" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fake News leading to a site Selling Supplements.]]></title>
            <link>https://medium.com/@thomasreggi/fake-news-leading-to-a-site-selling-supplements-19271e264d56?source=rss-f9c0acbfa46c------2</link>
            <guid isPermaLink="false">https://medium.com/p/19271e264d56</guid>
            <category><![CDATA[journalism]]></category>
            <category><![CDATA[supplements]]></category>
            <category><![CDATA[fake-news]]></category>
            <category><![CDATA[news]]></category>
            <category><![CDATA[facebook]]></category>
            <dc:creator><![CDATA[Thomas Reggi]]></dc:creator>
            <pubDate>Mon, 09 Jan 2017 00:23:27 GMT</pubDate>
            <atom:updated>2017-01-09T05:51:45.225Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J2DxbFowiRSxkhlCQaTmYQ.png" /></figure><p>I was just scrolling through my Facebook feed. I found this post about fat burning. I started to think about how easy it is to make a video and past over the CNN logo and bar over it. Because this looks pretty fishy.</p><p><a href="http://celebrity-us.com/00/usa/muscle/stanford-discovery-alpha-fuel/index.html?voluumdata=BASE64dmlkLi4wMDAwMDAwMy03ZTgwLTQyOGEtODAwMC0wMDAwMDAwMDAwMDBfX3ZwaWQuLjkwNDE4MDAwLWQ1ZmUtMTFlNi04YzU3LTBlYjMyZjZkMzY5Yl9fY2FpZC4uN2U5ZjUyZTMtNjI2ZS00MDgxLThkZTMtNDJjYzEwMjU0N2Y5X19ydC4uRF9fbGlkLi43YTM2ODA0Yy03NmU3LTRlYmYtYjA4MC01MTA4ZjFlZTdlYzNfX29pZDEuLmU1ZGVhNTNmLWFlMDYtNDM5ZC05NzBiLTU4MmU3YzE2MjRjMV9fdmFyMS4uS0EwODJfX3ZhcjIuLnVzbXVDSmEyNTI5ZHR2X19yZC4ud3d3XC5cZmFjZWJvb2tcLlxjb21fX2FpZC4uX19hYi4uX19zaWQuLg&amp;c1=KA082&amp;c2=usmuCJa2529dtv">Here’s where the video takes you.</a> It’s a site where you can purchase a supplement.</p><p>It’s fake! But what’s really bad here is that if it was real theres no canonical url or identifier we can place on video or images. Ideally each video by the legitimate CNN site had a watermark or ribbon with a canonical identifier, so I can track it back to it’s source. we as engineers need to fix this. It’s bad and it’s gonna get worse.</p><p>Whose responsibility is it to take care of this? Facebook? CNN? Us? This is wrong and shouldn’t be happening. How can we take matters into our own hands and fix this?</p><p>Here’s how you can report it on Facebook.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*C99QGBevVG3qdw97mTNIiQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*6lI88XtfY5ANSvR-9aHy5w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*QPpJJW_iqG3grujESytbNg.png" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?type=text%2Fhtml&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;schema=instagram&amp;url=https%3A//www.instagram.com/p/BPBuBXThSBp/&amp;image=https%3A//i.embed.ly/1/image%3Furl%3Dhttps%253A%252F%252Fscontent.cdninstagram.com%252Ft51.2885-15%252Fe15%252F15877224_340578192992938_4935649534639341568_n.jpg%253Fig_cache_key%253DMTQyMzYyMTM2MTEwODMyODU1Mw%25253D%25253D.2%26key%3D4fce0568f2ce49e8b54624ef71a8a5bd" width="612" height="612" frameborder="0" scrolling="no"><a href="https://medium.com/media/d07eec45522fd8044e259c6efdf6ab58/href">https://medium.com/media/d07eec45522fd8044e259c6efdf6ab58/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19271e264d56" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I’m passionate about being a human being, and other human beings in general.]]></title>
            <link>https://medium.com/@thomasreggi/im-passionate-about-being-a-human-being-and-other-human-beings-in-general-821652a8f4ed?source=rss-f9c0acbfa46c------2</link>
            <guid isPermaLink="false">https://medium.com/p/821652a8f4ed</guid>
            <dc:creator><![CDATA[Thomas Reggi]]></dc:creator>
            <pubDate>Fri, 06 Jan 2017 13:41:39 GMT</pubDate>
            <atom:updated>2017-01-06T13:41:39.653Z</atom:updated>
            <content:encoded><![CDATA[<p>I’m passionate about being a human being, and other human beings in general. I’m a naturally curious person. I love to find out how things work, hacking, reverse engineering, learn and understand more about my surroundings and importantly myself. I’m on my journey, my path. That’s why and how I’ve developed this skill for programming the internet, which I’m incredibly passionate about. It’s given me an immeasurable sense of control in the world around me. To me, programming is an art form, it’s a means of creative expression as well as communication. I’ve always wanted to take this skill and use it to create value where there was none, to build a business. It’s about creating an organization that supports people, community, I am very interested in entrepreneurship, business and marketing, and I think that those passions complement with my love for programming very well.</p><p>Thanks to @<a href="https://www.instagram.com/thedailypositives/?hl=en">thedailypositives</a> question on this <a href="https://www.instagram.com/p/BOx7_6mh7RN/">Instagram post</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=821652a8f4ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How schema-based APIs are going to kick off Artificial Intelligence.]]></title>
            <link>https://medium.com/@thomasreggi/how-schema-based-apis-are-going-to-kick-off-artificial-intelligence-adda4b8efb50?source=rss-f9c0acbfa46c------2</link>
            <guid isPermaLink="false">https://medium.com/p/adda4b8efb50</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[graphql]]></category>
            <dc:creator><![CDATA[Thomas Reggi]]></dc:creator>
            <pubDate>Sat, 25 Jun 2016 15:20:43 GMT</pubDate>
            <atom:updated>2016-06-25T15:20:43.074Z</atom:updated>
            <content:encoded><![CDATA[<p>Humas are incredibly inconsistent and sloppy when it comes to writing code. While you have articles in wired about the end of code, for the time being were still doing the writing. Let’s talk about APIs, schemas, and artificial intelligence.</p><p>What fundamentally is a API? Well the acronym floats around a lot, it stands for application process interface, which is a pretty broad term. What do they do? What are they for?</p><p>The general idea is that an API is a server that allows computers to send information to it and gets information back. It’s a system that can do anything, most are abstractions upon the CRUD operations you’d perform on a database. An API can contain one or many endpoints (URLs). These endpoints can also be protected with a varying number of authentication methods.</p><p>APIs generally return some sort of data in some sort of format that a computer can parse such as json, xml, csv. This data is super helpful for other computers to talk to the API to perform tasks it wouldn&#39;t otherwise have access to.</p><p>APIs are everywhere. They bucket into two camps, APIs that are for the public and internal APIs that are specific to the API creator. Twilio is a company that provides endpoints that allow you to make text messages as well as send and receive phone calls. If I need to make an app that needs this functionality I can make an authorized request to their server and build off the expertise they’ve developed. Right now I’m using the Medium android app which most-likely uses some sort of private API under the hood.</p><p>Now you know a little about APIs and why or how they would be used, if you step back you can see a bigger picture. The Internet with all these APIs act as one global computer that all use the Internet to communicate and accomplish tasks. What does this mean for artificial intelligence? AI is hard and the only way to reasonably create an intelligent system is to outsource each of the smaller bits to different services. It’s about breaking everything into individual pieces and then tackling them one at a time.</p><p>Here&#39;s the problem, APIs don&#39;t all speak a universal language. They are all implemented in a unique and custom way. They all differ in technologies, programming languages, authenticate details, request validation, error message handling, response status codes, error codes, internationalization, and endpont naming.</p><p>Enter the humble schema. There are two things that can change this chaos for the better. One is GraphQL and the other is Swagger.</p><p>Swagger allows you to build a document that contains all of the implementation details about an API, and I mean ALL. Swagger first and foremost is a specification, a set of rules that dictate how things should behave. The benefits of Swagger are sevenfold, not only does it allow you to detail an API, you can also use Swagger tools to build documentation, you can also run your server on top of a Swagger file, and base the actual routing and validation on the file itself. You can also use it to generate a library for accessing your API in different languages, say javascript, Ruby, python, etc.</p><p>GraphQL is a emerging technology, one sourced by Facebook that shifts that way APIs are written and used entirely. Intrinsic to its design is a schema and type system that builds the rules as you design the api. Unlike Swagger where you have to detail endponts, methods, objects, ect. GraphQL only use one endpoint and primary the POST method. Where with a classic Rest API you’d need to design individual endpoints and associate them with HTTP methods, then after the API is designed you need to write a whole bunch of documentation by hand.</p><p>Let’s put this all together. APIs computers to talk to each other, and execute operations remotely, and when an API has a proper schema or spec that is universal it allows people and computers to have better knowledge of how the API works without having to be explicitly told how things operate. This is a necessary step to allow more automated and autonomous operation of these APIs.</p><p>An apparent issue is that while schemas do benefit the API creator its has pros and cons from a capitalistic perspective. When different systems become compatible and documented it makes it easier to migrate from one to another. Take two similar services Shopify and Big Cartel both have APIs that provide access to an Order object but both are structured differently using different types and keys for the same object. However, in a world where a schema is a versioned object itself. Its just a matter of mapping one schema to the other, which makes migration incredibly simple.</p><p>The generation of schemas in APIs is happening whether we can stop it or not. It&#39;s a common sense way of managing and standardizing interoperatble systems. The main question we need to ask is who or what is this work going to benefit most? Us humans, or the systems that will use them?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=adda4b8efb50" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Smarter Spam]]></title>
            <link>https://medium.com/@thomasreggi/smarter-spam-7cbda2c77138?source=rss-f9c0acbfa46c------2</link>
            <guid isPermaLink="false">https://medium.com/p/7cbda2c77138</guid>
            <category><![CDATA[messaging]]></category>
            <category><![CDATA[bots]]></category>
            <dc:creator><![CDATA[Thomas Reggi]]></dc:creator>
            <pubDate>Mon, 06 Jun 2016 03:21:27 GMT</pubDate>
            <atom:updated>2016-06-06T03:21:27.306Z</atom:updated>
            <content:encoded><![CDATA[<p>What happens when people start using matured “bot” or “AI” for spam?</p><p>Imagine a world where we’ve put most of our preferences, likes, and favorites online. We’ve plastered the internet with lines and lines of text, comments, blogs, and other forms of consumable strings. All of the information is ready to be interpreted by spammers to target you.</p><p>I see a world where the interfaces we will mainly be using are text messaging apps, and voice based personal assistants. What happens when a spam bot can taylor itself specifically toward selling you something, does it have to disclose it’s a bot?</p><p>What happens when bots get better? When a bot becomes something more than a trivial piece of software designed to perform one task?What happens when you’re getting as many spam messages as you do in any given email account?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7cbda2c77138" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>