<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Glenn</title>
    <description>The latest articles on DEV Community by Glenn (@fetchworkglenn).</description>
    <link>https://dev.to/fetchworkglenn</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F348215%2F751c880d-3604-45e5-be86-ecad8547decf.jpeg</url>
      <title>DEV Community: Glenn</title>
      <link>https://dev.to/fetchworkglenn</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fetchworkglenn"/>
    <language>en</language>
    <item>
      <title>Windows: change default sound source with 1 click</title>
      <dc:creator>Glenn</dc:creator>
      <pubDate>Wed, 04 Nov 2020 23:06:09 +0000</pubDate>
      <link>https://dev.to/fetchworkglenn/windows-change-default-sound-source-with-1-click-3ebd</link>
      <guid>https://dev.to/fetchworkglenn/windows-change-default-sound-source-with-1-click-3ebd</guid>
      <description>&lt;p&gt;I found myself switching between my monitor speakers and my headphones frequently and having to click 3-4 times through the taskbar every time I wanted to change started to get annoying.&lt;/p&gt;

&lt;p&gt;I figured it could be useful to others so here it is.&lt;/p&gt;

&lt;h1&gt;
  
  
  Default Audio Switcher
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Purpose:
&lt;/h3&gt;

&lt;p&gt;Created for switching default sound source between my monitor speakers and headphones with 1 click.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Windows OS&lt;/li&gt;
&lt;li&gt;Download and copy &lt;a href="https://www.nirsoft.net/utils/nircmd.html"&gt;NirCmd&lt;/a&gt; to your windows directory&lt;/li&gt;
&lt;li&gt;Download my &lt;a href="https://github.com/GlennChon/defaultaudioswitcher"&gt;defaultaudioswitcher repo&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Setup Switch Sound Source:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Find the names of your sound sources for your PC via command prompt
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nircmd showsounddevices
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Pick the two you want to switch between&lt;/li&gt;
&lt;li&gt;Edit the SwitchSoundSource+.bat file with the names of your sound sources
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;SET &lt;span class="nv"&gt;defaultSoundSource&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"exampleSource1"&lt;/span&gt;
SET &lt;span class="nv"&gt;soundSource0&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"exampleSource1"&lt;/span&gt;
SET &lt;span class="nv"&gt;soundSource1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"exampleSource2"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Save the SwitchSoundSource+.bat &lt;/li&gt;
&lt;li&gt;Run (double click) SwitchSoundSource.vbs&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Optional:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Create shortcut to the .vbs file and set icon location to ico file in this folder (or your own custom icon)&lt;/li&gt;
&lt;li&gt;Set hotkey via shortcut properties&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I just have my shortcut set up on my &lt;a href="https://www.winstep.net/nexus.asp"&gt;Nexus Dock&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;@author &lt;a href="https://github.com/glennchon"&gt;Glenn Chon&lt;/a&gt;&lt;/p&gt;

</description>
      <category>windows</category>
      <category>tutorial</category>
      <category>opensource</category>
      <category>showdev</category>
    </item>
    <item>
      <title>How do all of you handle user sign up flows?</title>
      <dc:creator>Glenn</dc:creator>
      <pubDate>Sat, 26 Sep 2020 20:38:08 +0000</pubDate>
      <link>https://dev.to/fetchworkglenn/how-do-all-of-you-handle-user-sign-up-flows-581m</link>
      <guid>https://dev.to/fetchworkglenn/how-do-all-of-you-handle-user-sign-up-flows-581m</guid>
      <description>&lt;p&gt;I've seen:&lt;/p&gt;

&lt;p&gt;⚫ Sign up form (email and password) ➡ Verification email ➡ User logs in&lt;/p&gt;

&lt;p&gt;⚫ Sign up with email ➡ Verification email to account setup page (details and password) ➡ User is logged in&lt;/p&gt;

&lt;p&gt;What benefits do you see in your method?&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>Architecture planning of an on top filter over multiple public search APIs?</title>
      <dc:creator>Glenn</dc:creator>
      <pubDate>Tue, 14 Apr 2020 20:10:04 +0000</pubDate>
      <link>https://dev.to/fetchworkglenn/architecture-planning-of-an-on-top-filter-over-multiple-public-search-apis-fn8</link>
      <guid>https://dev.to/fetchworkglenn/architecture-planning-of-an-on-top-filter-over-multiple-public-search-apis-fn8</guid>
      <description>&lt;p&gt;I'm in the beginning stages of creating a service that gives users more filtering options on top of multiple public APIs.&lt;/p&gt;

&lt;p&gt;I think I've gathered the basic pros and cons of setting something like this up with different stacks and wanted to see if I was missing anything big or I have anything wrong. (Or if you have any other recommendations)&lt;/p&gt;

