<?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: scroung720</title>
    <description>The latest articles on DEV Community by scroung720 (@scroung720).</description>
    <link>https://dev.to/scroung720</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%2F444597%2F64d133c0-430c-4294-9b0c-4fc57c3fc694.jpg</url>
      <title>DEV Community: scroung720</title>
      <link>https://dev.to/scroung720</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/scroung720"/>
    <language>en</language>
    <item>
      <title>Spread the word this should get to every student</title>
      <dc:creator>scroung720</dc:creator>
      <pubDate>Thu, 01 Oct 2020 00:32:03 +0000</pubDate>
      <link>https://dev.to/scroung720/spread-the-word-this-should-get-to-every-student-44og</link>
      <guid>https://dev.to/scroung720/spread-the-word-this-should-get-to-every-student-44og</guid>
      <description>&lt;p&gt;I didn't know about the GitHub Student Developer Pack.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://education.github.com/pack"&gt;https://education.github.com/pack&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Check the benefits they are so many.&lt;/p&gt;

&lt;p&gt;They offer lots of benefits for students completely free. You can now deploy and host things completely for free.&lt;/p&gt;

&lt;p&gt;My personal recommendation is that if you really want to understand JavaScript, get this pack and claim the 6 months of FrontEndMasters and complete the path in JavaScript.&lt;/p&gt;

&lt;p&gt;Sorry, I don't have time to write a complete post but there are lots of possibilities.&lt;/p&gt;

&lt;p&gt;If you know about any other benefit from this pack that is valuable, please share it in your comments, so the students can use these amazing tools for free.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>beginners</category>
      <category>javascript</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Without money involved. Would you code? What would you like to code?</title>
      <dc:creator>scroung720</dc:creator>
      <pubDate>Wed, 16 Sep 2020 14:42:48 +0000</pubDate>
      <link>https://dev.to/scroung720/without-money-involve-would-you-code-what-would-you-like-to-code-48l5</link>
      <guid>https://dev.to/scroung720/without-money-involve-would-you-code-what-would-you-like-to-code-48l5</guid>
      <description>&lt;p&gt;The purpose of my question is that I would like to know the uses that people would do to their programming skills beside working for getting money. And yes, answering I would not code is a valid answer.&lt;/p&gt;

&lt;p&gt;-Maybe you always wanted to create a side project.&lt;br&gt;
-Maybe you wanted to create a video game or something.&lt;/p&gt;

&lt;p&gt;In my case, I would like to code video games and animations using 3D webgl shaders.&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>How to program better (or This is what is wrong with your code) </title>
      <dc:creator>scroung720</dc:creator>
      <pubDate>Tue, 15 Sep 2020 16:15:47 +0000</pubDate>
      <link>https://dev.to/scroung720/how-to-program-better-or-this-is-what-is-wrong-with-your-code-30gj</link>
      <guid>https://dev.to/scroung720/how-to-program-better-or-this-is-what-is-wrong-with-your-code-30gj</guid>
      <description>&lt;p&gt;Have you ever received a code review report saying that your code is "wrong"?. It happened to me multiple times while working on a unicorn startup, also very often I couldn’t understand what was wrong. It is really annoying having people saying that your code is wrong when they are not capable of explaining why💢 or worse they are not willing to do so.&lt;/p&gt;

&lt;p&gt;At some point, I was obsessed with understanding the difference between Good😇 and Bad😈 code. This article is meant to share with you what I learned in my road to discover what differentiates great code from bad code. Hopefully, I will make you understand some ideas that some senior code reviewers couldn’t explain to me without the jargon of a senior dev with poor personal communication skills.&lt;/p&gt;

&lt;h2&gt;
  
  
  The quirks of code review feedback
&lt;/h2&gt;

&lt;p&gt;There are so many things to say about code review feedback, I am going to condense the more important parts to understand the topic we are discussing. What I am trying to show you here is that code review feedback very often has involved communication problems 💬 and we as developers tend to have this kind of problem. &lt;/p&gt;

&lt;p&gt;There are some exceptions but many professional developers are not very sociable persons. It makes sense we spend most of our time sitting in front of a computer. In fact, it is very probable that you are a developer because you are an introvert who prefers to spend more time in front of these devices than dealing with people 👀. And if you are an extrovert, hold on, there is still a chance to teach you how to program better 😅.&lt;/p&gt;

&lt;p&gt;Our job is to communicate with computers, especially to command computers to do specific tasks. We don't interact with people like doctors, lawyers, or almost any other job, the most we code the less we interact with people(unless you are doing pair programming). Even worse on these days of the pandemic, we are more isolated than ever😷. So, compared to the professionals of other careers. It is very likely that we have personal communication skills on average or under the average.&lt;/p&gt;

&lt;p&gt;So, with that being said. Let's explore code reviews.&lt;/p&gt;

&lt;h3&gt;
  
  
  The technical jargon
&lt;/h3&gt;

&lt;p&gt;On one of the many code reviews to my work, a coworker put something like 'you are not using technique "X"' -rejected- and I was like wait a second how I was supposed to know that there is consensus to use technique "X". After talking to the CTO about the technique "Y", I used, it was accepted because the trade-offs of technique "X" was not worth the time to correct the technique "Y"💵.&lt;/p&gt;

&lt;p&gt;After that, I went to the guy who did the review and asked him about technique X. He told me something like 'use google'. Then I realize that it is unfair to work in these very abstract things and having to interact with people who don't want to convey how they think🤔.&lt;/p&gt;

&lt;p&gt;I did everything I could to learn technique "X" and what I found is that I didn't need to use it. Why do developers do this? Why do we avoid having conversations about how to program? What works or what does not work? Where does "A" work better than "B"? Where does "B" work better than "A"? Why do we cover our arguments under the appeal to authority or the 'this is the way we do this' or 'our "X" language senior says that we should do it this way' or ‘this approach is similar to the syntax of "X" framework’?🤨&lt;/p&gt;

&lt;h3&gt;
  
  
  Avoiding confrontation
&lt;/h3&gt;

&lt;p&gt;We, humans, we are biased very often, that's why we need to make decisions based on the evidence. I have no doubt that the reason for many data-driven decision companies to be successful is that they are not taking the gut decisions of their managers but they are listening to their clients and more important to the data of their clients 📊.&lt;/p&gt;

&lt;p&gt;We like to think that we are really good at what we do and very often we don't want to share our work with others, or we don't want to review the work of others. Be aware that the whole point to make anything meaningful is to work in a team. So, this is as important as making code or more, because it doesn't matter if you created a super-optimized snippet of code if it is unmaintainable 🙃 someday someone is going to delete it and create another version with its own new characteristics.&lt;/p&gt;

&lt;p&gt;Share ideas, avoid technical jargon, have real conversations with your team, and be straight to the point when giving feedback is a good pattern to maintain the good health of a code base allowing it to be scalable. Do not be fooled by the urgent things that put you away from what is really important. Always take time to explain what you did in your code and even more important, always be willing to listen to others' ideas about their code and yours💡.&lt;/p&gt;

