<?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: CodingShower</title>
    <description>The latest articles on DEV Community by CodingShower (@codingshower).</description>
    <link>https://dev.to/codingshower</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%2F829094%2F8ecff8df-ed5f-4aac-a7b1-9e4bb90cda5f.jpg</url>
      <title>DEV Community: CodingShower</title>
      <link>https://dev.to/codingshower</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/codingshower"/>
    <language>en</language>
    <item>
      <title>What is Python pip Dependency Resolution?</title>
      <dc:creator>CodingShower</dc:creator>
      <pubDate>Sat, 06 Aug 2022 13:38:02 +0000</pubDate>
      <link>https://dev.to/codingshower/what-is-python-pip-dependency-resolution-4bik</link>
      <guid>https://dev.to/codingshower/what-is-python-pip-dependency-resolution-4bik</guid>
      <description>&lt;p&gt;When you are using multiple packages in your Python project, these top level packages may depend on a common package with different version constraints. &lt;code&gt;pip&lt;/code&gt; smartly resolves which version of this common dependancy to install.&lt;/p&gt;

&lt;p&gt;For instance, if package &lt;code&gt;foo&lt;/code&gt; has a dependancy on &lt;code&gt;bob&amp;gt;=2.0.0&lt;/code&gt; where as &lt;code&gt;bar&lt;/code&gt; has a dependancy on &lt;code&gt;bob&amp;lt;=3.0.0&lt;/code&gt;, &lt;code&gt;pip&lt;/code&gt; will have to resolve which version to download and install to make sure it is able to conform to both the constraints.&lt;/p&gt;

&lt;p&gt;This process is known as dependancy resolution and involves an intense process (known as backtracking).&lt;/p&gt;

&lt;p&gt;Eventually during the dependancy resolution, conflicts may arise (dependancy hell), due to which your installation may fail. This behaviour is different across the older versions of &lt;code&gt;pip&lt;/code&gt; compared to the newer ones (legacy and new dependancy resolvers).&lt;/p&gt;

&lt;p&gt;Sometimes it may be useful to know the details on how &lt;code&gt;pip&lt;/code&gt; choses the version when given a list of multiple versions of the same dependency from the dependency tree, how to resolve conflicts when they arise and how to go about finding out conflicts that already exists in the package installed in the current environment/system.&lt;/p&gt;

&lt;p&gt;For some folks just knowing what dependancy resolution is (as stated above), might be enough. But for some, the details might be really interesting. If thats the case, then &lt;a href="https://codingshower.com/pip-dependency-resolver-and-version-conflicts/"&gt;head over to this article&lt;/a&gt; to have in in-depth encounter :)&lt;/p&gt;

</description>
      <category>python</category>
      <category>programming</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Profiling Flask Apps</title>
      <dc:creator>CodingShower</dc:creator>
      <pubDate>Mon, 20 Jun 2022 14:08:31 +0000</pubDate>
      <link>https://dev.to/codingshower/profiling-flask-apps-2101</link>
      <guid>https://dev.to/codingshower/profiling-flask-apps-2101</guid>
      <description>&lt;p&gt;When you're working on Flask apps, at some point one of your routes could get slow in terms of performance (returning response to the client).&lt;/p&gt;

&lt;p&gt;The best way to approach such problems (slow programs) is to use a profiler to analyse which parts of your code is slowing down the application.&lt;/p&gt;

&lt;p&gt;In Flask we can use the Werkzeug Profiler Middleware to implement profiling in our Flask apps. It is super simple!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from flask import Flask
from werkzeug.middleware.profiler import ProfilerMiddleware

app = Flask(...)
app.wsgi_app = ProfilerMiddleware(app.wsgi_app)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it! Now when you make a request to one of your endpoints, in your console log, you'll notice stats getting dumped.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;----------------------------------------
PATH: '/search'
         7508936 function calls (7492431 primitive calls) in 3.824 seconds

   Ordered by: internal time, call count

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.701    0.701    2.152    2.152 ...
   101132    0.485    0.000    0.485    0.000 ...
   166457    0.351    0.000    1.258    0.000 ...
  1440656    0.226    0.000    0.347    0.000 ...
5048/4702    0.165    0.000    0.327    0.000 ...
       ...

----------------------------------------
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;If you'd like to learn more about configuring the profiler, head over to &lt;a href="https://codingshower.com/profiling-python-flask-web-apps-with-werkzeug-middleware-application-profiler/"&gt;this article&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;If you'd like to learn more about using a statistical profiler, head over to &lt;a href="https://codingshower.com/profiling-python-flask-web-apps-with-pyinstrument/"&gt;this article&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>python</category>
      <category>flask</category>
      <category>profiler</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Vim Convert Tab Key Press into Spaces</title>
      <dc:creator>CodingShower</dc:creator>
      <pubDate>Fri, 27 May 2022 10:05:03 +0000</pubDate>
      <link>https://dev.to/codingshower/vim-convert-tab-key-press-into-spaces-4dpc</link>
      <guid>https://dev.to/codingshower/vim-convert-tab-key-press-into-spaces-4dpc</guid>
      <description>&lt;p&gt;Here's a quick tip on how to convert the tab key in vim to spaces instead of the tab character. Put the following in your &lt;code&gt;~/.vimrc&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;set expandtab
set tabstop=2
set softtabstop=2
set shiftwidth=2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or the following command when the editor is open:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;:set et sw=2 ts=2 sts=2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Head over to &lt;a href="https://codingshower.com/vim-set-tab-to-n-spaces/"&gt;this article&lt;/a&gt; to read up more on each setting/option specified above.&lt;/p&gt;

</description>
      <category>vim</category>
      <category>snippet</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Source Code Pro Font in VSCode (macOS)</title>
      <dc:creator>CodingShower</dc:creator>
      <pubDate>Tue, 17 May 2022 13:19:20 +0000</pubDate>
      <link>https://dev.to/codingshower/source-code-pro-font-in-vscode-macos-3ffd</link>
      <guid>https://dev.to/codingshower/source-code-pro-font-in-vscode-macos-3ffd</guid>
      <description>&lt;p&gt;I've been using the Source Code Pro Font for coding in my VSCode setup (on macOS) for quite some time now. Personally, I've been loving it and would highly recommend it to others.&lt;/p&gt;

&lt;p&gt;Setting it up is really easy! I've documented all the &lt;a href="https://codingshower.com/using-source-code-pro-font-in-vs-code-on-macos/"&gt;required steps here&lt;/a&gt; that you can follow. It won't take more than 5mins, so go for it!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>vscode</category>
      <category>fonts</category>
      <category>programming</category>
    </item>
    <item>
      <title>All about React flushSync</title>
      <dc:creator>CodingShower</dc:creator>
      <pubDate>Wed, 20 Apr 2022 13:29:04 +0000</pubDate>
      <link>https://dev.to/codingshower/all-about-react-flushsync-3k4c</link>
      <guid>https://dev.to/codingshower/all-about-react-flushsync-3k4c</guid>
      <description>&lt;p&gt;Learn all about React &lt;code&gt;flushsync()&lt;/code&gt; here - &lt;a href="https://codingshower.com/react-flushsync/"&gt;https://codingshower.com/react-flushsync/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
