<?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>Forem: Amy Holt</title>
    <description>The latest articles on Forem by Amy Holt (@ameseee).</description>
    <link>https://forem.com/ameseee</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%2F182027%2Fe1084cef-1de7-4036-b5c5-58bab3bbd4b4.png</url>
      <title>Forem: Amy Holt</title>
      <link>https://forem.com/ameseee</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ameseee"/>
    <language>en</language>
    <item>
      <title>Meet border-box, my best friend.</title>
      <dc:creator>Amy Holt</dc:creator>
      <pubDate>Mon, 02 Sep 2019 23:16:14 +0000</pubDate>
      <link>https://forem.com/ameseee/meet-border-box-my-best-friend-a56</link>
      <guid>https://forem.com/ameseee/meet-border-box-my-best-friend-a56</guid>
      <description>&lt;p&gt;Have you been given the advice to use &lt;code&gt;box-sizing: border-box;&lt;/code&gt; but not completely understand what it was doing for you?&lt;/p&gt;

&lt;p&gt;Whether working to recreate comps down to the pixel or building my own designs, &lt;code&gt;border-box&lt;/code&gt; has made my life a lot easier. But it didn't seem any easier until I understood what it was doing for me. That's why it is my best friend and I think you might want it in your life, too!&lt;/p&gt;

&lt;p&gt;Before you dive into this, you should have an understanding of content, padding, border, and margin and the role each of those play in &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Introduction_to_the_CSS_box_model"&gt;the box model&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;box-sizing: content-box;&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;content-box&lt;/code&gt; is the default value for the box-sizing property for most elements. The &lt;strong&gt;content&lt;/strong&gt; in &lt;code&gt;content-box&lt;/code&gt; means that content, and only content, will use the height and width that are applied to an element. &lt;/p&gt;

&lt;p&gt;If we apply a width of 200px to a &lt;code&gt;div&lt;/code&gt;, we won't be surprised to see it take up 200px. Now, when we add on 10px of padding and a 3px border, we will see that the box is now 226px wide: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jrnxwbeq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/9cpd32c2dsnqjsds1k5d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jrnxwbeq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/9cpd32c2dsnqjsds1k5d.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If I truly only have 200px for this element, I now need to subtract the padding and border from the content, so I set the content at 174px. Any tiny change I decide to make to the padding or border from there on out, I'll also have to calculate and make a change to the content. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;box-sizing: border-box;&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;border&lt;/strong&gt; in &lt;code&gt;border-box&lt;/code&gt; means that the border and everything inside of it, padding and content, will count toward the defined height and width of the element.&lt;/p&gt;

&lt;p&gt;If we apply a width of 200px to a &lt;code&gt;div&lt;/code&gt; element, then the 10px padding and 3px border, the content, padding and border will all fit within that 200px width:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bTXDbnga--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/1i3j45cxhy3z1lxmfhvu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bTXDbnga--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/1i3j45cxhy3z1lxmfhvu.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If I need to modify the border or padding at any time, I can count on border-box to keep the element the size I defined, saving me tome from having to do the math and adjust the content's height and width every time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Different Elements → Different Default Styles
&lt;/h2&gt;

&lt;p&gt;While most elements default to &lt;code&gt;content-box&lt;/code&gt;, not all necessarily do! This depends on the user agent stylesheet for the browser you are using. In &lt;a href="https://chromium.googlesource.com/chromium/blink/+/master/Source/core/css/html.css"&gt;Chrome's latest stylesheet&lt;/a&gt;, buttons are defaulted to &lt;code&gt;border-box&lt;/code&gt; along with several types of inputs. &lt;/p&gt;

&lt;h2&gt;
  
  
  Example
&lt;/h2&gt;

&lt;p&gt;To see this in action, visit &lt;a href="https://codepen.io/ameseee/pen/JjPWJdL"&gt;this CodePen&lt;/a&gt;. Commenting out lines 30 and 34 one at a time can give you a feel for what each declaration does.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrap Up
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;border-box&lt;/code&gt; may be your new best friend, but only if you know what it is doing for you. &lt;a href="https://css-tricks.com/box-sizing/#article-header-id-3"&gt;Try adding it&lt;/a&gt; to the next small project you whip up and see how it helps you!&lt;/p&gt;

</description>
      <category>css</category>
      <category>boxmodel</category>
      <category>layout</category>
    </item>
    <item>
      <title>Be an Approachable and Empowering Mentor</title>
      <dc:creator>Amy Holt</dc:creator>
      <pubDate>Mon, 15 Jul 2019 15:46:17 +0000</pubDate>
      <link>https://forem.com/ameseee/be-an-approachable-and-empowering-mentor-1ipp</link>
      <guid>https://forem.com/ameseee/be-an-approachable-and-empowering-mentor-1ipp</guid>
      <description>&lt;p&gt;While these thoughts are frequently running through my head when I teach, pair, and observe others do the same, the 9th trait of a 10x engineer in the recent shit-storm motivated me to collect these ideas and get them out. If you missed it:&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fut00wrz5wknvdyf2vhz7.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fut00wrz5wknvdyf2vhz7.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I think engineers, junior to senior, should be able to mentor and teach others. Mentoring and teaching require skills that we aren't just born with, and may not feel so natural for some folks. But that's ok - it's learnable!&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Mentor?
