<?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>Forem: Cole Walker</title>
    <description>The latest articles on Forem by Cole Walker (@colewalker).</description>
    <link>https://forem.com/colewalker</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%2F315411%2Fcac3bd9b-87be-4224-9661-27275567e043.jpg</url>
      <title>Forem: Cole Walker</title>
      <link>https://forem.com/colewalker</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/colewalker"/>
    <language>en</language>
    <item>
      <title>Conventional Commits, the Future of Git</title>
      <dc:creator>Cole Walker</dc:creator>
      <pubDate>Fri, 04 Sep 2020 00:03:34 +0000</pubDate>
      <link>https://forem.com/colewalker/conventional-commits-the-future-of-git-32gg</link>
      <guid>https://forem.com/colewalker/conventional-commits-the-future-of-git-32gg</guid>
      <description>&lt;p&gt;Conventional commits are something which have revolutionized the way that I work, and made me re-think how I go about my git workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  What?
&lt;/h2&gt;

&lt;p&gt;Put simply, conventional commits is a standard for writing commit messages. Just like we have &lt;a href="https://medium.com/better-programming/naming-conventions-in-go-short-but-descriptive-1fa7c6d2f32a"&gt;conventions for naming variables&lt;/a&gt;, or &lt;a href="https://semver.org/"&gt;numbering release versions&lt;/a&gt;, there is a convention for writing commit messages.&lt;/p&gt;

&lt;p&gt;Put even simpler, conventional commits tell you how to write your commit messages.&lt;/p&gt;

&lt;h2&gt;
  
  
  They're easier to write
&lt;/h2&gt;

&lt;p&gt;There are many benefits to adopting conventional commits. But the first thing that an adopter notices is that they simplify the process of writing a commit. All developers are aware how difficult it can be to name things, and writing descriptive yet succinct commits can be even more difficult. By providing a format to follow, conventional commits take away a lot of the thinking work that is required when writing a commit message, and point us in a good direction.&lt;/p&gt;

&lt;h2&gt;
  
  
  They're easier to read
&lt;/h2&gt;

&lt;p&gt;Secondly, they make it easier to read the history of a repository, for both humans and computers. The beauty of the convention is that it was designed for maintainers to easily be able to gloss over commits and get the gist of what each has done to the repository. When &lt;a href="https://gitmoji.carloscuesta.me/"&gt;gitmojis&lt;/a&gt; are added into the fray, it makes it even easier.&lt;/p&gt;

&lt;h3&gt;
  
  
  Okay, so what are gitmojis?
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://gitmoji.carloscuesta.me/"&gt;Gitmojis&lt;/a&gt; are a convention (yes, another one) for attributing meaning to emojis in the context of development. &lt;/p&gt;

&lt;p&gt;For example: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; 🎨 = "Improve structure / format of the code."&lt;/li&gt;
&lt;li&gt;⚡️ = "Improve performance."&lt;/li&gt;
&lt;li&gt;✨ = "Introduce new features."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These emojis make it even easier to see what changes a commit made, because they're bright and instantly pop out to the reader. Even someone unfamiliar with the format can understand the general idea because of how humans associate meanings with images.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tools can parse it
&lt;/h2&gt;

&lt;p&gt;Conventions make it easy for automated tools to process commits. Tools exist to &lt;a href="https://github.com/conventional-changelog/commitlint"&gt;lint commits&lt;/a&gt;, &lt;a href="https://marketplace.visualstudio.com/items?itemName=vivaxy.vscode-conventional-commits"&gt;help to write them&lt;/a&gt;, or even &lt;a href="https://github.com/semantic-release/semantic-release"&gt;automate changelogs and versioning.&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  I'm sold, what's the convention?
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;type&amp;gt;[optional scope]: &amp;lt;description&amp;gt;

[optional body]

[optional footer(s)]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This is a basic representation of the convention, written in &lt;a href="https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form"&gt;Extended Backus–Naur Form.&lt;/a&gt; Further rules and explanations can be found on &lt;a href="https://www.conventionalcommits.org/en/v1.0.0/"&gt;the conventional commits website.&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Type
&lt;/h3&gt;

&lt;p&gt;The type of commit describes the type of work that occurs. You can think of this as being similar to the labels that are added to issues or stories. &lt;/p&gt;

&lt;p&gt;The convention defines &lt;code&gt;feat&lt;/code&gt; for features, and &lt;code&gt;fix&lt;/code&gt; for bugfixes, but others can be added if necessary. For example, &lt;a href="https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional"&gt;commitlint&lt;/a&gt; adds several more:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ci&lt;/li&gt;
&lt;li&gt;chore&lt;/li&gt;
&lt;li&gt;docs&lt;/li&gt;
&lt;li&gt;feat&lt;/li&gt;
&lt;li&gt;fix&lt;/li&gt;
&lt;li&gt;perf&lt;/li&gt;
&lt;li&gt;refactor&lt;/li&gt;
&lt;li&gt;revert&lt;/li&gt;
&lt;li&gt;style&lt;/li&gt;
&lt;li&gt;test&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Scope (optional)
&lt;/h3&gt;

&lt;p&gt;Scope represents the area that you're performing the work on, and thus entirely depends on the project that is being worked on. Scope is usually surrounded by &lt;code&gt;( )&lt;/code&gt;. If a breaking change occurs, sometimes an &lt;code&gt;!&lt;/code&gt; is placed at the end of the scope to denote so.&lt;/p&gt;

&lt;p&gt;For example, a web-application might have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;(database)&lt;/li&gt;
&lt;li&gt;(dependencies)&lt;/li&gt;
&lt;li&gt;(styling)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Description
&lt;/h3&gt;

&lt;p&gt;This is where the description of the commit goes. It is a brief statement describing the work that was done. Any gitmojis related to the changes should go at the beginning of this. &lt;/p&gt;

&lt;h3&gt;
  
  
  Body (optional)
&lt;/h3&gt;

&lt;p&gt;This is where a longer description would go if necessary. If breaking changes were introduced with this commit, they must be explained either here or footer, in the format:&lt;br&gt;
&lt;code&gt;BREAKING CHANGE change description&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Footer (optional)
&lt;/h3&gt;

