<?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: codelitically_incorrect</title>
    <description>The latest articles on DEV Community by codelitically_incorrect (@codelitically_incorrect).</description>
    <link>https://dev.to/codelitically_incorrect</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%2F124039%2Ff56adb8b-b37c-4f13-b41e-6ca33b794e55.png</url>
      <title>DEV Community: codelitically_incorrect</title>
      <link>https://dev.to/codelitically_incorrect</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/codelitically_incorrect"/>
    <language>en</language>
    <item>
      <title>What is the cleanest way to format the meta tag for CSP declarations</title>
      <dc:creator>codelitically_incorrect</dc:creator>
      <pubDate>Fri, 25 Oct 2019 17:27:29 +0000</pubDate>
      <link>https://dev.to/codelitically_incorrect/what-is-the-cleanest-way-to-format-the-meta-tag-for-csp-declarations-15la</link>
      <guid>https://dev.to/codelitically_incorrect/what-is-the-cleanest-way-to-format-the-meta-tag-for-csp-declarations-15la</guid>
      <description>&lt;p&gt;What is the cleanest way to format the meta tag for CSP declarations that make it readable and easy to add too? How do you do structure it? The reasoning behind this question is the awkward syntax W3C proposed, and with the strictness of syntax, it's easy to screw up your CSP policy that then fails silently.&lt;/p&gt;

</description>
      <category>metatag</category>
      <category>html</category>
      <category>csp</category>
    </item>
    <item>
      <title>Poll: What is your UI Framework of choice?</title>
      <dc:creator>codelitically_incorrect</dc:creator>
      <pubDate>Sat, 28 Sep 2019 17:47:38 +0000</pubDate>
      <link>https://dev.to/codelitically_incorrect/poll-what-is-your-ui-framework-of-choice-131f</link>
      <guid>https://dev.to/codelitically_incorrect/poll-what-is-your-ui-framework-of-choice-131f</guid>
      <description>&lt;p&gt;What is your framework of choice? &lt;br&gt;
React, Vue, Angular, W3C WebComponents or Other?&lt;/p&gt;

&lt;p&gt;UPDATE: Results as of 10/2/2019 (and counting)&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Angular&lt;/th&gt;
&lt;th&gt;React&lt;/th&gt;
&lt;th&gt;Vue&lt;/th&gt;
&lt;th&gt;Aurelia&lt;/th&gt;
&lt;th&gt;W3C Web Components&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

</description>
      <category>framework</category>
      <category>react</category>
      <category>vue</category>
      <category>angular</category>
    </item>
    <item>
      <title>How do you count your lines of code?</title>
      <dc:creator>codelitically_incorrect</dc:creator>
      <pubDate>Tue, 24 Sep 2019 17:06:38 +0000</pubDate>
      <link>https://dev.to/codelitically_incorrect/how-do-you-count-your-lines-of-code-17a1</link>
      <guid>https://dev.to/codelitically_incorrect/how-do-you-count-your-lines-of-code-17a1</guid>
      <description>&lt;p&gt;As Javascript developers, we have to wield several technologies to get a UI built. How do you go about counting your lines of code on a per screen basis?&lt;/p&gt;

&lt;p&gt;Do you factor in css line-count and html line-count or do you look at your line-count as being pure Javascript logic?&lt;/p&gt;

</description>
      <category>benchmarks</category>
      <category>performance</category>
      <category>css</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Mixins in ECMAScript 6 - Awkward, inconvenient, powerful.</title>
      <dc:creator>codelitically_incorrect</dc:creator>
      <pubDate>Tue, 03 Sep 2019 12:21:55 +0000</pubDate>
      <link>https://dev.to/codelitically_incorrect/mixins-in-ecmascript-6-awkward-inconvenient-powerful-4jf2</link>
      <guid>https://dev.to/codelitically_incorrect/mixins-in-ecmascript-6-awkward-inconvenient-powerful-4jf2</guid>
      <description>&lt;p&gt;(UPDATE: I am really not sure about the state of proposals for 'mixins' in ECMAScript. The information below were snippets I got from another source in 2017. I do know we are able to support traits in ES6 by way of Object.assign(..) but I was hoping it would be keyworded-in as part of the class definition syntax for future ES. )&lt;/p&gt;




&lt;p&gt;So you've heard that ECMAScript 6 will sport "Mixins". Some languages implement this feature as "Traits" or Shared Modules. The origin of the concept, I feel, was born in the language called SELF (a Sun Microsystems experiment, see: &lt;a href="http://www.selflanguage.org/"&gt;http://www.selflanguage.org/&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;In a simple explanation, traits, or mixins, is a language feature allowing classes of objects to share a common set of behaviors we call methods -- or functions, perhaps even data properties. It is NOT inheritance, but some think of it as multiple inheritance. It is an arbitrary implementation for simple code reuse when inheritance does not make sense.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
In building a game, the Character, Level or Weapon classes might all posses the ability to log messages to a console for debugging purposes, so a mixin called Loggable could be used to package up a few methods to be shared across the class hierarchy. This way, classes even though not related, might share this common trait. As you see, inheritance does not make sense logically or semantically. A Person is-not a Loggable. It does not sound right, it does not read right, it conflicts with the beauty of code and clarity.&lt;/p&gt;

