<?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: BigCityC</title>
    <description>The latest articles on Forem by BigCityC (@bigcityc).</description>
    <link>https://forem.com/bigcityc</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%2F744115%2F2b35cae9-739a-4433-8876-22303d0c8054.jpeg</url>
      <title>Forem: BigCityC</title>
      <link>https://forem.com/bigcityc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/bigcityc"/>
    <language>en</language>
    <item>
      <title>Learning ReactJs...again</title>
      <dc:creator>BigCityC</dc:creator>
      <pubDate>Wed, 15 May 2024 22:37:31 +0000</pubDate>
      <link>https://forem.com/bigcityc/learning-reactjsagain-5hef</link>
      <guid>https://forem.com/bigcityc/learning-reactjsagain-5hef</guid>
      <description>&lt;p&gt;This is the introduction to a short series I plan on doing. I have now been in the software development industry for two years.&lt;/p&gt;

&lt;p&gt;I began learning how to code in 2017 and failed miserably until finding an online tutor/mentor to help me in 2019. I began learning ReactJS in 2019 to help build my coding skillset. I worked with React for about a year and a half before finding my first software job with a robotics company.&lt;/p&gt;

&lt;p&gt;After getting my first software job, my personal coding pursuits took a backseat. With a full-time job, I found little inclination to code in my spare time, feeling that forty hours a week was ample time spent in the world of programming.&lt;/p&gt;

&lt;p&gt;At my current job, we do not use frameworks, we use vanilla Javascript. Nonetheless, these past two years have been a continuous learning curve, allowing me to gain valuable insights.&lt;/p&gt;

&lt;p&gt;With all that being said, I am on a quest to learning ReactJS again. And I thought it would be good to document the differences in my experience from the first time I learned React. &lt;/p&gt;

</description>
      <category>react</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>learning</category>
    </item>
    <item>
      <title>CodeSignal - Best coding challenge website</title>
      <dc:creator>BigCityC</dc:creator>
      <pubDate>Fri, 21 Jan 2022 16:50:21 +0000</pubDate>
      <link>https://forem.com/bigcityc/codesignal-best-coding-challenge-website-2f2h</link>
      <guid>https://forem.com/bigcityc/codesignal-best-coding-challenge-website-2f2h</guid>
      <description>&lt;p&gt;Throughout my journey learning front end web development I have been through a lot of different coding challenge websites.&lt;/p&gt;

&lt;p&gt;A few months ago, I was introduced to CodeSignal, and have been using it ever since.&lt;/p&gt;

&lt;h2&gt;
  
  
  First Impressions
&lt;/h2&gt;

&lt;p&gt;I recently took an hour coding test on CodeSignal. After enjoying the experience, I signed up. I found the UI to be really fun and engaging. I’ve tried using other code challenge websites in the past, and always found them unnecessarily confusing, and lacking character. Meanwhile, I found CodeSignal to be full of color, with an easy layout to understand.&lt;/p&gt;

&lt;p&gt;The basic version has two options.. Arcade or Interview Practice.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F447sh4kjl5cz23qywnhe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F447sh4kjl5cz23qywnhe.png" alt="Options" width="420" height="488"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Interview Practice
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;I find this feature to be really useful, and I appreciate the organization of the topics at hand. For example, the first topic is Data Structures, and it covers Arrays, Linked Lists, Hash Tables, Trees, Heaps, Stacks and Queues.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Plus!&lt;/strong&gt; The challenges tell you which companies have asked them in the past.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6tqvhihs7pov90kkl92u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6tqvhihs7pov90kkl92u.png" alt="asked by Amazon, Microsoft and Apple" width="597" height="210"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Arcade
&lt;/h2&gt;

&lt;p&gt;What a fun name for a place to drill no-context coding challenges day in and day out. The UI is an exciting place to be as well, making you feel like you are digging your well of knowledge deeper and deeper by taking advantage of the “endless scroll” that so many other websites take advantage of… but this time for good instead of evil!&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy4gtjoyuz77emmjjvknj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy4gtjoyuz77emmjjvknj.png" alt="asked by Amazon, Microsoft and Apple" width="800" height="1035"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  My Approach
&lt;/h2&gt;

&lt;p&gt;I use CodeSignal to practice for technical interviews.&lt;br&gt;
I do one challenge per day, that consists of two 15 minute sessions.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In the first 15 minutes&lt;/em&gt;, I attempt to solve the challenge by myself, with no help from the internet. I make sure to document my thought process using comments.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In the second 15 minutes&lt;/em&gt;, I compare my answer and thought process to other correct answers. This is a feature I like about CodeSignal, once you solve the question, you unlock all of the other correct answers. It isn’t this easy on other code challenge websites. In some cases you have to spend coins to unlock the solutions.&lt;/p&gt;

&lt;p&gt;Once the initial 15 minutes is up, if I haven’t solved the challenge… I google the answer. Although, instead of simply copy/pasting the answer and moving on, I compare the thought process of the answer I found to mine.&lt;/p&gt;

&lt;p&gt;Overall, I think CodeSignal is the most useful code challenge website. I find it’s user experience to be really ergonomic and I plan on continuing to use it on a daily basis to improve my coding.&lt;/p&gt;