&lt;h3&gt;
  
  
  I don’t like how you did this
&lt;/h3&gt;

&lt;p&gt;Sometimes there are code reviewers that forget that they should share the reasoning behind the review result. I have seen people rejecting code with arguments like: 'It works but I don't like how you did this', the objectivity 🎯 in code reviews is vital. Please, don’t be this person if you are going to reject the work of someone else at least have the decency to explain why. Otherwise you are making your code base unsustainable, if someday you need help with code reviews you will need to train at once a team member on your code review process, do’s/don'ts, style guide and rules.&lt;/p&gt;

&lt;p&gt;I know this situation sounds silly, although, I have found projects with people who think that by being the only one who can approve pull requests they are protecting their jobs 🤢 . Furthermore, they reject any attempt to change the code style from whatever he/she perceives to be correct without having any objective reasons to behave in this way.&lt;/p&gt;

&lt;p&gt;This is an anti-pattern of code maintainability, the so-called 'Single Point of Failure' and should be avoided because it is very dangerous to the code base. I saw an extreme case of this. I worked with one of these code owner 'dictators' . He sabotaged the git repository of the project and stole 😈 the clients by making it impossible to access the code again.&lt;/p&gt;

&lt;p&gt;Most of the time, the correct way to give code review feedback when you believe it needs some corrections is starting with what is working fine and then switching to bad things like not following a style guide or not using a good practice. Anyway, there is a case when the coder has completely failed ❌. In this case my suggestion is to be as objective and direct as possible without criticizing the author and just focus on criticizing the code.&lt;/p&gt;

&lt;h3&gt;
  
  
  The mythical good reviewer Senior Dev
&lt;/h3&gt;

&lt;p&gt;We need to address that there are some cases where code reviewers are very wise good mentors. You can learn a lot from them and not only knowledge sometimes they even teach you how to teach. They give you suggestions about how to fix your code 🛠️ and some ideas about how to improve your code and which trade-offs in an specific code snippet you should be aware of.&lt;/p&gt;

&lt;p&gt;Value this kind of senior because they bring stability to the team. They allow the team to be more scalable, meaning you can add more people to the team more easily, also, 👉 good code reviews improve the quality of the code in general 👈, improve the communication among team members, creates trust, show respect, transparency and humility.&lt;/p&gt;

&lt;h2&gt;
  
  
  About Good and Bad code
&lt;/h2&gt;

&lt;p&gt;Good and Bad are subjective concepts that usually underlined an specific set of values that vary from project to project, even from team to team. When someone is telling you that your 'code is bad' it is not an universal truth, you should think on this way that what he/she wanted to tell was that your 'code is not what he/she would consider to be good code' 🙃.&lt;/p&gt;

&lt;p&gt;You should always need to ask why your code is not covering the expectations. You need to adapt your code to your team values, if those values are already defined if not you need to encourage the discussion to figure out what is the correct way to do things otherwise it will become a complete mess down the road 🛣️.&lt;/p&gt;

&lt;p&gt;Your code and values should be in alignment with each other. If this is not the case to solve this discrepancy we need to have principles because there is no process, style guide, set of convention that we can use to address all possible cases on programming. Principles 📜 help us whenever we need to take a decision to define what are the important things for the company or project. And principles can be formulate base on values.&lt;/p&gt;

&lt;p&gt;For example, there are cases where speed is more valuable than readability, this is very unlikely but it happens. However, most of the time I found companies that do not understand what are their values, and why they do what they do, they don't have principles most of the time they are improvising or relying on the experience of their software engineer, which sometimes can help but you should avoid the Improvising Driven Development. It is a recipe for disaster 💥.&lt;/p&gt;

&lt;p&gt;Now, that we have talked about good, bad, principles and values. We can talk about the more broaden good and bad characteristic of code.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is wrong
&lt;/h3&gt;

&lt;p&gt;We know that 'bad code' is not universal 🌎. However, there are some more general characteristics of 'good' quality code that usually bad code doesn't have and this is what is wrong with your code most of the time. Normally you won't hear these concepts explicitly mention in online courses, or even in university courses about CS.&lt;/p&gt;

&lt;p&gt;Professional developers learn about these concepts by reading books 📚 about programming and learning from experience the concepts and methodologies used in different companies. It is people who are serious in the business of software who are interested in these concepts. The next list outline what, I believe, we as professional programmers believe is a set of broadly accepted characteristics that moderate the quality of code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://dev.to/ham8821/solid-principles-to-start-with-object-oriented-programming-1e49"&gt;S.O.L.I.D. principles&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/apium_hub/code-smells-that-are-found-the-most-aal"&gt;Code smells&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/apium_hub/code-refactoring-techniques-4pp"&gt;Refactoring&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/anuraghazra/design-patterns-everyday-53m0"&gt;Design Patterns (GOF)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/iamschulz/in-defense-of-the-separation-of-concerns-24m0"&gt;Separation of concerns&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/lpasqualis/choosing-the-proper-level-of-abstraction-74c"&gt;Abstraction&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/lpasqualis/choosing-the-proper-level-of-abstraction-74c"&gt;Function purity&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/nijeesh4all/kiss-the-java-script-298"&gt;KISS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/phantas0s/the-dry-principle-benefits-and-costs-with-examples-4l3g"&gt;DRY&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gonedark/practicing-yagni-3n1d"&gt;YAGNI&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You need to understand the concepts listed above, if you want to become a real professional developer (a person who profess), one of the things that. These concepts allow you to have smart conversations with other developers thus you can collaborate with them to create good quality code 🏆.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why is wrong
&lt;/h3&gt;

&lt;p&gt;Ok, someone is telling you that your code 'is wrong' but why?. It means (mostly) that you have failed ❌ on one or more of the characteristics enlisted in the previous section.&lt;/p&gt;

&lt;p&gt;You are not applying a well-known design pattern that could make your code more predictable in a place where is a good fit 🧩 to use it and you can't justify why you took this decision. The reviewer identified a flaw in your logic that is 100% based on his/her experience 🧙‍♂️ and believes it is going to be a problem later. You are not following S.O.L.I.D. 🦉 principles these principles serve as guides to create classes that are flexible and extendable. Your work has code smells 🦨 and you can't explain the reason for this which means you are trying to push to production code that needs to be refactor. You are not following the style guide or code conventions of your team 📑. Your reviewer is biased and he/she thinks he/she can do it better but he/she is just bluffing, in reality, he/she doesn't like your solution and probably is because he/she is not aware of the trade-offs related to the actual problem 🙁 in this cases you can say 'please, can you take a second look and focus on...'.&lt;/p&gt;

&lt;p&gt;In order to be a successful software engineer you need to have the skills to explain your code. You need to defend your reasoning 🛡️ behind each decision. Otherwise, your code will be rejected more often. This topic is a complete world in its own and I would need to write another article about it but for now.&lt;/p&gt;

