<?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: Víctor H. Torres</title>
    <description>The latest articles on DEV Community by Víctor H. Torres (@victorhtorres).</description>
    <link>https://dev.to/victorhtorres</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%2F586500%2F63543b29-0f28-49ee-84f5-22ae485cc844.png</url>
      <title>DEV Community: Víctor H. Torres</title>
      <link>https://dev.to/victorhtorres</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/victorhtorres"/>
    <language>en</language>
    <item>
      <title>Find your specialty by being a T-shaped person.</title>
      <dc:creator>Víctor H. Torres</dc:creator>
      <pubDate>Sat, 05 Jun 2021 22:09:18 +0000</pubDate>
      <link>https://dev.to/victorhtorres/find-your-specialty-by-being-a-t-shaped-person-25hb</link>
      <guid>https://dev.to/victorhtorres/find-your-specialty-by-being-a-t-shaped-person-25hb</guid>
      <description>&lt;p&gt;The technology industry has many possible areas of work: software development, computer security, data science, AI and many more ... In addition, each area triggers a whole series of sub-areas to specialize. The job possibilities are immense, but that can also be overwhelming for some people who have yet to find what to specialize in.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do I need a specialization?
&lt;/h2&gt;

&lt;p&gt;In general, large companies are looking for people with skills in very specific areas, who have a deep command of a tool, a programming language. This happens because there are not enough professionals or people with the necessary experience to cover the high demand that the industry requires.&lt;/p&gt;

&lt;h2&gt;
  
  
  T-shaped person
&lt;/h2&gt;

&lt;p&gt;Also known as T-shaped developer, T-shaped professional. It is a profile of a person that has been defined by various industries, where the person learns, at least the basics, about the different areas or sub-areas that are transversal to their more specific skills:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TiuUn8Bm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9azev4ouwh7wkfh1uoqe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TiuUn8Bm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9azev4ouwh7wkfh1uoqe.png" alt="T-shaped person image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  But ... I don't know what to specialize in!
&lt;/h2&gt;

&lt;p&gt;My recommendation is to focus on the horizontal part of that T. Experience different areas of the industry of your interest, do not stay only with the first thing you learn. The time will come when you find some area, sub-area, tool, programming language, that you are more passionate about than everything else that you have already learned and place that passion in the vertical part of that T and learn it in depth.&lt;/p&gt;

&lt;p&gt;The invitation is not to neglect that horizontal part of the T, when you find your specialty. The advantages of working on both parts of the T will lead you to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Improve your analytical ability to solve problems.&lt;/li&gt;
&lt;li&gt;Best outlook in the industry.&lt;/li&gt;
&lt;li&gt;Opportunities for personal and professional growth.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Never stop learning!&lt;/p&gt;

</description>
      <category>softskill</category>
      <category>specialty</category>
      <category>tshaped</category>
      <category>developer</category>
    </item>
    <item>
      <title>How do you optimizing recursive functions</title>
      <dc:creator>Víctor H. Torres</dc:creator>
      <pubDate>Sun, 16 May 2021 21:34:22 +0000</pubDate>
      <link>https://dev.to/victorhtorres/how-do-you-optimizing-recursive-functions-326f</link>
      <guid>https://dev.to/victorhtorres/how-do-you-optimizing-recursive-functions-326f</guid>
      <description>&lt;h2&gt;
  
  
  Let's remember
&lt;/h2&gt;

&lt;p&gt;Recursive functions, a common topic when you are studying your career, like informatic engineer o related careers, but it's even more common learn only the fundamental: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A recursive function is when the function call itself for reduce a big problem to another each more small until reaching a base case. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A classic example is calculate the factorial of a positive number:&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;factorial&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;    

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;factorial&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&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;factorial&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

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

&lt;/div&gt;



&lt;h3&gt;
  
  
  The bad
&lt;/h3&gt;

&lt;p&gt;The compiler needs to stack each recursive function called in the call stack, until find the base case. Then, return to resolve each &lt;strong&gt;pending operation&lt;/strong&gt; that left in the call stack:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
# call stack simulation:
factorial(4)
  4 * factorial(3)
    3 * factorial(2)
      2 * factorial(1)
        1 * factorial(0)
          return 1
            1 * 1 -&amp;gt; return 1
        2 * 1 -&amp;gt; return 2
    3 * 2 -&amp;gt; return 6
  4 * 6 -&amp;gt; return 24

&amp;gt;&amp;gt;&amp;gt; 24

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

&lt;/div&gt;



&lt;p&gt;The above implementation could be easy to overflow the call stack with big numbers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tail recursion
&lt;/h2&gt;

&lt;p&gt;This is the part that ommited in many case when are talking about recursion. Exist a way to optimizing the recursive functions and the tip is: &lt;strong&gt;Not leave pending operations&lt;/strong&gt; when your call the function on mode recursive. &lt;/p&gt;

