<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tepy Thai</title>
    <description>The latest articles on DEV Community by Tepy Thai (@tepythai).</description>
    <link>https://dev.to/tepythai</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%2F50716%2F37ac377d-8268-4b94-b414-9a2fd40485ba.jpeg</url>
      <title>DEV Community: Tepy Thai</title>
      <link>https://dev.to/tepythai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tepythai"/>
    <language>en</language>
    <item>
      <title>Why 100vw causes horizontal scrollbar</title>
      <dc:creator>Tepy Thai</dc:creator>
      <pubDate>Fri, 05 Jun 2020 02:17:58 +0000</pubDate>
      <link>https://dev.to/tepythai/why-100vw-causes-horizontal-scrollbar-4nlm</link>
      <guid>https://dev.to/tepythai/why-100vw-causes-horizontal-scrollbar-4nlm</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This post is from my personal blog &lt;a href="https://tepy.dev/til/why-100vw-causes-horizontal-scroll"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Do you ever wonder why sometimes your site just has a horizontal scrollbar appeared out of nowhere? Today I just ran into it again (as always 😆) and I somehow figured out how to remove it. So here is the step I took to debug and fix it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Try the global border or outline color trick to find which element is causing it:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="no"&gt;red&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Find elements with width bigger than the document's width (more from &lt;a href="https://css-tricks.com/findingfixing-unintended-body-overflow/"&gt;csstrick&lt;/a&gt;)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;docWidth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;documentElement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;offsetWidth&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="p"&gt;[].&lt;/span&gt;&lt;span class="nx"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelectorAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;*&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;offsetWidth&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;docWidth&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;el&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Most of the times, I always find the &lt;code&gt;100vw&lt;/code&gt; value on the &lt;code&gt;width&lt;/code&gt; that is the cause of the overflow. So, if that is the case, you can try replacing it with &lt;code&gt;width: 100%&lt;/code&gt; instead and see if it works. Try with its inner elements as well if present.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, back to the title, why would &lt;code&gt;100vw&lt;/code&gt; be the cause? Well, the answer is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;When you set an element's width to &lt;code&gt;100vw&lt;/code&gt;, the element's width now will be the whole &lt;code&gt;view width&lt;/code&gt; of the browser and the important part is &lt;strong&gt;&lt;code&gt;100vw&lt;/code&gt; does not include the &lt;code&gt;vertical scrollbar&lt;/code&gt;'s &lt;code&gt;width&lt;/code&gt; into its calculation at all&lt;/strong&gt;. Therefore, when there is a &lt;code&gt;vertical scrollbar&lt;/code&gt;, the &lt;code&gt;total width&lt;/code&gt; will be the sum of the &lt;code&gt;element's width&lt;/code&gt; and the &lt;code&gt;vertical scrollbar's width&lt;/code&gt;, which causes the overflow on the x-axis and thus the &lt;strong&gt;&lt;code&gt;horizontal scrollbar&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Hope this helps!&lt;/p&gt;

&lt;p&gt;Feel free to correct me if you think there is something wrong 😃&lt;/p&gt;

</description>
      <category>css</category>
    </item>
    <item>
      <title>My Programming Journey To Frontend Dev</title>
      <dc:creator>Tepy Thai</dc:creator>
      <pubDate>Thu, 04 Jun 2020 16:36:33 +0000</pubDate>
      <link>https://dev.to/tepythai/my-programming-journey-to-frontend-dev-2agi</link>
      <guid>https://dev.to/tepythai/my-programming-journey-to-frontend-dev-2agi</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;I hope this writing could be an inspiration to someone 😃&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Hi, I'm Tepy, a Frontend Developer from &lt;strong&gt;Cambodia&lt;/strong&gt; 🇰🇭 who is currently studying Computer Science in &lt;strong&gt;Japan&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I decided to become a Frontend Developer about 2 years ago after I started learning about Web Development, especially &lt;strong&gt;React.js&lt;/strong&gt;.&lt;br&gt;
The reason I chose to become a Frontend Developer despite having interest in being a Fullstack Developer as well&lt;br&gt;
is that I enjoy seeing the result of my works &lt;strong&gt;immediately&lt;/strong&gt; and I am quite interested in beautiful &lt;strong&gt;UI/UX&lt;/strong&gt; as well.&lt;/p&gt;