&lt;p&gt;If someone is rejecting your code and you believe your code is correct, express your intentions about what you were trying and then ask why that specific approach was wrong if these other number approaches didn't seem to be good enough, show that you evaluate trade-offs between different solutions and show that you studied 🔬 the details about the problem that you are trying to solve.&lt;/p&gt;

&lt;p&gt;These are the main reasons that I have found, to receive negative feedback on code reviews, when collaborating with teams. With the &lt;em&gt;What &amp;amp; Why&lt;/em&gt; out of the way, now I can teach you one detail to have in mind when creating new code and extending existing code, that will improve or at least main the quality of your code base 💪 .&lt;/p&gt;

&lt;h2&gt;
  
  
  How to write good(general) code
&lt;/h2&gt;

&lt;p&gt;As mentioned earlier good quality code have several aspects, however very frequently I found developers in all kinds of organizations doing this one mistake that increases 💹 the code base cost maintainability.&lt;/p&gt;

&lt;p&gt;We can do an exercise to explore this topic, we can create an hypothetical case where we are working in a project, I am going to explain the situation and the decisions involve in creating the code base. Especially, we are going to explore how the way the code is written affects the readability of the code base, all this using a story about boxes 🔲.&lt;/p&gt;

&lt;h2&gt;
  
  
  Once upon a time
&lt;/h2&gt;

&lt;p&gt;A junior developer named Bill 🧒 just graduated from university starts sending his resume wherever he could. On the other side of the same city, there is a guy named Terry 👨. Terry doesn't know anything about programming. The only thing that Terry knows is that he wants to build an app or webapp. Normally when he explains his ideas to other people he says he is creating the Uber/Spotify/Facebook of insert_any_words_here.&lt;/p&gt;

&lt;p&gt;One day, Terry realizes that he needs to start looking for software developers to create this big original idea the &lt;em&gt;Spotify of Italian Soups Recipes&lt;/em&gt; or something as weird as this. He is determined to use the fortune 💰 of his grandfather 👴 to make himself more wealthy 🤑 .&lt;/p&gt;

&lt;p&gt;Terry starts asking his friends, he was looking for developers, so he can hire them, but he didn't have luck. Then he remembered that one of his friends had a successful business related to computers. His friend Ken had a computer store 🖥️. Sure, 'he needs to know where I can find developers', he thought. He went down to Ken's computer store asked the people in there it seems that nobody knew who Ken was. He made a phone call and Ken told him that he usually doesn't show on the store. Ken only shows himself 2 or 3 times per year in his store.&lt;/p&gt;

&lt;p&gt;Eventually Terry asks Ken the big question 'Where can I find developers?' 🕵️ , Ken replies that 'I have no idea, the only time I needed a programmer was the time I end up paying to use a program to create web pages'. Next, Terry starts googling he find out some websites for freelancers.&lt;/p&gt;

&lt;p&gt;He is interested in hiring the best developer of his city. Very soon he realizes that paying a software developer expert is expensive. However, he continue with his ideas, he needed to find an alternative. Eventually, he paid for an advertise in the local newspaper job and classified ads 📰.&lt;/p&gt;

&lt;p&gt;Two days later Bill in his desperation to get a job finds Terry's ad. Next, Bill calls Terry, eventually they met and Bill along other 2 just graduated, started creating the 🌈 Spotitaliansoup 🦄 platform.&lt;/p&gt;

&lt;h3&gt;
  
  
  The project starts
&lt;/h3&gt;

&lt;p&gt;Everyone is happy 🤗 , especially Terry. He is building a platform at what seems to be almost a tenth of the original estimated price defined by a senior software engineer freelancer.&lt;/p&gt;

&lt;p&gt;In the meantime Bill and the Boyz 👬 start to think that after all, writing 📝 production code is not that difficult. Everyone is coding driven by what each one believes work better. There is no consistency across the entire code base they are even using multiple tools to do the same job. They didn't have a timeline, the only thing to moderate the project duration is the decision of Terry willing to pay at most 6 months of salary to each one of his developers.&lt;/p&gt;

&lt;h3&gt;
  
  
  ☣️ 28 Days Later ☣️
&lt;/h3&gt;

&lt;p&gt;One day Bill is creating the soupImporter module from scratch and as part of that module he decided 💡 to create a function called soupFoo,this function receives 1 argument then it reads a given list of soups files, next it gathers all text. After that,it goes through a transformation maybe capitalization of titles or filling empty data with default data. Finally, outputs processed data inside a JS object. It was something around 15 lines of code.&lt;/p&gt;

&lt;p&gt;Here you have soupFoo logic in a diagram with boxes!!!:&lt;br&gt;
&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%2Fbamflelhydo6rihfaxq6.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%2Fbamflelhydo6rihfaxq6.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All coming days of this project were a collection of trial and errors 🐘 .&lt;/p&gt;
&lt;h3&gt;
  
  
  ☣️☣️☣️ 28 Weeks Later ☣️☣️☣️
&lt;/h3&gt;

&lt;p&gt;The personal deadline of Terry was near and Terry found out they didn't have anything to release 😟 . Of course, they had some good prototypes and parts of the system doing what was supposed to be doing but nothing with the shape of a Minimum Viable Product.&lt;/p&gt;

&lt;p&gt;Suddenly Terry starts asking very often to Bill and the Boyz 'why is it taking so long?' 😠 . Each of them tell Terry their current status and they can't give him a real estimation because they had no idea what they are doing. Terry starts to feel that if they continue at this pace. It is going to be more expensive than expected. &lt;/p&gt;

&lt;p&gt;He starts looking in the internet how to simplify the problem because at this point he has spent a lot of time and money 💸 , he learned that he needed a project manager, he read about using APIs to spend less time generating content.&lt;/p&gt;

&lt;p&gt;Eventually, he discovered an API that serves Italian soup recipes 🍲 on demand. He hired a friend's cousin named Karen 👩 . She studied arts but she was looking for a job. It was good timing for this project. After a meeting Terry presented to everyone Karen their new project manager. Her job was to maintain developers focus on the important tasks.&lt;/p&gt;

&lt;p&gt;First task for Karen was to manage the integration of the Italian soup API. She talked 🗣️ to Bill about this task. Bill told her that the implementation could be done right away. He knew that he could implement the use of the Italian soup API inside the soupFoo function.&lt;/p&gt;

&lt;p&gt;Next day when Bill was implementing the API. He realized 🤔 that he could put an if/else inside the soupFoo logic and send a new flag as an argument 👿 , in a way that he can know when they are going to read soup recipes from soup API or their own soup recipes. He knew that this was an ugly solution but it was a quicker implementation.&lt;/p&gt;

&lt;p&gt;Here you have soupFoo logic v2 in a diagram with boxesss:&lt;br&gt;
&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%2F3opvlezn1c5zikjtzdkq.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%2F3opvlezn1c5zikjtzdkq.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This was the last commit of Bill in the project 😔 . He found a better job with a friend from university . The boyz and Terry didn't see it coming. Terry rapidly hired another new just graduated junior Bob 🧑‍🎓 . Hopefully Bob and the boyz could manage to finish the project on time before Christmas. &lt;/p&gt;
&lt;h3&gt;
  
  
  18 months and 1,543 commits later...