&lt;p&gt;Footers are entirely dependant on the project once again, but they must follow a specific format, "each footer MUST consist of a word token, followed by either a &lt;code&gt;:&amp;lt;space&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;space&amp;gt;#&lt;/code&gt; separator, followed by a string value." (From the &lt;a href="https://www.conventionalcommits.org/en/v1.0.0/#specification"&gt;conventional commits website&lt;/a&gt;) &lt;/p&gt;
&lt;h3&gt;
  
  
  Examples
&lt;/h3&gt;

&lt;p&gt;(courtesy of the &lt;a href="https://www.conventionalcommits.org/en/v1.0.0/#examples"&gt;conventional commits website&lt;/a&gt;)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;feat: ✨ allow provided config object to extend other configs

BREAKING CHANGE: `extends` key in config file is now used for extending other config files
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;refactor!: 💥 drop support for Node 6

BREAKING CHANGE: refactor to use JavaScript features not available in Node 6.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fix: ✏️ correct minor typos in code

see the issue for details

on typos fixed.

Reviewed-by: Z
Refs #133
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Conventional commits are good and you should try them. &lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Filtering Null Values out of TypeScript Arrays</title>
      <dc:creator>Cole Walker</dc:creator>
      <pubDate>Sat, 29 Aug 2020 13:02:12 +0000</pubDate>
      <link>https://forem.com/colewalker/filtering-null-values-out-of-typescript-arrays-1ega</link>
      <guid>https://forem.com/colewalker/filtering-null-values-out-of-typescript-arrays-1ega</guid>
      <description>&lt;h2&gt;
  
  
  Filtering Null Values out of TypeScript Arrays
&lt;/h2&gt;

&lt;p&gt;Something that stumped me the first time I encountered it in TypeScript was dealing with nullable types in arrays. When dealing with arrays, we often do not want to keep the null values in, or we want to perform a map operation and get yelled at by the compiler about missing properties. I learned a little snippet to deal with this, which I will explain step by step.&lt;/p&gt;

&lt;p&gt;First, let's establish the scenario.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;DoesntMatter&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;meaningless&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)[]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Here we have an interface DoesntMatter with a property 'meaningless', which is an array containing either strings or null values. &lt;/p&gt;

&lt;p&gt;Assume that we have an instance of DoesntMatter in our code, and we need to concatenate the strings of the array into one mega-string. Unfortunately, we can't do that without getting rid of all of the nulls first.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;instanceOfDoesntMatter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;meaningless&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;val&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;val&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;!!&lt;/span&gt;&lt;span class="nx"&gt;val&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The above snippet uses a really cool feature, called a &lt;a href="https://www.typescriptlang.org/docs/handbook/advanced-types.html"&gt;type guard.&lt;/a&gt; The type guard will check to make sure val is a string, and if it is, it'll run the function. If it isn't, it won't run the function. Since we only need to filter out nulls, we know that the function will only run if the value is a string already, so we can return true if val, which is what the &lt;code&gt;!!&lt;/code&gt; is doing. &lt;/p&gt;

&lt;p&gt;The result of this filter is an array which contains nothing but string values. &lt;/p&gt;

&lt;p&gt;Type guards are a very powerful feature, and this is only one small use case of the nearly endless possibilities with them. &lt;/p&gt;

</description>
      <category>typescript</category>
      <category>node</category>
      <category>javascript</category>
    </item>
    <item>
      <title>4 Awesome Array Methods in JavaScript</title>
      <dc:creator>Cole Walker</dc:creator>
      <pubDate>Mon, 17 Aug 2020 11:41:09 +0000</pubDate>
      <link>https://forem.com/colewalker/4-awesome-array-methods-in-javascript-3ai1</link>
      <guid>https://forem.com/colewalker/4-awesome-array-methods-in-javascript-3ai1</guid>
      <description>&lt;p&gt;Arrays are one of the most commonly used data structures in JavaScript, and they have a lot of awesome methods that make development a bit easier for us. Here are a few of my favorite array methods. &lt;/p&gt;

&lt;h2&gt;
  
  
  Set
&lt;/h2&gt;

&lt;p&gt;While not technically an array method, I often use this data structure to filter out duplicates from arrays storing primitive types. A &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set"&gt;Set&lt;/a&gt; is a data structure which stores unique values, making it a simple way of eliminating duplicates in arrays.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;filteredArr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[...&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;   &lt;span class="c1"&gt;// [1,2,3]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Filter
&lt;/h2&gt;

&lt;p&gt;When you have more complex data structures stored in your arrays, and need to remove duplicates or only some of the items, filter is the way to go. Filter allows you to return a new array containing any elements which pass a test of your choice.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;filteredArr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;indexOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;===&lt;/span&gt;&lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The above snippet passes each item of the array into the filter function, which will check to see if it is the first occurrence of its value. If it isn't, then that means it's a duplicate, and it will be removed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Some
&lt;/h2&gt;

&lt;p&gt;Array.some is a neat method which returns true if any element of an array matches a condition. I often use this method in conjunction with filter to filter my arrays with more complex logic.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/* I use the arrow function implicit return syntax here 
to make the code easier to read. 
If you aren't familiar with the syntax, 
the arrow function returns the value of the statement 
following it.
*/&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;contains1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;some&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="o"&gt;===&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;contains6&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;some&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="o"&gt;===&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  All
&lt;/h2&gt;

