<?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 João Bernardes on Medium]]></title>
        <description><![CDATA[Stories by João Bernardes on Medium]]></description>
        <link>https://medium.com/@joobernardes_870?source=rss-577c7bf73bb3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*OScoCVtetk6PDSVZ</url>
            <title>Stories by João Bernardes on Medium</title>
            <link>https://medium.com/@joobernardes_870?source=rss-577c7bf73bb3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 14:53:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@joobernardes_870/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[Os Erros de escrita mais comuns!]]></title>
            <link>https://medium.com/@joobernardes_870/os-erros-de-escrita-mais-comuns-efd2c9887936?source=rss-577c7bf73bb3------2</link>
            <guid isPermaLink="false">https://medium.com/p/efd2c9887936</guid>
            <category><![CDATA[portuguesa]]></category>
            <category><![CDATA[lingua]]></category>
            <category><![CDATA[portugal]]></category>
            <category><![CDATA[erros-comuns]]></category>
            <category><![CDATA[erros]]></category>
            <dc:creator><![CDATA[João Bernardes]]></dc:creator>
            <pubDate>Tue, 17 Jan 2023 11:50:30 GMT</pubDate>
            <atom:updated>2023-01-17T11:50:57.053Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/311/1*Dq1rmrKlv12RkZO91hubgA.png" /></figure><p>Vivemos na Era digital onde a tecnologia está cada vez mais presente nas nossas vidas e vem facilitar o nosso dia a dia. À nossa volta vemos processos automatizados e aceleradores que nos fazem poupar tempo que poderíamos aplicar noutras tarefas. A princípio, parece tudo perfeito, mas se pararmos para pensar, há imensas coisas que nos deixámos de preocupar, o que faz com que algumas tarefas se tornem preguiçosas e fiquem destreinadas.</p><p>Consigo lembrar-me de quando viajávamos com um mapa no porta-luvas e bastava fazer o trajeto uma ou duas vezes, que o memorizávamos sem problema. Agora, todos utilizamos o GPS e ninguém conhece caminhos e atalhos e todos nós preguiçámos a nossa memória.</p><p>Onde quero chegar?</p><p>Outro dos automatismos com que lidamos todos os dias, é a escrita inteligente, seja no computador, tablet ou smartphone. Sem contar, estamos constantemente à espera daquela correção automática que nos é proporcionada e que evita cometermos aquele erro crasso que nos envergonha diante do grupo de trabalho ou de amigos.</p><p>Qual é o grande problema?</p><p>Há palavras que se aplicam erradamente num determinado contexto sem estar necessariamente mal escritas. É neste ponto que a escrita inteligente do nosso grupo de <em>Whatsapp </em>ou de <em>Microsoft Teams</em> não atua, e muitas das vezes, os erros começam a nascer e a propagar-se devido ao desinteresse em escrever corretamente.</p><p>Deixo uma pequena lista de erros que vejo diariamente e que facilmente conseguem ser evitados, com algumas mnemónicas que nos ajudam a memorizar a abordagem correta.</p><h3>Há vs À</h3><p>“Há” com o “H”, envolve a existência de algo. Já a segunda, está a referenciar alguma coisa. Exemplos:</p><p>Estou <strong>à </strong>tua espera <strong>há </strong>uma hora.</p><p><strong>Há </strong>5 computadores ligados.</p><p>Vou <strong>à </strong>loja comprar um computador.</p><h3>Vêm vs Vêem</h3><p>“Vêm” apenas com um “E”, é uma conjugação do verbo “Vir”. Já com dois “E’s” estamos perante o verbo “Ver”. Exemplos:</p><p>Eles <strong>vêm </strong>cá a casa jantar hoje.</p><p>Eles <strong>vêem </strong>muito mal de noite.</p><p><strong>Mnemónica</strong>: Temos todos dois olhos não é? Então quando tiveres dúvidas, já sabes, “Vêem”.</p><h3>Poder vs Puder</h3><p>Puder, é a forma do futuro do conjuntivo do verbo irregular <strong>Poder </strong>e pronuncia-se com “E” aberto. Exemplos:</p><p>O presidente tem um grande <strong>poder </strong>político.</p><p>Era bom todos <strong>podermos </strong>ser ricos.</p><p>Vou descansar assim que <strong>puder</strong>.</p><p>Vamos todos ajudar sempre que <strong>pudermos</strong>.</p><p><strong>Mnemónica</strong>: sempre que imaginarmos a frase, vamos tentar perceber o tipo de entoação que estamos a dar ao “E”, isto vai ajudar a perceber qual a forma correta de aplicar a forma verbal.</p><h3>Queimas-te vs Queimaste</h3><p>Neste tipo de erros, são usados multiplos verbos diferentes, mas acabamos por aplicar a regra/mnemónica a qualquer um. Exemplos:</p><p>Usa uma proteção, caso contrário <strong>queimas-te</strong>.</p><p>Já te <strong>queimaste</strong>, eu avisei.</p><p><strong>Focas-te</strong> na tua tarefa e vais conseguir ter sucesso.</p><p><strong>Focaste </strong>bem a foto, ficou incrível.</p><p><strong>Mnemónica</strong>: Para além do tom ser diferente, que desta forma já os conseguimos diferenciar, caso restem dúvidas, podemos colocar na negativa. Se desta forma separarmos a palavra, então estamos perante um hífen. Exemplos:</p><p>Usa uma proteção, caso contrário <strong>queimas-te</strong>.</p><p><strong>VS</strong></p><p>Usa uma proteção, assim <strong>não te queimas</strong>.</p><p>Já te <strong>queimaste</strong>, eu avisei.</p><p><strong>VS</strong></p><p>Não te queimaste, eu avisei.</p><p><strong>Focas-te</strong> na tua tarefa e vais conseguir ter sucesso.</p><p><strong>VS</strong></p><p><strong>Não te focas</strong> na tua tarefa, não vais conseguir ter sucesso.</p><h3>Conselho vs Concelho</h3><p>Duas palavras homónimas, cujo significado nada tem a ver um com o outro. Exempos:</p><p>Lisboa e Loures são dois <strong>concelhos </strong>diferentes.</p><p>Aproveita bem a vida, é o melhor <strong>conselho </strong>que te posso dar.</p><p><strong>Mnemónica</strong>: Concelho com “C” está relacionado com geografia, cidades, por isso como cidade começa pela letra “C” ajuda-nos a lembrar como escrever corretamente.</p><h3>Traz vs Trás</h3><p>“Trás” é uma preposição, já “Traz”, é uma forma do verbo “Trazer”. Exemplos:</p><p>Se estás na cozinha, <strong>traz </strong>um prato para a mesa.</p><p>Segura o menino porque pode cair para <strong>trás</strong>.</p><p><strong>Mnemónica</strong>: Neste caso, quando queremos decidir qual opção escolher, caso envolva o verbo “Trazer” sabemos que é com “Z”.</p><h3>Hão de vs “Hadem”</h3><p>“Hão de” refere geralmente uma intenção futura na terceira pessoa do plural. Exemplos:</p><p>Os elementos da equipa <strong>hão de</strong> desenvolver o requisito para que possamos começar.</p><p>Vocês <strong>hão de</strong> participar numa discussão sobre o tema.</p><p>Hadem, ou Hão-de estão incorretos na lingua Portuguesa e infelizmente ainda se ouve muito.</p><h3>Despoletar</h3><p>Uma palavra que é muito utilizada no discurso tanto político como técnico e que, infelizmente, é mal aplicada. A palavra existe, e tem um significado completamente contrário ao que é empregue. Exemplo:</p><p><strong>Erro: </strong>Os media andam a <strong>despoletar </strong>informação errada.</p><p><strong>Erro: </strong>Quando carrego neste botão <strong>despoleta </strong>uma ação complexa.</p><p><strong>Despoletar </strong>é o ato de tirar a espoleta, ou seja, impedir o funcionamento, desativar, tornar impossível o disparo ou explosão, não deflagrar, não detonar, não rebentar, neutralizar.</p><p><strong>Espoleta </strong>é o disparador, é o dispositivo que produz a detonação de explosivos e projéteis.</p><p>Palavras corretas: ativar, originar, desencadear, detonar, deflagrar, gerar, instaurar, rebentar.</p><p><strong>Correto: </strong>Os media andam a <strong>desencadear </strong>informação errada.</p><p><strong>Correto: </strong>Quando carrego neste botão <strong>gera </strong>uma ação complexa.</p><h3>Links úteis:</h3><p><a href="https://ensina.rtp.pt/artigo/despoletar-e-espoletar-um-erro-a-detonar-a-travar-a-evitar/">https://ensina.rtp.pt/artigo/despoletar-e-espoletar-um-erro-a-detonar-a-travar-a-evitar/</a></p><p><a href="https://www.infopedia.pt/">https://www.infopedia.pt/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=efd2c9887936" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TOP 8 “Best Practices”on How to Develop a Timer]]></title>
            <link>https://medium.com/kinetit/top-8-best-practices-on-how-to-develop-a-timer-d45d420442aa?source=rss-577c7bf73bb3------2</link>
            <guid isPermaLink="false">https://medium.com/p/d45d420442aa</guid>
            <category><![CDATA[code]]></category>
            <category><![CDATA[asynchronous]]></category>
            <category><![CDATA[outsystems]]></category>
            <category><![CDATA[timer]]></category>
            <dc:creator><![CDATA[João Bernardes]]></dc:creator>
            <pubDate>Fri, 02 Sep 2022 14:38:04 GMT</pubDate>
            <atom:updated>2022-09-02T14:50:37.886Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*suf_LgzZG5C4Ld-QZLgITA.png" /></figure><p>Timers are asynchronous processes that run a server action that doesn’t depend on other actions to run and execute successfully.</p><p>Timers are handled by the OutSystems Scheduler Service. This service checks for Timers that are ready to run and executes their actions. A Timer is ready to run when the current time is greater or equal to the Timer runtime property NextRun.</p><h3>Possible use cases of a timer</h3><p>•Execute batch processing to process logic in records;<br>•Synchronize with external APIs and databases;<br>•Sending emails at a predetermined time;<br>•Delete older records from the database;<br>•Bootstrap an entity;<br>•Execute logic to configure an application after its deployment;<br>•Simply define a schedule to do something.</p><h3>Implementing timers</h3><p>When implementing timers, there are best practices that you should follow to ensure a proper running of the timer without affecting the app performance and allowing a good audit and debug. In addition, as another type of implementation, the code must be self-explanatory.</p><p><strong>1. Prefix the timer action with Timer_&lt;NameofTheTimer&gt;<br></strong>To easily identify the server action has a timer, prefix it. Avoid using that action in another context than that timer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*gxK08zllvRhAogBDlEl4UQ.png" /></figure><p><strong>2. Dynamically allow/disallow the execution of the timer<br></strong>You may need to disable a timer of executing due to a business request or some technical issue. The easy way to do it is to avoid changing the code (imagine doing it in production). A site property or a database value can be used to implement this feature.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*p24h4hj6HIFxzUbuPu_nBQ.png" /></figure><p><strong>3. Creating a way out of a cycle<br></strong>One of the best usages for a timer it’s housekeeping. We can delete some record every day or transfer data to backup entities in order to reduce hot tables. During a huge cycle, we can unintentionally run a timer or generate an infinite cycle. Consequently, it’s a good approach to have a site property that allows us to force the cycle to stop right away.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*fL5OHAcHXtRtkDevY0IGDw.png" /></figure><p><strong>4. Add logs to audit the execution of the timer<br></strong>Each time you run a timer, you should audit information about the execution of it for auditing and debugging. Data you definitely need to track is:</p><p>•Start date/time;<br>•End date/time;<br>•Status (success, completed with no errors, completed with errors, failed);<br>•Any output or error messages.<br>•Adapting these logs with a back office screen can help you and the rest of the •team to manage application timers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*t_nyTjWgXDNYO2hJR0pwuQ.png" /></figure><p>It’s important to understand that the log messages order is not assured. Consider numbering the logs.</p><p><strong>5. Avoid long-running actions that never times out<br></strong>Even though OutSystems automatically retries a failed timer, it could end up degrading app performance or changing multiple records many times. At worst, if the code is not ready, it could reprocess the same records multiple times after they were updated.</p><p>To prevent a timeout never increase the timeout in minutes. Most of the time it is a design problem and you design expecting possible timeouts.</p><p>Timers should take at most 20 minutes and then reschedule themselves to start again immediately to continue the task at hand.</p><p>Consider dividing the records being processed in batches and calling the timer to execute while there are records to process. Use control tables and process data in chunks, rescheduling itself at the end of a run.</p><p>This is accomplished by adding an explicit timeout inside the timer logic that when reached takes the necessary actions to properly terminate the current processing, store the current status of the process in such a way that when the process starts again it can seamlessly proceed from the point where it stopped. At the end of a run, the timer ends with a wake timer action for itself.</p><p><strong>6. Plan, prioritize and monitor the timer schedule to avoid impacting the app performance<br></strong>Schedule the timer to run when it will not impact the app performance and affect UX. Most of the time, heavy processing timers run at night or weekends when the app less affects users and live systems.</p><p>In case of timers running at the same time, prioritize them. Use the Service Center to monitor the timer execution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*7CeNtg6Koyd4aGLa7euQzg.png" /></figure><p><strong>7. Place timers in the Core Layer modules<br></strong>Timers execute actions that should be in the Core Layer modules. Usually, you can find timers in _CS and _BL modules depending on what they are handling. For example, if you have a timer to delete records from a database (for records marked to delete) the timer should be placed in _CS module where that entity is defined; if your timer is executing business logic code it should be placed in a _BL module.</p><p><strong>8. Exception Handling<br></strong>The timer action should be the simplest possible and each record be processed by itself, returning a message record with a flag with success or false and with a message in case of an error. The main action simply uses this information to raise an exception, handle the error or simply continue que logic. Additionally, if you want to guarantee that your record will be always saved, insert a CommitTransaction. Be aware that it has a performance hit, so in some cases, you may be better off only committing every ten or x records.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*KdN6ZndDaWX7f_N4UbLIsg.png" /></figure><p>This is an example of error handling.</p><h3>Session in Timers</h3><p>Asynchronous logic, such as Timers and Process Activities, run in a separate session. All session variables will start with their default value when executing an action associated with a timer or process activity.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d45d420442aa" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kinetit/top-8-best-practices-on-how-to-develop-a-timer-d45d420442aa">TOP 8 “Best Practices”on How to Develop a Timer</a> was originally published in <a href="https://medium.com/kinetit">KinetIT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Disable break line in input widgets]]></title>
            <link>https://medium.com/@joobernardes_870/disable-break-line-in-input-widgets-d18a0e2fdd6?source=rss-577c7bf73bb3------2</link>
            <guid isPermaLink="false">https://medium.com/p/d18a0e2fdd6</guid>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[outsystems]]></category>
            <category><![CDATA[low-code]]></category>
            <dc:creator><![CDATA[João Bernardes]]></dc:creator>
            <pubDate>Thu, 25 Jul 2019 18:06:53 GMT</pubDate>
            <atom:updated>2019-07-30T09:15:33.736Z</atom:updated>
            <cc:license>http://creativecommons.org/publicdomain/zero/1.0/</cc:license>
            <content:encoded><![CDATA[<h3>Summary</h3><p>Hello, as we all know, there are weird requirements from clients and sometimes, we need to make some research to take care of the issue. Well, I was working on a project where we were providing information to an external data base. In this project, we had forms with input widgets with more than 1 line:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/1*vamnMDHbZb8_Pq_gYnbFPg.png" /></figure><p>The application was online, and was being used by multiple users so, they started noticing that some data inserted in those kind of inputs came with weird characters. Our team did some investigation and found that those situations happened when the users typed “enter”.</p><h3>Solutions</h3><ol><li>Disable the “enter” typing;</li><li>Replace the “enter” character in the data base.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/212/1*Gpb6wK6c2n-Q2lyYWdxcbA.png" /><figcaption>To disable the typing possibility in an input widget, we added this extended property.</figcaption></figure><p>From now on any user could type “enter” whenever he wants, and nothing will happen. After adding the extended property, we needed to update the data base and replace the line break with a space. For this, we created a timer.</p><p>Firstly, we ran a query to find the line break:</p><pre>WHERE   {CAR}.[Description] LIKE &#39;%&#39; + CHAR(<strong>13</strong>) + CHAR(<strong>10</strong>) + &#39;%&#39;</pre><p>Secondly, we replaced the attribute with a space (yes, I literally typed an enter):</p><pre>Replace(GetCars.List.Current.CAR.Description,&quot;<br>&quot;,&quot; &quot;)</pre><p>With this method, we were able to solve this issue.</p><h3>More info:</h3><p>During the research we found some useful details:</p><p>Line feedchar (10), Carriage returnchar(13).</p><p>“If you want to generate a line break, it is a good practice to use CR and LF together. CHAR(13) + CHAR(10)”</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d18a0e2fdd6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Disable break line in input widgets]]></title>
            <link>https://medium.com/noesis-low-code-solutions/disable-break-line-in-input-widgets-c8345434ad6d?source=rss-577c7bf73bb3------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8345434ad6d</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[character]]></category>
            <category><![CDATA[outsystems]]></category>
            <category><![CDATA[front-end-outsystems]]></category>
            <category><![CDATA[putin]]></category>
            <dc:creator><![CDATA[João Bernardes]]></dc:creator>
            <pubDate>Fri, 07 Jun 2019 18:58:39 GMT</pubDate>
            <atom:updated>2020-09-22T14:01:50.053Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Summary</strong></h3><p>Hello, as we all know, there are weird requirements from clients and sometimes, we need to make some research to take care of the issue. Well, I was working on a project where we were providing information to an external data base. In this project, we had forms with input widgets with more than 1 line:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/1*vamnMDHbZb8_Pq_gYnbFPg.png" /></figure><p>The application was online, and was beeing used by multiple users so, they started noticing that some data inserted in those kind of inputs came with weird characters. Our team did some investigation and found that those situations happened when the users typed “enter”.</p><h3><strong>Solutions</strong></h3><ol><li>Disable the “enter” typing;</li><li>Replace the “enter” character in the data base.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/212/1*Gpb6wK6c2n-Q2lyYWdxcbA.png" /><figcaption>To disable the typing possibility in an input widget, we added this extended property.</figcaption></figure><p>From now on any user could type “enter” whenever he wants, and nothing will happen. After adding the extended property we needed to update the data base and replace the line break with a space. For this, we created a timer.</p><p>Firstly, we ran a query to find the line break:</p><pre>WHERE   {CAR}.[Description] LIKE &#39;%&#39; + CHAR(<strong>13</strong>) + CHAR(<strong>10</strong>) + &#39;%&#39;</pre><p>Secondly, we replaced the attribute with a space (yes, I literally typed an enter):</p><pre>Replace(GetCars.List.Current.CAR.Description,&quot;<br>&quot;,&quot; &quot;)</pre><p>With this method, we were able to solve this issue.</p><h3><strong>More info:</strong></h3><p>During the research we found some usefull details:</p><p>Line feedchar (10), Carriage returnchar(13).</p><p>“If you want to generate a line break, it is a good practice to use CR and LF together. CHAR(13) + CHAR(10)”</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8345434ad6d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/noesis-low-code-solutions/disable-break-line-in-input-widgets-c8345434ad6d">Disable break line in input widgets</a> was originally published in <a href="https://medium.com/noesis-low-code-solutions">Noesis Low-Code Solutions</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>