<?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: Christoffer Wallenberg</title>
    <description>The latest articles on Forem by Christoffer Wallenberg (@chrisse23).</description>
    <link>https://forem.com/chrisse23</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%2F348323%2F20f2fc6d-8038-4b35-9009-4ba4463b3ad1.png</url>
      <title>Forem: Christoffer Wallenberg</title>
      <link>https://forem.com/chrisse23</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/chrisse23"/>
    <language>en</language>
    <item>
      <title>A Study in Programming</title>
      <dc:creator>Christoffer Wallenberg</dc:creator>
      <pubDate>Thu, 29 Oct 2020 01:35:33 +0000</pubDate>
      <link>https://forem.com/chrisse23/a-study-in-programming-4l6l</link>
      <guid>https://forem.com/chrisse23/a-study-in-programming-4l6l</guid>
      <description>&lt;p&gt;A big part of learning programming is about one's way of thinking and building mental models. In this guide, we will look at how we can use Sherlock Holmes' "Science of deducation" as a way of solving various programming problems. You may be wondering why Sherlock Holmes has anything to do with programming? See this as a way of thinking and as an aid when analyzing and solving various programming problems.&lt;/p&gt;

&lt;p&gt;Sherlock Holmes' "Science of deducation" consists of three parts Observe, Theorize, Test which are described in more detail below. Please keep in mind is that even if these are made in order, they are also individually good to keep in mind constantly when programming.&lt;/p&gt;

&lt;h2&gt;
  
  
  Observe
&lt;/h2&gt;

&lt;p&gt;Let's start with the first part observe and this quote:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"You see, but you do not observe." Sherlock said. "The distinction is clear."&lt;br&gt;
"For example, you have frequently seen the steps which lead up from the hall to this room."&lt;/p&gt;

&lt;p&gt;"Frequently."&lt;/p&gt;

&lt;p&gt;"How often?"&lt;/p&gt;

&lt;p&gt;"Well, some hundreds of times."&lt;/p&gt;

&lt;p&gt;"Then how many are there?"&lt;/p&gt;

&lt;p&gt;"How many? I do not know."&lt;/p&gt;

&lt;p&gt;"Quite so! You have not observed. &amp;gt; And yet you have seen. That is just my point."&lt;br&gt;
"Now, I know that there are &amp;gt; seventeen steps, because I have &amp;gt; both seen and observed."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This conversation between Sherlock and Watson is a good example of how easy it is especially in the beginning when writing your code that you only write without really reflecting on what you do and why. An important part when programming is to continuously reflect on why I write my code like this, what does it do and what do I want to achieve? As an example, you can in Javascript code a event listener over 300 times, but if you do not understand that this is what you do, it does not matter how many times you do it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It is a capital mistake to theorize before one has data. Insensibly one begins to twist facts to suit theories, instead of theories to suit facts.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The gist of the quote above is that you need to go through the data you have before you can start thinking of a solution to your programming problem. The risk otherwise is that you get a solution that is deficient or does not cover all requirements.&lt;/p&gt;

&lt;p&gt;In a new project, start by going through the requirements and all the functionality that should be available, what parts are there? What is the data and what is the expected result / goal?&lt;/p&gt;

&lt;p&gt;In an existing project where you have to add functionality, it is important to understand go through the existing code and test around to get an understanding of how the program works before you start on a solution.&lt;/p&gt;

&lt;h2&gt;
  
  
  Theorize
&lt;/h2&gt;

&lt;p&gt;After you have gone through all the data and gained an understanding of what to do and what you expect for results, it is time to think about how. Two parts here that are important, to filter out all the data that is unnecessary for the current problem and focus on your problem and avoid any side tracks.&lt;/p&gt;

&lt;p&gt;Start by asking yourself the question, what is the least I need to make this work? It is otherwise easy to start thinking about side problems that take focus and risk complicating your main problem.&lt;/p&gt;

&lt;p&gt;After you have done that, you can start developing a few different possible solutions. Keep in mind constantly what it is you want to achieve and the data you have when working with a solution.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test
&lt;/h2&gt;

&lt;p&gt;Now you have a possible solution so now it's time to test it! The important thing here is to apply an analytical and critical mindset when you test and be prepared that the solution may not work och work as you intended. Even Sherlock Holmes did not always succeed on the first try with his theory but he went back, went through all the data and tried to see what he missed and added new pieces to the puzzle. You can apply the same mindset in programming, go through the code step by step and tell yourself what is happening, try to see if you missed something.&lt;/p&gt;

&lt;p&gt;This quote by Sherlock fits in very well with programming.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It has long been an axiom of mine that the little things are infinitely the most important.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Armed with this knowledge, try applying this the next time you are going to solve a programming problem.&lt;/p&gt;