&lt;p&gt;here is the Ruby representation. It's a beauty.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module Loggable
   def log (msg)
      puts msg
   end
end

class Character include Loggable
   def jump
      log("jumped")
   end
end

class Sword &amp;lt; Weapon  include Loggable
   def animate_blade
      log("do sword animation");
   end
end
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;In Scala, It's a beauty:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Sword extends Weapon with Loggable {
   def animate_blade() { 
      log("do sword animation")
   }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;In ECMAScript 6:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var Loggable = Base =&amp;gt; class extends Base {
  log(s) { }
};
class Weapon { }
class Sword extends Loggable(Weapon) { }
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;WTF?!!!!!&lt;br&gt;
It gets ugly if you wanted 2 or more mix-ins:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Weapon { }
class Sword extends Loggable(Localizable(Weapon)) { }
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;I don't know. It's powerful. Definitely not a beauty!&lt;/p&gt;

</description>
      <category>mixin</category>
      <category>traits</category>
      <category>modules</category>
      <category>inheritance</category>
    </item>
    <item>
      <title>SELF: An ancient programming paradigm</title>
      <dc:creator>codelitically_incorrect</dc:creator>
      <pubDate>Sun, 01 Sep 2019 13:58:32 +0000</pubDate>
      <link>https://dev.to/codelitically_incorrect/self-ancient-programming-paradigm-4mjc</link>
      <guid>https://dev.to/codelitically_incorrect/self-ancient-programming-paradigm-4mjc</guid>
      <description>&lt;p&gt;"&lt;i&gt;Look to the real world to combine simplicity with power.&lt;/i&gt;" &lt;br&gt;
-Randy B. Smith&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Uniformity. Directness. Liveliness.&lt;/b&gt; - 3 core principals of the SELF environment that we don't normally see in the throng of modern era programming languages. There is Material Design Principals when considering  User Interface design, but what if I told you that there was an ancient language which modeled the real world we live in?&lt;/p&gt;

&lt;p&gt;Have a look at SELF. Since then, nothing like it has seen the light. It was ahead of it's time.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/Ox5P7QyL774"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>objects</category>
      <category>oo</category>
      <category>programming</category>
      <category>objectoriented</category>
    </item>
    <item>
      <title>Truth about Functional Programming</title>
      <dc:creator>codelitically_incorrect</dc:creator>
      <pubDate>Sun, 01 Sep 2019 13:43:13 +0000</pubDate>
      <link>https://dev.to/codelitically_incorrect/truth-about-functional-programming-fi0</link>
      <guid>https://dev.to/codelitically_incorrect/truth-about-functional-programming-fi0</guid>
      <description>&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(defun save-system (system)
           (let ((op 'asdf:monolithic-concatenate-source-op)
               (c (asdf:find-component system nil)))
           (asdf:operate op c)
           (asdf:output-file op c)))
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;There are 2 popular paradigms of programming for organizing code today. Object Oriented Programming and Functional Programming. Lately, more and more articles are springing up, pushing you to rethink objects (you know, the logical way to simulate real world people, places or things) and starting considering functional programming. &lt;/p&gt;

&lt;p&gt;But you need to know the bias and the drawbacks. The bias is clear, it's an academic, geek-inspired, mathematical idea that is more whimsical than practical -- to show how uber and "Lispy" it looks, how smart one is at calculus, to adorn and lift up the ego about ones intellect.&lt;/p&gt;

&lt;p&gt;That is the bias. An ugly splash of function calls embedded inside function calls, calling other functions and never destroying or creating state with side-effects, that is the benefit. An abstract, math-like mentality of algorithms dumped into your editor and executed in almost a primitive, cave-man style procedural flow. How horrible. We came a long way from that. Why not just go back to Assembly or C?&lt;/p&gt;

&lt;p&gt;What is scary is that these geeks are pushing functional programming as the ideal paradigm for AI/Machine Learning. Reason about the devastation.&lt;/p&gt;

&lt;p&gt;Object Oriented Programming is on the opposite side of the see-saw. It is a paradigm that organizes reality and thought-processes by simulating the real world using tangible objects. It's that clear. It's that logical. It models the world that we interact with. Objects are composed of objects, they communicate with each other, responsibilities are clear, dependencies are seen, system parts can be replaced, enhanced or debugged. There is nothing that cannot be simulated.&lt;/p&gt;

&lt;p&gt;The drawbacks of functional programming is self evident:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It's awkward&lt;/li&gt;
&lt;li&gt;mathematical&lt;/li&gt;
&lt;li&gt;almost procedural in nature&lt;/li&gt;
&lt;li&gt;ends up relying on objects eventually (contradiction of idea)&lt;/li&gt;
&lt;li&gt;a syntax nightmare&lt;/li&gt;
&lt;li&gt;harder to read&lt;/li&gt;
&lt;li&gt;difficult to debug&lt;/li&gt;
&lt;li&gt;complex to understand&lt;/li&gt;
&lt;li&gt;not natural&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Be careful.&lt;/p&gt;

</description>
      <category>lisp</category>
      <category>functional</category>
      <category>oo</category>
      <category>objectoriented</category>
    </item>
  </channel>
</rss>
