<?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: detimo</title>
    <description>The latest articles on DEV Community by detimo (@detimo).</description>
    <link>https://dev.to/detimo</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%2F274365%2F8fdfd565-0bbb-41a8-9ba7-618a732f8317.png</url>
      <title>DEV Community: detimo</title>
      <link>https://dev.to/detimo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/detimo"/>
    <language>en</language>
    <item>
      <title>What is the Most Difficult Concept to deal with in Python?</title>
      <dc:creator>detimo</dc:creator>
      <pubDate>Tue, 19 Nov 2019 09:01:36 +0000</pubDate>
      <link>https://dev.to/detimo/what-is-the-most-difficult-concept-to-deal-with-in-python-3283</link>
      <guid>https://dev.to/detimo/what-is-the-most-difficult-concept-to-deal-with-in-python-3283</guid>
      <description>&lt;p&gt;When it comes to &lt;a href="https://python.org"&gt;Python&lt;/a&gt;, youll find that you pick up on many of the concepts quite quickly. Yes, there will be some things here and there that may give you some trouble - you are learning a new language after all - but the similarities to the English language will make &lt;a href="https://pythonbasics.org"&gt;learning Python&lt;/a&gt; much more easy to take on than &lt;a href="http://markburgess.org/CTutorial/C-Tut-4.02.pdf"&gt;learning C&lt;/a&gt; or &lt;a href="https://autotelicum.github.io/Smooth-CoffeeScript/literate/js-intro.pdf"&gt;Javascript&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Overall, Python is a very simple concept to grasp. Everything is written in a manner that is clean and easy to read. Plus, youll likely grasp code that you havent ever used faster than you would in other programs because of the no-nonsense language Python was developed with. That being said, there are some frustrations that every programmer runs into when working with code. Here are a few that you may experience while working with Python.&lt;/p&gt;

&lt;h2&gt;
  
  
  Indentions
&lt;/h2&gt;

&lt;p&gt;While indenting is usually just an annoying practice that programmers either live and die by or casually ignore, theres no getting around it with Python. Indentation is built directly into Pythons programming language, so youll have to learn quickly if you want to build anything!&lt;/p&gt;

&lt;p&gt;Python wants four spaces for every ident:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;5&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="s"&gt;"5"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Indenting isnt all bad though - it makes your code more readable, easier to maintain, and much easier to debug. When you get the hang of it, it will start to feel like second nature. Plus, there is an added silver lining. Many of the syntax issues that come with other languages wont carry over to Python because you wont have to worry about brackets, colons, semicolons, and the like. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IrzG_Rrh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://external-content.duckduckgo.com/iu/%3Fu%3Dhttps%253A%252F%252Fthumbs.gfycat.com%252FFrailMildFawn-max-1mb.gif%26f%3D1%26nofb%3D1" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IrzG_Rrh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://external-content.duckduckgo.com/iu/%3Fu%3Dhttps%253A%252F%252Fthumbs.gfycat.com%252FFrailMildFawn-max-1mb.gif%26f%3D1%26nofb%3D1" alt="spacebar"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Documentation
&lt;/h2&gt;

&lt;p&gt;This complaint is pretty much universal for coders of every programming language - documentation can be a pain to sort through. This is especially true if your source prefers to upload raw docs instead of making a more user-friendly version. Yikes! &lt;/p&gt;

&lt;p&gt;That being said, &lt;a href="https://docs.python.org/"&gt;Pythons documentation&lt;/a&gt; tends to be miles ahead of other languages in terms of readability. It may take you a while to get the hang of it, but youll gradually start intuitively understanding the content as you become more experienced.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--H6IP9gfF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://external-content.duckduckgo.com/iu/%3Fu%3Dhttps%253A%252F%252Fthumbs.gfycat.com%252FRecklessUnsteadyAndeancat-size_restricted.gif%26f%3D1%26nofb%3D1" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--H6IP9gfF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://external-content.duckduckgo.com/iu/%3Fu%3Dhttps%253A%252F%252Fthumbs.gfycat.com%252FRecklessUnsteadyAndeancat-size_restricted.gif%26f%3D1%26nofb%3D1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Be sure to look for any examples that may be given farther into the documentation and try to learn by applying the syntax written in the example. When youve figured out how to use the example in the doc properly, go back and read the first section. Things will be much more clear!&lt;/p&gt;

