<?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 Pedro Pini on Medium]]></title>
        <description><![CDATA[Stories by Pedro Pini on Medium]]></description>
        <link>https://medium.com/@pedropini?source=rss-b15864ef609a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*IYdphspqaET0OTtOzic1Qg.jpeg</url>
            <title>Stories by Pedro Pini on Medium</title>
            <link>https://medium.com/@pedropini?source=rss-b15864ef609a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 09:48:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pedropini/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[The entrepreneur GateKeeping Culture]]></title>
            <link>https://medium.com/@pedropini/the-entrepreneur-gatekeeping-culture-1d077cb32b51?source=rss-b15864ef609a------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d077cb32b51</guid>
            <dc:creator><![CDATA[Pedro Pini]]></dc:creator>
            <pubDate>Sun, 19 Jan 2025 00:47:09 GMT</pubDate>
            <atom:updated>2025-01-19T00:47:09.194Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bZX0WcnBrfCzB7puEXAPXQ.png" /></figure><p>One thing I like about social media is that reduced gatekeeping a lot, if you don’t know the term gatekeeping refers to “Having a knowledge, power, opportunities and decide not to share”. Social media is all about you posting great content to be visible, so either people share useful tips or they will never rise the social game.</p><p>When I started my entrepreneurship journey I see that a lot people will say focus on doing a great product and users will come -&gt; BS.</p><p>So here I’m sharing with you all tips and knowledge I gained from blood, sweat and tears.</p><p>## 1 Hard truth: Ideas are worth nothing</p><p>Don’t think your idea is worth millions and you need to make it “stealth” so nobody will steal from you. The reality is very few people can execute, this is a term you will hear a lot EXECUTION. Everyone can have ideas but few can execute, most of startup fails exactly for this reason :(</p><p>## 2 Hard Truth: Product</p><p>As a software developer I spend years of my life studying and trying to make the best code possible. Reality is that your product doesn’t matter, don’t get me wrong (your product needs to work and be usable) but don’t need to be great. This was a harsh splash on my face, the reality is perception, who/how you offer your product is key, I’ve seen a product on product hunt that don’t even work and the guys manage to get a better ranking than me(with a working product) so believe me you need a marketing and distribution strategy.</p><p>## 3 Hard Truth: Venture Capital</p><p>This is one that shocked me, venture capital is a hub, where network is more important than your product, because in the end of the day new startups come and go, but people stay so if you see people that get accepted in startups they will have one of these 2 things: Great college or great achievements(probably the ones that already make $ bucks for them)</p><p>## 4 Hard Truth: Users</p><p>Look users may not be tech savvy but they’re not stupid, don’t hard sell your product like buy this great product, is all about how they perceive your product, show them reasons, comparison and “give” before asking. Most of the times your solution will be a sharing contact app, until you realize that people are sharing photos through your app which is just one feature of it and then you become google photos.</p><p>To sum up your product needs to be good is a fact, otherwise user retention will be low, but most important is get a MVP that works, because you will have to figure it out how you can sell it to people, what channels your users are and how can they include your product in their lives with little to no friction.</p><p>follow me on linkedin for more: <a href="https://www.linkedin.com/in/pedropini/">https://www.linkedin.com/in/pedropini/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d077cb32b51" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing ScaleNext — A Modern and Scalable Next.js Boilerplate]]></title>
            <link>https://medium.com/@pedropini/introducing-scalenext-a-modern-and-scalable-next-js-boilerplate-78d037e78c4e?source=rss-b15864ef609a------2</link>
            <guid isPermaLink="false">https://medium.com/p/78d037e78c4e</guid>
            <dc:creator><![CDATA[Pedro Pini]]></dc:creator>
            <pubDate>Sat, 28 Sep 2024 01:16:30 GMT</pubDate>
            <atom:updated>2024-09-28T01:16:30.586Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introducing ScaleNext — A Modern and Scalable Next.js Boilerplate</h3><p>Building a SaaS application from scratch can be daunting.</p><p>But what if you had a Next.js boilerplate that handles authentication, payments, emails, and UI components — right out of the box?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*SQNjPOKcP9kgWeiofgBI0w.gif" /></figure><p>I’ve created a highly scalable Next.js boilerplate that can help you jumpstart your SaaS project with minimal effort. Here’s what you’ll get:</p><p>✨ Key Features:</p><p>Next.js for fast, SEO-friendly web apps.</p><p>Stripe Integration for seamless payments.</p><p>Resend for Emails with React-based email templates.</p><p>Shadcn UI for beautifully designed, customizable components.</p><p>Clerk for Authentication offering secure user sessions.</p><p>Supabase for a real-time Postgres database.</p><p>and the best part it’s FREE.</p><p>💡 Ready to give it a try? Check out the repository <a href="https://github.com/PedroPini/ScaleNext">https://github.com/PedroPini/ScaleNext</a> and clone it to your local machine. You’ll be up and running in no time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=78d037e78c4e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The most used decorators type in Typescript]]></title>
            <link>https://medium.com/@pedropini/the-most-used-decorators-type-in-typescript-c99ad089717d?source=rss-b15864ef609a------2</link>
            <guid isPermaLink="false">https://medium.com/p/c99ad089717d</guid>
            <dc:creator><![CDATA[Pedro Pini]]></dc:creator>
            <pubDate>Tue, 18 Jun 2024 13:04:46 GMT</pubDate>
            <atom:updated>2024-06-18T13:04:46.217Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/895/0*Gcl3H0_WuaQ6qqeO.png" /></figure><h3>Some Background</h3><p>Decorators in TypeScript are a special kind of declaration that can be attached to a class, method, accessor, property, or parameter.</p><p>Decorators are essentially functions that can modify the behaviour of the target they are applied. They are often used to add metadata, enable features, or wrap functions with additional logic.</p><h3>Types of Decorators</h3><p>1. <strong>Class Decorators</strong>: Applied to a class.</p><p>2. <strong>Method Decorators</strong>: Applied to methods of a class.</p><p>3. <strong>Accessor Decorators</strong>: Applied to getters or setters.</p><p>4. <strong>Property Decorators</strong>: Applied to properties of a class.</p><p>5. <strong>Parameter Decorators</strong>: Applied to parameters of a class constructor or method.</p><h3>Why Use Decorators?</h3><p>1. <strong>Code Reusability</strong>: Decorators allow for the reuse of common logic across different parts of an application. For example, logging, validation, or authorization can be implemented once and reused across multiple methods or classes.</p><p>2. <strong>Separation of Concerns</strong>: Decorators help in keeping business logic separate from cross-cutting concerns. This makes the codebase cleaner and more maintainable.</p><p>3. <strong>Enhanced Readability</strong>: By using decorators, the intention of a piece of code can be more clearly expressed. For example, an @deprecated decorator immediately signals that a method should not be used anymore.</p><p>4. <strong>Metadata Addition</strong>: Decorators can be used to add metadata to classes or properties, which can then be used by frameworks or libraries for various purposes, such as dependency injection, serialization, or validation.</p><p>5. <strong>Aspect-Oriented Programming (AOP)</strong>: Decorators enable AOP, which allows behaviour to be added to code without modifying the actual code. This is useful for logging, monitoring, or transaction management.</p><p>Read the full article at</p><p><a href="https://pedropini.beehiiv.com/p/decorators-typescript">https://pedropini.beehiiv.com/p/decorators-typescript</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c99ad089717d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering the Ukelele, Rubik’s Cube, and Mandarin: How SMART Goal Setting Transformed My Life]]></title>
            <link>https://medium.com/@pedropini/mastering-the-ukelele-rubiks-cube-and-mandarin-how-smart-goal-setting-transformed-my-life-3cacbf00164a?source=rss-b15864ef609a------2</link>
            <guid isPermaLink="false">https://medium.com/p/3cacbf00164a</guid>
            <dc:creator><![CDATA[Pedro Pini]]></dc:creator>
            <pubDate>Fri, 06 Jan 2023 00:39:08 GMT</pubDate>
            <atom:updated>2023-01-06T00:39:08.548Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M5KsHm4WEomV7SsoOoNSAQ.jpeg" /><figcaption>Happy life</figcaption></figure><p>Before learning about SMART goals, I would always create objectives but struggle to keep doing them, later on, I discovered the reason, without clarity on a specific goal you won’t be driven to complete it.</p><p>It might be time to set some SMART goals! This acronym stands for Specific, Measurable, Attainable, Relevant, and Time-bound. By setting goals that are clear and achievable, you can increase your chances of success and make progress more efficiently because you have a reason to do. Make sure your goals are Specific and well-defined, Measurable so you can track your progress, Attainable given your resources and limitations, Relevant to your overall objectives, and Time-bound with a specific deadline for completion.</p><p>Here is an example of a SMART goal to learn Mandarin:</p><p>Specific: To learn basic Mandarin vocabulary and grammar</p><p>Measurable: Attend a Mandarin language class once a week, practice speaking and writing for at least 15 minutes a day, and complete a beginner’s Mandarin textbook within 6 months</p><p>Attainable: I have the necessary resources (access to a Mandarin language class and materials) and the time commitment (1 class session and 15 minutes of daily practice) to make progress in learning the language at a beginner’s level</p><p>Relevant: Learning basic Mandarin will allow me to communicate with Mandarin speakers on a basic level and may be useful for personal or professional travel to Mandarin-speaking countries</p><p>Time-bound: The goal has a specific deadline (6 months) for completing a beginner’s Mandarin textbook</p><p>Try setting SMART goals and see how they can help you achieve your objectives!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3cacbf00164a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React basics all you need to know]]></title>
            <link>https://medium.com/@pedropini/react-basics-all-you-need-to-know-9769f7d5a007?source=rss-b15864ef609a------2</link>
            <guid isPermaLink="false">https://medium.com/p/9769f7d5a007</guid>
            <category><![CDATA[react-component-lifecycle]]></category>
            <category><![CDATA[react-navigation]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[jsx]]></category>
            <category><![CDATA[react-hook]]></category>
            <dc:creator><![CDATA[Pedro Pini]]></dc:creator>
            <pubDate>Tue, 15 Feb 2022 00:45:22 GMT</pubDate>
            <atom:updated>2022-03-10T00:45:54.858Z</atom:updated>
            <content:encoded><![CDATA[<h3>What is React?</h3><p>If you never heard of React is a JS library created by Facebook. The difference is that they treat everything as components, but what this really means?</p><p>Let’s see how a navbar would look like in visual studio code, for a better understanding</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/423/0*SXg8PhttqMl3X1NK.png" /></figure><p>Keep in mind the navbar image we are looking at is considered a component in React.</p><h3>Folder Structure</h3><p>Our folder structure would look like the one below, don’t get attached to names I’m naming the navbar under container because I like to detach what has logic and state from simple components. But in the end, all of them is considered as components, there are great articles that explain how to structure a react app, <a href="https://betterprogramming.pub/how-you-should-structure-your-react-applications-e7dd32375a98">https://betterprogramming.pub/how-you-should-structure-your-react-applications-e7dd32375a98</a>, and <a href="https://www.taniarascia.com/react-architecture-directory-structure/">https://www.taniarascia.com/react-architecture-directory-structure/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/196/0*90G10tfnzYL-TfAO.png" /></figure><h3>Create React App</h3><p>You’ll need to have installed <a href="https://nodejs.org/en/">Node &gt;= 14.0.0 and npm &gt;= 5.6</a> on your machine</p><pre>npx create-react-app learn-react<br>cd learn-react<br>npm start</pre><p>As you can see a react welcome page will be displayed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-yRDM7WGH6c4YrDi.png" /></figure><p>Cool now that we have our application running let’s see how things work, you’re probably seeing 3 folders right now: node_modules, public, and src.</p><pre>learn-react<br>├── README.md<br>├── node_modules<br>├── package.json<br>├── .gitignore<br>├── public<br>│   ├── favicon.ico<br>│   ├── index.html<br>│   └── manifest.json<br>└── src<br>    ├── App.css<br>    ├── App.js<br>    ├── App.test.js<br>    ├── index.css<br>    ├── index.js<br>    ├── logo.svg<br>    └── serviceWorker.js<br>    └── setupTests.js</pre><h3>Node Modules</h3><p>This folder will store all downloaded packages from your <strong>package manager</strong> in my case I use <strong>npm,</strong> but also we could use <strong>yarn.</strong> If you don’t know what is a <strong>package manager</strong> it’s a public registry that consists of packages we can use on our code, for example, if you want to use a custom select, you can search on the npm website and find a lot of custom ones with different functionalities.</p><p>Want to read the full article?</p><p><a href="https://pedropini.com.br/posts/react-react-fundamentals/">https://pedropini.com.br/posts/react-react-fundamentals/</a></p><h3><em>Originally published at </em><a href="https://pedropini.com.br/posts/react-react-fundamentals/"><em>https://pedropini.com.br</em></a><em> on February 15, 2022.</em></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9769f7d5a007" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[11 Useful websites and software’s for software developers]]></title>
            <link>https://medium.com/@pedropini/11-useful-websites-and-softwares-for-software-developers-39baac38c97e?source=rss-b15864ef609a------2</link>
            <guid isPermaLink="false">https://medium.com/p/39baac38c97e</guid>
            <category><![CDATA[website]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[programmer]]></category>
            <category><![CDATA[developer]]></category>
            <dc:creator><![CDATA[Pedro Pini]]></dc:creator>
            <pubDate>Mon, 14 Feb 2022 11:25:53 GMT</pubDate>
            <atom:updated>2022-02-14T11:25:53.077Z</atom:updated>
            <content:encoded><![CDATA[<p>There are a bunch of different places to find something if you’re in need, the websites listed below are a few options that had continued over time with me.</p><p>Websites</p><ol><li><a href="https://codepen.io/">https://codepen.io</a> (very useful to get custom snippets of UI features like modify bootstrap cards)</li><li><a href="https://www.origamid.com/">https://www.origamid.com</a> (this is a good instructor website, I like the linear thinking he has while explaining code, he just give tutorials only in Portuguese)</li><li><a href="https://www.udemy.com/">https://www.udemy.com</a> (Another good source to learn, my preferred one to watch is Academind courses)</li><li><a href="https://www.wappalyzer.com/">https://www.wappalyzer.com</a> (It’s a browser extension, very nice if you’re curious like me to know what kind of development stacks is a website using)</li><li><a href="https://www.hackerrank.com/">https://www.hackerrank.com</a> (Good for practicing your coding skills with challenges and be ready for an interview)</li><li><a href="https://github.com/">https://github.com</a> (Best versioning platform, as many private repositories and a lot of features like GitHub actions, CI/CD, gists, and even a kanban project management to keep tasks on track)</li><li><a href="https://codeimg.io/">https://codeimg.io</a> (Share on Linkedin or somewhere else that code snippet that could be useful)</li><li><a href="https://colors.muz.li/">https://colors.muz.li</a> (Colors Pallet for your new system)</li><li><a href="https://code.visualstudio.com/">https://code.visualstudio.com</a> (Best IDE for programming)</li><li><a href="https://www.docker.com/">https://www.docker.com</a> (No need to install anything as you can always run it in a container ;) )</li><li><a href="https://www.postman.com/">https://www.postman.com</a> (For API’s debugging and test)</li></ol><p>Here are my two cents on what’s useful on the web, I would appreciate it if you could also share your thoughts and opinions.</p><p>if you want to read on my website just go to: <a href="https://pedropini.com.br/posts/links-websites-programmer/">https://pedropini.com.br/posts/links-websites-programmer/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39baac38c97e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Porque fazemos o que fazemos?]]></title>
            <link>https://medium.com/@pedropini/porque-fazemos-o-que-fazemos-15d85bb0488b?source=rss-b15864ef609a------2</link>
            <guid isPermaLink="false">https://medium.com/p/15d85bb0488b</guid>
            <category><![CDATA[pense]]></category>
            <category><![CDATA[reflexao]]></category>
            <category><![CDATA[livros]]></category>
            <category><![CDATA[vida]]></category>
            <dc:creator><![CDATA[Pedro Pini]]></dc:creator>
            <pubDate>Sun, 27 Jan 2019 21:08:28 GMT</pubDate>
            <atom:updated>2019-01-27T21:12:46.469Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wZT7jKC5jQm0Gv1-XG7XkQ.jpeg" /><figcaption>Aqui leia com um copo de café :)</figcaption></figure><p>Bem eu posso dizer que eu realmente era outra pessoa antes de ler este livro, este como muitos de outros livros que vem me formando como pessoa, me passam grandes ensinamentos, este me passou o que eu acredito ser um dos mais valiosos, a nossa MOTIVAÇÃO.</p><p>Cortella começando explicando nele pensamentos de grandes filósofos e sociólogos, contudo ele nos leva a refletir a simplicidade destes dilemas, se somos motivados pelo dinheiro ou pelo nosso espirito.</p><p>Não cabe a mim descrever o livro, só expliquei a temática central do mesmo, com isso refleti muito e cheguei a conclusão de que todos nossos objetivos são adaptados a nossa realidade e conforme evoluímos criamos novos e novos objetivos e isto é o que nos faz acordar todos os dias para fazer a mesma rotina, só que dessa vez melhor que ontem.</p><p>Então eu percebi que eu deveria ter objetivos mais fortes que me fizessem ir além, aqueles 110% que dizem é dessa meta que você irá tirar a vontade de fazer até mesmo as tarefas mais chatas e tediantes.</p><p>Com isso venho oferecer a você que reflita por 3 minutos e mentalize como você se vê daqui à 5 anos, com essa visão crie seus objetivos(de preferência anote-os em um caderno) e irá rir com eles, alguns irá alcançar tão facilmente e outros nem tanto, contudo serão eles que irão te levar ao seu objetivo principal como você se viu.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15d85bb0488b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Usando DELEGATE e LAMBDA no C#]]></title>
            <link>https://medium.com/@pedropini/usando-delegate-e-lambda-no-c-c87251a22d37?source=rss-b15864ef609a------2</link>
            <guid isPermaLink="false">https://medium.com/p/c87251a22d37</guid>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[tutorial]]></category>
            <dc:creator><![CDATA[Pedro Pini]]></dc:creator>
            <pubDate>Sun, 06 Jan 2019 12:16:00 GMT</pubDate>
            <atom:updated>2019-01-06T12:16:00.587Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G6_JdLqUx3TSJE1nrp4n1g.jpeg" /></figure><p>Fala pessoal, neste post eu irei explicar conceitos destas duas funcionalidades que eu entendia, porém dificilmente aplicava. Acho bem legal se você tentar aplicar o que irá ver para ver se realmente aprendeu. Sem mais enrolação…</p><p>Começando pelo <strong>Delegate </strong>é um tipo de referência que pode ser usado para encapsular métodos anônimos. Ele recebe a referência da função e pasmem faz a mesma coisa que ela hahah.</p><p>Aqui eu declaro divisão do tipo <strong>delegate</strong>, no caso decidi usar uma função anônima utilizando lambda, porém pode perceber que o <strong>lambda =&gt;</strong></p><p>nos permite ir direto ao ponto do nosso escopo em que eu divido x por y.</p><pre>delegate void divisao(int x, int y);<br>divisao divi = (x, y) =&gt;</pre><pre>{</pre><pre>Console.WriteLine(x / y);</pre><pre>};</pre><pre>divi(6, 3);</pre><p>porém eu poderia deixar divisão mais genérico, o renomeando para operação e agora posso utiliza-lo como uma função de multiplicação.</p><pre>delegate void operacao(int x, int y);<br>divisao multiplicacao = (x, y) =&gt;</pre><pre>{</pre><pre>Console.WriteLine(x * y);</pre><pre>};</pre><pre>divi(6, 3);</pre><p>Mas e agora, perdi a funcionalidade de divisão e gostaria de multiplicar e dividir. Como qualquer método podemos chamar ele quantas vezes quisermos e o melhor é por causa de estarmos utilizando a função anônima podemos reutilizar passando diferentes parâmetros e claro mudando nosso escopo do método.</p><pre>delegate void operacao(int x, int y);<br>operacao divi = (x, y) =&gt;</pre><pre>{</pre><pre>Console.WriteLine(&quot;DIVISAO&quot;);</pre><pre>Console.WriteLine(x / y);</pre><pre>};</pre><pre>divi(6, 3);<br>divi(8, 2);</pre><pre>divi = (x, y) =&gt;</pre><pre>{</pre><pre>Console.WriteLine(&quot;\nMultiplicacao&quot;);</pre><pre>Console.WriteLine(x * y);</pre><pre>};</pre><pre>divi(6, 3);</pre><p>Expressões <strong>Lambda </strong>são geralmente utilizadas em funções anônimas ou quando queremos fazer algum tipo de busca, como no caso abaixo, eu crio uma lista de inteiros já atribuo os valores dela instanciando com o new e passando os valores entre chaves.</p><p>Após isso eu utilizo o método <strong><em>FindIndex </em></strong>da <strong><em>List </em></strong>e dentro dele eu utilizo a expressão lambda que está dizendo elementos que ele automaticamente atribui como sendo o começo do nosso índice vai ser filtrado quando elementos <strong>%</strong> é o <strong>módulo</strong>(que é o <strong>resto </strong>da divisão) for diferente de 0. Após ele encontrar este valor ímpar ele irá retornar o índice em que ele se encontra no nosso caso será a 3 posição, atribuímos a variável <strong><em>indexImpar </em></strong>e retornamos com um <strong><em>console.WriteLine</em></strong>;</p><pre>List&lt;int&gt; elements = new List&lt;int&gt;() { 10, 20, 40, 31 };</pre><pre>int indexImpar = elements.FindIndex(elementos =&gt; elementos % 2 != 0);</pre><pre>Console.WriteLine(&quot;\nLISTA&quot;);</pre><pre>Console.WriteLine(indexImpar);</pre><pre>Console.ReadLine();</pre><p>Obs: Utilizo o <strong><em>Console.ReadLine</em></strong> no final para meu console não fechar de uma vez, porém quando clicamos na seta verde ou usamos <strong>F5</strong> estamos startando nossa aplicação com o modo <strong>debugger </strong>junto, por isso ele acaba de executar e fecha, se você utilizar <strong>CTRL + F5</strong> ele irá manter o resultado sem você precisar adicionar o <strong>Console.ReadLine</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c87251a22d37" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tratando exceções no C#]]></title>
            <link>https://medium.com/@pedropini/tratando-exce%C3%A7%C3%B5es-no-c-5566c68acf6f?source=rss-b15864ef609a------2</link>
            <guid isPermaLink="false">https://medium.com/p/5566c68acf6f</guid>
            <category><![CDATA[codigo]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[desenvolvimento-software]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[code]]></category>
            <dc:creator><![CDATA[Pedro Pini]]></dc:creator>
            <pubDate>Sun, 30 Dec 2018 23:40:15 GMT</pubDate>
            <atom:updated>2019-01-03T00:57:41.221Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5PyeGXp9J3PpUTHCv9drnQ.jpeg" /></figure><p>Bom dia Pessoal, nesta manhã ensolarada irei explicar um pouco sobre uma parte muito importante do desenvolvimento de sistemas, o tratamento de exceções.</p><p>Muitas vezes quando o programa que criamos está no ar é preciso pensar em possíveis situações que poderá compromete-lo, assim como valores nulos, divisões por zero e por ai vai.</p><p>Sem mais delongas vamos ao código, neste exemplo temos a utilização do famoso comando try-catch. O try-catch nada mais é que o metodo mais popular de tratar exceções, a sua lógica é a seguinte TRY(tente) fazer este código <strong><em>cenário perfeito , </em></strong>enquanto o catch irá se preocupar com os possíveis erros <strong>as exceções do cenário perfeito </strong>. Até aqui você entendeu o que é TRY-CATCH e como utilizá-lo. Vamos um pouco mais a fundo.</p><p>Dentro do catch existe uma classe <strong>DivideByZeroException</strong> que neste caso só irá tratar para nós exceções de divisão por zero, está classe <strong>herda </strong>de sua classe mãe a <strong>Exception</strong>. O que eu fiz foi criar um alias para esta classe chamado erro para facilitar a legibilidade, por isso podemos chamar algumas propriedades dessa classe como <strong>Message</strong>, <strong>StackTrace</strong>, entre algumas outras opções também.</p><pre>try</pre><pre>{</pre><pre>int resultado = Dividir(0, divisor);</pre><pre>Console.WriteLine(&quot;\nResultado da divisão de 10 por &quot; + divisor + &quot; é &quot; + resultado);</pre><pre>}</pre><pre>catch(DivideByZeroException erro)</pre><pre>{</pre><pre>Console.WriteLine(erro.Message);</pre><pre>Console.WriteLine(erro.StackTrace);</pre><pre>}</pre><p><strong>VANTAGENS</strong>: Com este tipo de tratamento seu programa não irá “explodir” um erro na tela do usuário e ficara mais fácil para você descobrir o tipo de erro e onde está acontecendo. Caso seu código realmente precise continuar a lógica desenvolvida para o sistema, atribua o finally que ficará logo abaixo do seu ultimo catch, caso esteja utilizando mais de um.</p><pre>finally <br>{<br>   status();<br>}</pre><p>É isso caso eu possa ajudar em alguma dúvida, me chame pelo linkedin pedropini ou pelo skype augustopini.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5566c68acf6f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hear the Truth]]></title>
            <link>https://medium.com/@pedropini/hear-the-truth-1dc760318621?source=rss-b15864ef609a------2</link>
            <guid isPermaLink="false">https://medium.com/p/1dc760318621</guid>
            <category><![CDATA[poetry]]></category>
            <dc:creator><![CDATA[Pedro Pini]]></dc:creator>
            <pubDate>Sun, 08 Apr 2018 15:29:27 GMT</pubDate>
            <atom:updated>2018-04-08T15:29:27.967Z</atom:updated>
            <content:encoded><![CDATA[<p>It is really hard to hear some truth about ourselves, we are influenced by utopic characters on television, movies and stories, this make us to have a distorcion about our reality, making a fake understanding that we are already perfect and mindfull. Because who wants to show their failures.</p><p>How many times do you really listen to a good feedback?</p><p>Did you that in a positive mean? or just ignored or instantly dislike the person who give the feedback. One truth is HUMANS love the cristicism, but on anothers, never on themselves. I started a year ago to do not criticize or judge, blame no one. I increased my skills in a huge exponencial way, just for listen more and talking less. I need to enhance a lot yet, but now i know i am on a good way, instead of criticism like others i prefer to understand what i need to aprimorate.</p><blockquote>Life is just a matter of what you want to become and the process to achieve the goal. So if you really want to conquer whatever it is, stop losing time with things that take you nowhere.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1dc760318621" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>