&lt;p&gt;The Game is Afoot!&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>javascript</category>
    </item>
    <item>
      <title>If Jane Austen wrote code</title>
      <dc:creator>Christoffer Wallenberg</dc:creator>
      <pubDate>Sat, 16 May 2020 17:07:56 +0000</pubDate>
      <link>https://forem.com/chrisse23/if-jane-austen-wrote-code-3i2n</link>
      <guid>https://forem.com/chrisse23/if-jane-austen-wrote-code-3i2n</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EuPoNkla--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xl2wdsjngloyg90mowxm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EuPoNkla--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xl2wdsjngloyg90mowxm.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>Code poem - imagination</title>
      <dc:creator>Christoffer Wallenberg</dc:creator>
      <pubDate>Mon, 11 May 2020 23:49:25 +0000</pubDate>
      <link>https://forem.com/chrisse23/code-poem-imagination-3e8p</link>
      <guid>https://forem.com/chrisse23/code-poem-imagination-3e8p</guid>
      <description>&lt;p&gt;A little poem in code. I find it fascinating how you close you can come to the english language with code.&lt;/p&gt;

&lt;p&gt;Maybe learning a foreign language and learning to code have a few similarities?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5BvfSxNf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/tw8rdy972xo9nthb640f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5BvfSxNf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/tw8rdy972xo9nthb640f.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>poetry</category>
      <category>javascript</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Pixel art in CSS</title>
      <dc:creator>Christoffer Wallenberg</dc:creator>
      <pubDate>Fri, 20 Mar 2020 01:08:38 +0000</pubDate>
      <link>https://forem.com/chrisse23/pixel-art-in-css-12g2</link>
      <guid>https://forem.com/chrisse23/pixel-art-in-css-12g2</guid>
      <description>&lt;p&gt;I been learning lately about CSS illustrations and making art in general with CSS. Which i find so cool!&lt;/p&gt;

&lt;p&gt;Experimented with pixel art which you can see here: &lt;a href="https://codepen.io/cwalle/pen/JjjJddy"&gt;https://codepen.io/cwalle/pen/JjjJddy&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Have you dabbled in CSS illustration any good tips for learning?&lt;/p&gt;

&lt;p&gt;Thinking of making a tutorial of above codepen, would that be interesting?&lt;/p&gt;

</description>
      <category>css</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Let’s talk video vs article when learning</title>
      <dc:creator>Christoffer Wallenberg</dc:creator>
      <pubDate>Tue, 10 Mar 2020 21:06:34 +0000</pubDate>
      <link>https://forem.com/chrisse23/let-s-talk-video-vs-article-when-learning-3233</link>
      <guid>https://forem.com/chrisse23/let-s-talk-video-vs-article-when-learning-3233</guid>
      <description>&lt;p&gt;Hello all!&lt;/p&gt;

&lt;p&gt;I been thinking lately on tutorials and video vs articles and thought it would be interesting to hear from you. &lt;/p&gt;

&lt;p&gt;So when you’re learning something new in programming or just starting out, do you prefer videos or articles with code examples?&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>learning</category>
    </item>
    <item>
      <title>Creativity and imagination in programming</title>
      <dc:creator>Christoffer Wallenberg</dc:creator>
      <pubDate>Mon, 09 Mar 2020 22:37:38 +0000</pubDate>
      <link>https://forem.com/chrisse23/creativity-and-imagination-in-programming-47mp</link>
      <guid>https://forem.com/chrisse23/creativity-and-imagination-in-programming-47mp</guid>
      <description>&lt;p&gt;When i was a kid i often immersed myself into the world of books. Early on it was the comics of Donald Duck, later on the marvelous world of Harry Potter and Lord of the Rings. I carried around the books of Harry Potter and  wanted to know everything about Duckburg.&lt;/p&gt;

&lt;p&gt;I always liked the idea of people creating worlds and stories around them. Lego was another thing i immersed myself into. These bricks opened a new world for me to build from my imagination (and later in life build things from Harry Potter with my younger brother) and build things out of my own ideas.&lt;/p&gt;

&lt;p&gt;Let me give you an example. A couple of months before my birthday i really wanted a pirate ship but since my birthday was far away i decided to build one with myself with the Lego i had. Even if it looked like any other ship, i remember i was really proud of having built that by my own.&lt;/p&gt;

&lt;p&gt;This is why i love programming because you can create purely based on your ideas and imagination. &lt;/p&gt;

&lt;p&gt;It's also a powerful tool for creating solutions to problems (and sometimes to problems that don't yet exists).&lt;/p&gt;

&lt;p&gt;I think Albert Einstein sums it up pretty good.&lt;/p&gt;

&lt;p&gt;“Imagination is more important than knowledge. For knowledge is limited to all we now know and understand, while imagination embraces the entire world, and all there ever will be to know and understand.”&lt;/p&gt;

&lt;p&gt;― Albert Einstein&lt;/p&gt;

&lt;p&gt;When i teach i try to tell my students to be creative problem-solvers and not just focusing on learning the latest JS framework.&lt;/p&gt;

&lt;p&gt;I'm curious on how you view programming, please share in the comments!&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>creativity</category>
    </item>
  </channel>
</rss>