&lt;p&gt;Array.all is exactly what you think it is. It returns true only if every element in an array matches a condition. While I don't use this function as frequently as the others on this list, it is great to have in my back pocket.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;all1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;all1Only1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;all1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;all&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="o"&gt;===&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;//true&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;arrOnly1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;all&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="o"&gt;===&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;//false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>What is the first thing that you do with a new tool or language?</title>
      <dc:creator>Cole Walker</dc:creator>
      <pubDate>Thu, 16 Jul 2020 13:40:59 +0000</pubDate>
      <link>https://forem.com/colewalker/what-is-the-first-thing-that-you-do-with-a-new-tool-or-language-343f</link>
      <guid>https://forem.com/colewalker/what-is-the-first-thing-that-you-do-with-a-new-tool-or-language-343f</guid>
      <description>&lt;p&gt;I often skip past "hello world", since it doesn't give you a good understanding of what a language looks or feels like. Usually, I try to dive into a project, often a smaller-scaled version of the idea that inspired me to try out the framework or language itself. For example, when I was diving into Go, I wrote a small application to grab data from the Goodreads API and parse it to my console, since I wanted to use Go for CLI or back-end applications. &lt;/p&gt;

&lt;p&gt;Does anyone else skip "hello world"?&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>Beginner’s CommonLISP: Everything You’ll Need to Know for a Simple Application</title>
      <dc:creator>Cole Walker</dc:creator>
      <pubDate>Thu, 02 Jul 2020 15:39:31 +0000</pubDate>
      <link>https://forem.com/colewalker/beginner-s-commonlisp-everything-you-ll-need-to-know-for-a-simple-application-3n68</link>
      <guid>https://forem.com/colewalker/beginner-s-commonlisp-everything-you-ll-need-to-know-for-a-simple-application-3n68</guid>
      <description>&lt;p&gt;In the first article in this series, I discussed the basics of CommonLISP, including the installation of the runtime, mathematical operations, and variables. In this article, I will be detailing more operations which one will encounter while building applications in CommonLISP, such as standard output, conditional statements, lists, functions, and macros. &lt;/p&gt;

&lt;h2&gt;
  
  
  Standard Output
&lt;/h2&gt;

&lt;p&gt;Standard output can be achieved by calling the print function on the desired output. However, the output will include quotation marks for strings. String values can be printed without quotation marks by calling the write or write-line functions on them instead. write-line will insert a new-line after the output whereas write will not.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;p&gt;Code  -&amp;gt; Output&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(print “Hello World”) -&amp;gt;  “Hello World”

(print (+ 22 22)) -&amp;gt; 44
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Conditional Statements
&lt;/h2&gt;

&lt;p&gt;The if statement is the way that LISP handles conditional statements.&lt;/p&gt;

&lt;p&gt;It takes 3 arguments, the first is the condition, the second is what is to be returned from the function if it evaluates to be true, and the third is what is to be returned from the function if it isn’t true.&lt;/p&gt;

&lt;p&gt;Note: all values outside of nil are considered to be true.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(if (&amp;gt;5 1)

    (print “5 is greater than 1”)

    (print “Something is wrong”)
)  
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This code will always print "5 is greater than 1", and will never print "Something is wrong".&lt;/p&gt;

&lt;h3&gt;
  
  
  The progn Function
&lt;/h3&gt;

&lt;p&gt;By default, if statements only allow one line of code for each condition. This becomes a problem if the programmer needs to include side effects in addition to the return statement. The solution to this issue is the &lt;code&gt;progn&lt;/code&gt; function. The &lt;code&gt;progn&lt;/code&gt; function takes an undetermined amount of arguments, referred to as the “body”, and the last argument will be the return statement of the function.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Progn&lt;/code&gt; works similar to how curly brackets work in C based languages.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(if (&amp;gt; 5 1)

    (progn

        (print “everything is right”)

        (+ 5 1)

    )

    (progn

        (print “something is wrong”)

        (- 5 1)

    )
)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This program will check to make sure that 5 &amp;gt;1.&lt;/p&gt;

&lt;p&gt;If it is, it will print “everything is right” and then return 5+1.&lt;/p&gt;

&lt;p&gt;If it isn’t, it will print “something is wrong”, and then return 5-1.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lists
&lt;/h2&gt;

&lt;p&gt;One of the unique features of LISP is how easy it is to create linked lists. A list is created by using what is called the symbol operator on a list of items surrounded by paren and separated by spaces. The items can be of any data type.&lt;/p&gt;

&lt;p&gt;Example  =    Linked List&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;‘(1 2 3 4) = 1 -&amp;gt; 2 -&amp;gt; 3 -&amp;gt; 4

‘(“Hello” 2 “Friend, I am Cole” 3) = “Hello” -&amp;gt; 2 -&amp;gt; “Friend, I am Cole” -&amp;gt; 3

‘(2 3 4 5.5) = 2 -&amp;gt; 3 -&amp;gt; 4 -&amp;gt; 5.5
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Car and Cdr
&lt;/h3&gt;

&lt;p&gt;Some of the most common functions used for operating on lists in LISP are car and cdr. Car returns the first element of a list. Cdr returns every following element.&lt;/p&gt;

&lt;p&gt;Example  -&amp;gt; Returns&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(car ‘(1 2 3 4)) -&amp;gt; 1

(cdr ‘(1 2 3 4)) -&amp;gt; (2 3 4)

(cdr (cdr ‘(1 2 3 4))) -&amp;gt;  (3 4)

(car (cdr ‘(1 2 3 4))) -&amp;gt; 2

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Loops
&lt;/h2&gt;

&lt;p&gt;The simplest form of a loop is with the loop keyword. It takes a set of statements as its arguments, and will repeat them until it encounters a return statement.&lt;/p&gt;

&lt;p&gt;Example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(defvar a)

(setf a 0)  