&lt;/h3&gt;

&lt;p&gt;After 18 months, no one remembers Bob, Bill, Karen and the Boyz 🌵. There are all the time new workers being hire also workers quitting their jobs, Terry's family is advising him to end this project. But Terry doesn't want people to think that he was a fool 😡. He continues pushing the project throwing more money at it 💸.&lt;/p&gt;

&lt;p&gt;One day a project manager named Mark 🤓 , asked a new hired call Tim to replicate and fix a bug found in their end-to-end tests. It has something to do with how the application is reading soup recipes.&lt;/p&gt;

&lt;p&gt;And this is what Tim found 😨 when he goes through the code for the soupFoo function version 17 diagram with boooooxxxesssss:&lt;/p&gt;

&lt;p&gt;&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%2Fuvv69ev88cmysu93cg5l.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%2Fuvv69ev88cmysu93cg5l.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now imagine poor Tim 😐. He needs to discover which of those boxes is related to the reported bug. He starts counting how many cases does he need to test because he doesn't have more information about how or when the bug is happening. The only thing that he knows is that something is terribly bad 👻 with this function. This situation amplifies his impostor syndrome 😢 and what happens next is Tim notifying Terry that he is quitting his job.&lt;/p&gt;
&lt;h3&gt;
  
  
  The Final Act 🎭
&lt;/h3&gt;

&lt;p&gt;Finally, Terry has had enough 🤬 he decided he is going to hire an expert to finish the project. Now, the money is not as important as ending up looking stupid 🤪 to his friends and family due to all the wasted money. After googling 🕵🏽‍♂️ for a while he found Steve an expert with 20+ years of experience doing software engineer 🦄 with perfect score in a freelance platform.&lt;/p&gt;

&lt;p&gt;Some meetings and negotiations later, Steve presents a plan 📉 with a timeline 📅 to Terry. With the following tasks in this order:&lt;br&gt;
1)Documenting existing code 📄&lt;br&gt;
2)Prioritizing code 🆙&lt;br&gt;
3)Based on priority creating tests 🟩🟥&lt;br&gt;
4)Refactoring the code that needs refactor 🧩&lt;br&gt;
5)Documenting new code 📄✖️2️⃣&lt;br&gt;
6)Creating new tests 🟩🟥✖️2️⃣&lt;/p&gt;

&lt;p&gt;One day when doing the refactoring milestone, Steve 🦄  found our beloved soupFoo 🧟 function. He remembered a &lt;a href="https://www.youtube.com/watch?v=xXXTeq06s4M" rel="noopener noreferrer"&gt;line&lt;/a&gt; from a tv show 📺 he used to see on the late 2000s. Instead of criticizing the bad shape of a computer in this case it would be the bad quality of code 🔫 .&lt;/p&gt;

&lt;p&gt;Steve did what was needed to be done 🦉 since the beginning and along the development of the project. He identified all the needed functionality for a MVP(YAGNI) 👍, removed repeat behaviors(DRY) 👍 and simplify logic(KISS) 👍.&lt;/p&gt;

&lt;p&gt;After 3 months of work he created 12 functions to divide all the soupFoo behavior 🌈:&lt;/p&gt;

&lt;p&gt;&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%2Fy8vzi54t5a78dkhhlk0e.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%2Fy8vzi54t5a78dkhhlk0e.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Steve was amazed by how well he abstracted all functionality. He was glad with the result of his work 🎖️. He finished all the work considered in his original timeline. After this Terry 😃 could invite his family and friends to the alpha test of his 🌈 Spotitaliansoup 🦄 platform.&lt;/p&gt;

&lt;p&gt;Some weeks later Terry got his first subscribers and then he realizes that the rate of revenue would be very slow 😓 because not many people was into italian soups. However, he asked Steve if they could adapt the platform to distribute digital books 📚 instead of italian soups and due to the flexible design this was indeed possible. The return of revenue of that project worked better for him at least to recover his money.&lt;/p&gt;

&lt;p&gt;As the years went by many contributors of the 🌈 Spotitaliansoup 🦄 platform remembered those months of work with shame 😳 . Terry learned a lot and very often he questioned himself: 'what would have happened if I didn't find Steve 🐴 ?'&lt;/p&gt;
&lt;h2&gt;
  
  
  The Yoda paradox
&lt;/h2&gt;

&lt;p&gt;The story is over ✋, now in this section I would like to talk about a topic related to code quality. Which is what happens when you reach the higher levels of code quality 🏆 in software engineer.&lt;/p&gt;

&lt;p&gt;I have been lucky enough 🧐 to work with software engineers like Steve with 20+ years of experience. At higher levels of good quality code, I have found an interesting pattern. Most of this engineers when they give their wisest advise is something among these lines:&lt;/p&gt;

&lt;p&gt;"You should know how to refactor so you never need to refactor again" &lt;/p&gt;

&lt;p&gt;"You should know how to use design patterns so you never need to use those design patterns"&lt;/p&gt;

&lt;p&gt;Every time they say things like these I have seen other co-workers saying that it is none-sense 😕 . But I believe these experts are not lying, these advises convey deep wisdom which is needed to create great quality code, hold your horses because there is a catch. What they really want to say is that:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You need to get wisdom 🧙‍♂️ , discover the liberty that exists within the limits that are defined by the principles, techniques and methods that drives software engineer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&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%2Fq5dn335z54avthfiyfm2.jpeg" 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%2Fq5dn335z54avthfiyfm2.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This means you should not blindly follow all the recommended principles, techniques and methods 🤖 . It is better to understand the "Whats", "Hows", "Whys", "Whens" and "Wheres" for each of this resources 🤔 . &lt;/p&gt;

&lt;p&gt;And don't get me wrong, I am not saying that you should not follow those principles, techniques and methods. Definitely you will have a phase where you are going to follow them blindly because it is a process but that doesn't mean that it would be the same forever 🕰️ .&lt;/p&gt;

&lt;p&gt;To get to this level of mastery, you need to take a long journey ✈️ reading dozens of books 🏝️ ,  spending thousands of hours programming 🏞️ , spending hundreds of hours working with other programmers 🗻.&lt;/p&gt;

&lt;p&gt;I believe this is what Yoda wanted to &lt;a href="https://www.youtube.com/watch?v=7fw49NqiTQw" rel="noopener noreferrer"&gt;teach&lt;/a&gt; to Luke Skywalker in one of the Star wars movies.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/tpiXQIuC9kKYg/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/tpiXQIuC9kKYg/giphy.gif" alt="Yoda"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"You must unlearn what you have learned"&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Yoda&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I truly believe that this should be the goal 🏅 of any true software engineer who wants to be at top levels of competence. There are no shortcuts, anyone saying that is easy is lying, what is really needed is hard work 🏋️‍♀️ , take smart decisions base on all the data you can access at the given time and you need discipline.&lt;/p&gt;
&lt;h2&gt;
  
  
  Conclusions