&lt;p&gt;Before entering the &lt;em&gt;web&lt;/em&gt; territory, I think I have had quite a long story about how I even got myself into the programming world in the first place.&lt;/p&gt;

&lt;h2&gt;
  
  
  High School
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Mathematics Lover&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;During my 3 years in high school, I had a &lt;em&gt;dream goal&lt;/em&gt; of getting into &lt;strong&gt;The Top 10&lt;/strong&gt; rank in the &lt;strong&gt;National Mathematics Olympiad&lt;/strong&gt; in 2012.&lt;/p&gt;

&lt;p&gt;I spent all my free time studying Math just for that competition. Thanks to the lack of internet availabilty at my hometown (I live in a rural area), I was able to put all my concentration in studying Math.&lt;/p&gt;

&lt;p&gt;As the result of &lt;strong&gt;endlessly&lt;/strong&gt; solving many Math problems everyday for &lt;strong&gt;3 years&lt;/strong&gt;, I was able to achieve my dream goal where I placed &lt;strong&gt;1st&lt;/strong&gt; in the National Mathematics Olympiad. It would be a lie if I told you it was not my greatest achievment in my life 😄.&lt;/p&gt;

&lt;h2&gt;
  
  
  After High School
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Clueless about future goal&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Even though I achieved my dream goal, I barely knew anything related to what I want to become in the future. Due to the lack of information, I chose to study Civil Engineering as it is quite a &lt;strong&gt;common&lt;/strong&gt; major for a student who is good at Math to choose back then in Cambodia.&lt;/p&gt;

&lt;p&gt;Since the university that I was in is an international one, there was a compulsary course about general knowledge of computer and internet (CS101?). The course introduced me to a lot of stuffs I don't really know back then and it somehow opened the door for me. However, after that course, I only understand the general thing of computer, nothing more nothing less.&lt;/p&gt;

&lt;h2&gt;
  
  
  My first line of code
&lt;/h2&gt;

&lt;p&gt;After hanging out with a few Computer Science friends of mine, I started my first line of code in &lt;a href="https://www.lua.org/"&gt;Lua&lt;/a&gt; (using &lt;a href="https://coronalabs.com/"&gt;2D game engine&lt;/a&gt;) while trying to make mobile game with them. I started out as I was really curious about how people make games and applications by that time, but eventually I got hooked into the world of programming without knowing it myself.&lt;/p&gt;

&lt;p&gt;Later on, I kept finding myself spending more and more time learning different things related to programming. Starting from taking &lt;code&gt;Python&lt;/code&gt; class for one of my elective courses to publishing my first ever mobile game. It was a clone of Flappy Bird game since that game was super popular at that time. However, what I did was creating just my own assets and wrote some really lame logic for the flying logic (I knew nothing about &lt;code&gt;physics logic for game&lt;/code&gt;) for the bird 😄 and I could not understand at all when it comes to much more difficult code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Coming to Japan
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;New journey begins&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Fast forward to 2015, I decided to change my major to Computer Science as I started my new chapter in Japan as a college student here. During my 1st year in Japan, I needed to take Japanese class over the course of 1 year, so during that time I could only learn programming during my spare time.&lt;/p&gt;

&lt;p&gt;As I started out as a self-taught programmer, it really took me quite a long time to finally understand the &lt;strong&gt;Foundation of Programming&lt;/strong&gt;. I could recall being confused between &lt;code&gt;i++&lt;/code&gt; and &lt;code&gt;++i&lt;/code&gt; for quite some time. Also, as a beginner I could not understand well how &lt;code&gt;while&lt;/code&gt; and &lt;code&gt;for&lt;/code&gt; loops really work at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  Into the real-world development
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;What keeps me going&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After I finally have solidated the foundation in &lt;strong&gt;C&lt;/strong&gt;, I started building &lt;strong&gt;Android Applications&lt;/strong&gt; with &lt;strong&gt;Udacity's Nanodegree Online Course&lt;/strong&gt;. Since I like seeing the result of my work immediately, building applications really encourages me to learn to code much better than just learning the basics.&lt;/p&gt;

