<?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: Deanna Swallow</title>
    <description>The latest articles on DEV Community by Deanna Swallow (@deannaswallow).</description>
    <link>https://dev.to/deannaswallow</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%2F47780%2Fbd7be32b-8482-4d12-a6e8-36de4911172c.png</url>
      <title>DEV Community: Deanna Swallow</title>
      <link>https://dev.to/deannaswallow</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/deannaswallow"/>
    <language>en</language>
    <item>
      <title>Debugging By Displaying Info</title>
      <dc:creator>Deanna Swallow</dc:creator>
      <pubDate>Sat, 02 Dec 2017 21:56:44 +0000</pubDate>
      <link>https://dev.to/deannaswallow/debugging-by-displaying-info-9jb</link>
      <guid>https://dev.to/deannaswallow/debugging-by-displaying-info-9jb</guid>
      <description>&lt;p&gt;When I first started coding, I grossly underestimated the value of displaying information to the screen. I had the notion of "if it works, it works, and if it doesn't, it doesn't." Anyone who's been coding for a bit will probably laugh at that. I started with Python, and &lt;code&gt;print&lt;/code&gt; became my best friend once I learned how to utilize it. I've since learned Visual Basic, C++, and JavaScript. With each of those, I made note quickly of how to display things. &lt;/p&gt;

&lt;p&gt;Let's say you're just starting out, and you've got a simple for loop doing some math for you, but you're not getting the results you expected. You're probably wondering why, and how to find the problem. With production code, you want to be concise and efficient, but when you're learning, it's okay to be verbose. Do it. Look at the formula you're using, and put &lt;em&gt;more&lt;/em&gt; variables in for testing purposes. Once you find the problem, you can edit your code to make it better (however you define "better"). &lt;/p&gt;

&lt;p&gt;In my recent attempt at solving Part 1, Day 1 of &lt;a href="http://adventofcode.com/"&gt;Advent of Code&lt;/a&gt;, I wasn't getting the sum as expected. I was keeping track of the running total(sum) in &lt;code&gt;total&lt;/code&gt; (original, right?), so I started sticking &lt;code&gt;console.log("current total is "+total);&lt;/code&gt; after &lt;strong&gt;every&lt;/strong&gt; single line that did something. Hey, look at that! It's broken on line [whichever one it was]. I made adjustments, ran it again, got it right on the second try. I went back and took out all those &lt;code&gt;console.log&lt;/code&gt; statements, and it was nice and readable again.&lt;/p&gt;

&lt;p&gt;I'm also working on an AngularJS project right now, and I'm doing the same thing. More complicated concepts, and it can be hard sometimes to track what info is where at any given point in time. Since its base is JavaScript, I can still &lt;code&gt;console.log&lt;/code&gt; a lot of things, but couldn't figure out how to stick it in at certain points. A mentor introduced me yesterday to the concept of &lt;a href="https://developers.google.com/web/tools/chrome-devtools/javascript/breakpoints"&gt;breakpoints&lt;/a&gt;. Super helpful! I was having difficulty visualizing what &lt;code&gt;$scope&lt;/code&gt; was holding at key points, and this solved it and let me see on my screen what it was and wasn't doing.&lt;/p&gt;

&lt;p&gt;I cannot emphasize enough how helpful it is to literally see what your program is doing. Learn how to display things. It makes everything else you learn easier.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>learning</category>
    </item>
    <item>
      <title>I Don't Really Need To Know That, Right?</title>
      <dc:creator>Deanna Swallow</dc:creator>
      <pubDate>Sat, 02 Dec 2017 19:41:32 +0000</pubDate>
      <link>https://dev.to/deannaswallow/i-dont-really-need-to-know-that-right-8bk</link>
      <guid>https://dev.to/deannaswallow/i-dont-really-need-to-know-that-right-8bk</guid>
      <description>&lt;p&gt;I first started learning to program about a year ago. I went the traditional route and took an intro class at my local community college. At first, things seemed simple and easy to grasp. It didn't take long for the "what on Earth is this nonsense?!" feeling to set in. I always fancied myself to be decent at math in general, but coming up with concise logic to solve a problem proved to be insanely daunting in those early stages. My first true stumbling block was when I was asked to write a program that could determine whether or not a number passed to it was prime or not. Sounds simple, right? I won't lie. I angry cried after spending about 12 hours on it and getting nowhere. I was given tips to try: walk away for a bit and come back to it, google prime number algorithms and try to implement them using the syntax for the language you're using, etc. For some idiotic reason, I thought those tips were silly and didn't apply to me. Why? I have no idea. I eventually gave in and followed the tips, but to no avail. I decided that I was going to simply not finish the assignment and turn in what I attempted to do. I thought it wouldn't matter. I was wrong.&lt;/p&gt;

&lt;p&gt;I got the grade back on it (50% for effort), and my instructor gave me source code to look at that actually solved the problem. I read it, and didn't understand it. That made me angry and I lost almost all confidence that I could do this little thing called programming. I moved on, still did well in the class despite that assignment, but I would noticeably twitch every time I heard "prime number." &lt;/p&gt;

&lt;p&gt;Fast forward to a couple months ago when I started a web development program at a bootcamp. What's that? I literally can't blow off assignments if I don't get something? I &lt;em&gt;have&lt;/em&gt; to figure things out before moving on?! Say it isn't so! I wanted to tear my hair out doing a few programming reinforcement exercises. I knew then that I should have pushed harder back at the beginning to figure out what I was doing. I remembered the prime number program, and I wondered if I could solve it now that I had some more training under my belt. &lt;/p&gt;

&lt;p&gt;Success!! It may seem minor to some, but it meant the world to finally be able to do it and understand what I was doing. I'm a stickler for actually &lt;em&gt;knowing&lt;/em&gt; what's going on, not just being &lt;em&gt;able&lt;/em&gt; to do it. That's when I made a vow to myself--not just because I was effectively being held to it by the bootcamp, but because I owed it to myself: don't skip things that you don't get. Keep trying, and utilize every freaking resource you can get your hands on until it makes sense. You'll thank yourself later. Now if I could find a way to divine the things I'm learning right now...&lt;/p&gt;

</description>
      <category>lettertomyself</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
