<?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: Connor</title>
    <description>The latest articles on DEV Community by Connor (@meigs2).</description>
    <link>https://dev.to/meigs2</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%2F513460%2Feecbf483-184a-40ff-9273-9c3deaddc473.png</url>
      <title>DEV Community: Connor</title>
      <link>https://dev.to/meigs2</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/meigs2"/>
    <language>en</language>
    <item>
      <title>Python for C# devs</title>
      <dc:creator>Connor</dc:creator>
      <pubDate>Fri, 11 Dec 2020 03:25:45 +0000</pubDate>
      <link>https://dev.to/meigs2/python-for-c-devs-5egp</link>
      <guid>https://dev.to/meigs2/python-for-c-devs-5egp</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--N6KeT_Vr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/upflcly9npe7xv5h7lef.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--N6KeT_Vr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/upflcly9npe7xv5h7lef.jpg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Photo by &lt;a href="https://dev.toom/photos/taiuG8CPKAQ"&gt;Maxwell Nelson&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/taiuG8CPKAQ"&gt;Unsplash&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Recently I've been using python for most of my personal projects rather than C#. I &lt;em&gt;really&lt;/em&gt; like C#, its been my main programming language for quite some time. However, for many things, you &lt;em&gt;really&lt;/em&gt; don't need all the bulk surrounding a C# binary. Therefore, for more simple projects I really like Python.&lt;/p&gt;

&lt;p&gt;However, I have only really started to become proficient in the language until very recently. Part of the issue was my history with Python, coming from a more... pure OOP experience with C++ and C#. However, after some more experience, Python is quickly becoming my go to language for simple scripting and medium sized projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  OOP and Me
&lt;/h2&gt;

&lt;p&gt;Initially, Python doesn't seem to be as robust (OOP wise) as something like C++, however, believe it or not, Python is actually totally object oriented. Admittedly, this fact escaped me for an embarrassingly long time, thinking Python was more like Javascript than C#. Though the dynamic typing is quite strange, once you realize that basically everything is an object, including &lt;em&gt;functions themselves,&lt;/em&gt; you can start to do really powerful things.&lt;/p&gt;

&lt;p&gt;For example, when starting to write my library for interacting with the Guild Wars 2 API, I discovered Python's decorators. Basically, because everything is an object, including functions, we can wrap functions with others, enabling runtime checking of conditions. For example, in the API, some endpoints require a API token to be provided. We can check, before we call the API, if the user has included an API token &lt;em&gt;only&lt;/em&gt; on the endpoints that require it. All we have to do is define and add the decorator &lt;code&gt;@requires_auth&lt;/code&gt; before the function, and, Viola! We can now enforce endpoints to require tokens to be given. If a new endpoint is added, we can just create the function and add the decorator in one easy to understand line.&lt;/p&gt;

&lt;p&gt;There is a great article on this, I'll link here here for further reading: &lt;a href="https://www.programiz.com/python-programming/decorator"&gt;https://www.programiz.com/python-programming/decorator&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--D049jPK_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://imgs.xkcd.com/comics/computer_problems.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--D049jPK_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://imgs.xkcd.com/comics/computer_problems.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://xkcd.com/722/"&gt;XKCD&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Up for Interpretation
&lt;/h2&gt;

&lt;p&gt;The other big thing I am liking more and more about Python is, because it is interpreted, no compilation is required. This makes quickly making a script to, say, scrape data from a website hilariously quick and easy. However, this has the obvious drawback of not being compiled, where we can enforce things before we actually run. Usually we use PyLint, however PyLint was really giving me some headaches when working on my custom module, but its something you have to just deal with unfortunately.&lt;/p&gt;

&lt;p&gt;One other thing I'd like to add is that at first I, naively, thought there was no way to enforce types of parameters into functions (and even then I'm not sure it will truly "enforce" it but, oh well). Usually most tutorials online will simply omit this. However, simply adding a &lt;code&gt;: type&lt;/code&gt; after a parameter will enforce its type, and will allow you to use intelligence if you're using VSCode. Which is really handy. Here's a quick example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[]):&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;adding &lt;code&gt;: []&lt;/code&gt; enforces the input type. Neat.&lt;/p&gt;

&lt;p&gt;Again, all this may sound simplistic, but switching languages is always a challenge.&lt;/p&gt;

&lt;p&gt;One qualm so far with all of this, and its not even a Python thing, is using VIM and VSCode autocomplete. Whenever I want to use a template, like the &lt;code&gt;def&lt;/code&gt; template, whenever I hit tab it puts me into visual select mode instead of insert. If there was a way to change this I would be very appreciative of it. I have been doing &lt;code&gt;c&lt;/code&gt; and just deleting everything and moving on but there must be a better way to move around that.&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Python environment setup for programming beginners</title>
      <dc:creator>Connor</dc:creator>
      <pubDate>Fri, 11 Dec 2020 03:04:07 +0000</pubDate>
      <link>https://dev.to/meigs2/python-environment-setup-for-programming-beginners-n9m</link>
      <guid>https://dev.to/meigs2/python-environment-setup-for-programming-beginners-n9m</guid>
      <description>&lt;p&gt;Many new programmers are often told to learn Python as their first programming language, which I totally agree with! However, for many, setting up a basic "environment" can seem extremely daunting. Which version of python should I use? What program should I use to code in? This tutorial tells me to use numpy, how do I get that?&lt;/p&gt;

