<?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: AidanLincoln</title>
    <description>The latest articles on Forem by AidanLincoln (@aidanlincoln).</description>
    <link>https://forem.com/aidanlincoln</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%2F340584%2F9d75e583-8af0-4ff9-9283-d83210f68295.png</url>
      <title>Forem: AidanLincoln</title>
      <link>https://forem.com/aidanlincoln</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/aidanlincoln"/>
    <language>en</language>
    <item>
      <title>How Can I Learn a New Programming Language Efficiently?</title>
      <dc:creator>AidanLincoln</dc:creator>
      <pubDate>Mon, 27 Jul 2020 21:04:05 +0000</pubDate>
      <link>https://forem.com/aidanlincoln/how-can-i-learn-a-new-programming-language-efficiently-gec</link>
      <guid>https://forem.com/aidanlincoln/how-can-i-learn-a-new-programming-language-efficiently-gec</guid>
      <description>&lt;p&gt;I’ve been watching Python tutorials on youtube for the past week. While I do feel like I’m learning syntax, I find myself skipping through parts of videos to avoid re-learning the fundamentals of coding. If anyone has tips or resources for learning a new language, I'd love to hear them.&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>Redundancy  in Ruby</title>
      <dc:creator>AidanLincoln</dc:creator>
      <pubDate>Sun, 19 Jul 2020 23:15:46 +0000</pubDate>
      <link>https://forem.com/aidanlincoln/ruby-kinda-sucks-cl4</link>
      <guid>https://forem.com/aidanlincoln/ruby-kinda-sucks-cl4</guid>
      <description>&lt;p&gt;When I began coding, Python was the language I started with. After learning some Python, I switched to Ruby and JavaScript because that’s what my school taught. I was soon asking the question, “Why are there multiple ways of doing the exact same thing in Ruby?”. &lt;/p&gt;

&lt;p&gt;Yukihiro Matsumoto, the creator of ruby, wanted his language to be expressive. I understand where he was coming from, but I find it redundant to have two words represent the exact same function. I would feel the exact same if tooth brushes were also called dental polishers. You may be thinking, “what about the words ecstatic vs excited?” I would argue that those words represent feelings, and definitions for feelings can vary from person to person. I find those words to have different but similar meanings. As an example when it comes to coding, I have no problem with JavaScript having multiple ways to iterate through an array. For loops and forEach loops accomplish the same task, but have minute differences. A for loop is easy to break out of, but forEach loops are easy to read. On the other hand, Ruby’s map and collect methods are the exact same. If you look at the Ruby documentation, they are both implemented as the C rb_ary_collect method.&lt;/p&gt;

&lt;p&gt;Now although it may seem like I hate Ruby, I don’t. Many other languages have redundancies as well. Using Ruby on Rails gets the job done, and I enjoy writing in the language (for the most part). Although, once I become equally skilled in Python, I’ll probably use Ruby less. This is partially due to the same reasons I’ve been ranting about, but also because Python is faster than ruby. I’ve heard many great points about why people enjoy Ruby’s expressiveness.&lt;/p&gt;

&lt;p&gt;I’d love to hear other peoples opinions on this topic.&lt;/p&gt;

</description>
      <category>healthydebate</category>
    </item>
    <item>
      <title>ES6 Required Parameters</title>
      <dc:creator>AidanLincoln</dc:creator>
      <pubDate>Tue, 24 Mar 2020 21:12:06 +0000</pubDate>
      <link>https://forem.com/aidanlincoln/es6-required-parameters-1efm</link>
      <guid>https://forem.com/aidanlincoln/es6-required-parameters-1efm</guid>
      <description>&lt;p&gt;Have you ever made a function that should require parameters to be passed in? Probably. In ES6 you can use default parameters to achieve this goal. &lt;/p&gt;

&lt;p&gt;First you can make a function that returns an error message. This error function can be used as a default parameter in any function you make.&lt;br&gt;
Now if you call the function you made without providing the necessary parameters, an error will be thrown.&lt;/p&gt;

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