&lt;/h2&gt;
&lt;h3&gt;
  
  
  About Code review
&lt;/h3&gt;

&lt;p&gt;Remember the aspects of code that should be reviewed:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Correctness and comprehension 📝&lt;/li&gt;
&lt;li&gt;The general style (code convention, style guide) 📔&lt;/li&gt;
&lt;li&gt;Language specific readability 👓&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Defend your code 🛡️ on review if it is wrong demand an explanation.&lt;/p&gt;

&lt;p&gt;Suggestion: When a code reviewer is proposing another solution that is equivalent to the original code, changing what was already done is more expensive 🙅. Original author's code should have preference unless there are clear identified downsides.&lt;/p&gt;

&lt;p&gt;Code reviews should be considered an opportunity to share knowledge 🧠. Code reviews should be as important as writing code because the code base belongs to the whole organization it is not of the author, that's why it is needed that someone from your team review your code. Developers should find ways to overcome the anxiety and stress that come with code review. Everyone can collaborate to make this process less stressful by communicating in a correct manner.&lt;/p&gt;
&lt;h3&gt;
  
  
  About writing better code
&lt;/h3&gt;

&lt;p&gt;My recommendation is that you should use those boxes diagrams (used to explain the story about the Spotitaliansoup) all the time. Be aware of the logic branching 🎋 generated by the used of if/else statement, any time you find yourself writing a function repeating this pattern of throwing an if/else inside an if or an else you are doing something wrong. Of course, there is a minimal amount of if/else that you need to have in order to create any program.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;My recommendation is that a function in the worst case should have an if (if/else) / else or if / else((if/else)) anything deeper than that you are doing it wrong&lt;/em&gt; ❌ .&lt;/p&gt;

&lt;p&gt;My claim here is that we should maintain if/else at minimum otherwise the complexity of a function grows exponentially 🤯, literally is the function 2&lt;sup&gt;x&lt;/sup&gt; it is not an opinion it is a fact, which mean that the cost to test, document, debug and read that code also grows exponentially, of course there are a lot of ways to write bad code but this is the kind of code that I found more often and that represent a lot of wasted money and time, this is the reason why I wrote this article because it is very common. So, this is the take away of the soupFoo function story you need to understand that if you are not careful with the code that you create you hurt your code base, your team, your company and your family because you can lose your job if you don't know how to work correctly.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;value&lt;/strong&gt; that we should aim to is code stability, but how can we do that? writing code for complete systems is a pretty complex task. The &lt;strong&gt;principle&lt;/strong&gt; that we should follow is that we need to create code that will not fail. The &lt;strong&gt;secret&lt;/strong&gt; 🙊 &lt;em&gt;in order to write code that will not fail, you need to write code that can't fail&lt;/em&gt; or at least not in the near future. And how can you do that? avoid evaluating expressions inside if statements, as much as possible, and if you can't avoid them, make sure those expressions are evaluated with distance between them.&lt;/p&gt;

&lt;p&gt;The closer if expressions are between each other the more probable bugs will hide in there. That's way you should keep it at minimum and away from each other. How many hours you have wasted due to a bug 🕷️ that was hidden inside an if/else, and it look something like this:&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="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;expression1&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;expression2&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;expression3&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;expression4&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="k"&gt;else&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="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="c1"&gt;//Your bug was here&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="k"&gt;else&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="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The worst is that sometimes we are lazy 🦥 we don't care what the code does we simply add another if/else statement to branch functionality this is wrong. I did this when I was starting my career, that's why I recognize this pattern in multiple project code base. Avoid nesting if/else as much as possible.&lt;/p&gt;

&lt;p&gt;If you don't have this problem or no one in your team have this problem in your code base 🎉 congratulations 🎉 . At least I put other topics in here. Hopefully, you learned something in here.&lt;/p&gt;

&lt;h3&gt;
  
  
  About striving for wisdom
&lt;/h3&gt;

&lt;p&gt;Almost everything that I wanted to say is in that section. Just a recommendation is that, you can follow your passion but don't forget to be human 🧍. Your coworkers and relatives are not computers 🤖 , you still need to interact with them and you still have things to learn from anyone. So, keep teaching and more important learning.&lt;/p&gt;

&lt;h3&gt;
  
  
  In general
&lt;/h3&gt;

&lt;p&gt;In order to create anything meaningful you need to work in team. The wizard-genius computer programmer 🧙‍♂️ that build companies on its own is a myth. You can build amazing things only if you are in a good team.&lt;/p&gt;

&lt;p&gt;Every time someone needs to rewrite your code to extend it, you have failed ❌ as software engineer. Programmers need to write code assuming that it will not be modified just extended, this doesn't mean that your code should be rigid it still needs to be flexible but the idea is that anyone updating/extending your code should find something to build on 🏗️ , not something that they will want to destroy.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"&lt;strong&gt;Performant code&lt;/strong&gt; is the Mc-mansion&lt;/em&gt; 🏘️ &lt;em&gt;in Sarasota that starts falling apart after 10 years. &lt;strong&gt;Readable code&lt;/strong&gt; is the old stone building&lt;/em&gt; 🏛️ &lt;em&gt;that stands for centuries. I cannot respect someone who doesn’t see the difference."&lt;/em&gt;&lt;br&gt;
Frank Underwood (a Twisted version) 👌&lt;/p&gt;

&lt;p&gt;Thank you for reading 🥺 . And excuse me if my English was bad 🎩 , it is not my native language.&lt;/p&gt;

</description>
      <category>career</category>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>codequality</category>
    </item>
    <item>
      <title>Learning How to Learn Efficiently</title>
      <dc:creator>scroung720</dc:creator>
      <pubDate>Tue, 25 Aug 2020 20:33:42 +0000</pubDate>
      <link>https://dev.to/scroung720/learning-how-to-learn-diffused-mode-focused-mode-1-433b</link>
      <guid>https://dev.to/scroung720/learning-how-to-learn-diffused-mode-focused-mode-1-433b</guid>
      <description>&lt;p&gt;Hello everyone. As you know there are lots of information about programming and related topics. Sometimes is really frustrating to constantly be googling the same things over and over again. I am sick of it. I decided that I need to find a way to improve how I learn.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/IPbS5R4fSUl5S/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/IPbS5R4fSUl5S/giphy.gif" alt="Homer Simpson Learning"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I already knew about a course that is very popular on the internet. I started taking this course last week. It is offered through the Coursera platform, it's called &lt;a href="https://www.coursera.org/learn/learning-how-to-learn"&gt;Learning How to Learn&lt;/a&gt;. I was trying to learn efficient ways to learn. And the course's name matches perfectly with my purpose. I finished week 1 and it is what I was looking for.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/ZwucezvrmQIEPunA7R/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/ZwucezvrmQIEPunA7R/giphy.gif" alt="Checking in a director for a card"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Last week, I learned multiple interesting things, one which seems to cause me more discomfort in practice is the &lt;a href="https://fs.blog/2012/04/feynman-technique"&gt;Feynman technique&lt;/a&gt;. Long story short, the main idea of this technique is that you need to be able to teach any concept to any 6 years old kiddo if you fail this means that you don't truly understand the topic, and you have some knowledge gaps.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/3ohzAxrXucGUVHJcnm/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/3ohzAxrXucGUVHJcnm/giphy.gif" alt="Mr. Krabs saying you got it kiddo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In order to practice my teaching skills and my English writing. I created this initial post which is going to be included in a series with useful things to learn more efficiently. Hopefully, some of these ideas are helpful to you.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/3o7abA4a0QCXtSxGN2/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/3o7abA4a0QCXtSxGN2/giphy.gif" alt="Scientific exclaiming 'good news everyone'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Our brain works at two 'velocities'
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Focused mode
&lt;/h3&gt;