&lt;p&gt;While building mobile application, I have learned to understand how an application is built with seperated pieces. It is mostly composed of the &lt;strong&gt;UI&lt;/strong&gt;(frontend) and the &lt;strong&gt;Data&lt;/strong&gt; and many other parts together. As a native app developer, I spent most of the time implementing the UI look of the app and fetching data from API to use in the app.&lt;/p&gt;

&lt;p&gt;That's also when I've first learned about &lt;strong&gt;API&lt;/strong&gt;. At first, I was not sure how the API really works at all. All I knew was that I could retrieve data from it and use it in my application. After a while, I got used to calling the api to get some data with some libraries and using it in the app. Then eventually I got to touch the &lt;strong&gt;Database&lt;/strong&gt; of the app when I tried to store data that I got from the api for offline usage. Writing database's query was something new to me as I was always dealing with just the UI of the app. So I found it somehow confusing most of the time. I also first learned a bit about the application archeticture such as MVVM, MVP, MVC etc.&lt;/p&gt;

&lt;h2&gt;
  
  
  From Native Mobile to the Web
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Expanding knowledge&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;While I learned a lot building native application, I felt something is missing with my current knowledge. Yes, it's the &lt;code&gt;How is the API built?&lt;/code&gt;. That thought of wanting to learn and build my own api brought me to venture into the web domain.&lt;/p&gt;

&lt;h2&gt;
  
  
  React.js
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Where it all started again&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I started off with the thought of wanting to build my own api, but what got me hooked was the &lt;strong&gt;Frontend&lt;/strong&gt; part of the web instead. That was because, again, I am quite interested in the &lt;strong&gt;UI/UX&lt;/strong&gt; part myself.&lt;/p&gt;

&lt;p&gt;That's when I got introduced to &lt;strong&gt;React.js&lt;/strong&gt; 2 years ago. I chose React as the web framework (well, React is basically a library) not because of any specific reason. It was just because it was pretty popular than the others at that time. However, the more I learn about React and use it, the more I like about it.&lt;/p&gt;

&lt;p&gt;Over the last 2 years, &lt;strong&gt;React&lt;/strong&gt; has taught me many new aspects of developing application. I believe it would be the same experience with other web frameworks, not just with React.&lt;/p&gt;

&lt;p&gt;You can read more about how what I have learned from React &lt;a href="https://tepy.dev/writing/what-i-have-learned-from-react-js"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Internships
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Gold opportunities&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://www.uzabase.com/" rel="noopener"&gt;Uzabase&lt;/a&gt;&lt;/strong&gt; as a software engineer for 5 weeks:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Agile development, pair programming, real life work&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As lucky as I was, I was introduced by a senior for my 2019 summer internship at Uzabase. It was also my first time having an interview with a CTO. Even though it was not a technical interview, it was a great opportunity for me to talk with him about my experience as a developer.&lt;/p&gt;

&lt;p&gt;During my very first internship, I was able to experience the real world of developing and maintaining a production ready website. Even more, I got to work with the team that composes of more than 10 people working together. That was a great lesson in communication for me as I was required to communicate a lot with the team.&lt;/p&gt;

&lt;p&gt;Not only I learned about how people work in the real world, it opened a new door for me to the other side of what I have been doing (frontend stuffs). Since the team uses &lt;strong&gt;Agile Development&lt;/strong&gt; and &lt;strong&gt;Pair Programming&lt;/strong&gt;, I got to understand how important those &lt;strong&gt;2&lt;/strong&gt; pieces are for a prodution team.&lt;/p&gt;

&lt;p&gt;At first I felt a bit off doing pair programming with the engineers there since I was used to coding by myself all the time. However, after doing it for a week and receiving an explaination of how we should do pair programming from them, I felt like it was one of the best way to improve any developer's skills. Pair programming doesn't only give you the opportunity to think first before you start to code, but also train you to properly explain your solution to your peer. By learning to do so, you will be able to train yourself to give better explanation in a &lt;strong&gt;precise&lt;/strong&gt; way to other people, which is an &lt;strong&gt;absolute important&lt;/strong&gt; skill every developer should have.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://www.wantedly.com/" rel="noopener"&gt;Wantedly&lt;/a&gt;&lt;/strong&gt; as a Frontend Engineer for 2 weeks:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;React, Graphql, Typescript, GitHub (get used to PR, Issues etc...)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This time, it was my first time being a Frontend Developer and I got the opportunity to use React as well as my other favorite stack such as Graphql, Typescript.&lt;/p&gt;