&lt;p&gt;function error() {&lt;br&gt;
    throw new Error("Missing parameter");&lt;br&gt;
}&lt;br&gt;
function test(parameter = error()) {&lt;br&gt;
    return parameter;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;test() // "Missing parameter"&lt;br&gt;
test("hi") // "hi"&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Nothing is as it seems...</title>
      <dc:creator>AidanLincoln</dc:creator>
      <pubDate>Tue, 10 Mar 2020 05:44:13 +0000</pubDate>
      <link>https://forem.com/aidanlincoln/nothing-is-as-it-seems-2lo2</link>
      <guid>https://forem.com/aidanlincoln/nothing-is-as-it-seems-2lo2</guid>
      <description>&lt;p&gt;Today I learned that NaN (not a number) is actually a number, and null (no value) is an object in JavaScript.  &lt;/p&gt;

&lt;p&gt;NaN is a numeric datatype, but its value cannot be expressed with real numbers. It is a non-configurable, non-writable property. The name "Not a Number" doesn't mean "This value isn't numeric", it just means "I can't process this, so I'm going to tell you it's not a valid number". JavaScript's number datatype is based on the floating point standard (IEEE 754 - &lt;a href="https://standards.ieee.org/standard/754-2019.html"&gt;https://standards.ieee.org/standard/754-2019.html&lt;/a&gt;), which defines rules for a number's storage in memory, what operations return, and what a comparison returns. If any of the values you are comparing are NaN, the value returned will be false.&lt;/p&gt;

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

&lt;p&gt;&lt;code&gt;typeof(NaN)&lt;/code&gt; // "number"&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const var1 = 5 * "abc"&lt;/code&gt;&lt;br&gt;
&lt;code&gt;const var2 = 5 * "abc"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;var1&lt;/code&gt; // NaN&lt;br&gt;
&lt;code&gt;var2&lt;/code&gt; // NaN&lt;/p&gt;

&lt;p&gt;&lt;code&gt;var1 == var2&lt;/code&gt; // false&lt;/p&gt;

&lt;p&gt;&lt;code&gt;NaN == NaN&lt;/code&gt; // false&lt;/p&gt;

&lt;p&gt;The value null represents the absence of any object value, but oddly enough, it is an object according to JavaScript. This is often regarded as a mistake from the first version of JavaScript that can't be fixed, but some disagree contending that it was not a mistake. Very few people believe it makes complete sense, though. Lots of code is reliant on null being an object, so 'fixing' it would result in many additional bugs. If it ain't broke, don't fix it?&lt;/p&gt;

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

&lt;p&gt;&lt;code&gt;typeof null&lt;/code&gt; // "object"&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>codenewbie</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>A few ruby tricks for arrays and hashes</title>
      <dc:creator>AidanLincoln</dc:creator>
      <pubDate>Sun, 01 Mar 2020 21:42:39 +0000</pubDate>
      <link>https://forem.com/aidanlincoln/a-few-ruby-tricks-for-arrays-and-hashes-3l55</link>
      <guid>https://forem.com/aidanlincoln/a-few-ruby-tricks-for-arrays-and-hashes-3l55</guid>
      <description>&lt;ul&gt;
&lt;li&gt;You can create a hash from a list of keys and values by using Hash[key, value].&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Hash[‘key1’, ‘value1’, ‘key2’, ‘value2’]&lt;/p&gt;

&lt;h1&gt;
  
  
  =&amp;gt; {‘key1’=&amp;gt;’value1’, ‘key2’=&amp;gt;’value2’}
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;You can directly turn parameters into arrays or hashes using a single star or double star in a method’s parameters.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The single star(arg*) takes all arguments after its call, and stores them in an array.&lt;/p&gt;

&lt;p&gt;The double star(arg**) expects you to pass in a key value pair, and stores it in a hash.&lt;/p&gt;

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

&lt;p&gt;def new_method(a, b*, c**)&lt;br&gt;
   return a, b, c&lt;br&gt;
end&lt;/p&gt;

&lt;p&gt;new_method(1, 2, 3, 4, a: 5, b: 6)&lt;/p&gt;

&lt;h1&gt;
  
  
  =&amp;gt; [1, [2, 3, 4], {:a =&amp;gt; 5, :b =&amp;gt; 6}]
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Lastly, I found out that any object can be used as a key in a hash.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Hash[true, ‘stuff’, false, ‘other stuff’]&lt;/p&gt;

&lt;h1&gt;
  
  
  =&amp;gt; {true=&amp;gt;’stuff’, false=&amp;gt;’other stuff’}
&lt;/h1&gt;

</description>
      <category>todayilearned</category>
      <category>codenewbie</category>
      <category>ruby</category>
    </item>
    <item>
      <title>Why did I start programming?</title>
      <dc:creator>AidanLincoln</dc:creator>
      <pubDate>Sun, 23 Feb 2020 20:13:10 +0000</pubDate>
      <link>https://forem.com/aidanlincoln/why-did-i-start-programming-28fj</link>
      <guid>https://forem.com/aidanlincoln/why-did-i-start-programming-28fj</guid>
      <description>&lt;p&gt;My life as a programmer started about six months ago. Initially, my reason for starting was a mixture of boredom and curiosity. As someone who spends a lot of time on their computer, I’ve used hundreds, if not thousands of programs. The thought of “How the hell did someone make this?” has crossed my mind multiple times. Only half a year ago, that thought turned into “How can I make something like this?”. I then started to watch free coding course videos on YouTube, and that led to downloading my first text editor and using python. At this point, coding was just for fun. I was making primitive programs that weren’t even useful to myself, and having a great time with it. I hadn’t considered the possibility that my newfound hobby could turn into something more. That changed when I saw a YouTube ad for a school called Flatiron (shoutout to google for stalking my search history). I started the pre-work for the software engineering class, and found that being spoon-fed information was more efficient than attempting to teach myself. The thought of “How can I make something like this?” has now turned into “What will I make?”. &lt;/p&gt;

</description>
      <category>codenewbie</category>
    </item>
  </channel>
</rss>