&lt;p&gt;Now, let's optimice the above 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;factorial&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;acum&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;acum&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;factorial&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;acum&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;n&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;factorial&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

&lt;span class="c1"&gt;# &amp;gt;&amp;gt;&amp;gt; 24
&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What changed?
&lt;/h3&gt;

&lt;p&gt;The new &lt;code&gt;acum&lt;/code&gt; variable help as an accumulator for the calculation of the factorial. Next, compare the return statement of the functions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Not optimized example: &lt;code&gt;return n * factorial(n - 1)&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Optimized example: &lt;code&gt;return factorial(n - 1, acum * n)&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;You need to find a way for not leave pending operations if you want tail recursion.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;With the recursive funtion optimized, the compiler doesn't need to stack each recursive function called, only change the value of the entry parameters function and execute until the base case is true:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
# call stack simulation:
factorial(4, 1)
factorial(3, 4)
factorial(2, 12)
factorial(1, 24)
factorial(0, 24)
return 24
&amp;gt;&amp;gt;&amp;gt; 24

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

&lt;/div&gt;



&lt;p&gt;There is no more fear that the call stack overflowed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Support for tail recursion
&lt;/h3&gt;

&lt;p&gt;Unfortunately, not all programming language support tail recursion in your compiler/interpreter. &lt;a href="http://neopythonic.blogspot.com/2009/04/tail-recursion-elimination.html"&gt;Python is one of them&lt;/a&gt;, but there are some &lt;a href="https://pypi.org/project/tail-recursive/"&gt;libraries&lt;/a&gt; that help to simulate this behavior with decorators. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Tail_call"&gt;This article&lt;/a&gt; on Wikipedia list some programing languages that support tail recursion.&lt;/p&gt;

&lt;p&gt;Anyway, it's fun to see how we can improve the algorithmic complexity of a program and I hope you enjoyed it too.&lt;/p&gt;

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

&lt;p&gt;Follow me on &lt;a href="https://twitter.com/victorhtorres"&gt;Twitter&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>recursive</category>
      <category>functions</category>
      <category>python</category>
      <category>bigo</category>
    </item>
    <item>
      <title>It's time to write!</title>
      <dc:creator>Víctor H. Torres</dc:creator>
      <pubDate>Sun, 09 May 2021 20:38:57 +0000</pubDate>
      <link>https://dev.to/victorhtorres/it-s-time-to-write-13gm</link>
      <guid>https://dev.to/victorhtorres/it-s-time-to-write-13gm</guid>
      <description>&lt;p&gt;Hello Devs.&lt;/p&gt;

&lt;p&gt;I've wanted to do this for a while, but I always found an excuse to get started. But, I founded this post which inspired me to take the first step:&lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="/jmfayard" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NjlhV-kq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--oLH1L0EP--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/17066/64e291f5-65fd-452a-88d9-a2f0c071f807.jpg" alt="jmfayard"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/jmfayard/yes-you-should-write-that-firstpost-481" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Yes, you should write that first post!&lt;/h2&gt;
      &lt;h3&gt;Jean-Michel Fayard 🇫🇷🇩🇪🇬🇧🇪🇸🇨🇴 ・ Mar 11 '20 ・ 3 min read&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#firstpost&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#motivation&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#beginners&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#writing&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;Thank you, &lt;a class="mentioned-user" href="https://dev.to/jmfayard"&gt;@jmfayard&lt;/a&gt; .&lt;/p&gt;

&lt;h2&gt;
  
  
  Presentation
&lt;/h2&gt;

&lt;p&gt;My name is Víctor. I'm from Colombia and I'm Back-End Software Developer since 2017. &lt;/p&gt;

&lt;p&gt;My day to day is evaluate, design and build requirements and debuggin components builded in Pl/Sql and C# languages, for a good company that offered me the opportunity, without experience and professional title (yes, you can do it and I will talk it in another post).&lt;/p&gt;

&lt;h3&gt;
  
  
  My focus in this moment
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Only Back-end 👻&lt;/li&gt;
&lt;li&gt;Design patterns.&lt;/li&gt;
&lt;li&gt;Software Architecture.&lt;/li&gt;
&lt;li&gt;Python, in deep ❤️&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  My first programing language
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Java. I love you too.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Intentions on Dev.to
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Share knowledge.&lt;/li&gt;
&lt;li&gt;Improve writing skills.&lt;/li&gt;
&lt;li&gt;Practice the English language.&lt;/li&gt;
&lt;li&gt;Share and make friends in this industry.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To finish, I leave a preview of what I will talk about in the next post: Different ways to implement recursion (stack and queue).&lt;/p&gt;

&lt;p&gt;I forgot, You can follow me on &lt;a href="https://twitter.com/victorhtorres"&gt;twitter&lt;/a&gt;.&lt;/p&gt;

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

</description>
      <category>firstpost</category>
    </item>
  </channel>
</rss>
