<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Emil Mladenov on Medium]]></title>
        <description><![CDATA[Stories by Emil Mladenov on Medium]]></description>
        <link>https://medium.com/@emsign?source=rss-7c91d16163d6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*GmYyha49zaYBhBycoOTsAw.jpeg</url>
            <title>Stories by Emil Mladenov on Medium</title>
            <link>https://medium.com/@emsign?source=rss-7c91d16163d6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 15:00:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@emsign/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Understanding regular expressions basics]]></title>
            <link>https://medium.com/@emsign/understanding-regular-expressions-basics-36c823c81523?source=rss-7c91d16163d6------2</link>
            <guid isPermaLink="false">https://medium.com/p/36c823c81523</guid>
            <category><![CDATA[regular-expressions]]></category>
            <category><![CDATA[regex]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[sequencing]]></category>
            <category><![CDATA[string]]></category>
            <dc:creator><![CDATA[Emil Mladenov]]></dc:creator>
            <pubDate>Mon, 26 Mar 2018 12:31:45 GMT</pubDate>
            <atom:updated>2018-03-26T12:31:45.723Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mxwl0_gdFfhnpXeh8RozCA.jpeg" /></figure><p>Regular expressions seem like the Matrix code. It almost feels like only the One can bend them to his will and make changes to the world. With their weird syntax, and mind-bending patterns it’s understandable why they are frightening many developers and people seem to do their best to avoid them in production.</p><p>“I have a problem and I decided to use regex to solve it. Now I have two problems”.</p><p>In this short article, I will aim to help you grasp the fundamentals of regular expressions by using fictitious and real world applicable examples, so you can grasp an understanding and get some practice then.</p><p><strong>What are regular expressions?</strong></p><p>A regular expression is a simply a sequence of characters that describe a search pattern for string. You can use regex to find specific sequences in strings and validate data like:</p><ul><li>Validate a phone number</li><li>Ensure that there’s no profanity words in an username</li><li>Get the exact time a specific word / character/ number occurs in a string</li><li>Ensure that a list of files all end with a specific extension</li><li>And many, many more examples</li></ul><p><strong>Creating a regular expression</strong></p><p>We will use JavaScript to write examples for regular expressions, so let’s make up a fake problem and dive right in to the code to solve it. Our problem is a a password, that has the following requirements we all know and love:</p><ul><li>It has to have more than 6 characters</li><li>It needs to contain uppercase letters</li><li>It needs to contain numbers</li><li>No spaces allowed</li></ul><p>This is how the regular expression to match the above pattern would look like:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ea807786a9db11c46ce12988bf754346/href">https://medium.com/media/ea807786a9db11c46ce12988bf754346/href</a></iframe><p>Now let’s break it down:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*QA1RXdFcL6EBy6U4az_sgQ.png" /></figure><p>Regular expressions may look daunting at first, but they are simply a set of rules combined in a sequence. The best way to master them and grasp a more solid understanding is to simply practice. Here’s a few ideas to get you going:</p><ul><li>Build a profanity filter</li><li>Build a regular expression to validate Elf names</li><li>Create an expression that counts the occurrences of how many times Stephen King tweets about Donald Trump (that’s a fun one)</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=36c823c81523" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting started with Flask]]></title>
            <link>https://medium.com/@emsign/getting-started-with-flask-677bb3435dfd?source=rss-7c91d16163d6------2</link>
            <guid isPermaLink="false">https://medium.com/p/677bb3435dfd</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[flask]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Emil Mladenov]]></dc:creator>
            <pubDate>Tue, 20 Mar 2018 20:28:27 GMT</pubDate>
            <atom:updated>2018-03-20T20:28:27.778Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cFthJrtCYbnDfdjljHC_MA.jpeg" /></figure><p>Flask is an awesome micro framework for developing web applications with Python.</p><p>By using Flask, you can quickly get a web application running, complete with models, views and templates, it’s simple to use, has nice documentation and it’s easy to learn.</p><p><strong>Prerequisites</strong></p><p>You will need Python installed on your computer. Install flask by using pip like so:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/45ea853e94d7ef8b6f0f01291b07178a/href">https://medium.com/media/45ea853e94d7ef8b6f0f01291b07178a/href</a></iframe><p>Once you have Flask installed, create a project to contain your web application files in. To create and run a simple application, you will need just a couple of folders and a main Python file to host your view logic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*rsl2uR4SHZQumwXCK8kBIw.png" /></figure><p><strong>Let’s get coding</strong></p><p>First, lets open our main file and let’s import the Flask module and a couple of methods.</p><p>We use the Flask constructor to create our app, and then we use a decorator function to set up our index route.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0e3b02e7a5ddc610452fad2588d47be4/href">https://medium.com/media/0e3b02e7a5ddc610452fad2588d47be4/href</a></iframe><p>When your run main.py, your Flask application will run on your default port, and you will see a simple ‘hello, Flask!’ printed in the browser.</p><p>Let’s create a simple template and render it. Flask uses the Jinja templating language, which allows for simple programming logic like for loops, if statements and such.</p><p>Our simple template looks like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/177c829afb30a6c8985fa4637f4c0f53/href">https://medium.com/media/177c829afb30a6c8985fa4637f4c0f53/href</a></iframe><p>We also need to change our view to render the template and pass it some values.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c7743593571b6eb53d8f13421d28b9a2/href">https://medium.com/media/c7743593571b6eb53d8f13421d28b9a2/href</a></iframe><p>The view will pass the title and news parameters to our template, and by using a simple for loop inside the template, we are able to render separate news items with unique titles and links. We also use a ternary statement to ensure that our heading title won’t get rendered without any content, if we forget to add a title (winkyface)</p><p>And that’s a wrap! This even barely scratches the surface of Flask, but it’s enough to help you grasp the fundamentals in the simplest way possible. My challenge for you is to render your own template!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=677bb3435dfd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding recursion in the simplest way possible]]></title>
            <link>https://medium.com/@emsign/understanding-recursion-in-the-simplest-way-possible-b7e833b4d03?source=rss-7c91d16163d6------2</link>
            <guid isPermaLink="false">https://medium.com/p/b7e833b4d03</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[recursion]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Emil Mladenov]]></dc:creator>
            <pubDate>Mon, 19 Mar 2018 13:12:53 GMT</pubDate>
            <atom:updated>2018-03-19T13:12:53.507Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J9SQ1JdVMe1pSB-jePs1zg.jpeg" /></figure><p>Recursion is a key computer science concept. It is essentially a function that keeps calling itself until it reaches an exit condition.</p><p>An abstract way to think about recursion is to imagine yourself cooking an omelette. Your base condition for the omelette is to add 5 eggs to a bowl, mix them, and then cook them in a pan. So a recursive way to cook your omelette could be:<br>Are there 5 eggs in the bowl?</p><p>If not, perform the action of adding one egg in the bowl.</p><p>Are there 5 eggs in the bowl?</p><p>If yes, then stop performing that action, as your base condition (having 5 eggs in a bowl) is now satisfied.</p><p>When I was initially learning about recursion, it took some time to understand what’s going on, as every example I came across involved some sort of math, such as the Fibonacci numbers, which kind of confused me at the beginning, as it wasn’t clear what the function actually did.</p><p>In order to ease the process of learning this super useful concept, behold the very useless, but simple and helpful recursive function — the <strong>screamer.</strong></p><p>What the screamer does is it builds up a big scream using recursion, and it will only scream, if the sound is long enough for an actual scream.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/79f6b7b5831125c77e50339543ea8cae/href">https://medium.com/media/79f6b7b5831125c77e50339543ea8cae/href</a></iframe><p>This is an extremely simple example that allows us to understand the mechanism of recursion:</p><p>First, we have our base condition - if the length of the sound is 10 or more characters, we return it.</p><p>If it’s not, we return the scream function, but we add a single letter ‘A’ to the original string.</p><p>The scream function will be called as many times necessary, until we have a string with the length of 10 characters. We ensure that new characters are added by calling the function again with an additional ‘A’ character.</p><p>I think this is a good stepping stone into learning recursion, and it provides a slightly simpler approach compared to using mathematical examples.</p><p>I suggest playing with the screamer function, by maybe adding a parameter for custom string lengths, or changing the letter added. Bonus points if you add an exclamation mark at the end of your scream. Once you feel confident in screaming, you can approach the mathematical examples with more ease, and your understanding of recursion will grow.</p><p>I hope this has been useful for beginners. What is the programming concept you are currently struggling with?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b7e833b4d03" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>