</description>
      <category>codesignal</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to scale an image inside of a div</title>
      <dc:creator>BigCityC</dc:creator>
      <pubDate>Wed, 03 Nov 2021 20:04:07 +0000</pubDate>
      <link>https://forem.com/bigcityc/how-to-scale-an-image-inside-of-a-div-4egj</link>
      <guid>https://forem.com/bigcityc/how-to-scale-an-image-inside-of-a-div-4egj</guid>
      <description>&lt;p&gt;Here is a basic react app, using styled components. &lt;br&gt;
I have set up an example of a div with an image inside of it.&lt;/p&gt;

&lt;p&gt;If you open the codesandbox and try using the slider to resize the browser, you can see two things.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The image remains the same size.&lt;/li&gt;
&lt;li&gt;The image “leaks” out of the div that it is a child of.
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import styled from "styled-components";
import Laptop from "./laptop.png";

const Container = styled.div`
  border: 1px solid red;
`;

const Img = styled.img.attrs({
  src: `${Laptop}`
})``;

export default function App() {
  return (
    &amp;lt;Container&amp;gt;
      &amp;lt;Img /&amp;gt;
    &amp;lt;/Container&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;codesandbox: &lt;a href="https://codesandbox.io/s/scaling-images-1-kc05z"&gt;https://codesandbox.io/s/scaling-images-1-kc05z&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are two things we need to add to the image if we want it to scale with its parent.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;height: auto
max-width: 100%;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;height: auto&lt;/code&gt;&lt;br&gt;
This allows the image to automatically adjust its height to allow the content to be displayed correctly.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;max-width: 100%&lt;/code&gt;&lt;br&gt;
This sets the width of the image so that the image will scale down if it has to, but never scale up to be larger than its original size.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: Using width: 100% instead will allow the image to be scaled up larger than its original size, in order to fit the full width of the div it is inside of. Most cases, it is better to use max-width.&lt;/p&gt;

&lt;p&gt;Below is the same code with the solution. You can see from the demo that the image has resized correctly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import styled from "styled-components";
import Laptop from "./laptop.png";

const Container = styled.div`
  border: 1px solid red;
`;

const Img = styled.img.attrs({
  src: `${Laptop}`
})`
  height: auto;
  max-width: 100%;
`;

export default function App() {
  return (
    &amp;lt;Container&amp;gt;
      &amp;lt;Img /&amp;gt;
    &amp;lt;/Container&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;codesandbox: &lt;a href="https://codesandbox.io/s/scaling-images-2-rxyx2"&gt;https://codesandbox.io/s/scaling-images-2-rxyx2&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>scaling</category>
    </item>
    <item>
      <title>Learning to code with mindfulness</title>
      <dc:creator>BigCityC</dc:creator>
      <pubDate>Wed, 03 Nov 2021 15:03:41 +0000</pubDate>
      <link>https://forem.com/bigcityc/learning-to-code-with-mindfulness-2o93</link>
      <guid>https://forem.com/bigcityc/learning-to-code-with-mindfulness-2o93</guid>
      <description>&lt;p&gt;I have recently noticed a peculiar habit in my day to day coding. I often find myself feeling frustration when I can’t solve a problem right away. This creates an urgency to complete the project, and results in unorganized code and half thought out solutions.&lt;/p&gt;

&lt;p&gt;When I have felt frustration in the past with a problem, my go to habit was to just start coding the first solution that pops into my head, and hope that it works. More times than not, it doesn’t.&lt;/p&gt;

&lt;p&gt;Last week I started to become more aware of when I am feeling frustrated. Recently I have been practicing different techniques to help put my mindset in a better, more calm, place when setting out to solve a problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Technique 1: Turn off distractions&lt;/strong&gt;&lt;br&gt;
Now, when I prepare to code, I turn my phone all the way off, close my email, and disable anything else that may distract me during the time I choose to focus on a problem. This technique helps me retain focus on one thing at a time and helps keep my mind clear on what needs to be solved in the code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Technique 2: Map it out&lt;/strong&gt;&lt;br&gt;
This technique has changed the way I approach coding. Now, when I feel hints of frustration, I know it’s because I need to step back from the keyboard, and create the space I need to really understand the problem at hand.&lt;br&gt;
This is the two step process I use to more mindfully solve problems:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Write out &lt;strong&gt;HOW&lt;/strong&gt; the code currently works, and how I want the code to work.&lt;/li&gt;
&lt;li&gt; Brainstorm all the possible solutions to the problem and choose the best one.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I bolded the &lt;strong&gt;how&lt;/strong&gt; in step one because that is the key to solving problems. When I let frustration get ahold of me, I try to solve the problem by asking WHAT I need to do to make it work, and not HOW to make the code work. Asking “what” is a surface level question, and often does not address the underlying problem, while asking “how” forces you look at the problem from its most basic level, and work your way up to the specific problem.&lt;/p&gt;

&lt;p&gt;In conclusion, I have been using the combination of removing distractions and creating space to think more carefully on how a problem can be solved. These two techniques have helped me code more mindfully and be more focused while solving problems.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
