<?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: David Ortega</title>
    <description>The latest articles on DEV Community by David Ortega (@davidortega).</description>
    <link>https://dev.to/davidortega</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%2F1120344%2Fba535737-05a1-4ba9-b08f-db73efd42fd4.jpeg</url>
      <title>DEV Community: David Ortega</title>
      <link>https://dev.to/davidortega</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/davidortega"/>
    <language>en</language>
    <item>
      <title>Make Jetbrains IDEs development faster🚀</title>
      <dc:creator>David Ortega</dc:creator>
      <pubDate>Sat, 15 Jul 2023 18:21:55 +0000</pubDate>
      <link>https://dev.to/davidortega/make-jetbrains-ides-development-faster-19fa</link>
      <guid>https://dev.to/davidortega/make-jetbrains-ides-development-faster-19fa</guid>
      <description>&lt;h2&gt;
  
  
  Easy to remember shortcuts for WebStorm / PHPStorm / PyCharm
&lt;/h2&gt;

&lt;p&gt;When programming, depending on the job you are doing, you will be using a code editor or an IDE, personally, I use &lt;a href="https://www.jetbrains.com/phpstorm/"&gt;PHPStorm from Jetbrains&lt;/a&gt; it has been the best one and it integrates everything I need. (This is not a promoted post, I promise).&lt;/p&gt;

&lt;p&gt;As I have been doing pair-programming with some colleagues I have seen that some of them don't know some very easy yet powerful tricks that jetbrains IDEs have to make development speed faster, so, in this post, I'll show you the best ones I use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start searching for DC instead of DefaultController
&lt;/h2&gt;

&lt;p&gt;This example might be silly, but with your IDE, you can search classes by just typing the uppercase letters of a class, for example, instead of writting "DefaultController" you can just write DC (even in lowercase):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LUGX5eYm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4a3al16ior5qekzcgbhv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LUGX5eYm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4a3al16ior5qekzcgbhv.png" alt="Example image of how it looks like in the IDE" width="800" height="132"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It has improved the speed of some of my colleagues a lot when searching through classes that have very long names (Looking at you SuperDuperAwesomeFeatureService).&lt;/p&gt;

&lt;h2&gt;
  
  
  There is a easier way to move between two files
&lt;/h2&gt;

&lt;p&gt;If you ever had to be checking between two files (maybe one is sending an array of data to the other and you don't remember the keys from it), you might be going back and forth looking for the file between your tabs. Well, Ctrl+E will make your life a lot easier!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gK-UloGE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r9bc4p1dve8m27a8mxs8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gK-UloGE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r9bc4p1dve8m27a8mxs8.png" alt="Image representation of the menu that is opened when using CTRL+E" width="800" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It automatically points to the last file you opened, so just hitting Enter will allow you to go to the last file. If you're moving between three of them and want to go to the first one, just use the down arrow and you're good to go!&lt;/p&gt;

&lt;h3&gt;
  
  
  Help the author
&lt;/h3&gt;

&lt;p&gt;As this is one on my first post on the platform, I'd like to know your opinion on this shortcuts, did you know them? Do you use this IDE? And also if you would like more in-depth posts about this or other topics.&lt;/p&gt;

&lt;p&gt;Thanks a lot for reading, read you in the comments!&lt;/p&gt;

</description>
      <category>programming</category>
      <category>beginners</category>
      <category>productivity</category>
      <category>development</category>
    </item>
    <item>
      <title>Better conditions: Invert your conditionals to beautify code</title>
      <dc:creator>David Ortega</dc:creator>
      <pubDate>Sat, 15 Jul 2023 17:01:30 +0000</pubDate>
      <link>https://dev.to/davidortega/better-conditions-invert-your-conditionals-to-beautify-code-68l</link>
      <guid>https://dev.to/davidortega/better-conditions-invert-your-conditionals-to-beautify-code-68l</guid>
      <description>&lt;p&gt;Do you get confused when it's been a week since you last checked code you wrote and now you can't understand the conditions in it? Do you have 2+ nested conditionals? Are If Else conditions your favourite ones? In this article we'll go through a short example on why you should invert your conditionals when doing checks on functions, remove else statements and how they make reading code easier.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use conditionals at the beginning of your functions and return early
&lt;/h2&gt;

&lt;p&gt;When writting a function, execution should stop as early as possible when a condition is not meet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ❌ Don't do this! &lt;/span&gt;
&lt;span class="c1"&gt;// Execution does not stop until the end, we have to go&lt;/span&gt;
&lt;span class="c1"&gt;// through all the code to understand why &lt;/span&gt;
&lt;span class="c1"&gt;// it does not work as expected&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;isAllowed&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;doSuccess&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;doError&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// ✅ Do this instead. If condition is not meet, return early&lt;/span&gt;
&lt;span class="c1"&gt;// Otherwise, continue with execution&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;isAllowed&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;doError&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nx"&gt;doSuccess&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With this example, we have removed an else statement and made the code easier to read. If condition is not meet, return error. Otherwise, keep going.&lt;/p&gt;

&lt;h3&gt;
  
  
  Help the author
&lt;/h3&gt;

&lt;p&gt;As this is my first post on the platform, I'd like to know your opinion on which language should I use for the example (maybe multiple ones?), and also if you would like more in-depth examples instead of a short one. &lt;/p&gt;

&lt;p&gt;Thanks a lot for reading, read you in the comments!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>programming</category>
      <category>codenewbie</category>
    </item>
  </channel>
</rss>