&lt;p&gt;During the period of just 2 weeks, I was able to learn a tremedous amount of knowledge from working on the project as well as from my mentor's advice . I got the chance to apply what I have been learning about React to improve the project and got myself adapting to working with a large codebase as well. Also, since the stack that they are using there is really cutting edge, it suits me really well since I also love to test out those cutting edge stuffs too.&lt;/p&gt;

&lt;p&gt;It was also an eyes opener for me as well to see that there are many new things about React that I didn't know or haven't seen before. One of them was the technique that is used to sync the state of UI with the &lt;code&gt;URL&lt;/code&gt;. Well, it is fairly just a technique, but before I've had seen it, I didn't think of having to do so at all. That's why it surprised me. Another one was the usage of &lt;code&gt;useMemo&lt;/code&gt;. I did read about it and also quite understand about it, but since most of the projects that I were working on by myself are quite small, I didn't think of optimizing the performance much at all &lt;strong&gt;from the start&lt;/strong&gt;. That is why I didn't really utilize the usage of &lt;code&gt;useMemo&lt;/code&gt; at all.&lt;/p&gt;

&lt;p&gt;Furthermore, I also got the chance to get used to creating &lt;code&gt;Pull Request&lt;/code&gt; and &lt;code&gt;Issues&lt;/code&gt; on GitHub as well. Since most of the communication was done within GitHub, I was able to train myself to write more &lt;code&gt;Docs&lt;/code&gt; and &lt;code&gt;Discussion&lt;/code&gt; on the platform as well.&lt;/p&gt;

&lt;h2&gt;
  
  
  Current
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Finding my first fulltime job&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As I am going to graduate in &lt;strong&gt;March 2021&lt;/strong&gt; and I want to become a fulltime &lt;strong&gt;Frontend Developer (or Software Developer)&lt;/strong&gt;, I am actively applying and searching for a job right now. Since I plan to live in &lt;strong&gt;Japan&lt;/strong&gt; for at least a couple of years after my graduation, it would be nice to get the job in Japan. However, I am also open to negotiation with any offers, so do not hesitate to ping me up 😄.&lt;/p&gt;

&lt;p&gt;Besides finding the job, I think it is really the &lt;strong&gt;time&lt;/strong&gt; for me to get myself &lt;strong&gt;giving&lt;/strong&gt; back to the community of developers where I have been learning from all this time. I plan to regularly write &lt;strong&gt;blog post&lt;/strong&gt; about what I have learned, especially &lt;strong&gt;React/Frontend Dev&lt;/strong&gt;. Also, I am looking forward to giving myself the time to make some &lt;strong&gt;video tutorials&lt;/strong&gt; as well. So please keep an eye on my &lt;a href="https://twitter.com/TepyThai" rel="noopener"&gt;twitter&lt;/a&gt; as well.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ending thought
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Keep on learning&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;First of all if you read this far, thanks for reading. This is my very first blog post so I hope you enjoy it.&lt;/p&gt;

&lt;p&gt;I have come all the way to what I am now by &lt;strong&gt;mostly&lt;/strong&gt; learn everything &lt;strong&gt;online&lt;/strong&gt;. And after coming to the &lt;strong&gt;web&lt;/strong&gt; world, I became really curious about learning all these &lt;strong&gt;cutting edge&lt;/strong&gt; stuffs that are progressively being created as I am writing this post. So I really look forward to checking out more stuffs and &lt;strong&gt;possibly teach&lt;/strong&gt; people back about what I learn along the way.&lt;/p&gt;

&lt;p&gt;Again, thanks for reading this.&lt;/p&gt;

</description>
      <category>react</category>
      <category>programmingjourney</category>
      <category>devstory</category>
      <category>frontend</category>
    </item>
  </channel>
</rss>