&lt;/h2&gt;

&lt;p&gt;For the context of this blog post, I'll use the term &lt;code&gt;mentor&lt;/code&gt; to describe anyone who is...&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;serving as an official mentor&lt;/li&gt;
&lt;li&gt;a more senior engineer teaching something they have more expertise in&lt;/li&gt;
&lt;li&gt;a less senior engineer teaching something they have more expertise in&lt;/li&gt;
&lt;li&gt;co-worker or classmate teaching something they have more expertise in&lt;/li&gt;
&lt;li&gt;educators&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, anyone who shares their knowledge with anyone else!&lt;/p&gt;

&lt;h2&gt;
  
  
  Why is this Important?
&lt;/h2&gt;

&lt;p&gt;The way mentoring interactions feel for the mentee can hugely determine the trust they have in their mentor, whether they feel valued, and their confidence and happiness in that space. A negative mentorship experience can lead a mentee to feel discouraged, frustrated, and like they are alone in their professional growth. On the other hand, a positive mentorship experience can make a mentee feel confident, valuable, and empowered to continue growing and collaborating!&lt;/p&gt;

&lt;h2&gt;
  
  
  How Do You Do It?
&lt;/h2&gt;

&lt;p&gt;There is no silver bullet. It takes work and thoughtfulness. Some of the things we say and do that might be leading to us not be approachable or empowering are deeply engrained into our daily language. Those are habits that we have the power to change!&lt;/p&gt;

&lt;h3&gt;
  
  
  Check Your Vocabulary
&lt;/h3&gt;

&lt;p&gt;Consider the following words:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;just&lt;/li&gt;
&lt;li&gt;simple&lt;/li&gt;
&lt;li&gt;easy&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All three of these words are harmless and perfectly acceptable to use in the workplace. But when a person hears them over and over, in reference to something that is complex and new to them, it adds up and can contribute to that imposter syndrome, as well as the approachability of the person using those words.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;True Story:&lt;/strong&gt; Last week, I advised a new student to refactor a lengthy function. They asked how they would go about it, and I said "Just pass that function an argument of &lt;code&gt;whateverItWas&lt;/code&gt;". To me it may be "just passing an argument", but to my student, at that moment, that meant about nothing. I immediately backed myself up and we worked through it together, but I can't undo my use of that word and the impact it may have had.&lt;/p&gt;

&lt;p&gt;Similarly, something that currently seems "easy" or "simple" to you may not be for your mentee. Removing some of these oh-so-engrained words from your vocabulary could make a huge impact for your mentees experience and your approachability.&lt;/p&gt;

&lt;h3&gt;
  
  
  Remove Assumptions
&lt;/h3&gt;

&lt;p&gt;"We all know how to _______, right?"&lt;/p&gt;

&lt;p&gt;How does that feel for the person who doesn't know how to _______?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They now might be questioning if they are ready to learn what you're about to talk about.&lt;/li&gt;
&lt;li&gt;They may be wondering if they are the only person who doesn't know _______.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this scenario, the mentor just assumed the mentee did know that concept, therefore sent the message that they &lt;em&gt;should&lt;/em&gt; know it. It's was probably the mentor's intention to create a transition from something the mentee likely has previous knowledge about so they have some context for the concept they're about to discuss. Keyword: &lt;code&gt;likely&lt;/code&gt;. Instead of assuming, let's ask them! It might take 30 more seconds, but they payoff will be your mentee feeling empowered going into this new topic!&lt;/p&gt;

&lt;p&gt;Another way to spin it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Are you familiar with _______?"&lt;/li&gt;
&lt;li&gt;"Before we dive into this, tell me what you know about _______."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This provides the mentee the opportunity to articulate their understanding and be part of the conversation. If that answer uncovers a misconception of lack of essential prior knowledge, the mentor know has this information and can fill in the gaps before moving on.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hands Off Their Keyboard
&lt;/h3&gt;

&lt;p&gt;Unless you are driving and they are navigating, just don't do it.&lt;/p&gt;

&lt;p&gt;If they are having trouble understanding what you are trying to have them do, you can white board it, you can back up and go character by character. Whatever you do, don't touch their keyboard. That moment someone realize they are "too slow" or just "don't know enough" for the mentor in front of you can be heartbreaking. It can also be really infuriating when a mentor writes code that the mentee don't understand.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;We aren't mentoring code, we are mentoring people.&lt;/strong&gt; If you want to teach someone to fish, you don't just bring them a bucket of fish. Don't fish for your mentee.&lt;/p&gt;

&lt;p&gt;And if the reasons above aren't compelling enough, the germs on someone else's keyboard should be.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrap Up
&lt;/h2&gt;

&lt;p&gt;Not sure how much these tips apply to you? Take the next week to keep track of what you say/do. Jot down a tally mark every time you say "easy" or go for someone else's keyboard. If you realize it is something you need to work on, work on it! Tell a co-worker and ask them to hold you accountable. Or be straightforward about it with a mentee so they can also help you in your journey. Your mentees will appreciate you for it 💖&lt;/p&gt;