&lt;p&gt;When we are doing an activity that demands our attention perhaps you are learning a new framework or you are at work coding. Your brain is working similar to a computer, using (&lt;a href="https://www.cambridge.org/core/journals/behavioral-and-brain-sciences/article/magical-number-4-in-shortterm-memory-a-reconsideration-of-mental-storage-capacity/44023F1147D4A1D44BDC0AD226838496"&gt;4 cores&lt;/a&gt;) where each core has a reference to a memory segment. &lt;/p&gt;

&lt;p&gt;The better you master an activity the bigger these chunks are, given this limitation sometimes we are unable to understand new learning concepts because maybe you needed to mix more than 4 segments of memory. &lt;/p&gt;

&lt;p&gt;Focused attention is the mode where you normally learn anything, &lt;br&gt;
it is important to know its pros and cons.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/OKDKZ0XADcCNW/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/OKDKZ0XADcCNW/giphy.gif" alt="Patrice star looking close over another person"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Pros
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;This is the only way to learn 📖 (currently). So, there is no alternative (until Elon Musk completes its &lt;a href="https://www.youtube.com/watch?v=lA77zsJ31nA"&gt;neuralink&lt;/a&gt; 🧠). &lt;/li&gt;
&lt;li&gt;Allows you to master an activity or knowledge. You can internalize a task or an idea so much that you don't even need to think about it (something like playing a musical instrument 🎻)&lt;/li&gt;
&lt;li&gt;Understand Analogies ♻️. Allows you to recognize the context where you are and then select a specific neural pattern to use, or to reuse another neural pattern to associate with a new activity&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Cons
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;It is very expensive to create new neural patterns 💸 in a way that the focused mode can use them, meaning you need to invest more time to practice and study&lt;/li&gt;
&lt;li&gt;Distractions can take you out of the focused mode 📢&lt;/li&gt;
&lt;li&gt;Using too much-focused mode can become a bottleneck to learn more things 🤕 (see Diffused mode)&lt;/li&gt;
&lt;li&gt;You have access to 4 neural paths at the same time 📁📁📁📁.&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;You need to understand that focused mode by itself is not enough for learning new things. To use new neural patterns in focus mode you need to practice. The more you practice the better you become at that activity when you are in focused mode.&lt;/p&gt;

&lt;h4&gt;
  
  
  Tips
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Practice makes permanent 🏄‍♂️&lt;/li&gt;
&lt;li&gt;The more abstract something is the more you need to practice to master it 💡&lt;/li&gt;
&lt;li&gt;Learning something difficult takes time(Sorry, you can't learn C++ in 21 days 😒) this is not an opinion it is a fact&lt;/li&gt;
&lt;li&gt;Avoid environments with distractions 😌&lt;/li&gt;
&lt;li&gt;Clean and organize your desktop or wherever you are working/studying 🚮 that also includes your 40 tabs open in google chrome, get rid of those unnecessary tabs&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;a id="diffused"&gt;&lt;/a&gt;Diffused mode
&lt;/h3&gt;

&lt;p&gt;Have you ever been stuck with a problem so bad that you get frustrated and then you change to another task or even while sleeping, all of a sudden the answer, key idea, solution comes to your mind out of nothing? This occurs when our brain is required to mix multiple neural patterns that are not frequently used together in your brain.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/eA2qEgL5mAsOk/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/eA2qEgL5mAsOk/giphy.gif" alt="Dr house md having an eureka moment"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The solutions that come out of the blue, happens because our brains have access to limited chunks of 'memory' (&lt;a href="https://www.cambridge.org/core/journals/behavioral-and-brain-sciences/article/magical-number-4-in-shortterm-memory-a-reconsideration-of-mental-storage-capacity/44023F1147D4A1D44BDC0AD226838496"&gt;4 memory segments&lt;/a&gt;) when thinking actively (focus on something).&lt;/p&gt;

&lt;p&gt;Just because you can't find a solution to a given problem or you can't understand a new topic, doesn't mean that you don't have the knowledge or capacity to do it. Perhaps you are too focus that you can't see the big picture. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/3oEdv889IaMYigqgZa/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/3oEdv889IaMYigqgZa/giphy.gif" alt="Funny non-suffering cat head stuck on paper box"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Pros
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Allows your brain to mix neural patterns in new ways 🆕&lt;/li&gt;
&lt;li&gt;Brings balance when used with focus mode ⚖️&lt;/li&gt;
&lt;li&gt;Can bring old neural patterns or memories 👴&lt;/li&gt;
&lt;li&gt;Can recognize patterns that were in front of you and you didn't realize at the moment when focusing⚠️&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Cons
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;You can let it happen but you can't control exactly when it is going to occur 😕&lt;/li&gt;
&lt;li&gt;If you are not truly compromised with what you are learning is probably that you are not going to get any new ideas 🥺&lt;/li&gt;
&lt;li&gt;It is more difficult to determine which knowledge comes from diffused mode and focused mode 💭&lt;/li&gt;
&lt;li&gt;Sometimes it feels that it is not working well. However, it could be an illusion of competence, maybe you need to learn more or you are missing important practice or information 🤔&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;Finally, your brain needs to wander around freely, by doing this it can combine knowledge in ways that would be difficult while focused. The diffused mode is the reason why some people suggest: 'Don't work hard, work smart'. At times, it is better to do something else otherwise you get stressed. Allow your brain to work naturally let it rest when you are stuck with a problem or when learning something new.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/W35DnRbN4oDHIAApdk/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/W35DnRbN4oDHIAApdk/giphy.gif" alt="Morty saying I am so smart "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Tips
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Ways to trigger the diffused mode:

&lt;ul&gt;
&lt;li&gt;Do physical exercise 🏊‍♀️&lt;/li&gt;
&lt;li&gt;Sleep 😴&lt;/li&gt;
&lt;li&gt;Relaxing 🛀&lt;/li&gt;
&lt;li&gt;Take a walk 🚶‍♀️&lt;/li&gt;
&lt;li&gt;Almost any activity that you internalize at a level where your brain doesn't need to be focus 🏆&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;If you are stuck with a problem or new topic and you have more than 10 minutes without any advance, just leave it for later skip that part or use a trigger of the diffused mode 😩&lt;/li&gt;
&lt;li&gt;Sleep well, even if you are not having difficulties solving problems or at learning. Sleeping besides helping you to combine neural paths in interesting ways, also, clears your brain from toxins and allows your brain to remove weak neural patterns and to strengthen even the more important neural patterns 💤&lt;/li&gt;
&lt;li&gt;If diffused mode is not working is probably because you need to study more fundamental knowledge related to what you are doing 📜&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Well, that's all for this post. For my next article, I want to talk about what are the best techniques to be a master of the focused mode.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/6NVOQr1I5H1MA/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/6NVOQr1I5H1MA/giphy.gif" alt="A text that says: 'You are never done learning'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Follow me if you want to know more about efficient learning and productivity. Thank you for reading.&lt;/p&gt;

</description>
      <category>learning</category>
      <category>beginners</category>
      <category>career</category>
      <category>productivity</category>
    </item>
    <item>
      <title>👹8 Ugly Truths I Found While Working as a Software Engineer👹</title>
      <dc:creator>scroung720</dc:creator>
      <pubDate>Thu, 20 Aug 2020 16:45:36 +0000</pubDate>
      <link>https://dev.to/scroung720/8-ugly-truths-i-found-while-working-as-programmer-34of</link>
      <guid>https://dev.to/scroung720/8-ugly-truths-i-found-while-working-as-programmer-34of</guid>
      <description>&lt;p&gt;Well, I have been paid for writing code for some years. And, I have found some ugly truths that I always wanted to share in a blog. Hopefully, you understand that my intention is not to make you feel bad...&lt;/p&gt;

&lt;p&gt;** TL;DR&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1) The more on tech trend you are the more replaceable you are&lt;/li&gt;
&lt;li&gt;2) Your co-workers are not your friends&lt;/li&gt;
&lt;li&gt;3) Your boss will take credit for any 'good work' created by you&lt;/li&gt;
&lt;li&gt;4) If you ever let anyone know that you are planning to leave your job the company will be really mean to you&lt;/li&gt;
&lt;li&gt;5) Certification == Disposable&lt;/li&gt;
&lt;li&gt;6) People is always looking at your screen or worse&lt;/li&gt;
&lt;li&gt;7) The Good Place&lt;/li&gt;
&lt;li&gt;8) Everything will be fine as long as investors are getting their expected revenue, otherwise &lt;strong&gt;Heaven&lt;/strong&gt; could become &lt;strong&gt;Hell&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/3o72F8t9TDi2xVnxOE/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/3o72F8t9TDi2xVnxOE/giphy.gif" alt="alt surprised monkey meme"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;br&gt;
🎁This post is a special nihilistic gift for everyone.🎁&lt;br&gt;
&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So, I enumerate these 😧😧ugly truths😧😧 and then I share an anecdote, description, or related information to that specific topic, then closing each with a 😌😌lesson😌😌.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/wM2jsoKbVTur6/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/wM2jsoKbVTur6/giphy.gif" alt="alt yin and yang symbol represented by fishes"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;br&gt;
☯️Remember, Yin and Yang: A balance between Good and Bad☯️&lt;br&gt;
&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here we go:&lt;/p&gt;