&lt;p&gt;There's also a lot of examples when you search the web, which are sometimes more in-depth or broad than the official docs. Don't forget &lt;a href="stackoverflow.com"&gt;stackoverflow&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Writing Programs
&lt;/h2&gt;

&lt;p&gt;When it comes down to it, the hardest part of any language is just figuring out how you want to apply what you've learned. Walking through tutorials and reading informative articles will be the easy part - the real challenge comes from creating an idea and seeing it through to fruition. &lt;/p&gt;

&lt;p&gt;That being said, there is a way you can combat this issue. The answer is simple - start by creating a journal that you can use to log all the ideas you have for different programs and apps. When you do this, be sure to add some notes about different ways to build the structure of the program - this will be very helpful later on. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resources&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://python.org"&gt;Download Python&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.python.org/"&gt;Python documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pythonbasics.org"&gt;Learn Python&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>python</category>
    </item>
    <item>
      <title>Python Flask: pros and cons</title>
      <dc:creator>detimo</dc:creator>
      <pubDate>Mon, 18 Nov 2019 15:37:51 +0000</pubDate>
      <link>https://dev.to/detimo/python-flask-pros-and-cons-1mlo</link>
      <guid>https://dev.to/detimo/python-flask-pros-and-cons-1mlo</guid>
      <description>&lt;p&gt;&lt;a href="https://flask.palletsprojects.com/en/1.1.x/" rel="noopener noreferrer"&gt;Flask&lt;/a&gt; is a lightweight &lt;a href="https://en.wikipedia.org/wiki/Web_Server_Gateway_Interface" rel="noopener noreferrer"&gt;Web Server Gateway Interface (WSGI)&lt;/a&gt; web application framework. &lt;/p&gt;

&lt;p&gt;A micro web framework that has minimal dependencies on external libraries, written in &lt;a href="https://python.org" rel="noopener noreferrer"&gt;Python&lt;/a&gt;, which was formed for a faster and easier use, and also has the ability to scale up to complex applications.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fexternal-content.duckduckgo.com%2Fiu%2F%3Fu%3Dhttps%253A%252F%252Fonaircode.com%252Fwp-content%252Fuploads%252F2017%252F08%252Fflask-python-framework-1024x553.png%26f%3D1%26nofb%3D1" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fexternal-content.duckduckgo.com%2Fiu%2F%3Fu%3Dhttps%253A%252F%252Fonaircode.com%252Fwp-content%252Fuploads%252F2017%252F08%252Fflask-python-framework-1024x553.png%26f%3D1%26nofb%3D1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A developer is provided the required code by Flask when building a web application. It lets you start up a server, handle requests, templates and much more.&lt;/p&gt;

&lt;p&gt;As a beginner in web development, you want to &lt;a href="https://pythonbasics.org/flask-tutorial-hello-world/" rel="noopener noreferrer"&gt;know more about Flask&lt;/a&gt;. Flask is considered the best framework for beginners due to its flexibility and gives you the opportunity to learn. Here are the advantages and disadvantages of the Flask web framework.&lt;/p&gt;

&lt;p&gt;While Flask is simple enough to get started with, you should know the &lt;a href="https://pythonprogramminglanguage.com" rel="noopener noreferrer"&gt;Python language&lt;/a&gt; before starting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Advantages of the Flask framework
&lt;/h2&gt;

&lt;p&gt;Flask is considered the best framework for light web application serving, it is a lightweight framework and can also be useful to the developer if he or she chooses a web interface to the default system based UI.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Easy to understand development&lt;/strong&gt;&lt;br&gt;
The Flask framework is easy to understand, that is why it is best for beginners. Its simplicity gives you the opportunity to understand it better and learn from it. There are interesting features to use in the framework. The simplicity in the flask framework enables the developer to navigate around and create the application easily.&lt;/p&gt;