(loop

(setf a (+ a 1))

(write a)

(when (&amp;gt; a 4) (return a))
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This example declares the variable "a", sets it to 0, then each loop, it will add 1 to a, and print it with the write command. When a &amp;gt; 4, it will exit the loop and return a. &lt;/p&gt;

&lt;h1&gt;
  
  
  Defining Functions
&lt;/h1&gt;

&lt;p&gt;Functions in CommonLISP are defined by the &lt;code&gt;defun&lt;/code&gt; operator. &lt;br&gt;
The syntax is&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(defun &amp;lt;function name&amp;gt; (&amp;lt;parameter list separated by spaces&amp;gt;)
     (&amp;lt;function body, last value is the return value&amp;gt;)
)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Calling the function is the same as any of the above operators.&lt;/p&gt;

&lt;p&gt;For example, here is a function which will return the square of the parameter “toBeSquared”.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(defun squareNum (toBeSquared)

(* toBeSquared toBeSquared))
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Example -&amp;gt; Return Value&lt;br&gt;
&lt;code&gt;(squareNum 3) -&amp;gt;  9&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;(squareNum (squareNum 2)) -&amp;gt;  16&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Anonymous Functions
&lt;/h3&gt;

&lt;p&gt;CommonLISP provides a way to create anonymous functions, which will only be run once, when they are encountered. They will not be given a name nor will they be stored for later use. The syntax is identical to defun, but with the defun keyword swapped out for lambda.&lt;/p&gt;

&lt;p&gt;Example&lt;/p&gt;

&lt;p&gt;&lt;code&gt;(+ 2 ((lambda (a) (+ a a) 2))&lt;/code&gt;  &lt;/p&gt;

&lt;p&gt;Returns &lt;br&gt;
6&lt;/p&gt;
&lt;h2&gt;
  
  
  Macros
&lt;/h2&gt;

&lt;p&gt;Macros are what make LISP such a uniquely powerful language. A macro is a function whose body is interpreted as input for the program before being interpreted as a program. It allows developers to programmatically change the program which is to be run. Macros are the reason as to why LISP is such a powerful tool in AI, they allow the computer to remember past decisions and modify its own code.&lt;/p&gt;

&lt;p&gt;In other words, LISP adds a step before compilation, called “macro-expansion”. The macro-expansion step compiles the macro into lisp code before executing the rest of the program.&lt;/p&gt;

&lt;p&gt;Macros are defined using the &lt;code&gt;defmacro&lt;/code&gt; command. &lt;/p&gt;

&lt;p&gt;The syntax is &lt;code&gt;&amp;lt;defmacro&amp;gt; &amp;lt;name&amp;gt; (parameters) &amp;lt;body-form&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Macros are complex, so I will give a simple example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight common_lisp"&gt;&lt;code&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;defmacro&lt;/span&gt; &lt;span class="nv"&gt;eight&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;+&lt;/span&gt; &lt;span class="nv"&gt;eight&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nv"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;will&lt;/span&gt; &lt;span class="nb"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;16.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Whenever the above macro (eight) is called, it will be treated as the number 8, since it is going to be compiled and evaluated before running elsewhere.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>functional</category>
      <category>lisp</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Do you chat with other developers often? What are your favorite communities to do so?</title>
      <dc:creator>Cole Walker</dc:creator>
      <pubDate>Thu, 09 Apr 2020 14:15:28 +0000</pubDate>
      <link>https://forem.com/colewalker/do-you-chat-with-other-developers-often-what-are-your-favorite-communities-to-do-so-3bd</link>
      <guid>https://forem.com/colewalker/do-you-chat-with-other-developers-often-what-are-your-favorite-communities-to-do-so-3bd</guid>
      <description>

</description>
      <category>watercooler</category>
      <category>discuss</category>
    </item>
    <item>
      <title>What I've Learned from Streaming Myself Coding</title>
      <dc:creator>Cole Walker</dc:creator>
      <pubDate>Thu, 09 Apr 2020 14:13:52 +0000</pubDate>
      <link>https://forem.com/colewalker/what-i-ve-learned-from-streaming-myself-coding-1o8j</link>
      <guid>https://forem.com/colewalker/what-i-ve-learned-from-streaming-myself-coding-1o8j</guid>
      <description>&lt;p&gt;For the past few weeks, I've coded every night on &lt;a href="https://www.twitch.tv/supcole"&gt;twitch&lt;/a&gt; for at least a few hours. It has been a lot of fun, and I've learned a lot about streaming, and branding myself in general.&lt;/p&gt;

&lt;h1&gt;
  
  
  Viewers are mostly there to hang out, don't sweat your coding skills
&lt;/h1&gt;

&lt;p&gt;The first stream that I did was a completely blind building of an Angular app. I had no prior Angular experience, and I was looking at the documentation for every other line of code, and getting stuck on bugs for minutes at a time. Despite this, people watched, and chatted, and were super nice about it! &lt;/p&gt;

&lt;p&gt;As it turns out, nobody expects you to be a perfect programmer 100% of the time. As long as you're actually putting a bit of effort in, that should be enough. &lt;/p&gt;

&lt;h1&gt;
  
  
  What you're building doesn't matter
&lt;/h1&gt;

&lt;p&gt;When I first started this experiment, I made sure to describe exactly what I was building in the title of my streams. This resulted in a few people coming who saw that I was doing React Native programming, or Angular, but when I changed the titles of my streams to be something more generic, like "javascript stream, ask me anything", I noticed much higher engagement. &lt;/p&gt;

&lt;p&gt;Additionally, I thought having a really exciting app would be what brought people into the streams. I wanted to make sure my viewers were as excited about the app as I was, so I picked ideas that seemed to be a bit more interesting, like a Movie Database app or a workout tracker. However, looking at the more popular streams in the programming sphere of twitch shows that the projects really don't matter. Some people build robots, others build websites for freelance clients, others are building finance programs, and their view counts are all pretty high. People respond more to a good personality than what that person is building, so build whatever you want to or are able to. &lt;/p&gt;

&lt;h1&gt;
  
  
  Be Nice
&lt;/h1&gt;

&lt;p&gt;Believe it or not, people like it when people are nice to them. This is a little known fact about life in general, but with streaming it goes double. In fact, being nice will get you way more engagement than being funny. I don't think I'm very funny on stream at all, and I still have a few viewers each stream that I do, just because I'm nice. &lt;/p&gt;

&lt;p&gt;So, don't feel like you need to be funny all the time, or super interesting, as long as you're nice, you're doing a great job of being a streamer.&lt;/p&gt;

&lt;h1&gt;
  
  
  Streaming is a great motivator
&lt;/h1&gt;

&lt;p&gt;Lately I've been struggling with finding the motivation to code. A certain global event has completely torn my normal routine apart, and I was left with a bunch of bad habits and a lack of willingness to do anything. I decided that with all my extra time at home, I'd try to stream to at least do something somewhat productive with my time.&lt;/p&gt;

&lt;p&gt;What I found that not only did streaming make me feel like I was converting otherwise unproductive time (gaming) into something slightly more productive, it actually encouraged me to code A LOT, and learn a ton about tools available and the ones that I already use to make the stream as good as it can for my viewers. &lt;/p&gt;

&lt;p&gt;Streaming made me go from "I don't want to code" to, "Boy, I can't wait to code for 4 hours on stream tonight". I'm getting more work done on side projects than I ever have before. &lt;/p&gt;

&lt;h1&gt;
  
  
  Make a schedule
&lt;/h1&gt;

&lt;p&gt;Making a schedule is in my opinion, what separates a good streamer from a great one. As a viewer, nothing is better than being able to plan to watch a streamer at a certain point of the day. I know that I have a few people who I go out of my way to watch at their scheduled times, I've even woken up early to watch streams before. Giving yourself a schedule, even if it's rough, will get you viewers who return each day, and that's important for building a community. &lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;Streaming is a ton of fun. If you have the means to, I'd recommend giving it a shot, you might just find a new hobby for yourself!&lt;/p&gt;

&lt;p&gt;Also, I'd be remiss if I didn't plug my stream in this article, I hope that you give me a watch sometime, I do a lot of JavaScript streaming, either mid-morning (11AM EST), or more often, at night (7PM EST). &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.twitch.tv/supcole"&gt;https://www.twitch.tv/supcole&lt;/a&gt;&lt;/p&gt;

</description>
      <category>watercooler</category>
      <category>productivity</category>
      <category>motivation</category>
      <category>tips</category>
    </item>
    <item>
      <title>Setting up a CommonLISP Environment and an Introduction to the Language</title>
      <dc:creator>Cole Walker</dc:creator>
      <pubDate>Tue, 31 Mar 2020 21:11:08 +0000</pubDate>
      <link>https://forem.com/colewalker/setting-up-a-commonlisp-environment-and-an-introduction-to-the-language-3kjk</link>
      <guid>https://forem.com/colewalker/setting-up-a-commonlisp-environment-and-an-introduction-to-the-language-3kjk</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;In the mid 1900’s, the second high-level programming language was created by John McCarthy. It was called List Processor, or LISP for short. LISP itself is a relatively simple language, so it has been modified and added to over time. Modified versions of the language are referred to as “dialects”, and today the most well-known dialects are Clojure, Scheme, and CommonLISP. &lt;/p&gt;

&lt;p&gt;LISP is a language which has been frequently used for AI due to its simple syntax, fast debugging process, and the inclusion of macros, which are a way to modify the program’s code as it is running. &lt;/p&gt;

&lt;p&gt;This tutorial will be about learning CommonLISP specifically, though its syntax and concepts should be similar enough to other dialects that once one is learned, learning other forms of LISP should prove to be trivial.&lt;/p&gt;

&lt;h1&gt;
  
  
  Installation
&lt;/h1&gt;

&lt;p&gt;To be able to execute CommonLISP code, we need to have an interpreter or compiler. The most popular option for LISP writers is the emacs text editor and SLIME extension, but that particular combination is daunting to newcomers of the language, since they may have to learn an unfamiliar text editor in addition to a very unique programming language. &lt;/p&gt;

&lt;p&gt;For that reason, I recommend that newcomers install the Steel Bank Common LISP compiler, which is available on all major operating systems. To install this compiler, first go to the &lt;a href="http://www.sbcl.org/"&gt;Steel Bank Common LISP website&lt;/a&gt;, and then go to the download section. On this page you will see a table with different architecture and operating systems.&lt;/p&gt;

&lt;p&gt;On this table, select the square that best represents your computer’s architecture and operating system, and click the link to download the installer file. &lt;/p&gt;

&lt;p&gt;The installer should take care of all of the configuration necessary to install the compiler on your computer, including adding the compiler to your operating system’s PATH.&lt;/p&gt;

&lt;p&gt;Note: on Linux, installation is much simpler, by default, many distros include a repository which includes the compiler. &lt;/p&gt;

&lt;p&gt;To install, enter the following command:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo apt-get install sbcl&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;LISP is an interpreted language, so running quick snippets of code is simple. To do so, type &lt;code&gt;sbcl&lt;/code&gt; into the command prompt to open the SBCL REPL (read eval print loop). It will run subsequent commands as LISP code, and print the evaluated values.&lt;/p&gt;

&lt;h2&gt;
  
  
  Executing Code from a File in SBCL
&lt;/h2&gt;

&lt;p&gt;CommonLISP code is saved with the .lisp extension. It can be run from the command line by using the following command:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sbcl --script &amp;lt;filepath&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sbcl --script helloworld.lisp&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
     will run the file helloworld.lisp in the working directory&lt;/p&gt;
&lt;h1&gt;
  
  
  Basic Operations
&lt;/h1&gt;

&lt;p&gt;LISP functions are called with what is called “prefix notation”. The operator goes first, then the operands follow. &lt;/p&gt;
&lt;h2&gt;
  
  
  Addition
&lt;/h2&gt;

&lt;p&gt;The addition operator is the same as it is in most languages, &lt;code&gt;+&lt;/code&gt;. It accepts any amount of numbers. The operator comes first because of prefix notation, and then the arguments follow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(+ 4 10)         returns 14

(+ 12 22 40)     returns 74

(+ 100 200.50)   returns 300.5
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Subtraction
&lt;/h2&gt;

&lt;p&gt;Subtraction works similarly, with the &lt;code&gt;-&lt;/code&gt; symbol. numbers are subtracted left to right.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(- 22 7)    returns 15

(- 7 22)    returns -15

(- 7 22 5)  returns -20

(- 22 0.5)  returns 21.5

(- 22 1.0)  returns 21
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Multiplication
&lt;/h2&gt;

&lt;p&gt;The multiplication operator uses the familiar &lt;code&gt;*&lt;/code&gt;symbol. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(* 5 4)     returns 20

(* 5 5 5)   returns 125

(* 2 0.25)  returns 0.5

(* 2 -2.5)  returns -5
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Division
&lt;/h2&gt;

&lt;p&gt;The division operator uses the &lt;code&gt;/&lt;/code&gt; symbol. CommonLISP is unique in that dividing integers does not return a decimal, but a simplified fraction representing the arguments given. However, dividing floating point numbers will always result in a floating point number.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(/ 4 2)    returns 2

(/ 4 10)   returns ⅖ 

(/ 4 -2)    returns -2

(/ 4.2 1.1)  returns 3.818181818181818

(/ 4.2 1)  returns 4.2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Variables
&lt;/h2&gt;

&lt;p&gt;setq is how LISP sets variables. Syntax is&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;setq &amp;lt;variable name&amp;gt; &amp;lt;form&amp;gt; [&amp;lt;variable 2 name&amp;gt; &amp;lt;form 2&amp;gt;]....&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 Types are dynamic and implicit. &lt;/p&gt;

&lt;p&gt;Example                     Variable / Value&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(setq apple (+ 12 23))      apple / 35

(setq bonsai 12)            bonsai / 12

(setq name “Cole”)          name / “Cole”
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;After reading this tutorial, you should have a very basic understanding of CommonLISP, and have it installed on your computer. In the next tutorial, we'll look at control structures, lists, and more!&lt;/p&gt;

</description>
      <category>lisp</category>
      <category>commonlisp</category>
      <category>functional</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Working from Home Tip: Don't be Afraid of Analog</title>
      <dc:creator>Cole Walker</dc:creator>
      <pubDate>Mon, 16 Mar 2020 15:22:00 +0000</pubDate>
      <link>https://forem.com/colewalker/working-from-home-tip-don-t-be-afraid-of-analog-38pj</link>
      <guid>https://forem.com/colewalker/working-from-home-tip-don-t-be-afraid-of-analog-38pj</guid>
      <description>&lt;p&gt;Early on in my days as a programmer, I believed that technology and screens were the future. I thought that by default, an app would be better and more efficient than using its analog alternative. I opted for apps over calculators, apps over traditional to-do lists, and using a laptop for ALL of my notes, even when it was suboptimal.&lt;/p&gt;

&lt;p&gt;I was thinking about it the wrong way. I now believe that we should search for analog methods first, and switch to technological solutions only when we realize that the analog solutions do not fit our needs.&lt;/p&gt;

&lt;p&gt;My number one increase in productivity came from replacing my to-do list applications with a physical planner. I found that there was nothing more addictive to me than that feeling of crossing off an item. I wasn't getting that with my to-do list applications, and that was what made me re-think my position on analog. &lt;/p&gt;

&lt;p&gt;Having a calculator at my desk allows me to make those quick computations much quicker than searching for my calculator app and typing in the numbers and symbols there. &lt;/p&gt;

&lt;p&gt;Having a scratchpad for flowcharts and psuedo-code is infinitely more convenient and quicker than any kind of technological solution for doing so. &lt;/p&gt;

&lt;p&gt;Additionally, most of our waking hours are spent staring at screens, which is proven to have consequences on our health, and personally makes me feel more irritable. I urge you to take advantage of whatever brief recess from screens you can, it'll make you more productive, and potentially feel better. &lt;/p&gt;

</description>
      <category>career</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Tips for finding your first internship</title>
      <dc:creator>Cole Walker</dc:creator>
      <pubDate>Sun, 08 Mar 2020 17:28:52 +0000</pubDate>
      <link>https://forem.com/colewalker/tips-for-finding-your-first-internship-paa</link>
      <guid>https://forem.com/colewalker/tips-for-finding-your-first-internship-paa</guid>
      <description>&lt;p&gt;I have been in the software industry for almost a year now, and when I was first searching for jobs, I was overwhelmed and wished that someone who was relatable to me would share their tips and tricks for getting the first role.&lt;/p&gt;

&lt;p&gt;I think it's important that you understand my background at the time, so that you can see what I had to work with. &lt;/p&gt;

&lt;p&gt;I was: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Working 2 jobs, both retail&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A junior in college, working on a CS degree&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A good student&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Not creative... didn't have much to put on a portfolio&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Good at web development&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I needed a job which was part-time and would bring me into the industry. I thought that would be impossible to find, but I was surprised at how many there were. Here are my tips for finding your internship.&lt;/p&gt;

&lt;h1&gt;
  
  
  Get help with your resume
&lt;/h1&gt;

&lt;p&gt;Before I visited the career center at my school, I was convinced that my resume was fantastic. I googled for hours trying to find tips and tricks for making it better. For this reason, I didn't think it was necessary to meet a career counselor about it. Luckily, the school required that all students using its system to apply for jobs have a few appointments with a career counselor first.&lt;/p&gt;

&lt;p&gt;As it turns out, my resume was NOT good. The career counselor very nicely tore the thing apart, pointing out its flaws, and helped me to build a resume which was actually good.&lt;/p&gt;

&lt;p&gt;Immediately I started getting calls from employers. This was the single biggest boon to my job search at the time. Even if you don't have access to a career counselor, I'd suggest finding someone you trust to take a look at your resume and see if it's any good. Chances are that they'll find a few things that can be improved upon, and you'll have an easier time finding jobs after making some changes.&lt;/p&gt;

&lt;h1&gt;
  
  
  Get your name out there
&lt;/h1&gt;

&lt;p&gt;Truthfully, I didn't even apply to my internship. I had no idea that the company existed before receiving an e-mail from them reaching out to see if I'd be interested in working there. They found my resume on a career board, and they desperately needed a part-time developer to help their team out. &lt;/p&gt;

&lt;p&gt;I had a few other offers from companies that I actually applied to, but having your name out there on a few job boards will take a lot of the burden off of your shoulders. Posting blog posts on sites like this one will help in getting your name out there too!&lt;/p&gt;

&lt;h1&gt;
  
  
  List some projects on your resume
&lt;/h1&gt;

&lt;p&gt;If you are like I was, you don't have any professional experience that is relevant to the positions that you're interested in. To prove that you're capable, you're going to have to place a "projects" section onto your resume. &lt;/p&gt;

&lt;p&gt;During interviews, my prospective employers were always impressed by the projects that I put in this section. You can put whatever you've built, as long as you are prepared to talk about it at length in your interview. &lt;/p&gt;

&lt;p&gt;To get my internship, I had a note-taking web app, another web app which I ended up not finishing, and my portfolio website on my resume. Under each project title I had a few bullet points which explained how I built the projects, and what they did. In the interview I was asked about why I used the technologies I used, and to go a bit more in-depth about the process and the status of the applications. &lt;/p&gt;

&lt;p&gt;If you follow these tips, I promise that you'll have an easier time finding jobs. Good luck!&lt;/p&gt;

</description>
      <category>career</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Customizing Firefox with CSS</title>
      <dc:creator>Cole Walker</dc:creator>
      <pubDate>Sun, 08 Mar 2020 17:01:06 +0000</pubDate>
      <link>https://forem.com/colewalker/customizing-firefox-with-css-h4m</link>
      <guid>https://forem.com/colewalker/customizing-firefox-with-css-h4m</guid>
      <description>&lt;p&gt;Today I found out that Firefox, my browser of choice, has some great features for web developers who love to tinker with the styles of things. As it turns out, not only can you edit the styles of the web browser window itself, but even use the familiar element inspector on it to help you do so. The best thing about this is that it isn’t only great for advanced web developers, but also people who want to practice their CSS skills on the thing they’ll probably be staring at more than anything else.&lt;/p&gt;

&lt;h1&gt;
  
  
  Setting up browser toolbox
&lt;/h1&gt;

&lt;p&gt;To set this up, we’re going to first have to edit a few settings in Firefox.&lt;br&gt;
To get the browser inspector, or what Firefox calls the “browser toolkit”, you’re going to open your developer tools (F12), click the little … icon in the upper right hand corner, and select the “Settings” option in the floating menu. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fwq6m38g43ate6vhaxlac.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fwq6m38g43ate6vhaxlac.png" alt="Dev settings window"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Take a look at the Advanced settings panel, and make sure that you check “Enable browser chrome and add-on debugging toolboxes”, and “Enable remote debugging” (yes, this is required, even if you’re debugging on your own machine)&lt;br&gt;
Now we’re all set to play around!&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsu876mo1lvz8qmdllilu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsu876mo1lvz8qmdllilu.png" alt="Advanced settings panel"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Inspecting the browser
&lt;/h1&gt;

&lt;p&gt;If you hit the key combination &lt;code&gt;Ctrl Shift Alt I&lt;/code&gt; you’ll open up 2 new windows. One will be completely blank, and the other will ask you about incoming requests. Click yes, and the blank window will turn into the familiar inspector window… this time for your browser window. Hovering over the elements in the inspector will show an outline over the corresponding elements on the browser window itself.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4k1i6an793q1v1wgu5gb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4k1i6an793q1v1wgu5gb.png" alt="Browser inspector"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you look for the “box” element, that represents the top part of the browser, so expand that.  From here, you can keep expanding things and play around with them in the style pane on the right, to see how they look. I’d recommend playing around with this for a bit to see how everything works. &lt;/p&gt;
&lt;h1&gt;
  
  
  Setting up a Stylesheet
&lt;/h1&gt;

&lt;p&gt;If you’ve found a change that you like the look of, and want to keep beyond this session, you can force Firefox to load a custom .css file. First, we have to tell Firefox to check for the css file on startup.&lt;/p&gt;

&lt;p&gt;Copy and paste &lt;code&gt;about:config&lt;/code&gt; into the address bar, and hit enter to open the page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8irqfd33rkiag4hvskri.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8irqfd33rkiag4hvskri.PNG" alt="about:config page"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click “accept the risk and continue”, we won’t be doing anything dangerous here. &lt;br&gt;
Type userprof into the search bar, and double click the box that is titled &lt;code&gt;toolkit.legacyUserProfileCustomizations.stylesheets&lt;/code&gt;. This just tells Firefox that you want it to search for the CSS file on startup.  &lt;/p&gt;

&lt;p&gt;The next step is to actually create the CSS file.&lt;/p&gt;

&lt;p&gt;To do so, you should copy paste &lt;code&gt;about:support&lt;/code&gt; into the address bar, and hit enter. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhqhu3gvfohkxe54ceav0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhqhu3gvfohkxe54ceav0.png" alt="About:support page"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You’ll see a page like this. Click the Open Folder button in the Profile Folder section, and it’ll open up your file explorer in the folder for your Firefox profile. &lt;/p&gt;

&lt;p&gt;If there is a chrome folder, navigate inside of it, and create or edit a file named &lt;code&gt;userChrome.css&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If there isn’t, create a folder named chrome, and create a file inside named &lt;code&gt;userChrome.css&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This is the file where your browser styles can be saved to. You’ll probably need a lot of !important in this file, since the specificity can be really hard to overwrite in some places. &lt;/p&gt;

&lt;p&gt;You can put whatever you want in here to make the browser yours, but this is the code that I have in mine. It will make the browser hide the bookmarks bar when you aren’t hovering your mouse over it, and it’ll make the address bar curved like it is in google chrome.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nf"&gt;#urlbar&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;25px&lt;/span&gt; &lt;span class="cp"&gt;!important&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;#PersonalToolbar&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="py"&gt;--uc-bm-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Might need to adjust if the toolbar has other buttons */&lt;/span&gt;
    &lt;span class="py"&gt;--uc-bm-padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;6px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Vertical padding to be applied to bookmarks */&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nd"&gt;:root&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;uidensity&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;"compact"&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="nf"&gt;#PersonalToolbar&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="py"&gt;--uc-bm-padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nd"&gt;:root&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;uidensity&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;"touch"&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="nf"&gt;#PersonalToolbar&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="py"&gt;--uc-bm-padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;6px&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nf"&gt;#PersonalToolbar&lt;/span&gt;&lt;span class="nd"&gt;:not&lt;/span&gt;&lt;span class="o"&gt;([&lt;/span&gt;&lt;span class="nt"&gt;customizing&lt;/span&gt;&lt;span class="o"&gt;])&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;margin-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;calc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="n"&gt;-&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--uc-bm-height&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;-&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt; &lt;span class="err"&gt;*&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--uc-bm-padding&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
    &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;rotateX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;90deg&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nl"&gt;transform-origin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;top&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;transform&lt;/span&gt; &lt;span class="m"&gt;135ms&lt;/span&gt; &lt;span class="n"&gt;linear&lt;/span&gt; &lt;span class="m"&gt;600ms&lt;/span&gt; &lt;span class="cp"&gt;!important&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;z-index&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nf"&gt;#PlacesToolbarItems&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;   
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt; &lt;span class="cp"&gt;!important&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;   
    &lt;span class="nl"&gt;justify-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt; &lt;span class="cp"&gt;!important&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nf"&gt;#PlacesToolbarItems&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nc"&gt;.bookmark-item&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="py"&gt;padding-block&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--uc-bm-padding&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="cp"&gt;!important&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;


  &lt;span class="c"&gt;/* SELECT ONE BOOKMARKS TOOLBAR BEHAVIOR */&lt;/span&gt;

  &lt;span class="c"&gt;/* ONE | Show when urlbar is focused 
       #nav-bar:focus-within + #PersonalToolbar{ 
       transition-delay: 100ms !important; 
       transform: rotateX(0); 
   } */&lt;/span&gt;

  &lt;span class="c"&gt;/* TWO | Show when cursor is over the toolbar area 
  My Personal Choice
  */&lt;/span&gt;
  &lt;span class="nf"&gt;#navigator-toolbox&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;#PersonalToolbar&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;transition-delay&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100ms&lt;/span&gt; &lt;span class="cp"&gt;!important&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;rotateX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restart your Firefox, and your browser should look like this. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F21f6y1cyvr041e689gvm.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F21f6y1cyvr041e689gvm.PNG" alt="New look"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to find ideas or code to use, check out the &lt;a href="https://old.reddit.com/r/firefoxcss" rel="noopener noreferrer"&gt;/r/firefoxCSS subreddit&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>customization</category>
      <category>firefox</category>
    </item>
    <item>
      <title>Confused by Redux: What the heck is Redux? What is state? Why do we need a state manager?</title>
      <dc:creator>Cole Walker</dc:creator>
      <pubDate>Thu, 13 Feb 2020 00:24:20 +0000</pubDate>
      <link>https://forem.com/colewalker/confused-by-redux-part-1-what-the-heck-is-redux-what-is-state-why-do-we-need-a-state-manager-52kg</link>
      <guid>https://forem.com/colewalker/confused-by-redux-part-1-what-the-heck-is-redux-what-is-state-why-do-we-need-a-state-manager-52kg</guid>
      <description>&lt;p&gt;Redux is one of the most difficult concepts to grasp as a newcomer to front-end frameworks, and it took me a long time to understand how it worked and how to use it. I didn't truly &lt;em&gt;get&lt;/em&gt; it until I had a need for it. &lt;/p&gt;

&lt;p&gt;In this article I aim to educate you about some of the concepts of Redux, including why we need it, what state is, and a high-level example of what we would use Redux for. &lt;/p&gt;

&lt;h2&gt;
  
  
  Why do we use Redux?
&lt;/h2&gt;

&lt;p&gt;I think that this is the single most important thing to understand when learning redux. If you don't have a reason to use redux, you cannot hope to grasp it. It is a utility that needs to be learned out of necessity, not just for fun. &lt;/p&gt;

&lt;p&gt;Redux describes itself as "a predictable state container for js apps". Chances are, you have no idea what the hell that means. I didn't when I first read it! &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Put simply, Redux handles your global state so you don't have to.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Redux holds all of those nasty global variables you need in a way that's clean and predictable, so you don't go goofing stuff up by mistake.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hold up, what the heck is "state"?
&lt;/h2&gt;

&lt;p&gt;State is the status of an application in a given moment. In other words, it's a snapshot of the variables that your application relies on. &lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Think of state as a screenshot of all of the variables on your app which change with interactions. *&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The &lt;em&gt;Example&lt;/em&gt;: a Countdown Timer
&lt;/h2&gt;

&lt;p&gt;A few months ago, I set out to build an app which would make my life better, a countdown timer. The requirements of this app were as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It needed to take as input a date and show me the amount of time remaining until that date in a stylish GUI. &lt;/li&gt;
&lt;li&gt; The GUI should be fully customizable via a settings screen, allowing me to change the background, color of the elements, and text color.&lt;/li&gt;
&lt;li&gt;The timer should update every second.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I started to build this app, and that's when I had my eureka moment with Redux. I finally understood why it was necessary, and why global state was a thing that people needed. &lt;/p&gt;

&lt;p&gt;Let's take those requirements and piece out the state that is mentioned in the app requirements, and what screens that each piece will be used on.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The user selected date. (Main Screen, Settings Screen) &lt;/li&gt;
&lt;li&gt;The current date and time. (Main Screen)&lt;/li&gt;
&lt;li&gt;The amount of time remaining until the user selected date. (Main Screen)&lt;/li&gt;
&lt;li&gt;The background. (Main Screen, Settings Screen)&lt;/li&gt;
&lt;li&gt;The color of the elements. (Main Screen, Settings Screen)&lt;/li&gt;
&lt;li&gt;The text color. (Main Screen, Settings Screen)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here's a screenshot so you can better visualize the app.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fm5irbnyjzsa5l3u9mcv8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fm5irbnyjzsa5l3u9mcv8.png" alt="Countdown App Screen"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From this list, you should be able to understand why we need global state, and which of these will be global state. The global state of this application is anything which exists on both of the screens. That is what we need Redux for. &lt;/p&gt;

&lt;p&gt;Redux will handle the updates to the global state, and deal with managing these variables between screens. &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>webdev</category>
      <category>redux</category>
    </item>
  </channel>
</rss>