&lt;h3&gt;
  
  
  1) The more on tech trend you are the more replaceable you are&lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Anecdote:
&lt;/h4&gt;

&lt;p&gt;When I was in college everyone was saying we need to learn Java, that there were many job offers, but I didn't like it. I always thought that I chose the wrong career. However, I found JavaScript and it was so similar to C for my newbie's eyes(now I know that JS is more related to lisp), I always loved C. &lt;/p&gt;

&lt;p&gt;Then, I started to learn JavaScript. Eventually, I started working as a web developer. I found lots of JS projects with people that had no idea how JS works. Also, it is incredible the number of managers that are not willing to pay for a JS specialist until they have no other option, and that's why at least in my country at top senior levels JS is better-paid x1.5-x2 than Java.&lt;/p&gt;

&lt;h4&gt;
  
  
  Related:
&lt;/h4&gt;

&lt;p&gt;Here is &lt;a href="https://en.wikipedia.org/wiki/Donald_Knuth"&gt;Donald Knuth&lt;/a&gt; giving advice about don't follow trends: &lt;a href="https://youtu.be/75Ju0eM5T2c"&gt;https://youtu.be/75Ju0eM5T2c&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;An extract of my favorite poem in the English language:&lt;br&gt;
&lt;em&gt;[...]I shall be telling this with a sigh&lt;br&gt;
Somewhere ages and ages hence:&lt;br&gt;
Two roads diverged in a wood, and I—&lt;br&gt;
I took the one less traveled by,&lt;br&gt;
And that has made all the difference&lt;/em&gt;&lt;br&gt;
by &lt;a href="https://en.wikipedia.org/wiki/The_Road_Not_Taken"&gt;Robert Frost&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Lesson:
&lt;/h4&gt;

&lt;p&gt;Scarcity makes you valuable.&lt;/p&gt;

&lt;h3&gt;
  
  
  2) Your co-workers are not your friends&lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Description:
&lt;/h4&gt;

&lt;p&gt;This is something more related to common sense. Like almost everything in life sharing too much time with people doesn't make them your friends. Of course, you can make friends from work but that is very unlike. Out there are people that are willing to go really low to maintain status or job positions. If you ever find sabotage, lies, and bad intentions don't be surprised.&lt;/p&gt;

&lt;h4&gt;
  
  
  Related:
&lt;/h4&gt;

&lt;p&gt;To illustrate this situation. I am adding this scene from Malcolm in the Middle, here the family finds out that Reese's teacher is sabotaging the perception of Reese's performance at school. The same situation is possible with a manager at work:&lt;br&gt;
&lt;a href="https://youtu.be/pU-uZztJEcQ"&gt;https://youtu.be/pU-uZztJEcQ&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Lesson:
&lt;/h4&gt;

&lt;p&gt;Be careful with what you do and what you say. There could be people willing to use anything against you.&lt;/p&gt;

&lt;h3&gt;
  
  
  3) Your boss will take credit for any 'good work' created by you&lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Anecdote 1:
&lt;/h4&gt;

&lt;p&gt;In my country, as a requirement to graduate from college, you need to work for free 6 months usually in government projects. This is called 'community service', when I was doing my service I created a project that months later was presented as someone else's work.&lt;/p&gt;

&lt;h4&gt;
  
  
  Anecdote 2:
&lt;/h4&gt;

&lt;p&gt;I was working at a consulting company. I found a flaw in our logic in a module that we used in multiple projects. I am not going into details but the fix improved performance 40% and savings for 30% on servers. The CEO gave a raise and a bonus to my direct boss. 😒&lt;/p&gt;

&lt;h4&gt;
  
  
  Anecdote 3:
&lt;/h4&gt;

&lt;p&gt;I was working for a product company. There was this bug that many engineer have been working on for like 5 months. Finally, it was my turn to give it a try, I created a fork from the open-source project we were based on. Recreate a whole module and I found out that the official documentation was lying and that some formulas were wrong. After that, I created a solution proposal.&lt;/p&gt;

