<?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[7Factor Software - Medium]]></title>
        <description><![CDATA[Software, DevOps, Cloud, and sustainable teams - Medium]]></description>
        <link>https://medium.com/7factor?source=rss----d442481192ff---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>7Factor Software - Medium</title>
            <link>https://medium.com/7factor?source=rss----d442481192ff---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 23:07:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/7factor" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Retention > Recruitment: Keeping women in tech is the real battle]]></title>
            <link>https://medium.com/7factor/retention-recruitment-keeping-women-in-tech-is-the-real-battle-7d4545d2c0de?source=rss----d442481192ff---4</link>
            <guid isPermaLink="false">https://medium.com/p/7d4545d2c0de</guid>
            <category><![CDATA[software]]></category>
            <category><![CDATA[women-in-tech]]></category>
            <category><![CDATA[company-culture]]></category>
            <category><![CDATA[motherhood]]></category>
            <category><![CDATA[retention]]></category>
            <dc:creator><![CDATA[Caitlin Willingham]]></dc:creator>
            <pubDate>Mon, 28 Mar 2022 17:59:29 GMT</pubDate>
            <atom:updated>2022-03-28T17:59:29.198Z</atom:updated>
            <content:encoded><![CDATA[<p><em>By Caitlin Willingham</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b-sHVtanfnXSFmUrFTIjYg.png" /></figure><p>Women’s History Month hits every March and with it comes a focus on the plight of women in the tech industry. Now, I’ve been a software developer for close to twenty years and, during all that time, I’ve tried to avoid reflecting on how it relates to me. I want to be recognized for being talented, not talented for a woman. I want to be known as an awesome software engineer and not singled out because of my gender.</p><p>This year is different. I’m now at a company where differences are celebrated, and emphasis is placed on bringing multiple viewpoints to the table. This diversity helped me realize just how much of an impact an individual’s contribution can make. Because of this, I feel comfortable sharing one of the most challenging experiences I’ve had as a woman in the tech industry: pregnancy and motherhood.</p><p>I preface my story by saying most of the articles I read regarding women in computer and tech fields want to address the problem of getting women into the sector. The lack of women in tech is something I had to grow accustomed to. Throughout most of my career, I’ve been the only woman developer on the team or, if there were other women, they were often in quality assurance or management. I am seeing more young women embracing development roles and coming from varied backgrounds, which makes me hopeful for the future.</p><p>This influx of younger women brings about another problem that I have yet to see touched on nearly as frequently as attracting more women in tech, retaining women in tech. We encourage and promote women to enter tech and once they land a role we queue the confetti cannons. In actuality, the vast majority of disparities and inequality happen <em>during</em> the job. The uphill battle women who are already employed and need to take leave (whether it’s due to having children, taking care of a sick parent, or something else) and those who want to come back from leave is steep.</p><p>Having a child while at my previous company brought the differences between me and my male coworkers into sharp focus. I remember awkward conversations with my male manager about HR and maternity policies. There were jokes toward the end of my pregnancy about when I was going to “pop”. I felt pressure to come back at the end of eight weeks post-partum to make sure I was not forgotten. To top it all off, I had post-partum depression which only enhanced my feelings of inadequacy.</p><p>While some of the men I directly worked with were extremely supportive (even going as far as to help me find cake when I had a craving), management was less so. Whether it was because I was in a consultant role embedded at a client site or due to company culture, there was a great deal of pressure to perform and promote the company ideals, which were rooted in deadlines and tight turnarounds. Despite all of this, I stayed with the company and, two years after my son was born, I became pregnant again.</p><p>Unfortunately, this pregnancy ended in a miscarriage. My team lead at the time was a woman and extremely understanding. I ended up missing a chunk of time at the client site and was going through an immense roller coaster of emotions. Without her, I would have been completely lost. However, despite my direct manager knowing about the miscarriage, I still ended up with a negative review and was threatened with a performance improvement plan. The final straw was when I went to talk to the head of my department to get more feedback on the review and explain the circumstances.</p><p>His idea of a suitable place to have this talk was the bar downstairs since all the small meeting rooms were taken up in our office. Suffice it to say, I went home crying. Time and time again my feelings and experiences were invalidated by my male superiors. My situation, to them, was something that needed to be handled instead of understood. I am sad to say it took me as long as it did to begin my search for a new job.</p><p>While each individual experience is different, I know these challenges in the workplace faced by pregnant and postpartum women are common. Access to affordable childcare, lack of flexible work schedules, and a general sense of imbalance between work and life are commonly cited reasons women developers leave the workforce. A few months after starting my search, I found a position where I could be fully remote. In my new position, I could have the flexibility to take my son to his doctor’s appointments, avoid a long commute, and still maintain a work/life balance. This change has not only improved my ability to care for my family but has made me better in my position. Knowing that the company I spend 40 hours a week with is understanding and validates my needs outside of the office makes me more inspired and productive in my day-to-day.</p><p>I feel that, if more women were offered this kind of flexibility, the retention problem would be reduced, and the industry would benefit from the unique perspective offered by motherhood. I now know that my experiences led me to realize what I am deserving of, and I hope this personal account can help others do the same. My hope for the future is that no woman is made to feel guilty or inadequate for her decision to have a child. While educating the men in charge is a suitable solution, the long-term goal is to have leaders look more like me and less like them. Unfortunately, this may not happen organically, so we must continue to persist, for all the women who will come after us.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d4545d2c0de" width="1" height="1" alt=""><hr><p><a href="https://medium.com/7factor/retention-recruitment-keeping-women-in-tech-is-the-real-battle-7d4545d2c0de">Retention &gt; Recruitment: Keeping women in tech is the real battle</a> was originally published in <a href="https://medium.com/7factor">7Factor Software</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Coworkers Taught Me How to Work Remotely]]></title>
            <link>https://medium.com/7factor/my-coworkers-taught-me-how-to-work-remotely-4a22c0945f41?source=rss----d442481192ff---4</link>
            <guid isPermaLink="false">https://medium.com/p/4a22c0945f41</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[culture]]></category>
            <category><![CDATA[adjustment]]></category>
            <category><![CDATA[remote-working]]></category>
            <dc:creator><![CDATA[Alyssa Tichenor]]></dc:creator>
            <pubDate>Tue, 05 Oct 2021 18:30:55 GMT</pubDate>
            <atom:updated>2021-10-06T16:18:03.922Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y4hY-M9s_Tf2r521fEftfA.png" /></figure><p>When the pandemic unfolded, I panicked, naturally.</p><p>My number one concern was obviously the looming question mark over the fate of the world, but I was also perplexed about how I would do my job. Having never worked remotely, I was confused about how I would accomplish my day-to-day tasks as a marketing and operations manager from the comfort of my sweatpants.</p><p>My company, <a href="https://www.7factor.io/">7Factor Software</a>, is stocked with highly skilled software engineers who are located all over the world, but with a large conglomerate in Atlanta. While the vast majority of my pre-pandemic work was in-person, in Atlanta, our remote people were already attuned to endless Zoom meetings and the never-ending “can you guys hear me?”. What they taught me, aside from which monitors and desks chairs reign supreme, was that culture is not tangible. During my transition to remote work, the engineers I work with gave me a whole new perspective on “office culture”.</p><p>A large part of 7Factor’s culture is transparency. While this transparency is usually related to team communication about projects and builds, 2020 opened the doors for us to be transparent about the change in our environments. I openly voiced my concerns about making sure our messaging stayed consistent while I was remote, and I was amazed by the support my team provided me.</p><p>We surprised ourselves with how easy it was to feel connected via Zoom. Happy hours, book clubs, office games, and check-ins all kept moving without a hitch. On my side, in-person pictures turned into screen grabs.</p><p>If anything, being remote made all our morale efforts more inclusive, as we are all now on the same playing field when it came to location. A “local” team member had no special meaning anymore, and this change has stuck.</p><p>Fast forward to what is now almost 2022, and I can confidently say our culture is stronger than ever. While the pandemic is tragic, a positive I can take away from the experience is the clear definement of office culture. It doesn’t mean mediocre lunches talking about the weekend ahead; it means investing in your team members. Making the effort to understand them.</p><p>The switch to being remote makes you put your priorities in order. Taking the time to get to know a new team member, congratulating a team member on their hard work, or simply learning more about each other is what matters. It is this dedication that enables my team to have better lines of communication, which in turn leads to better solutions.</p><p>So thank you 2020, for canceling my vacations and keeping me cooped up in my bedroom/office hybrid. Without you, I would have never known what office culture really means.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a22c0945f41" width="1" height="1" alt=""><hr><p><a href="https://medium.com/7factor/my-coworkers-taught-me-how-to-work-remotely-4a22c0945f41">My Coworkers Taught Me How to Work Remotely</a> was originally published in <a href="https://medium.com/7factor">7Factor Software</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Code Carefully — You May be Writing a Symphony]]></title>
            <link>https://medium.com/7factor/code-carefully-you-may-be-writing-a-symphony-f3e5cb156f2?source=rss----d442481192ff---4</link>
            <guid isPermaLink="false">https://medium.com/p/f3e5cb156f2</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[music]]></category>
            <category><![CDATA[composition]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Amy]]></dc:creator>
            <pubDate>Mon, 02 Aug 2021 14:52:22 GMT</pubDate>
            <atom:updated>2021-08-02T14:52:22.333Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Code Carefully — You May be Writing a Symphony</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8WC1ZaMlElM7GmE-ENFeAQ.jpeg" /><figcaption>Image by Gerd Altmann from Pixabay</figcaption></figure><p>Let’s start with the premise that good music captures and expresses human emotion, often with a nuance that is hard to articulate. Similarly, well written code expresses its own intent, while always remaining mindful of capricious human desires and flaws. Good software provides a buffer against mistakes a person may make. Maybe, sometimes, music does the same.</p><p>Refactoring is like improvisation on a theme. Sure, your code works, but is there another way, maybe a better way of expressing the same idea? It is similar to a composer working through different options until finally landing on that perfect melody that gets stuck in your head and you hum it without even thinking. Clean code is intuitive and beautiful in its own way.</p><p>Having a unit testing suite is like your bass notes or grounding harmonies. As long as you have some type of chord structure, the melody can vary wildly and most of the time it will still sound good. When you have a testing suite, you can modify your code freely without it resulting in random chaos.</p><p>Code has a sequential order to its execution. You can loop over the same code multiple times, or reuse methods in multiple places, just like you can repeat a chorus or a melody (and probably should). But a song played backward, from the end to the beginning, has little meaning (unless it was <strong>that</strong> kind of song to start with). The way the technical elements of a song, and of a software program are structured and organized together creates the overall picture and brings meaning.</p><p>Finally, the ability to transpose or even play different instruments will surprise people who are non-musicians, and non-coders. It is true that you will need to look up the new language’s syntax, just as you would need to look up the fingerings for a new instrument or new key. But your prior knowledge of patterns, structures, and options in general will allow you to express yourself incredibly quickly if you’re willing to try.</p><p>I’ve accidentally revealed some of my favorite aspects of coding: refactoring, unit testing, and organizing a big idea into the optimal combination of patterns. But of course what matters most in the end is the question of what does the code, or the music, do for you?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3e5cb156f2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/7factor/code-carefully-you-may-be-writing-a-symphony-f3e5cb156f2">Code Carefully — You May be Writing a Symphony</a> was originally published in <a href="https://medium.com/7factor">7Factor Software</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How we used an AWS SQS to Optimize our Integration Jobs]]></title>
            <link>https://medium.com/7factor/how-we-used-an-aws-sqs-to-optimize-our-integration-jobs-a81c74802be5?source=rss----d442481192ff---4</link>
            <guid isPermaLink="false">https://medium.com/p/a81c74802be5</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[sqs]]></category>
            <dc:creator><![CDATA[Christopher Malloy]]></dc:creator>
            <pubDate>Wed, 28 Jul 2021 14:07:52 GMT</pubDate>
            <atom:updated>2021-07-28T14:17:25.701Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*uzX04goMjBTPgq52USRWjw.png" /></figure><p>When building applications, it’s not often that you have to be concerned with memory optimizations and the size of incoming data. So when the challenge arises, it’s exciting but can also be a bit daunting, simply for lack of practice. Once you understand the resource needs of the app, or at least the fact that you have to account for it, you can begin solutioning and architecting for the problem at hand. I’d like to walk you through a story of how we ran into such a resource problem, how we solved for it, and how our implementation ultimately played out. The journey takes us from an unstable ELT job that had frequent Out Of Memory errors and took over two hours to run, to a stable 20-minute process.</p><p>At one of our healthcare clients, we needed to build a process that would ingest a CSV file, perform some operations on the data, and send this processed data to a third-party data source. Essentially, ETL. As we did our initial build-out, we were testing will CSV files that had anywhere from a few dozen to a few hundred rows. No big deal. And we were chugging along writing the code without a care in the world. The simplified deployment implementation of this job was a docker container hosted on AWS ECS behind a Load Balancer, intended to be a hot and running API-based job. Whenever the job would need to be kicked off, an API route was called and the job would do its thing.</p><p>As we began our first test runs with files we would be using in production, we began to notice 503 errors coming back from the API. This had not occurred a single time during months of local testing, and only started happening in the deployment inside ECS, so we were puzzled. After some investigation, we discovered that the ECS Container Agent was reporting “Out of Memory Exception” and spinning down the container. This means that the response back to the LB would timeout, and report a 503 bad gateway.</p><p>This is obviously bad, but the reasons go deeper than just the obvious “it’s broken”. Because this meant that only a subset of data would get loaded to that third-party destination, and the jobs were not designed to re-run without re-sending data. This would result in duplicate data entries in the target data source, and since this was related to the payroll division of the company, that meant that some employees’ paychecks were now incorrectly doubled. A file could cover tens of thousands of employees and hundreds of thousands of dollars for the company. While I’m sure the employees would have been happy to receive double pay, this was obviously a massively destructive bug in the operation that we needed to resolve ASAP.</p><p>We certainly need to focus on memory optimizations in our job, but I want to focus on how we solved the duplicate entry error. Due to the load these containers would be under, there was always the possibility one of them would fall over. Furthermore, since we had to upload one transaction at a time, there was always a chance that a break would occur in the request/response cycle, causing a failure to load a transaction.</p><p>While we would like to say we could code these reasons away, hope is not a good development strategy, so the solution was to store the data to be sent in intermediary storage location, to be then subsequently sent to its destination. What would also be ideal, is if multiple containers could process the data in the holding area, however, we would have to ensure that no two or more containers would pick up and send the same transaction. That would bring us back to the duplicate entry problem.</p><p>So these are our requirements, now to pick the tooling. A mysql database or maybe even a file storage location may seem like the first obvious solution, but these are not ideal as they are better suited for permanent storage of data, and what we really need here is just a temporary holding location. Not to mention we need a way to keep a record of processed transactions, and that is usually implemented with a lock table in a database somewhere, but that’s cumbersome as a whole table has to be built and maintained, and it’s another integration point which could fail. So what would be a solution that would solve all these problems at once?</p><p>Enter Simple Queue Service, or SQS. A queue is the perfect solution to our problem. It is by design a temporary storage solution that can hold messages up to 256kb in size. And it solves the duplicate transaction problem simply by the nature of what a queue is: each instance of the job will pull from the queue and when a message is in progress of being pulled, no other instance can pull it. It is effectively locked at that point. From here two things can happen, either the instance successfully processes the message and removes it permanently from the queue, or it fails for whatever reason and is put back into the queue.</p><p>That last point is very special and is the crux of why a queue is so valuable. This means that we have a built-in re-try mechanism at the infrastructure level. The job itself is totally unaware that other copies of itself are running alongside it. It is also totally unaware of how many messages it will end up processing, or which ones it will process. It doesn’t matter. Each instance simply needs to exist and churn away, pulling and messages it finds, until there are no messages left to process, at which point the job containers will go back to lying dormant, periodically asking SQS if there are any more messages in the queue to process. This solution is bulletproof to containers crashing out for whatever reason, as well as the final destination becoming unreachable for whatever reason.</p><p>Besides drastically stabilizing the system, this solution proved to reduce our average runtime from 2 hours to 20 minutes. And when we only have one day to send all of the payroll data over to the client so they can have checks cut and ready for the next day, every minute counts.</p><p>The conclusion is a queue is oftentimes a fantastic solution for decoupling your architecture. This reduces bottlenecks, points of failure, and dependencies. Just like you might write an abstraction at the software level, this is almost like an abstraction at the infrastructure level. The next time you have microservices communication with other data sources or ingest points in a system, consider spreading the load with SQS.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a81c74802be5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/7factor/how-we-used-an-aws-sqs-to-optimize-our-integration-jobs-a81c74802be5">How we used an AWS SQS to Optimize our Integration Jobs</a> was originally published in <a href="https://medium.com/7factor">7Factor Software</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[4 Insights on How to Teach Others Successfully]]></title>
            <link>https://medium.com/7factor/4-insights-on-how-to-teach-others-successfully-f5bd7947b268?source=rss----d442481192ff---4</link>
            <guid isPermaLink="false">https://medium.com/p/f5bd7947b268</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[teaching]]></category>
            <category><![CDATA[working-together]]></category>
            <dc:creator><![CDATA[Harsh Jain]]></dc:creator>
            <pubDate>Thu, 03 Jun 2021 19:59:13 GMT</pubDate>
            <atom:updated>2021-06-07T17:56:29.326Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*apN2EZOoGRc2LHAN3p68rA.png" /></figure><p>When people think of teachers, the first thing that comes to mind is usually a classroom with someone at the front lecturing. This is a natural response, but teaching occurs everywhere and at all times. Throughout your life and career, you’ll encounter moments where you have to teach people. Whether it’s because someone new joined your team and needs the rundown, a junior member needs insight on technical processes, or a team member hits a roadblock, moments for teaching occur all the time.</p><p>You might have encountered a situation where someone is leaving their company and in a mad dash to get all their knowledge spread to the rest of the team, they hold a super long meeting to ‘teach’ others how to do the stuff they do. But in reality, that teaching is just them spewing out words and no one is actually absorbing the information. This is because they aren’t properly conveying the information they want others to know. You can be the smartest person in the room, but it means nothing if you don’t know how to tell people the information you know. Throughout my years as a college student and then transitioning into my career, I have noticed certain things that aid in teaching people. Here are four things I believe help when teaching others.</p><ol><li>Patience</li></ol><p>If there is one thing all teachers and mentors need, it’s patience. Every single person learns at a different rate and absorbs information differently. Your job isn’t to cram information down people’s throats but to work with people, so they fully understand the subject and can do things on their own. This takes time, communication, and patience to achieve because there will be times where you explain something in a certain way, and they don’t understand it. This isn’t because they are dumb, but because the information was presented in the wrong way. You need to find out how to portray the information in an easier format for that individual.</p><p>2. Take things slow</p><p>This leads to the second point which is to take things slow. Rushing through and telling them everything quickly is not going to help anyone because they won’t know anything by the end of the explanation. Take things one part at a time and make sure that they understand everything thus far before moving on to the next part. Since advanced topics build upon the fundamentals, they won&#39;t learn anything further if they don’t have a good foundation. This could mean having multiple teaching sessions for a topic as to not bombard them with too much information at once, or just take breaks and see if they understand the current topic before moving on. Give them time to ask questions during those breaks and throughout the mentoring session. If you wait to take questions at the end, they will either not remember the question, or the rest of the content confused them more, leading them to have a million more questions because their original one was never answered.</p><p>3. Become your student</p><p>This plays into taking it slow and breaking up the content into reasonable chunks. A good way to make sure you divide the content into reasonable pieces is to put yourself in the shoes of your mentee. Think about what they know and what they don’t know. A common mistake when teaching someone is you start to assume they know more than they do. This creates a disconnect, making it harder for the student to learn the content. So first take a step back and assume they don’t know all that much. What you can also do is just ask them straight out while teaching ‘Hey, do you know about &lt;insert topic here&gt;?’. People think this can be offensive if the topic is simple, but you can’t read minds. You need to communicate to get a feel for what they know going into the mentoring session.</p><p>4. Remember your tone</p><p>Lastly, one of the biggest factors when teaching someone is your tone and level of excitement. You should never go into a teaching session upset or angry. People are very empathetic, and your mood will change their mood. No one can learn while angry or sad, and so you need to show excitement about the topic you are teaching. It changes the perception of the subject matter, turning it from something they might hate into something they enjoy. The content doesn’t change, but your attitude towards it can make the difference between a student paying attention and understanding the material and not understanding anything because they can’t focus.</p><p>These 4 principles are not the only aspects that matter when mentoring someone but are some of the most important that I’ve experienced when teaching others. I hope this gave you some insight into the best practices of teaching others and helped you rethink your approach. The most important thing moving forward is that we keep spreading knowledge!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f5bd7947b268" width="1" height="1" alt=""><hr><p><a href="https://medium.com/7factor/4-insights-on-how-to-teach-others-successfully-f5bd7947b268">4 Insights on How to Teach Others Successfully</a> was originally published in <a href="https://medium.com/7factor">7Factor Software</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 Ways My Leaders Helped Me Overcome Imposter Syndrome]]></title>
            <link>https://medium.com/7factor/5-ways-my-leaders-helped-me-overcome-imposter-syndrome-3bb2f1c21c16?source=rss----d442481192ff---4</link>
            <guid isPermaLink="false">https://medium.com/p/3bb2f1c21c16</guid>
            <category><![CDATA[imposter-syndrome]]></category>
            <category><![CDATA[personal-growth]]></category>
            <category><![CDATA[company-culture]]></category>
            <category><![CDATA[women-in-tech]]></category>
            <category><![CDATA[tech]]></category>
            <dc:creator><![CDATA[Amy]]></dc:creator>
            <pubDate>Mon, 03 May 2021 19:25:20 GMT</pubDate>
            <atom:updated>2021-05-03T19:25:20.693Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I387lf7WlqMfDTChxzsL0w.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@lighttouchedphotography?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Kevin Schmid</a> on <a href="https://unsplash.com/s/photos/empty-stage?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Overcoming imposter syndrome is something of a buzzword or hot topic right now. Call it whatever you want: call it feeling like you belong, call it people who are part of a minority in tech staying in tech and not leaving the industry.</p><p>Reflecting on my transition from being a newly hired developer with no CS degree to 1.5 years later having multiple challenging projects under my belt, I realized there are several specific things my leaders did that critically shaped my experience. As <a href="https://hbr.org/2021/02/stop-telling-women-they-have-imposter-syndrome">others have noted</a>, often what we call imposter syndrome can be made worse or even be caused by a negative culture. On the flip side, then, it can also be remedied by a positive culture. Here are five cultural aspects leaders at my company provided that made the most difference in helping me overcome imposter syndrome.</p><h4><strong>Highly available support, especially at the beginning.</strong></h4><p>Just like our infrastructure, support should be highly available. A developer’s ability to ask effective questions matures as they mature. There were times in the first few months where I essentially pointed at the screen and stuttered “why?” because I didn’t even have the vocabulary to describe what I was seeing. The developers who trained me at my company are the definition of what you would want: people who model great communication and great problem-solving strategies.</p><h4>Stretch projects appropriate to people’s abilities, paired with believing in them by default.</h4><p>There’s something special about a leader who knows you and automatically assumes you’re capable of learning and executing on something you’ve never done before. Just because you’ve never done something before does not mean it cannot be learned. When you first start out, this is an incredibly daunting idea. If you are lucky enough to have a supportive environment plus a high resilience toward failures along the way, you will grow. Then you get to look back on hard things you did, which is extremely encouraging and validating.</p><h4>Leaders and team members admitting when they don’t know things.</h4><p>There are few things more immediately empowering than hearing a leader say they don’t know something. A little voice in your head says ‘aha!’ That means I can do this too! At my company, we have a culture that highly values humility, and we don&#39;t hire anyone who thinks they know everything. This makes a huge difference and helps create an environment that is oriented around continual growth for everyone.</p><h4>Public praise.</h4><p>I’m going to tell you a secret. One of the main fears behind imposter syndrome is the fear that other people don’t think you belong here. When people who have power publicly call out their team members who have done great things, this is helpful because it creates a positive culture and validates the decision to hire and keep that person. The opposite of this is being on a team where people try to steal credit for someone else’s work. Luckily that never happens at my company, but I think it’s important to consider what the opposite of celebrating your teammates looks like because it certainly happens in toxic cultures, especially to people who are part of a minority.</p><h4>Representation in leadership.</h4><p>To quote one of my favorite podcasters and authors, <a href="https://www.josaxton.com/">Jo Saxton</a>, ‘you can’t be what you can’t see’. People need to see leaders who are similar to them, ideally at their company, but if not, then within the broader community. <a href="https://www.womenwhocode.com/">Women Who Code</a> is #1 on my list of tech organizations that are truly advancing the cause of inclusion and empowerment. Let me know in the comments if you have other favorite groups to recommend.</p><h4>Final Thoughts</h4><p>If you lead other humans, you may want to consider whether they have a strong enough balance of both support and stretch projects to grow and whether humility, celebrating your teammates and representation in leadership are standard parts of your culture.</p><p>If you are considering a new position, especially in something unfamiliar or challenging, you may want to look at these aspects as signs of what life will really be like at a company.</p><p>Most importantly to those of us who are in it, it’s important to remember that overcoming imposter syndrome is not a single event but rather a gradual process of trusting yourself more and more in different contexts. That is why my favorite tip is to write down your accomplishments, big or small, and look back at this list whenever you need encouragement.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3bb2f1c21c16" width="1" height="1" alt=""><hr><p><a href="https://medium.com/7factor/5-ways-my-leaders-helped-me-overcome-imposter-syndrome-3bb2f1c21c16">5 Ways My Leaders Helped Me Overcome Imposter Syndrome</a> was originally published in <a href="https://medium.com/7factor">7Factor Software</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Factory Pattern Method: An Overview on Scalability]]></title>
            <link>https://medium.com/7factor/the-factory-pattern-method-an-overview-on-scalability-1f9b25aecd80?source=rss----d442481192ff---4</link>
            <guid isPermaLink="false">https://medium.com/p/1f9b25aecd80</guid>
            <category><![CDATA[factory-method-pattern]]></category>
            <category><![CDATA[quality-software]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Kyle Sudu]]></dc:creator>
            <pubDate>Thu, 08 Apr 2021 18:18:58 GMT</pubDate>
            <atom:updated>2021-04-12T14:09:47.647Z</atom:updated>
            <content:encoded><![CDATA[<h3>Build Cool Things Responsibly</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F2A3dXPpN6gqTGMatfY%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fusnationalarchives-car-ford-factory-2A3dXPpN6gqTGMatfY&amp;image=https%3A%2F%2Fmedia2.giphy.com%2Fmedia%2F2A3dXPpN6gqTGMatfY%2Fgiphy-downsized-large.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="317" frameborder="0" scrolling="no"><a href="https://medium.com/media/d7d50eec3e80a2890c527e557e5482ee/href">https://medium.com/media/d7d50eec3e80a2890c527e557e5482ee/href</a></iframe><p>What the heck is the Factory Method Principle, and why should we care about it?</p><p>Factory Method Principle (FMP) is a design pattern that involves the use of a ‘factory’ and delegating the task of creating objects to that ‘factory.’ It is a creational pattern part of the ever-important Gang of Four design patterns. It is a pattern often taken for granted by Jr. engineers not used to working at scale. Its benefits begin to shine as programs begin to scale towards 10s of thousands of users or objects are created at a more constant pace. When memory and performance begin to decline, implementing FMP can be a great solution to maximizing current resources. In FMP, Factories are responsible for the encapsulation of the business logic for the creation of an object. It solves the problem of needing to build something without knowing all the details!</p><p>The Object-Oriented Programing paradigm is centered around the creation and manipulation of objects. At some point, you must instantiate these objects. In other words, the word ‘new’ needs to be used at some point. We use the FMP to abstract away that use of the word ‘new’. Depending on the situation, there will be different business logic that we will need to create different objects. Under FMP we define a contract (interface or superclass etc.) for creating an object but let subclasses decide which class to instantiate.</p><p>The benefits of FMP become clearer when you know you want an object, but you do not know how or why you want to construct that object or even what parameters you want to pass to that object. FMP allows you to defer those decisions until runtime. Not only does this reduce duplicated code, but it is also efficient, readable, and polymorphic. Having a factory, often referred to as a wrapper, creates an instance of an object means that we can dynamically swap what object we are creating based on the given circumstance.</p><p><strong>The Deets</strong></p><p>Looking at the unified model language (UML) we can more easily see FMP in action. We have two types of things to keep track of: objects and creators. Objects are the things that are manipulated, and the creators create those objects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*zI2mYK0UBozjaR5yoxZE8g.png" /></figure><p><strong>The Scenario</strong></p><p>To put this into more concrete terms let’s build a car manufacturing application. Version 1.0 is limited and only builds one type of car, the Honda Accord. You publish your app on Reddit and it immediately goes viral. Each day hundreds of users flock to your website to have cars printed out of thin air for them. After a few months, hundreds of users turn into thousands and then tens of thousands. The requests start coming in for different types of cars. Users are wanting Toyota Camrys and Ford Fusions. The team decides to scale the application and allow for the creation of different types of cars. This is going to be a major overhaul of the codebase. The team will have to analyze pain points, update business logic, and account for new user input.</p><p><strong>The Solution</strong></p><p>Here comes FMP! Instead of the cumbersome process of adding if/else logic for what car the user wants, we will instead use a factory method design pattern. First, we will update the Honda class to depend upon an abstract base class car. We will then create new classes for Toyota and Ford that depend upon that base car class. This ensures uniformity among our products. Next, we will create factory classes for each of our cars that we will create. Each factory class will depend upon an abstract base factory class. Now, all we must do is call the factories MakeMeACar() method and voila, a car is printed out of thin air!</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/244f31cb0ffcc31bf26a918fd08f84d3/href">https://medium.com/media/244f31cb0ffcc31bf26a918fd08f84d3/href</a></iframe><p>To the less seasoned eye, this may seem like a useless change. With only two cars that we care about, why bother abstracting this. Consider a scenario where our growth is sustained and in 2 months, we add 3 more cars to our lineup. Instead of repeating a lot of this work, we can simply update the factory method! Our app will scale much smoother.</p><p><strong>The Landing</strong></p><p>Factories! With this new understanding, you should be better prepared to join a team working at scale or starting a new project that will grow rapidly. Go off into the world and create some factories.</p><p>Thanks to <a href="https://www.youtube.com/watch?v=EcFVTgRHJLM&amp;list=PLrhzvIcii6GNjpARdnO4ueTUAVR9eMBpc&amp;index=4">Christopher Okhravi</a> for the example.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f9b25aecd80" width="1" height="1" alt=""><hr><p><a href="https://medium.com/7factor/the-factory-pattern-method-an-overview-on-scalability-1f9b25aecd80">The Factory Pattern Method: An Overview on Scalability</a> was originally published in <a href="https://medium.com/7factor">7Factor Software</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Code Coverage and Testing: Used the right way]]></title>
            <link>https://medium.com/7factor/code-coverage-and-testing-used-the-right-way-9fdfa74da73c?source=rss----d442481192ff---4</link>
            <guid isPermaLink="false">https://medium.com/p/9fdfa74da73c</guid>
            <category><![CDATA[code-coverage]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[code]]></category>
            <dc:creator><![CDATA[Teresa Hansen]]></dc:creator>
            <pubDate>Tue, 09 Mar 2021 18:47:46 GMT</pubDate>
            <atom:updated>2021-03-09T18:47:46.837Z</atom:updated>
            <content:encoded><![CDATA[<h3>Code Coverage and Testing: Used the Right Way</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jcFRMD3bvm2zvGUH1oMGCw.png" /></figure><p>What is code coverage? How can I take advantage of code coverage to improve a codebase? What should I look out for? These are all questions that should be asked when looking into code coverage.</p><p>I have been using code coverage as a tool to improve legacy testing suites as well as new features for over a year.</p><p><strong>The Basics:</strong></p><p>Code coverage is a way to measure the amount of code that runs given a testing suite. It will tell you how much of the code is being touched by the tests. As a result of breaking down a test suite into a single number, a lot of important information can be lost. Code coverage can show the quantity of tests but does little to show the quality of the tests.</p><p>Quality testing is arguably more important than the quantity of tests in a test suite. There are many ways to add a test that can increase your code coverage number without actually testing the functionality of the code. By doing this the code coverage may look great but the functionality of the code is not tested. The purpose of the tests should be to show that functionality changed if someone goes in to change the code. If just the code is tested, not the functionality, the test will not help in the future when you need to change the code but not the functionality.</p><p>Although, quality is very important when testing, quantity is also important. If you only have one test, that only goes through one path, you are leaving a lot of your code untested. The quality of your test may be great, but the quantity is lacking. One of the biggest benefits of code coverage is to show what part of the code is not tested. By showing what is not tested, a developer can go back and add tests to check the functionality of the untested code.</p><p>For a good testing suite, you need your tests to be of good quality and have a quantity of tests so that all functionality is covered. Code coverage does not show all of the story when it comes to a quality test suite.</p><p><strong>Take Advantage:</strong></p><p>While code coverage may not be the end all be all for if a test suite is good, it is important to be able to take advantage of the positives that come with code coverage. Some of the benefits of code coverage include increase mindfulness to test, ability to show what code is not tested, and a better overall confidence in the codebase.</p><p>Often testing takes a back seat when it comes to creating a new feature or changing something from the past. While there are many reasons why one is because testing can be easily forgotten and is not a priority to most developers. By adding code coverage testing can become more important and closer to the forefront of the mind when writing new code or changing the old. Having good tests can lead to a host of positive results in being able to debug as well as enter into code that you have never worked in before.</p><p>What I believe to be the best benefit for code coverage is the ability to see what code is not tested. While having 100% code coverage does not mean that all of your code is well tested, having 10% code coverage means that you have do not have a well-tested codebase. A developer can use the code coverage to help them find places that have no tests so that they can add them. Knowing what code is not tested can help future developers improve the test suite by adding tests that should be there.</p><p>Confidence in a codebase is difficult to achieve when you can only rely on human testing. Most code has many paths that do different things based on given parameters or situations. When relying on human testing trying to change the existing code to be better written or more efficient can bring about questions such as, how we know everything is working correctly and what is the potential for failure with the change. By having a good testing suite that covers all of the different features and scenarios can help developers in having confidence that their changes did not cause problems with the system.</p><p><strong>Take Heed:</strong></p><p>The benefits of code coverage can be overtaken by negatives if taken too far. While having low code coverage is bad having high code coverage is not necessarily good. There are many ways that someone can artificially increase the code coverage for a project without having well tested code. Without the right mindset, code coverage amount can do nothing but increase the amount of work on a developer with none of the advantages.</p><p>Many developers see adding tests as extra work. Another task that they have to do to appease those in charge, with little effect on the functionality of their project. Writing tests can take time away from other work that needs to get done and the tests may be harder to write than the code itself. With this mindset, code coverage can be seen as another hurdle they need to jump through before their code can be used in production. This deters programmers from writing good comprehensive tests for their code. Before starting with code coverage, developers need to be on board with wanting to write good tests.</p><p>Code coverage is not a good metric in the ways that quality tests are not needed to make a high code coverage. One way to get high code coverage without writing quality tests is to write a test with no assert statement. Without an assert statement, the program calculating the code coverage will record code being tested that tests for nothing. These tests don’t test functionality and at best will test that no unexpected exceptions are thrown. A second way is to mock incorrectly. By incorrectly mocking you can end up skipping the functionality for parts of the code you are trying to test. Third, testing only the easy code and avoiding writing tests for code that is harder to test. The more complex the code the more that code should be tested, but if all of the simple, getters and setters, are tested the code coverage number may be high with a little testing of functionality.</p><p>When talking about code coverage, a lot of people ask what percent coverage is needed. We need to remember that even if your code is 100% in code coverage, this does not mean that it is 100% well tested. A change of how people view testing is the best way to get a better testing suite than adding a requirement based on a metric.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*dSVLQETTNova9BbpyPTXqA.png" /><figcaption>100% coverage, yet testing nothing</figcaption></figure><p>Like most tools, code coverage has a range of what it can do, and with the right application can be helpful for the developers work. Though, also like most tools, if used improperly can be a difficult tool to wield and bring up more issues than originally known. With this info I hope that you have gained a better understanding of the benefits as well as the downfalls that come with code coverage.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9fdfa74da73c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/7factor/code-coverage-and-testing-used-the-right-way-9fdfa74da73c">Code Coverage and Testing: Used the right way</a> was originally published in <a href="https://medium.com/7factor">7Factor Software</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Hooks: A Super Serious Take]]></title>
            <link>https://medium.com/7factor/react-hooks-a-super-serious-take-735d7ab2a861?source=rss----d442481192ff---4</link>
            <guid isPermaLink="false">https://medium.com/p/735d7ab2a861</guid>
            <category><![CDATA[code]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[react-hook]]></category>
            <dc:creator><![CDATA[Eric Turner]]></dc:creator>
            <pubDate>Thu, 18 Feb 2021 19:47:01 GMT</pubDate>
            <atom:updated>2021-02-18T20:01:10.725Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*mKOr662l2_FODTiuFeBL9g@2x.jpeg" /></figure><p>“What are React ‘hooks’, and should I be anxiously concerned about their existence?”</p><p>This is the question I asked myself when the rumblings began several years prior. “React hooks are cool”, I would overhear my peers say. Naturally, the mind begins to run wild with ideas, trying to imagine what these “hooks” could be and if they were possibly fishing, pirate or grappling related, and if there would be fun, light-hearted syntax to accompany these thematic new features. As I would soon discover, the answer is no. I wasn’t even close, and it was a really bad guess.</p><p>But what I did eventually find is a new syntax, mildly engaging but without a whimsical theme, that would allow me to write code in a leaner, concise, easy-to-reason-about way. It also let me avoid awkward run-ins with classes (we’ve been going through a separation) and parse out logic from lifecycles so that not ALL the things have to happen when my state updates. Furthermore, I found that using custom hooks, I could share logic between components without the software equivalent of a Rube Goldberg machine.</p><p>In this article, I want to share the initial concepts I found in React hooks, so let’s explore the basics — together, for safety and accountability!</p><h3><strong>The Basics</strong></h3><p>We start with the important question: Do I need to use hooks in React code? The answer is no, you don’t. But you probably could, should, and you might even *like* it. Some good news is that you can start using them in tandem with existing code, like two syntaxes riding the same React bicycle and pedaling in harmony. This negates the need to immediately refactor everything to include them, and often only slight refactoring is needed. Simply put, both are acceptable to use in the same code base (for now, as the official docs ominously warn), but you can’t use a hook inside a class.</p><p>And what is it, would one say, that hooks ‘do’, exactly? Well, they allow you to ‘hook’ into the React state and lifecycle stuff, thus the name. It’s horribly on the nose and disappointing, I know, but “devs gonna dev” when it comes to naming things. They hook (ugh) into those features in a functional way, as we’ll explore briefly.</p><p>To do just that, we are provided a whopping, nearly overwhelming, two built-in hooks.</p><h3><strong>The State Hook</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*X-sf0Bxr9DTUSZU06cYlfQ.png" /></figure><p>In this example, we’ve tapped a bit into the state of our component, utilizing the <em>useState</em> hook to create a stateful property and a virtual burrito to keep ourselves motivated. For our efforts, we receive an array that we’re de-structuring into two items, the burrito property itself, which we can use in our templates and such, and a method to set the value of the burrito, <em>setBurrito</em>. We’ve also given the burrito an initial value, that of ‘Spicy Steak’. Later, we could update our burrito, using <em>setBurrito</em>’, to a more palatable ‘Avocado Chicken’.</p><p>Now, if you’ve used React previously, you might be thinking to yourself, “Hey! I’m supposed to set state in the constructor in the component class declaration!” You might also be thinking about how you could go for a burrito, but that’s for another tutorial on Pavlovian behavior and not really applicable here. Try to focus.</p><p>Well, you’re not wrong about the state stuff. But to reiterate, this can be used in place of having to extend a class, create a constructor and declare state inside said constructor. Both syntaxes can be used, just not in the same component. In fact, if you have an existing stateless component and find yourself needing to suddenly and desperately add stateful properties to such, the <em>useState </em>hook can be a great way to do so without needing to refactor and add a class.</p><h3>The Effect Hook</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*6Z-r5WMRTqV3gJZlEtL5hQ.png" /></figure><p>If you’re like me, the security of my burrito often keeps me under high stress. What if someone were to tamper with the contents? How can I be confident I’m not about to bite into a burrito hiding a couple of low-end hot dogs and some novelty mayonnaise? I need to be notified, immediately and deafeningly, that a saboteur has fouled my fillings.</p><p>That means using the effect hook, which is fired off anytime state changes or the component reaches a lifecycle phase. The official documentation says, “When you call <em>useEffect</em>, you’re telling React to run your ‘effect’ function after flushing changes to the DOM.” This is a statement full of poor imagery but does indicate any DOM change, including those that normally occur at lifecycle phases like <em>componentDidMount</em>, will run the given function.</p><p>Does this mean that every time any change to the DOM occurs, the effect function will run? Yes, it does, and much like next-gen console scalpers, that’s not usually helpful and mostly infuriatingly detrimental and also I don’t like it at all. However, what if we could have some simple control that enables us to specify exactly when it should run and only then?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*1X18komF4dDBoaJmWXUXGw.png" /></figure><p>We can pass a second argument, <em>[burrito]</em>, that tells <em>useEffect</em> to run ONLY if the burrito itself is updated. I don’t care if they tussle my taco, chuff my chimichanga or eff with my enchilada, but you bust open my burrito and I want the alarm sounded. Also, why are Tex-Mex saboteurs so into alliteration? Regardless, this means that only if the burrito is built, bothered, or binned (mounted, updated, or destroyed) will the effect be run, so if you absolutely must update the state of another property within an effect, this is a great way to avoid the stack overflow of perpetual state updates. It’s also a fine choice for separating concerns as you can use as many effects as needed and place them where it makes sense in your code.</p><h3><strong>Creating New Hooks</strong></h3><p>While not going into full detail here, I do want to mention the creation of your own hooks and sharing stateful logic. Stateful logic is code that can be shared, but not state itself, between components, and is a great way to easily share functionality. What it’s not is what happens when you combine two states to form a logical portmanteau, such as Florida and Georgia to form Florgia which <a href="https://en.wikipedia.org/wiki/List_of_geographic_portmanteaus">Wikipedia</a> says is near Jacksonville.</p><p>An example might be fetching data from an API; you could abstract the logic necessary for getting a list of burritos from the burrito store API, and using the above native hooks <em>useState</em> and <em>useEffect</em>, store that list of burritos in state and perhaps fetch it when a new burrito notification is received. All of this, within one custom hook, can be imported and used concisely in all of the many components that need a fresh list of burritos without having to repeat code, because everyone loves a DRY burrito!</p><h3><strong>A Few Caveats</strong></h3><p>There are a few items worth mentioning, some stipulations that require attention, from the official documentation.</p><p>First, “Only call Hooks at the top level. Don’t call Hooks inside loops, conditions, or nested functions.” Seems simple and avoidable enough, but if you find yourself needing to commit those sins, grab a burrito of your own understanding and have a rethink about your code.</p><p>And second, “Only call Hooks from React function components. Don’t call Hooks from regular JavaScript functions.” Regular JavaScript functions never have any fun and this is no exception, you’ll need a magical React component or your own custom hook that gets imported into a React component. Not a huge deal but important to note.</p><h3><strong>Post-meal thoughts</strong></h3><p>That’s just the first bite of React hooks. With those simple ingredients, functional, clean code can be prepared alongside traditional, class-based React in a way and pace that makes sense to your codebase.</p><p>Final question: Have you ever made yourself hungry writing about code?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=735d7ab2a861" width="1" height="1" alt=""><hr><p><a href="https://medium.com/7factor/react-hooks-a-super-serious-take-735d7ab2a861">React Hooks: A Super Serious Take</a> was originally published in <a href="https://medium.com/7factor">7Factor Software</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding How Flex Works]]></title>
            <link>https://medium.com/7factor/understanding-how-flex-works-5a1495f528a8?source=rss----d442481192ff---4</link>
            <guid isPermaLink="false">https://medium.com/p/5a1495f528a8</guid>
            <category><![CDATA[design]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[flex]]></category>
            <dc:creator><![CDATA[Katie Kang]]></dc:creator>
            <pubDate>Mon, 01 Feb 2021 21:05:01 GMT</pubDate>
            <atom:updated>2021-02-01T21:18:26.160Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tXDBPtce4KLd9Yy1Ves_oA.jpeg" /></figure><p>To be most efficient in mobile design, you must familiarize yourself with Flex. It will save you time, and more importantly headaches. Flex is useful if you want to create a responsive UI for all devices. I highly recommend using Flex instead of setting specific values between elements such as paddingRight: 50 to give a space, as it won’t create a responsive UI, since there are so many devices out there with all different screen sizes. I will be going through a few key examples of using Flex and explaining how these are beneficial in mobile design. These are all basic designs that will set you up for success within Flex!</p><h3>Getting Started</h3><p>We will be using &lt;View&gt; and a few other components to demonstrate some examples. &lt;View&gt; is similar to &lt;div&gt; in HTML. Note &lt;View&gt; is neither a string nor HTML, it’s called JSX. Instead of using plain HTML, you will need to use JSX in React Native. For more information about JSX, click <a href="https://reactjs.org/docs/introducing-jsx.html">here</a>. There are more of these, such as &lt;Text&gt; and &lt;TouchableOpacity&gt;. All of these are called Core Components and it will come in handy to learn these before viewing my examples. Click <a href="https://reactnative.dev/docs/components-and-apis">here</a> to learn more about Core Components.</p><p>Example #1: Using SafeArea for 100% Screen Coverage</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*QZJ0Nd_onur_SLdDrWxncQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/222/1*FGA67kiBDs5MQ6Mao90yiA.png" /></figure><p>&lt;SafeAreaView&gt; is used for the latest iOS devices where the front camera takes up a large partition of the front screen, I.E.: iPhone 11, 12, X, Xs, and XR. What is happening here is that the &lt;SafeAreaView&gt; component takes up the entire screen, including the status bar area. Because we’ve applied flex: 1 in &lt;SafeAreaView&gt;, it takes the entire screen including the status bar area top and bottom. Then it renders the &lt;View&gt; area where it takes up the area without the status bar which is why you see the yellow background on the top and the bottom of the screen. &lt;View&gt; is on top of &lt;SafeAreaView&gt; so if you remove &lt;View&gt;, then you will see only the yellow background color applied to the entire screen. So think of flex: 1 as width or height 100%.</p><p>How to create two &lt;View&gt; areas and divide the screen exactly in half? As we saw the example above, flex: 1 is like width or height: 100%. Then what happens if we do this?</p><p>Example #2: Creating Horizontal Sections</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*3rr2WS9fuO7XO5b8ZJkLkw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/287/1*Z8iXoVo3i6MftUPatQ3mIw.png" /></figure><p>Flex will automatically break down the entire space in &lt;SafeAreaView&gt; to exactly in half. Can you guess what happens if you add one more &lt;View style={{ flex: 1 }}&gt;? It will break down to 33.3% for each &lt;View&gt;, because each &lt;View&gt; must have 100%, but there are 3 &lt;Views&gt;, so it will do the hard work for you. Then what happens if you add &lt;View&gt; but no flex: 1? The last &lt;View&gt; will take up the needed space, and then the two flex views will share the remaining space evenly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/329/1*mBX5Q0DF-_-o93Rv9NyUFg.png" /></figure><h3>Diving Deeper</h3><p>Also, by default, the direction of flex in React Native flex is ‘column’, not ‘row’. It is opposite to what you see in React CSS. What do I mean by that? Here is an example.</p><p>Example #3: Understanding ‘column’ and ‘row’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*gcDCUDZHhj5mC69cgii2lg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/248/1*BC63cy5lfRSmZYvTJi-XfA.png" /></figure><p>We’ve applied flex: 1 and instead of using the default ‘column’ direction, we are using ‘row’ direction for &lt;SafeAreaView&gt;, so the entire screen is one big fat row going left to right. It gets confusing, but remember, the entire screen is one row! Imagine you have one really long yellow strip inside a black box and you are only seeing a small portion of it — which is your mobile screen. In ‘row’ direction, you can add items from left to right. In ‘column’ direction, each component will stack from top to bottom. When you apply ‘row’ or ‘column’ direction, everything inside that component will get affected. Here, we have ‘row’ direction applied in &lt;SafeAreaView&gt;, so any child component will stack up items from left to right. See the next example of how I created 3 rows and 2 columns. The key point is that the parent’s flexDirection will affect its children component.</p><h3>Adding Adjustments</h3><p>Okay, so you understand that the above example shows the entire screen as one row, and since it’s ‘row’ direction, each component within &lt;SafeAreaView&gt; parent component will render from left to right. Then what about the text 10 and text 11 that got cut off? Because of flexDirection: ‘row’ and flex: 1, items are rendered from left to right, and there’s not enough space for those two texts to display on the screen. If we change &lt;Text&gt;first half&lt;/Text&gt; to some really long text, the rest of &lt;Text&gt; components will not show at all. Also, don’t get confused with small texts. You might think you have plenty of space available below those texts, but as you can see with the background color, each text takes up a thin slice of one big yellow row. We just have too much unused space for small texts, because of flex: 1 in &lt;SafeAreaView&gt;. The text by default is justifyContent: ‘flex-start’ aligned, meaning it is top-aligned vertically. Don’t worry, we’ll cover this in example #4.</p><p>So, where are the rest of the texts? It overflows to the outside of the screen to the right. Think of each &lt;Text&gt; item as a small box. Right now, we have 11 &lt;Text&gt;, thus 11 boxes, but think of an extreme case where you have 100 boxes or 100 &lt;Text&gt; items. Will it display all here? Certainly not. We’ve already used up the available space. The mobile devices are small and you have limited spaces. In the real-world, cramming everything in one row like this is a bad design that you want to avoid. Back to the solution. To fix this, you can add flexWrap: ‘wrap’ and it will ‘wrap’ the remaining text that doesn’t fit in the first row. Whether you applied flex: 1 or not, it will still do that.</p><h3>Let’s Kick it Up a Notch</h3><p>If you understand flex and flexDirection, the rest is easy. See more example code below and try to see if you can do similar or even more complex things. I highly recommend using backgroundColor everywhere, because you can visualize the area that’s being affected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*sxmtGmPmVe5bP6oPyN4PGw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/238/1*Ey0UvP-7IFt_erdZ9bQsOw.png" /></figure><p>Example #4: Adding User Profile Information</p><p>Let’s look at a more real-world example. What if you want to create a header and content with a user’s avatar on the left and their information on the right? Here is one way of doing that.</p><p>The pink and sky-blue areas below are nothing different than the example above with lots of text. The entire pink and sky blue area is one giant row, and we are simply stacking up elements from left to right. And the email and address area is just taking up the remaining space by using flex: 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*-cVw8aSPSG8DCVftqb3oVg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/313/1*gA1tMwBCy526jhDHQCJx9Q.png" /></figure><p>Okay…. So what do you do if you want to vertically center ‘Avatar’ text? You can use justifyContent: ‘center’ to do that. If you want to replace Avatar text with an image, the same principle applies; you can still use the same style.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/571/1*UngKo1VfyD6Vrq0p3nxGvw.png" /></figure><p>To align items horizontally centered, use alignItems: ‘center’. Think of justifyContent as a y-axis and you move items top, center, or bottom aligned using that. The same goes for alignItems; it’s like the x-axis, moving items left, center, or right. Value for the left, or right alignment is not ‘left’ or ‘right’, it’s ‘flex-start’, and ‘flex-end’. So you would do justifyContent: ‘flex-start’ or alignItems: ‘flex-start’. I know, it’s confusing at first, but just play around with it for a bit.</p><p>So far, we’ve covered the most frequently used features of flex. If you got all of these, you won’t have much trouble when building a UI. Just think carefully about how you are going to write the code when you have a complex design. Start from putting everything in the imaginary boxes. I use backgroundColor very often so that I can visualize items and it helps me to correct any mistakes in the early development stage. It gets pretty messy when the design has so many items in multiple layers of &lt;View&gt;.</p><p>I hope this overview helps you on your Flex journey! Remember to start small and remember the basics.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a1495f528a8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/7factor/understanding-how-flex-works-5a1495f528a8">Understanding How Flex Works</a> was originally published in <a href="https://medium.com/7factor">7Factor Software</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>