<?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: Márlon Medeiros Brum</title>
    <description>The latest articles on DEV Community by Márlon Medeiros Brum (@marlonbrum).</description>
    <link>https://dev.to/marlonbrum</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%2F416261%2Fddb796da-40c3-4894-980f-64c9b27ecf36.jpg</url>
      <title>DEV Community: Márlon Medeiros Brum</title>
      <link>https://dev.to/marlonbrum</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/marlonbrum"/>
    <language>en</language>
    <item>
      <title>Windows 10 Virtual Desktops</title>
      <dc:creator>Márlon Medeiros Brum</dc:creator>
      <pubDate>Mon, 27 Jul 2020 03:41:08 +0000</pubDate>
      <link>https://dev.to/marlonbrum/windows-10-virtual-desktops-1o7b</link>
      <guid>https://dev.to/marlonbrum/windows-10-virtual-desktops-1o7b</guid>
      <description>&lt;p&gt;I'd like to recommend a feature of Windows 10 (that might be present in previous versions, I'm not sure), that I know it exists, but never gave a thought on how it could be useful: Multiple Virtual Desktops. You can divide your opened applications and windows in different virtual desktops, to help organize your work. &lt;/p&gt;

&lt;p&gt;To create a new desktop, just press Ctrl + Windows + D, or press Windows + Tab and click "New Desktop": &lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fm1biaait5cjh0wozh9g6.png" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fm1biaait5cjh0wozh9g6.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can switch between Desktops with Ctrl + Windows + [Right Arrow] and Ctrl + Windows + [Left Arrow], or by pressing Windows+Tab and clicking on the desktop. &lt;/p&gt;

&lt;p&gt;Now, when you open an app, it will remain in the desktop you opened it, unless you press Window+Tab, right click on the window listed, Move To..&lt;/p&gt;

&lt;p&gt;I've thought about two scenarios that this feature could be usefull. You could have a desktop only for development related programs, visual studio, sql server, browser for searching and testing etc. In another desktop you can keep non development related apps, like Media Players, messengers etc.&lt;/p&gt;

&lt;p&gt;Another nice scenario: Imagine you're working on a PHP Project, with Visual Studio Code, My Sql, along with some browser tabs to run your project and some searches about that. Suddenly, you get a call about another project, and have halt your currently work to solve a bug on it. But this is a C# project , so you open a new desktop, and open Visual Studio , SQL Server and browsers, to work on this new project, without having the other windows there to clutter your desktop. When you need to change to the previous project, just switch back the previous desktop.&lt;/p&gt;

</description>
      <category>productivity</category>
    </item>
    <item>
      <title>Buildmystring.com - Generate your string concatenation code</title>
      <dc:creator>Márlon Medeiros Brum</dc:creator>
      <pubDate>Tue, 07 Jul 2020 19:26:13 +0000</pubDate>
      <link>https://dev.to/marlonbrum/buildmystring-com-generate-your-string-concatenation-code-ne4</link>
      <guid>https://dev.to/marlonbrum/buildmystring-com-generate-your-string-concatenation-code-ne4</guid>
      <description>&lt;p&gt;If you work with SQL sentences in your application, you probably write your query in a SQL Tool before, to develop and test it. You will write this query using line breaks and identation and end up with something like that:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;select&lt;/span&gt; 
    &lt;span class="n"&gt;t1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Field1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;t1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Field2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;t2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Field3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;t2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Field4&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;Table1&lt;/span&gt; &lt;span class="n"&gt;t1&lt;/span&gt;
    &lt;span class="k"&gt;inner&lt;/span&gt; &lt;span class="k"&gt;join&lt;/span&gt; &lt;span class="n"&gt;Table2&lt;/span&gt; &lt;span class="n"&gt;t2&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="n"&gt;t1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;JoinField1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;t2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;JoinField1&lt;/span&gt;
    &lt;span class="k"&gt;inner&lt;/span&gt; &lt;span class="k"&gt;join&lt;/span&gt; &lt;span class="n"&gt;Table3&lt;/span&gt; &lt;span class="n"&gt;t3&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="n"&gt;t1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;JoinField2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;t3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;JoinField2&lt;/span&gt;
&lt;span class="k"&gt;where&lt;/span&gt;
    &lt;span class="n"&gt;t1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Field1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'Condition'&lt;/span&gt; &lt;span class="k"&gt;and&lt;/span&gt; &lt;span class="n"&gt;t2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Field3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'Condition'&lt;/span&gt;
&lt;span class="k"&gt;order&lt;/span&gt; &lt;span class="k"&gt;by&lt;/span&gt;
    &lt;span class="n"&gt;t1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;OrderField&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Well, now you'll have to move this query to your application code. If its a language that allows line breaks in the middle of the string, like php, you could just add a &lt;code&gt;"&lt;/code&gt; before and after the string:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$sql&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"select 
    t1.Field1, t1.Field2, t2.Field3, t2.Field4
from Table1 t1
    inner join Table2 t2 on t1.JoinField1 = t2.JoinField1
    inner join Table3 t3 on t1.JoinField2 = t3.JoinField2
where
    t1.Field1 = 'Condition' and t2.Field3 = 'Condition'
order by
    t1.OrderField"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;But if you're using a language that don't allow linebreaks inside the string, like C#, you'll have to close the string at each line and reopening at the next line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;sql&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"select  "&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt;