&lt;p&gt;Option 1:&lt;br&gt;
Normal front end + back end for auth and config saves to DB.&lt;/p&gt;

&lt;p&gt;Front end &amp;gt; User requests search &amp;gt; User search configs &amp;gt; Request from individual APIs &amp;gt; Filter &amp;gt; Display&lt;br&gt;
Back end &amp;gt; handles user auth and config saves&lt;/p&gt;




&lt;p&gt;Pros:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simple to set up.&lt;/li&gt;
&lt;li&gt;Public API end point requests come from client so there’s less cost for my server. &lt;/li&gt;
&lt;li&gt;No chance of being blacklisted for too many API calls from 1 IP address.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;All filtering done on client side, code will be accessible to anyone who wants to copy.&lt;/li&gt;
&lt;li&gt;UX speed dependent on client machine/connection – Must wait for multiple API requests from different sources and then filter.&lt;/li&gt;
&lt;li&gt;Speed dependent on 3rd party API servers and whether they’re available at time of request.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Indifferent: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Will still need to implement an auth server and save user settings.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Option 2:&lt;br&gt;
Normal front end + REST back end API + auth and config saves to DB.&lt;/p&gt;

&lt;p&gt;Front end &amp;gt; User saves configs &amp;gt; User requests search&lt;br&gt;
Back end &amp;gt; Use user search configs &amp;gt; Calls 3rd party APIs &amp;gt; Results formatted and filtered in server &amp;gt; Return to front end &amp;gt; Display results&lt;/p&gt;




&lt;p&gt;Pros:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simple to set up.&lt;/li&gt;
&lt;li&gt;Don’t have to worry about bogging down client UX.&lt;/li&gt;
&lt;li&gt;Hides filtering from anyone who wants to just copy the code and business model.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Increase in cost due to many api requests from my server.&lt;/li&gt;
&lt;li&gt;Risk of being blacklisted if there are a high number of users.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Option 3:&lt;br&gt;
Normal front end + REST back end API + Redis cache + auth and config saves to DB.&lt;/p&gt;

&lt;p&gt;Front end &amp;gt; User saves configs &amp;gt; User requests search&lt;br&gt;
Back end &amp;gt; Use user search configs &amp;gt; check if end-points are in DB or end-point results are in Redis cache &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If false, Calls 3rd party APIs &amp;gt; Format results &amp;gt; Results saved Redis cache &amp;gt; Filter results &amp;gt; Return to front end&lt;/li&gt;
&lt;li&gt;If true, get results from Redis cache &amp;gt; Filter results based on user configs &amp;gt; Return to front end
________________________________________ &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Pros:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Less requests done from my server than option 2.&lt;/li&gt;
&lt;li&gt;Less risk of being blacklisted.&lt;/li&gt;
&lt;li&gt;Requests are only called when needed or the cache result has timed out.&lt;/li&gt;
&lt;li&gt;If there are a lot of users with the same base API search requests, this will have a constant number of requests within a specified cache timeout time-frame.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Same speed as 2 if users request search after a cache item has timed out.&lt;/li&gt;
&lt;li&gt;Increase in setup complexity.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Option 4:&lt;br&gt;
Normal front end + REST back end API + Redis cache + auto rolling API calls+ auth and config saves to DB.&lt;br&gt;
Same as Option 3 but instead of getting results on demand when Redis cache item times out, the server automatically gets the results for each unique api endpoint upon timeout. (aka 4 times a day it’ll make all unique api calls and cache results)&lt;/p&gt;




&lt;p&gt;Pros:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Same as 3&lt;/li&gt;
&lt;li&gt;Constant number of 3rd party API calls, x:1 relation in number of calls and Unique API. X being how many times I want my server to auto get results.&lt;/li&gt;
&lt;li&gt;Decreases costs substantially as user numbers get high. Scales effectively.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Not as cost effective as 3 in the beginning as it may be making calls unnecessarily with small user numbers ( could halve the number of calls at first to 2 instead of 4 times a day) and change that as users increase.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Option 5:&lt;br&gt;
Front end with GraphQL + Apollo GraphQL backend + Redis cache + auto rolling API calls + auth and config saves to DB&lt;/p&gt;

&lt;p&gt;Setup same as Option 4 but basically implement it as a GraphQL API&lt;/p&gt;




&lt;p&gt;Pros:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reduces number of calls between client and my server for relational calls&lt;/li&gt;
&lt;li&gt;Decreases costs on my end when implemented for large number of users.&lt;/li&gt;
&lt;li&gt;Would be fun to learn and useful in the future for other projects&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Time to learn setting up GraphQL &lt;/li&gt;
&lt;li&gt;Not really worth it if I don’t have a large number of users accessing relational data&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>architecture</category>
      <category>graphql</category>
      <category>redis</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