&lt;p&gt;Unlike other web application frameworks, flask let you be in total control in web development taking full creative control of the application and web development. The developer has the chance of being "in the drivers seat", taking charge of what you want to do like adding external features.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fexternal-content.duckduckgo.com%2Fiu%2F%3Fu%3Dhttp%253A%252F%252Fdocs.peewee-orm.com%252Fprojects%252Fflask-peewee%252Fen%252Flatest%252F_images%252Ffp-admin.jpg%26f%3D1%26nofb%3D1" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fexternal-content.duckduckgo.com%2Fiu%2F%3Fu%3Dhttp%253A%252F%252Fdocs.peewee-orm.com%252Fprojects%252Fflask-peewee%252Fen%252Flatest%252F_images%252Ffp-admin.jpg%26f%3D1%26nofb%3D1" alt="flask admin"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It is very flexible and easy.&lt;/strong&gt;&lt;br&gt;
There are only a handful of parts of flask that cannot be changed or altered because of its simplicity and minimalism. This means that almost all the parts of flask are open to change, unlike some other web frameworks.&lt;/p&gt;

&lt;p&gt;Flask comes with a &lt;a href="https://pythonbasics.org/flask-tutorial-templates/" rel="noopener noreferrer"&gt;template engine&lt;/a&gt; that lets you use the same user interface for multiple pages. Python can insert variables into the templates.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Testing&lt;/strong&gt;&lt;br&gt;
Using Flask for web development allows for unit testing through its integrated support, built-in development server, fast debugger, and restful request dispatching. It is lightweight to enable you to transit into a web framework easily with some extension. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fexternal-content.duckduckgo.com%2Fiu%2F%3Fu%3Dhttps%253A%252F%252Fmedia.giphy.com%252Fmedia%252FxT4uQyKtTSwg4h9zd6%252Fgiphy.gif%26f%3D1%26nofb%3D1" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fexternal-content.duckduckgo.com%2Fiu%2F%3Fu%3Dhttps%253A%252F%252Fmedia.giphy.com%252Fmedia%252FxT4uQyKtTSwg4h9zd6%252Fgiphy.gif%26f%3D1%26nofb%3D1" alt="testing"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Disadvantages of flask
&lt;/h2&gt;

&lt;p&gt;As it is easy for an amateur or a beginner to learn and create a web development with flask framework, in the same way, a bad developer will write worse code, or in the case of a young developer in training, it will be easier for him to use low-quality code creating a "bad web application".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fexternal-content.duckduckgo.com%2Fiu%2F%3Fu%3Dhttps%253A%252F%252Fmedia.giphy.com%252Fmedia%252F137EaR4vAOCn1S%252Fgiphy.gif%26f%3D1%26nofb%3D1" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fexternal-content.duckduckgo.com%2Fiu%2F%3Fu%3Dhttps%253A%252F%252Fmedia.giphy.com%252Fmedia%252F137EaR4vAOCn1S%252Fgiphy.gif%26f%3D1%26nofb%3D1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scale&lt;/strong&gt;&lt;br&gt;
Another issue about flask is that it has a singular source which means that it will handle every request in turns, one at a time. So if you are trying to serve multiple requests, it will take more time. With fewer tools at your disposal, you may need to install more modules. This could be mitigated by using Python specialized hosting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Modules&lt;/strong&gt;&lt;br&gt;
Using more modules is seen as a third party involvement which could be a major breach in security. The process and development is no longer between the web framework and the developer, because of the involvement of other modules. That could increase the security risk if a malicious module is included. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Related links&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://pythonbasics.org/flask-tutorial-hello-world/" rel="noopener noreferrer"&gt;Flask beginners tutorial&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://flask.palletsprojects.com/en/1.1.x/" rel="noopener noreferrer"&gt;Python Flask module site&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pythonprogramminglanguage.com/" rel="noopener noreferrer"&gt;Learn Python&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>python</category>
      <category>flask</category>
    </item>
  </channel>
</rss>