&lt;span class="s"&gt;"    t1.Field1, t1.Field2, t2.Field3, t2.Field4 "&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt;
&lt;span class="s"&gt;"from Table1 t1 "&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt;
&lt;span class="s"&gt;"    inner join Table2 t2 on t1.JoinField1 = t2.JoinField1 "&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt;
&lt;span class="s"&gt;"    inner join Table3 t3 on t1.JoinField2 = t3.JoinField2 "&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt;
&lt;span class="s"&gt;"where "&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt;
&lt;span class="s"&gt;"    t1.Field1 = 'Condition' and t2.Field3 = 'Condition' "&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt;
&lt;span class="s"&gt;"order by "&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt;
&lt;span class="s"&gt;"    t1.OrderField "&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;That's where this site I've just discoverd helps. In &lt;a href="https://www.buildmystring.com/"&gt;https://www.buildmystring.com/&lt;/a&gt;, you inform your multiline strings, and it generates the code for you, with all the concatenations you'll need. You can choose your language (C#, Java, Vb.NET, c++ or SQL), a series of additional options and it will generate the code for you. &lt;/p&gt;

&lt;p&gt;I know its not that difficult to do that by yourself, but it will save you some work.&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>sql</category>
    </item>
    <item>
      <title>Allowing string interpolation and line breaks inside strings in Javascript</title>
      <dc:creator>Márlon Medeiros Brum</dc:creator>
      <pubDate>Fri, 03 Jul 2020 12:11:18 +0000</pubDate>
      <link>https://dev.to/marlonbrum/allowing-string-interpolation-and-line-breaks-inside-strings-in-javascript-3a6h</link>
      <guid>https://dev.to/marlonbrum/allowing-string-interpolation-and-line-breaks-inside-strings-in-javascript-3a6h</guid>
      <description>&lt;p&gt;In Javascript, when you have to build a multiline string, you'll probably do that:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;myLabelText&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;getLabelText&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;myInputValue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;getInputValue&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;sHtml&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;div class='outter-container'&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
             &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;div class='inner-container'&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
             &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;label for='myInput'&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;myLabelText&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
             &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;input id='myInput' value='&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;myInputValue&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;' /&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
             &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
             &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;In my opinion the readability of the code is not so good. I've recently discovered that by the use of backticks (`) to delimiter strings, you can use string interpolation and insert line breaks in the strings.&lt;/p&gt;

&lt;p&gt;String interpolation is the ability to reference variables from inside the string, without the need to concatenate them. This way, the code above could be rewritten like this:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;myLabelText&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;getLabelText&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;myInputValue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;getInputValue&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;sHtml&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`&amp;lt;div class='outter-container'&amp;gt;
               &amp;lt;div class='inner-container'&amp;gt;
                 &amp;lt;label for='myInput'&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;myLabelText&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;/label&amp;gt;
                 &amp;lt;input id='myInput' value='&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;myInputValue&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;' /&amp;gt;
               &amp;lt;/div&amp;gt;
             &amp;lt;/div&amp;gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The code is much more cleaner, without the extra chars to close and open strings.&lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>Create a shorcuts page for your work</title>
      <dc:creator>Márlon Medeiros Brum</dc:creator>
      <pubDate>Mon, 29 Jun 2020 17:01:32 +0000</pubDate>
      <link>https://dev.to/marlonbrum/create-a-shorcuts-page-for-your-work-p7g</link>
      <guid>https://dev.to/marlonbrum/create-a-shorcuts-page-for-your-work-p7g</guid>
      <description>&lt;p&gt;As an autonomous developer, I work with more thant one customer, and several projects. For each customer, there are a lot of links to use: Development, Test and production environments, dashboards. &lt;br&gt;
To make my life easier, I created a html page with this links and I use it as my start page. The interesting point is you can create links to your source code or programs you use. I'll show how in this post.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9vO2wvIo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qa4a04sn54d1ifi83xl8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9vO2wvIo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qa4a04sn54d1ifi83xl8.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can create the layout of this page as it fits better for you. As you can see, I divided the links into groups for each project. The first tip I gave you is to use another browser for that, so you can use this page as your start page and still have a browser for common navigation. I recommend Firefox Developer Edition for that.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Open Visual Studio code projects&lt;/strong&gt;&lt;br&gt;
Visual studio code register a vscode:: url prefix, so you can use that to link your projects. Just create a link to : vscode://c:/your/project/folder/ and the project will be opened on VSCode&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Other executable and utilities&lt;/strong&gt;&lt;br&gt;
You can't run a exe directly from a link, for security reasons, but you can easily register a custom url handler, like vscode:, to open a file. You can see details &lt;a href="https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa767914(v=vs.85)?redirectedfrom=MSDN"&gt;here&lt;/a&gt;, but in short you will have to create some registry keys. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PJ-s62l6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/njrmdvirnsk2n5wds5h5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PJ-s62l6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/njrmdvirnsk2n5wds5h5.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I created a custom 'open:' url handler that points to a small commmand line tool I wrote on c#, that receives the full url as a parameter, treat it and open it using Process.Open.&lt;/p&gt;

&lt;p&gt;This procedure might be complicated at first, but it will save you time every time you have to open an web site or application.&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