&lt;p&gt;Then my direct boss asked me to go to the CEO office to explain the solution for approval because they were about to buy lots of licenses of proprietary software to work around that bug. When we were leaving the office my boss says to the CEO that he had 'a better solution' than mine that what I said was just an idea. Once when we were outside the office, I asked him what was the other solution, and he told me 'There is no other solution. We are going to use yours.'&lt;/p&gt;

&lt;p&gt;Look I don't like to think bad about people, but I am sure that he did that to take credit in case I was right, and if I was wrong to blame me because It was my idea. In the end, the bug was fixed with my solution, and everyone forgot that it was the main problem of the project for 6 months.&lt;/p&gt;

&lt;h4&gt;
  
  
  Lesson:
&lt;/h4&gt;

&lt;p&gt;Be prepared to defend your work, use email, control version always document what you do.&lt;/p&gt;

&lt;h3&gt;
  
  
  4) If you ever let anyone know that you are planning to leave your job the company will be really mean to you&lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Description:
&lt;/h4&gt;

&lt;p&gt;This is like a law of software companies. I have made this mistake. On my first job, by saying to my boss that I was going to an interview. He sabotaged the whole interview process calling me all the time during the interview, giving me extra work that week. A lot of passive-aggressive actions like taking away my ID so I suffer to enter the building standing outside. &lt;/p&gt;

&lt;p&gt;Also when something like this happens and there is the need to fire people they are going to choose you first. The worst is when the people at the new job don't continue with your hiring process. Sometimes people end up without a job because of this. I know many developers. I would say that each year, I hear stories like these 1 or 2 times, they were trying to change to another job and something goes wrong and then they lost everything.&lt;/p&gt;

&lt;h4&gt;
  
  
  Lesson:
&lt;/h4&gt;

&lt;p&gt;Don't let anyone at your current job know that you are trying to get a new job. If you need to take interviews, take your vacation days, or ask for permission to leave the office earlier. Only say something until you already have a concrete deal with the people from the new job, this means you had accepted their offer and you discussed the details about your hiring. Also, you should ask for time to organize things in your current job.&lt;/p&gt;

&lt;h3&gt;
  
  
  5) Certification == Disposable&lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Description:
&lt;/h4&gt;

&lt;p&gt;Anyone who has enough years in this industry knows that most of the time, certifications are not correlated to how well prepared a candidate is. I have experience in hiring people and creating the annual business plan with the owners of a few companies. &lt;/p&gt;

&lt;p&gt;When we are doing Java projects it is really savage because the certifications are very standardized for that language, so for managers whenever a developer is under the average performance literally they say, &lt;em&gt;get someone else with the same certifications&lt;/em&gt; and that's how it is done, just like that. The worst thing about it is that sometimes they are letting go, great engineers with many years of experience and replacing them with just graduated juniors that create programs with lower quality.&lt;/p&gt;

&lt;h4&gt;
  
  
  Related:
&lt;/h4&gt;

&lt;p&gt;Here, I will extrapolate statistics to be the equivalent to certifications:&lt;br&gt;
&lt;em&gt;There are three kinds of lies: lies, damned lies, and statistics.&lt;/em&gt;&lt;br&gt;
-Mark Twain&lt;/p&gt;

&lt;p&gt;Here is &lt;a href="https://en.wikipedia.org/wiki/Kent_Beck"&gt;Kent Beck&lt;/a&gt; criticizing SCRUM certifications:&lt;br&gt;
&lt;a href="https://youtu.be/fH4gqsIYzyE?t=1201"&gt;https://youtu.be/fH4gqsIYzyE?t=1201&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Lesson:
&lt;/h4&gt;

&lt;p&gt;Certifications don't replace hard-smart work. Even degrees don't replace hard-smart work. You should value a person at their job, based on their work and nothing else.&lt;/p&gt;

&lt;h3&gt;
  
  
  6) People is always looking at your screen or worse&lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Description:
&lt;/h4&gt;

&lt;p&gt;The obvious case about this is the situation when your direct boss catches you watching doge memes and videos of kittens, this is embarrassing. It happened to me once with the RHCP concert at the Giza pyramids last year 😁. &lt;/p&gt;

&lt;p&gt;However, when you spend more time with managers you find out, that many companies have tracking software installed on each computer at the company they do that to track workers' behavior. They can know how long people are really working and they have access to almost everything, and you can't do anything because technically those are their computers, not yours.&lt;/p&gt;

&lt;h4&gt;
  
  
  Lesson:
&lt;/h4&gt;

&lt;p&gt;Always be professional inside and outside the office, especially when using the company's devices because you never know who is watching. 😅 Btw, always log out from your OS account when you are away from your computer.&lt;/p&gt;

&lt;h3&gt;
  
  
  7) The Good Place (yes!, like the Netflix Show)&lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Description:
&lt;/h4&gt;

&lt;p&gt;The only reason for having a fancy office and amazing benefits are investors throwing money because they want you to make them richer, not because you need a nice place to work.&lt;/p&gt;

&lt;h4&gt;
  
  
  Lesson:
&lt;/h4&gt;

&lt;p&gt;It is good to be passionate about work but remember at the end of the day. It is a business and most of the time what moves everything is money.&lt;/p&gt;

&lt;h3&gt;
  
  
  8) Everything will be fine as long as investors are getting their expected revenue, otherwise &lt;strong&gt;Heaven&lt;/strong&gt; could become &lt;strong&gt;Hell&lt;/strong&gt;&lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Anecdote:
&lt;/h4&gt;

&lt;p&gt;I saw a CEO founder being fired because he couldn't make the company more profitable, we were having a steady 40% annual growth for 5 years in a row. The company went from 40 to 500 employees. Those numbers were incredible, which is really good for any business but the investors were anxious because of the slow return on revenue. Someone thought that it was a better idea to find a 'better CEO' whatever that means after that almost every founder was leaving the company. The last thing I knew about that company is that nobody knew how the products worked and they had a complete year without any new product and that everyone was leaving even the new hires.&lt;/p&gt;

&lt;h4&gt;
  
  
  Lesson:
&lt;/h4&gt;

&lt;p&gt;Sometimes you and your team are doing an incredible job. Unfortunately, the real owners of the company are not aware of it and start making wrong decisions. Don't take it personally and don't be too hard on yourself.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusions
&lt;/h2&gt;

&lt;p&gt;Well, those are a few of the many ugly truths that I have found while working on the software industry.&lt;/p&gt;

&lt;p&gt;Enumerating these, makes me think about the people out there thinking that being a programmer is super easy. Because you can land more easily a well-paid job. Or that we are living 'the dream' but that is not 100% truth. Being a great software engineer demands a lot of hard-smart work.&lt;/p&gt;

&lt;p&gt;Please, share your opinion about these topics. Thank you for reading.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>nihilism</category>
      <category>career</category>
    </item>
  </channel>
</rss>