</description>
      <category>pairing</category>
      <category>mentorship</category>
      <category>team</category>
    </item>
    <item>
      <title>Semantic HTML? How can you tell?</title>
      <dc:creator>Amy Holt</dc:creator>
      <pubDate>Wed, 26 Jun 2019 15:54:03 +0000</pubDate>
      <link>https://forem.com/ameseee/semantic-html-how-can-you-tell-13am</link>
      <guid>https://forem.com/ameseee/semantic-html-how-can-you-tell-13am</guid>
      <description>&lt;p&gt;When HTML5 was released in 2014, developers were given a slew of new elements. Many of them are meant to serve as a replacement for the flavorless jello &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;, the inline &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;, and other elements whose names didn't convey much meaning.&lt;/p&gt;

&lt;p&gt;Utilizing these elements to give our HTML as much meaning as possible is what it means to write "semantic HTML". Using semantic HTML results in the same appearance of our site in the browser, but it provides a lot of benefits to both users and developers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits of Semantic HTML
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Increases Accessibility
&lt;/h3&gt;

&lt;p&gt;Semantic elements help screen readers understand the context of the content on your site better; therefore communicate it to users more effectively. Search engines are also more effective when they have semantic tags to reference. &lt;/p&gt;

&lt;h3&gt;
  
  
  Dev Empathy
&lt;/h3&gt;

&lt;p&gt;We've all seen that codebase with 14 nested &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; elements, and even with perfect indentation, it gets difficult to read. Using semantic elements, such as &lt;code&gt;&amp;lt;nav&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;article&amp;gt;&lt;/code&gt;, and &lt;code&gt;&amp;lt;footer&amp;gt;&lt;/code&gt; in place of the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; element, when appropriate, can alleviate this. This will also make reading and updating the document easier for &lt;em&gt;future-you&lt;/em&gt;. Another benefit for devs is when we need to style elements - instead of those 14 &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; elements that all need their own attribute, we now have different element names that we may not need to add as many attributes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Does it Look Like?
&lt;/h2&gt;

&lt;p&gt;One of the two cards below was built with semantic HTML; one was not. Can you tell which is which?&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fvbkovurugoiz64zmzc7e.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fvbkovurugoiz64zmzc7e.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The answer is - you &lt;em&gt;shouldn't&lt;/em&gt; be able to tell by looking at the result in the browser. Semantic HTML should result in the same appearance; but the elements we use should communicate meaning to us, the devs, and technologies that read our code, in order to provide a better experience for all users.&lt;/p&gt;

&lt;p&gt;Here's a screenshot of the code, side-by-side. See the full CodePens by clicking on the links below.&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fzzexk332lff0d775rycg.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fzzexk332lff0d775rycg.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Find the CodePens &lt;a href="https://codepen.io/ameseee/pen/NZGYwR" rel="noopener noreferrer"&gt;here&lt;/a&gt; and &lt;a href="https://codepen.io/ameseee/pen/ewJdYK" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; There are many different ways the HTML could have been written for this card - all using semantic elements. This is by no means the best or only solution!&lt;/p&gt;

&lt;h3&gt;
  
  
  What About &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;s?
&lt;/h3&gt;

&lt;p&gt;This does &lt;strong&gt;not&lt;/strong&gt; mean you should never use a &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; again! Notice that, in the "Semantic? Yes" example, I chose to use a &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; to wrap the host details. I didn't &lt;em&gt;want&lt;/em&gt; to communicate anything about the chunk of content, but needed the container to use FlexBox in my CSS. However, I chose to use an &lt;code&gt;&amp;lt;article&amp;gt;&lt;/code&gt; element for the card itself, then a &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt; to differentiate the rental info from the host info.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; elements probably do still have a place in your site. When you're not sure if you should be using a &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; or a more semantic element, ask yourself, "Are these elements grouped together because their content belongs together? Are they grouped together because I need a container for styling?" That can be a starting point for making that decision.&lt;/p&gt;

&lt;h2&gt;
  
  
  Your Challenge
&lt;/h2&gt;

&lt;p&gt;After reading this you may be thinking "I already use some semantic HTML" - that's great! I encourage you to read through a project you're currently working on and assess your use of semantic HTML. If something sticks out to you, refactor it!&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrap Up
&lt;/h2&gt;

&lt;p&gt;Just like in anything else in programming, there is not &lt;strong&gt;one right way&lt;/strong&gt; to write semantic HTML, but it's important we are thoughtful and constantly trying to make our applications more accessible to users and readable to other devs.&lt;/p&gt;

&lt;p&gt;Check out MDN's page on &lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/Semantics#Semantic_elements" rel="noopener noreferrer"&gt;Semantic Elements&lt;/a&gt; to learn about more of the elements available for your use!&lt;/p&gt;

</description>
      <category>semantic</category>
      <category>html</category>
      <category>a11y</category>
    </item>
  </channel>
</rss>