&lt;p&gt;Well, in this short tutorial I will show you the basics of how to set up your own coding environment for python, and can even be extended to other languages once you decide to learn another!&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing Python
&lt;/h2&gt;

&lt;p&gt;If you've been using websites like &lt;a href="http://repl.it"&gt;repl.it&lt;/a&gt; since getting started, you'll need to take some extra steps to set up python on your computer if you want to start making more powerful projects.&lt;/p&gt;

&lt;p&gt;Head on over to &lt;a href="https://www.python.org/downloads/"&gt;https://www.python.org/downloads/&lt;/a&gt; and download python for your respective operating system.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FOdPslH6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/SGzZz2e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FOdPslH6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/SGzZz2e.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note, as of the time of writing, python 3.9 has been released, however I would be wary of downloading this latest version, as some important packages, like numpy and matplotlib may not be supported. I would recommend downloading 3.7 or 3.8 instead, unless this article has been out for a while.&lt;/p&gt;

&lt;h3&gt;
  
  
  Python 2 vs Python 3
&lt;/h3&gt;

&lt;p&gt;Just a quick tangent, but you might not know the difference between Python 2 and Python 3. Python 2 is an older version of Python. It is mainly kept for support for older programs. You should learn and use Python 3 unless it is necessary to use Python 2.&lt;/p&gt;

&lt;p&gt;With that out of the way, go ahead and download and install Python by running the installer. If the installer asks if you want to add python to your PATH variable, tell it yes. If it asks you to restart your computer, do that as well after installation. This will allow you to run python from the command prompt.&lt;/p&gt;

&lt;p&gt;And you've now installed Python! Next up we'll be installing the tools we use to actually code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing Visual Studio Code
&lt;/h2&gt;

&lt;p&gt;This part is simple. Now that you've got Python set up, its time to download your coding "environment". A coding environment is where you will develop, run and debug your programs. Visual Studio Code is Free, maintained by Microsoft, and works on most computers. Some other alternatives are Sublime, Atom and even just plain old Notepad. Those will not be covered here. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zjQ9Ak4x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/uf5IfUe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zjQ9Ak4x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/uf5IfUe.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Just go to &lt;a href="https://code.visualstudio.com/"&gt;https://code.visualstudio.com/&lt;/a&gt; and download and install VSCode!&lt;/p&gt;

&lt;h2&gt;
  
  
  Finishing up
&lt;/h2&gt;

&lt;p&gt;Now that you have Python and Visual Studio Code installed, its time to start your first project!&lt;/p&gt;

&lt;p&gt;Open VSCode and pick a folder where you want to keep your projects. Somewhere in your Documents on your computer is usually good. Now, make a new Python file, like &lt;code&gt;[test.py](http://test.py)&lt;/code&gt; and open it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XLyLABuH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/xBWZNwC.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XLyLABuH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/xBWZNwC.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After opening the file, VSCode might ask if you want to install the Python extension and PyLint. Install those.&lt;/p&gt;

&lt;p&gt;Now you're essentially good to go! To test, add a line of code like &lt;code&gt;print("Hello World")&lt;/code&gt;, press Shift+F5 (or F5 and Enter to go into debug mode) and Viola! Your code will run in the command prompt below.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Welcome to my Blog!</title>
      <dc:creator>Connor</dc:creator>
      <pubDate>Fri, 13 Nov 2020 02:41:35 +0000</pubDate>
      <link>https://dev.to/meigs2/welcome-to-my-blog-ni2</link>
      <guid>https://dev.to/meigs2/welcome-to-my-blog-ni2</guid>
      <description>&lt;p&gt;&lt;a href="https://unsplash.com/photos/D9VQo3GmapA"&gt;Cover image by Intricate Explorer&lt;/a&gt;&lt;br&gt;
Hi everyone, welcome to my Blog!&lt;/p&gt;

&lt;p&gt;I'm Connor Radeloff, a graduating senior at CU Boulder in Colorado majoring in Computer Science. I love C#, but have recently been using Python quite a bit for smaller side projects.&lt;/p&gt;

&lt;p&gt;I'm starting this blog for a few reasons. As of recent I think I've been in a bit of a rut regarding coding, and I really need to pick up the pace again. I'm looking for jobs right now, and I need some more projects on my resume! You can't have enough projects.&lt;/p&gt;

&lt;p&gt;I also think sometimes I find issues in my projects that I have to find answers to on my own (stack overflow fails me) so I can share my findings here.&lt;/p&gt;

&lt;p&gt;I also would like to share my progress, findings, and just general things I've been interested in on here, which might inspire others or give me feedback.&lt;/p&gt;

&lt;p&gt;In here I can post things like&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Code Snippets
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and links to other things I find useful, and things others might find useful as well, like &lt;a href="https://www.youtube.com/watch?v=ggSyF1SVFr4"&gt;links to helpful videos.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'll have more posts coming soon. Thanks!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tMNDBS8J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://licensebuttons.net/l/by/3.0/88x31.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tMNDBS8J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://licensebuttons.net/l/by/3.0/88x31.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>student</category>
      <category>dotnet</category>
      <category>welcome</category>
    </item>
  </channel>
</rss>
