<?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:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Teko Engineering Blog]]></title><description><![CDATA[Teko Engineering insights on AI, web technologies, and modern software development  Sharing technical knowledge and experiences from Teko's engineering team]]></description><link>https://engineering.teko.vn/</link><image><url>https://engineering.teko.vn/favicon.png</url><title>Teko Engineering Blog</title><link>https://engineering.teko.vn/</link></image><generator>Ghost 3.16</generator><lastBuildDate>Sat, 25 Apr 2026 12:27:10 GMT</lastBuildDate><atom:link href="https://engineering.teko.vn/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Coding interviews: Everything you need to prepare]]></title><description><![CDATA[<p></p><h3 id="why-coding-interviews">Why Coding Interviews?</h3><p>Most of your time as a software engineer will probably be spent coding or reviewing code, so it is important that we see how well you can do it during the interview process. In addition to assessing your coding skill, coding interviews also let us see what</p>]]></description><link>https://engineering.teko.vn/coding-interview/</link><guid isPermaLink="false">5fbdd2d6d39f150019aecab9</guid><dc:creator><![CDATA[Vu Lan Phuong]]></dc:creator><pubDate>Mon, 18 Jul 2022 04:14:09 GMT</pubDate><media:content url="https://storage.googleapis.com/teko-home/blog/1--1--2.png" medium="image"/><content:encoded><![CDATA[<img src="https://storage.googleapis.com/teko-home/blog/1--1--2.png" alt="Coding interviews: Everything you need to prepare"><p></p><h3 id="why-coding-interviews">Why Coding Interviews?</h3><p>Most of your time as a software engineer will probably be spent coding or reviewing code, so it is important that we see how well you can do it during the interview process. In addition to assessing your coding skill, coding interviews also let us see what it is like to collaborate with you on a difficult problem.</p><h3 id="with-a-coding-question-what-are-interviewers-trying-to-judge-in-a-candidate">With a coding question, what are interviewers trying to judge in a candidate?</h3><p>Through a coding question, the interviewer is judging three main things: critical thinking, attention to detail, and working attitude.</p><p><strong>Critical thinking</strong></p><ul><li>The most challenging part of software engineering is solving difficult problems. In an interview, we do not have the time to partner with you to solve one of our company’s real-world problems. The next closest thing is to solve a difficult problem with you. Therefore, most coding interviews will include a difficult algorithmic component to assess how you solve challenging problems.</li></ul><p><strong>Attention to detail</strong></p><ul><li>In coding, a single mistyped character can break a program in many ways. Having you actually write code during an interview lets us see how well you do this, including how well you are able to review and correct your own mistakes.</li></ul><p><strong>Working attitude</strong></p><ul><li>Nobody likes to work with people with a bad attitude or incompatible culture. During the process of the interview, while working through a difficult problem and while pointing out mistakes or issues in your thinking/solution, we see how you respond and interact with the interviewer. This helps us assess what kind of peer you would be like to work with.</li></ul><h3 id="what-can-candidates-do-to-prepare-for-interviews">What can candidates do to prepare for interviews?</h3><p>As with any kind of test, there are test-specific preparations you should make, but more importantly are the broader learnings you should engage in to push your career to the next level. There are many books / sites dedicated to this topic, but here are some of our recommendations:</p><p><strong>Interview-specific skills</strong></p><ul><li><strong>Practice interviewing</strong>: Do coding interviews on a whiteboard with your friends first, then acquaintances that you do not know that well, and even strangers if you can! This will help you practice solving a problem with a stranger and explaining your thoughts out loud.</li><li><strong>Write code by hand:</strong> Some IDEs write a huge portion of code for you, but there are environments/languages where these IDEs can’t be used. We prefer hiring people that can code without any support.</li><li><strong>Write code on a whiteboard:</strong> You only need to do this once or twice to figure this out. Don’t let the interview be your first experience doing this.</li></ul><p><strong>Job skills</strong></p><p>Learn <strong>how</strong> to think about algorithms:</p><ul><li>Most candidates should have done a lot of this during school.</li><li>Websites like geeksforgeeks or leetcode or hackerrank, etc. are all excellent resources for practicing algorithms.</li><li>During your work, you usually won’t have a beautifully stated dynamic programming question to solve, but the concepts of caching, precomputing, and removing redundant work will come up constantly.</li></ul><p>Focus on <strong>how</strong> you figure out these algorithms from first principles</p><ul><li>Do not just memorize the questions/solutions you see.</li><li>We will not proceed with a question if we suspect you’ve seen it before (it’s quite easy to tell when this happens), so it’s not useful to memorize algorithm questions.</li></ul>]]></content:encoded></item><item><title><![CDATA[Front-end Engineer - Myths and Facts]]></title><description><![CDATA[Front-end engineers, what the job looks like, what's your responsibilities, skills and also some facts that you have to face when being a Front-end engineer]]></description><link>https://engineering.teko.vn/front-end-engineer-myths-and-facts/</link><guid isPermaLink="false">6153e306e039fb001af9cbf9</guid><category><![CDATA[Front-End Development]]></category><dc:creator><![CDATA[Văn Linh]]></dc:creator><pubDate>Wed, 29 Sep 2021 04:36:53 GMT</pubDate><media:content url="https://storage.googleapis.com/teko-home/blog/Image-from-iOS--12-.png" medium="image"/><content:encoded><![CDATA[<img src="https://storage.googleapis.com/teko-home/blog/Image-from-iOS--12-.png" alt="Front-end Engineer - Myths and Facts"><p>A bit about Front-end engineers, what the job looks like, what's your responsibilities, skills and also some facts, some challenges that you have to face when being a Front-end engineer.</p><p>Hi, this is <strong>Văn Linh</strong> from the Seller Center team, Teko Vietnam.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://storage.googleapis.com/teko-home/blog/image-16.png" class="kg-image" alt="Front-end Engineer - Myths and Facts"><figcaption>It's very hard for Front-end engineers to satisfy the customers</figcaption></figure><h2 id="is-it-worth-being-a-front-end-engineer">Is it worth being a Front-end engineer?</h2><p>Some of you must have thought that Front-end is just a simple job which is easy to achieve, the work just revolves around doing the UI for an application. For example: you only have to cut the HTML, use CSS for styling some buttons, images... of the page, and include some JavaScript codes for the functionality. That's all, sounds easy? 😎</p><p>Let me tell you a story, it might upset you but it's a truth, a true story which happened at a company in Vietnam. I will call it company X - of course this company is not Teko 😁</p><p>There's a man, he led a Back-end team in company X. There's a member in his team who made mistakes frequently and made him very unhappy. One day, he couldn't take it anymore and told that member: "If you make mistakes more and more, contact HR to see if the Front-end team has slots and join it instead". Of course, we all thought it was a joke from that guy. However, he repeated his bad thought about Front-end many times, even he organized games for his team and told other members: "Who win can code Back-end, who lose will have to code Front-end instead". The CTO of company X always troll him by telling him: "Can you code CSS?" 🙂</p><p>So, is Front-end job really as cheap as the TL from company X thinks? Is it worth being a Front-end engineer? 🤔</p><h2 id="myths-and-facts">Myths and Facts</h2><p>I will go through a few examples about something that <strong>you might think it's good but it's really not</strong>, also the facts that Front-end engineers have to face, and how are these things being applied in Teko. You will know what is the real job of a Front-end engineer. It's not as simple as you think, but it's not too complicated 😉</p><p>Front-end is <strong>not</strong> a job which you have to do in a stereotypical way, but you should work in a flexible way instead. To be a strong Front-end engineer, you will need not only to own the Front-end skills, but also to show your creativity, thinking, responsibility and even art in work.</p><h3 id="myth-1-it-s-good-to-design-features-with-complex-logic"><strong>Myth #1: It's good to design features with complex logic</strong></h3><p><strong>Situation:</strong> Your boss defines 10 features for a screen with complex logic. He defines the requirement very clearly with a very high confidence and gives it to you 😎 Your job is to develop a screen that can meet most requirements.</p><p><strong>Fact:</strong> After you deploy this screen on production for a while, you, your team and your boss realize that end-users only use <strong>1 out of 10</strong> features that's been well-defined 😞 LOL, why?</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://storage.googleapis.com/teko-home/blog/image-21.png" class="kg-image" alt="Front-end Engineer - Myths and Facts"><figcaption>Users never use things they don't like even you build a lot</figcaption></figure><p>You must remember a very important principle when designing/developing Front-end features: <strong>what users think is not really what you think</strong>. You can build a very big feature that contains complex logic and you are very clear with the logic of this feature. However, users might not know how to use it, or the UX is really bad that makes them very confused, they feel that they receive zero-value when using your feature. That's why they get rid of using your feature, and they will give a lot of feedback for you/your team with an uncomfortable mood.</p><p>💡 <strong>Lessons learned</strong></p><ul><li><strong>Think about MVP (Minimum Viable Product) first</strong>. Build as simple as possible with enough features to serve customers quickly 👍</li><li>Remember <a href="https://en.wikipedia.org/wiki/Pareto_principle" rel="nofollow">Pareto Principle</a> which states that <strong>20% of efforts bring 80% of results, and the other 80% of efforts bring only 20% of results.</strong></li></ul><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://storage.googleapis.com/teko-home/blog/image-17.png" class="kg-image" alt="Front-end Engineer - Myths and Facts"><figcaption>Pareto Principle</figcaption></figure><ul><li><strong>Tracking is very important ⭐ </strong>Everything you did should have a logging/tracking system. This will help you to trace error logs to optimize app performance, trace user behaviour to optimize app's UI/UX, functionality and more.</li></ul><p><strong>🚀 How do we apply these lessons in Teko?</strong></p><ul><li>A lot of features have been done in MVP version to onboard quickly.</li><li>When brainstorming a feature, we cut off a lot of useless functions that can bring zero-value to customers.</li><li>Using <a href="https://guide.stag.teko.vn/tracking/js/" rel="nofollow">tracker-js</a> to trace all user behaviour and API-integration error logs to optimize app performance and UI/UX.</li><li>Using <a href="https://developers.google.com/analytics" rel="nofollow">Google Analytics</a>, <a href="https://www.facebook.com/business/learn/facebook-ads-pixel" rel="nofollow">Facebook pixel</a> for tracking ecommerce events, conversion rate, revenue... to optimize SEO, marketing strategies, advertising campaigns... for ecommerce apps.</li></ul><h3 id="myth-2-it-s-easy-to-build-features-to-meet-the-ui-ux-design"><strong>Myth #2: It's easy to build features to meet the UI/UX design</strong></h3><p><strong>Situation: </strong>Your PO/designer gives you a wireframe for a feature that acts A and he expects that you build this feature to exactly act A.</p><p><strong>Fact:</strong> You build this feature that acts B which has a different UX behaviour than A, or the feature is not really worked as expected from the PO 💔</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://storage.googleapis.com/teko-home/blog/image-20.png" class="kg-image" alt="Front-end Engineer - Myths and Facts"><figcaption>Build a thing that doesn't match the design</figcaption></figure><p>This is very normal and usually happens in many projects. There are many reasons why this case happens such as missing requirements, the wireframe is not clear and does not cover all cases, the Front-end developers build the feature according to their own understanding without raising any problems...</p><p>The drafted wireframe from PO/designer is only their overall thinking of a screen/feature. Of course, they cannot figure out all the cases (especially the corner cases) for you at the beginning, because they're not the person who implements the feature, but you are. When you build the feature, you will directly experience the user behaviour and find out there will be a lot of questions that need to be answered. That's why I say <strong>"Front-end engineers should work in a flexible way"</strong>.</p><p>💡 <strong>Lessons learned</strong></p><ul><li>Do not hesitate to <strong>ask as many questions as possible</strong> when receiving a wireframe. It will take your time at the beginning, but it will save much more time/effort later on, trust me 😉</li><li>The requirements can be unexpectedly changed at any time, and you will need to face this instead of running away.</li><li>As an engineer, you will have the right to raise any problems that you find unreasonable, or reject any nonsense requirements from the PO. If you can, show your UI/UX design skill and modify the wireframe or requirement to make the feature better that can bring a good user experience and more business value. So <strong>please be proactive </strong>!!! ⭐</li></ul><p><strong>🚀 How do we apply these lessons in Teko?</strong></p><ul><li>Increasing time for the design phase to clear all problems about UI/UX design, business, API documentation... to make sure the coding phase is clear and not to be reworked too much.</li><li>Front-end engineers are more proactive on raising problem when receiving a wireframe or an API documentation.</li></ul><h3 id="myth-3-it-s-easy-to-build-shareable-components-for-team"><strong>Myth #3: It's easy to build shareable components for team </strong></h3><p><strong>Situation: </strong>You build a shared component for everyone in your team to reuse in some screens and you expect that everyone will use your component 😍</p><p><strong>Fact:</strong> No one uses your component 😢 they build the component in their own way and duplicate this component in many variations.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://storage.googleapis.com/teko-home/blog/image-19.png" class="kg-image" alt="Front-end Engineer - Myths and Facts"><figcaption>Each member builds a thing in their own way and it causes confusing</figcaption></figure><p>There is one thing you will obviously know and I don't need to tell you: the code will be very messy and hard-maintained in this case.</p><p>For example: you build a component <code>Price</code> to format price currency. However, member A builds another component <code>PriceLabel</code> to format currency too, with a little difference in logic. In addition, member B also builds another component <code>PriceInfo</code> to format currency with other logic... When a new member joins the team, he will see at least 3 components that do the same functionality and a big question comes to his mind: "Which one should I use now?"</p><p>If the team scales more and more, it will be much more difficult to manage the code. Therefore, code management, responsibility, commitment and the initiative at work are very important.</p><p>💡 <strong>Lessons learned</strong></p><ul><li><strong>Document your components clearly</strong>. You might want to use the UI component explorer for better management (eg: <a href="https://storybook.js.org/" rel="nofollow">Storybook</a>, <a href="https://react-styleguidist.js.org/" rel="nofollow">Styleguidist</a>...), everyone will use it as the component documentation of the team.</li><li>The TL should backup code for the team, ensure the code quality and the review-code process to make sure the code is clean and clear.</li><li>Everyone should have the responsibility when building/contributing to any shared components, and follow the coding convention of the team.</li></ul><p><strong>🚀 How do we apply these lessons in Teko?</strong></p><ul><li>The consumer-app project: monorepo teko-web which defines shared components to reuse across many sites.</li><li>The staff - back office project: monorepo staff-interface which defines a shared design system, layout and sidebar menu for a large system that includes many modules such as product, price &amp; promotion, page builder, purchasing, warehouse, logistic...</li><li>Storybook for the shared components used in consumer-app, staff - back office, design system (eg: <a href="https://design.teko.vn/" rel="nofollow">https://design.teko.vn</a>)...</li></ul><h2 id="conclusion">Conclusion</h2><p>The above Myths &amp; Facts are just a few practical examples. There will be many other situations that you will meet when you work as a Front-end engineer. Being a Front-end engineer, you will learn how to satisfy the customers who directly use your products, although it's very very hard to do. You will make mistakes, sometimes you will feel bored with your work, but the more you fail and recover and improve, the more mature you become. </p><p>Front-end has a lot of things for you to learn, to grow in both technical and soft skills. Therefore, do not hesitate to be a Front-end engineer if you want 😄</p>]]></content:encoded></item><item><title><![CDATA[Hướng dẫn viết CV “cực xịn” dành cho ứng viên IT]]></title><description><![CDATA[<h3 id="chu-n-b-m-t-chi-c-cv-x-n-x-l-b-c-quan-tr-ng-u-ti-n-trong-vi-c-ng-tuy-n-c-c-m-u-cv-p-c-c-h-ng-d-n-vi-t-cv-chung-chung-c-th-t-m-th-y-kh-p-n-i-tr-n-m-ng-ch-b-ng-1-c-nh-p-chu-t-v-v-y-b-i-vi-t-n-y-s-ch-t-p-trung-v-o-vi-c-l-m-th-n-o-tr-nh-b-y-cv-c-a-b-n-ng-n-g-n-m-v-n-hi-u-qu-v-g-y-n-t-ng-nha-">Chuẩn bị một chiếc CV “xịn xò” là bước quan trọng đầu tiên trong việc ứng tuyển. Các mẫu CV đẹp, các hướng dẫn viết CV chung chung có thể tìm thấy ở khắp nơi trên mạng chỉ bằng 1 cú nhấp chuột. Vì vậy bài viết này sẽ chỉ</h3>]]></description><link>https://engineering.teko.vn/huong-dan-viet-cv-cuc-xin-danh-cho-ung-vien-it/</link><guid isPermaLink="false">5fbdce7cd39f150019aeca68</guid><dc:creator><![CDATA[Recruitment Team]]></dc:creator><pubDate>Wed, 25 Nov 2020 04:35:12 GMT</pubDate><media:content url="https://storage.googleapis.com/teko-home/blog/B-i---ng-Instagram-Hoa-Tr-ch-d-n-M-u-cam.png" medium="image"/><content:encoded><![CDATA[<h3 id="chu-n-b-m-t-chi-c-cv-x-n-x-l-b-c-quan-tr-ng-u-ti-n-trong-vi-c-ng-tuy-n-c-c-m-u-cv-p-c-c-h-ng-d-n-vi-t-cv-chung-chung-c-th-t-m-th-y-kh-p-n-i-tr-n-m-ng-ch-b-ng-1-c-nh-p-chu-t-v-v-y-b-i-vi-t-n-y-s-ch-t-p-trung-v-o-vi-c-l-m-th-n-o-tr-nh-b-y-cv-c-a-b-n-ng-n-g-n-m-v-n-hi-u-qu-v-g-y-n-t-ng-nha-">Chuẩn bị một chiếc CV “xịn xò” là bước quan trọng đầu tiên trong việc ứng tuyển. Các mẫu CV đẹp, các hướng dẫn viết CV chung chung có thể tìm thấy ở khắp nơi trên mạng chỉ bằng 1 cú nhấp chuột. Vì vậy bài viết này sẽ chỉ tập trung vào việc làm thế nào để trình bày CV của bạn ngắn gọn, đủ ý mà vẫn hiệu quả và gây ấn tượng nha!</h3><hr><h3 id="1-v-c-c-th-ng-tin-chung-">1. Về các thông tin chung:</h3><img src="https://storage.googleapis.com/teko-home/blog/B-i---ng-Instagram-Hoa-Tr-ch-d-n-M-u-cam.png" alt="Hướng dẫn viết CV “cực xịn” dành cho ứng viên IT"><p>Một chiếc CV ngắn gọn và đủ ý nên được tóm lược trong 1-2 trang A4 ở định dạng PDF. CV của ứng viên trong ngành IT nên được viết bằng tiếng Anh và phải được kiểm tra lỗi chính tả một cách cẩn thận. </p><p><strong>Chú ý: </strong>Để nhà tuyển dụng có cái nhìn tổng quan về chủ nhân của chiếc CV, bạn có thể giới thiệu vắn tắt về bản thân trong khoảng 2-3 câu. Phần này sẽ trả lời những câu hỏi <strong>“bạn có kinh nghiệm trong lĩnh vực gì?” “mối quan tâm/định hướng của bạn là gì?”</strong>. Phần này không bắt buộc, tuy nhiên nó giúp bạn trả lời câu hỏi <strong>“Bạn là ai?”</strong> và biết đâu sẽ có những cơ hội công việc tìm đến phù hợp với những mối quan tâm của bạn.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://storage.googleapis.com/teko-home/blog/image-4.png" class="kg-image" alt="Hướng dẫn viết CV “cực xịn” dành cho ứng viên IT"><figcaption>Một phần tóm tắt chứa nhiều thông tin thú vị sẽ thu hút sự quan tâm của các nhà tuyển dụng</figcaption></figure><h3 id="2-th-ng-tin-c-nh-n-">2. Thông tin cá nhân:</h3><p>Phần này rất quan trọng với nhà tuyển dụng, tuy nhiên không nên dài dòng mà nên trình bày ngắn gọn, đủ ý thôi nhé! Ngoài ra nên có link Github, Linkedin hoặc website cá nhân với link ngắn hoặc dưới dạng link ẩn. </p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://storage.googleapis.com/teko-home/blog/image-6.png" class="kg-image" alt="Hướng dẫn viết CV “cực xịn” dành cho ứng viên IT"><figcaption>Github, Linkedin hoặc website sẽ giúp bạn thể hiện được những thông tin thú vị mà chưa có trên CV</figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://storage.googleapis.com/teko-home/blog/image-7.png" class="kg-image" alt="Hướng dẫn viết CV “cực xịn” dành cho ứng viên IT"><figcaption>Hoặc 2 dòng thông tin ngắn gọn giúp bạn tiết kiệm diện tích cho những phần thông tin khác</figcaption></figure><h3 id="3-h-c-v-n-">3. Học vấn:</h3><p>Ngoài những thông tin cơ bản như Tên trường, ngành học, thời gian bắt đầu – tốt nghiệp … thì những thông tin về GPA/học bổng/thành tích mà bạn đã đạt được sẽ là những thông tin gây ấn tượng tốt với nhà tuyển dụng. Nếu phần này không có gì nổi bật thì cũng không sao, hãy tập trung vào phần Kinh nghiệm làm việc nhé!</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://storage.googleapis.com/teko-home/blog/image-8.png" class="kg-image" alt="Hướng dẫn viết CV “cực xịn” dành cho ứng viên IT"><figcaption>Rất ngắn gọn và ấn tượng nhỉ!</figcaption></figure><h3 id="4-kinh-nghi-m-l-m-vi-c-">4. Kinh nghiệm làm việc:</h3><p>Nhà tuyển dụng thường quan tâm đến những kinh nghiệm mà bạn đã làm trong khoảng 5-7 năm gần nhất. Nếu bạn có nhiều năm kinh nghiệm hơn, có thể tóm lược thông tin dưới dạng “vị trí mà bạn đảm nhiệm – thời gian làm việc – công ty mà bạn làm – tóm lược về công việc bạn đã làm” trong 1-2 dòng.</p><p>Thông tin ở phần Kinh nghiệm làm việc nên được sắp xếp <strong>theo thứ tự thời gian đảo ngược</strong>, tức là những công việc gần nhất nên được đưa lên đầu tiên. Ở mỗi công việc nên có đủ thông tin về Vị trí, Tên công ty, Thời gian làm việc tại công ty (tháng, năm), Mô tả những công việc bạn đã làm và kết quả đạt được.</p><p><strong>Chú ý:</strong> Phần mô tả công việc nên được viết bằng những câu ngắn, chỉ rõ rằng <strong>“bạn đã làm gì” “bằng cách nào” “kết quả như thế nào”</strong>. Ví dụ: </p><blockquote>Redesigned and rebuilt the core of the platform by using gRPC, improved speed by more than two-fold and reduced memory-usage by almost 4 times.</blockquote><h3 id="5-k-n-ng-">5. Kỹ năng:</h3><p>Một phần nữa mà các nhà tuyển dụng đặc biệt chú ý là phần Kỹ năng. Để ngắn gọn và hiệu quả, hãy liệt kê các thông tin theo thứ tự các kỹ năng bạn thành thạo nhất đến ít thành thạo hơn. Không cần tốn thời gian làm bảng biểu, đánh giá từ 1 đến 5 sao vì năng lực của bạn sẽ được kiểm chứng trong các bài test và buổi phỏng vấn.</p><figure class="kg-card kg-image-card"><img src="https://storage.googleapis.com/teko-home/blog/image-10.png" class="kg-image" alt="Hướng dẫn viết CV “cực xịn” dành cho ứng viên IT"></figure><figure class="kg-card kg-image-card"><img src="https://storage.googleapis.com/teko-home/blog/image-11.png" class="kg-image" alt="Hướng dẫn viết CV “cực xịn” dành cho ứng viên IT"></figure><h3 id="6-ch-ng-ch-gi-i-th-ng-">6. Chứng chỉ/Giải thưởng:</h3><p>Đây là phần highlight khiến CV của bạn nổi bật hơn. Nếu bạn có tham gia các cuộc thi coding, Hackathon hoặc những khóa học liên quan đến các kỹ năng công việc, đừng ngần ngại liệt kê chúng vào. Tuy nhiên đừng lạm dụng, hãy liệt kê 3-4 thông tin có giá trị nhất thôi nhé.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://storage.googleapis.com/teko-home/blog/image-15.png" class="kg-image" alt="Hướng dẫn viết CV “cực xịn” dành cho ứng viên IT"><figcaption>Nếu có 1 dòng để mô tả rõ hơn về cuộc thi/khóa học thì thật tuyệt!</figcaption></figure><h3 id="7-th-ng-tin-kh-c-">7. Thông tin khác:</h3><p>Nếu bạn có những dự án riêng hay ho (Personal Projects) hoặc dự án nổi bật tại công ty, bạn có thể liệt kê những dự án đó vào trang sau của CV hoặc liệt kê chi tiết trên Linkedin để nhà tuyển dụng tham khảo thêm nhé!</p><hr><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://storage.googleapis.com/teko-home/blog/CV_Software-Engineer_Mark-Nguyen.png" class="kg-image" alt="Hướng dẫn viết CV “cực xịn” dành cho ứng viên IT"><figcaption>Đây là 1 CV mẫu để bạn tham khảo, tuy nhiên vẫn có 1 lỗi nho nhỏ, bạn thử tìm xem nhé ^^</figcaption></figure><hr><h3 id="hi-v-ng-v-i-nh-ng-tips-n-u-tr-n-cv-c-a-b-n-s-d-d-ng-v-t-qua-c-c-v-ng-ki-m-duy-t-v-ghi-i-m-v-i-nh-tuy-n-d-ng-n-o-gi-th-h-y-b-t-tay-v-o-thi-t-k-1-chi-c-cv-th-t-x-n-x-v-g-i-cho-team-hr-c-a-teko-vietnam-th-i-n-o-">Hi vọng với những tips đã nêu ở trên, CV của bạn sẽ dễ dàng vượt qua các vòng kiểm duyệt và ghi điểm với nhà tuyển dụng. Nào, giờ thì hãy bắt tay vào “thiết kế” 1 chiếc CV thật xịn xò và gửi cho team HR của Teko Vietnam thôi nào!</h3>]]></content:encoded></item><item><title><![CDATA[Extracting common logic in FM webapp: a case study of React HOCs, render props, and hooks]]></title><description><![CDATA[HOC, render props, and hooks are all useful React patterns that will help refactor a code base, making logic in your apps more reusable. ]]></description><link>https://engineering.teko.vn/extracting-common-logic-in-fm-webapp-a-case-study-of-react-hocs-render-props-and-hooks-2/</link><guid isPermaLink="false">5ef32757a4a1900012ef129e</guid><category><![CDATA[Front-End Development]]></category><category><![CDATA[React Hooks]]></category><category><![CDATA[Tech Stack]]></category><dc:creator><![CDATA[Thoa Ta]]></dc:creator><pubDate>Sun, 05 Jan 2020 15:30:00 GMT</pubDate><content:encoded><![CDATA[<p>When coding, usually we start out with the simplest, most verbose way of writing code. While it's better to identify common logic early on and write reusable abstractions for it, sometimes we just have to start simple and refactor later. In this article, I use a small refactoring in one of Teko ERP modules to introduce us to three React patterns.</p><p><em>Hi, I'm Thoa, a developer in the Finance Management team based in HCMC. I joined Teko Vietnam late February 2019 and have been working on the web front-end for the ERP Finance module since then.</em></p><h1 id="introduction">Introduction</h1><ul><li><strong>What is FM webapp?</strong> The web front-end to display and interact with data from the Finance Management micro-service (FM). Built on <a href="https://reactjs.org">React</a>.</li><li><strong>What are HOCs?</strong> A higher-order component (HOC) is a function that takes a component and returns a new component, usually with added props. HOCs usually have the signature <code>withX</code>, for example, <code>withStyles</code> (material-ui v1), <code>withRouter</code> (react-router).</li><li><strong>What are render props?</strong> A render prop is a function prop that a component uses to know what to render. It’s similar to a <code>children</code> prop (or the <a href="https://daveceddia.com/pluggable-slots-in-react-components">slot pattern</a>), except that <code>children</code> normally contains DOM nodes, while <code>render</code> tends to mean a function.</li><li><strong>What are hooks?</strong> Hooks are a new addition in React 16.8 (<a href="https://reactjs.org/blog/2019/02/06/react-v16.8.0.html">February 2019</a>). They let you use state and other React features without writing a class. By convention, they have this signature <code>useX</code>, for example, <code>useState</code>, <code>useEffect</code>, <code>useContext</code>, <code>useRef</code>.</li></ul><h1 id="our-case-study">Our case study</h1><ul><li><strong>The need</strong>: FM logic defines enum sets such as object types, account types, sellers, voucher types. The webapp doesn’t store these values. Instead, it fetches from the API <code>/enums/something</code> whenever it needs to display a drop-down, or map a code to a label.</li></ul><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://lh6.googleusercontent.com/2xmfpdchPW7G0_HTKnk-gfrCUFb_f_ilZQ8Hsy9mwmeKE0kxD83u1AhmFCI8EmSrx9Om8Y2XPuom6N_xyA-vSfGn4_JFbKpWKSjXlt6u6KRn3qtVRUE8Yb3t9DRIX40dtTokllBk" class="kg-image"><figcaption>Values for these drop-downs come from APIs like /enums/object-type</figcaption></figure><ul><li><strong>The problem</strong>: Code repetition (currently: 11 files). See the screenshot below.</li></ul><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://lh3.googleusercontent.com/cMq4qh22SBeC54ULPJCg8EnOIKaJwP4tF2ib6G4ZAELyb9bS-iD_ruYMQxY3TdPD2MX3984QGq187xc7J7ZyCL6CcMj9BTx8MPavbgUKo_8VKqfbvN8bb-FuTGL4jRiN2OHQPyTn" class="kg-image" alt="16 results in 11 files" title="Repetition of enum API requests"><figcaption>Code repetition when calling the API for each component individually</figcaption></figure><ul><li><strong>The requirement</strong>: Extract this fetching logic to a reusable function or component.</li></ul><h1 id="comparing-the-three-approaches">Comparing the three approaches</h1><p><em>Heads-up: Don’t try to read the code. Just quickly scan for readability.</em></p><h2 id="the-base">The base</h2><figure class="kg-card kg-image-card kg-width-full kg-card-hascaption"><img src="https://lh5.googleusercontent.com/dQXONR1O1uQzqcYUPGEjxJvwF1qoqrzvkQy8fTj1EZ3f8kUl3_nHU6gQ5EHu7dF9hQYf8bJxsoo1hLNOZB9KzJ2taI8qvZDZ_bbf2RJ2tusrr8LGWotU9hnSvYI3MDPYZf9RT2LF" class="kg-image"><figcaption>At a glance: three approaches for building the base component</figcaption></figure><p>There's not much difference among these three functional components. They all do the same things:</p><ul><li>hold three local state variables: <code>loading</code>, <code>choices</code>, <code>error</code></li><li>on mount: call API <code>/enums/something</code></li><li>pass the <code>loading</code>, <code>choices</code>, and <code>error</code> values to the consumer.</li></ul><h2 id="the-consumer">The consumer</h2><p><em>Note: in the screenshots below, the rendering code was intentionally left out to focus on the shared logic.</em></p><h3 id="challenge-level-1-the-consumer-needs-one-enum-set-">Challenge level 1: The consumer needs one enum set.</h3><figure class="kg-card kg-image-card kg-width-full kg-card-hascaption"><img src="https://lh4.googleusercontent.com/6uR_c0D_S1NBGMAF1sTvzVFH844U7TT6BNBqnJp4_H9PtoR3d7E89Gwngap7voFHdIhYzcqH99bMPKbiwRYBKTFScmNtkMtc0XuMzjjt6LlRF08DrTTF0plNgZ4N5M5trPpvHNRx" class="kg-image"><figcaption>At a glance: the three corresponding consumers</figcaption></figure><p>Any option looks fine.</p><h3 id="challenge-level-2-the-consumer-needs-multiple-enum-sets-">Challenge level 2: The consumer needs multiple enum sets.</h3><figure class="kg-card kg-image-card kg-width-full kg-card-hascaption"><img src="https://lh5.googleusercontent.com/NS19xGuNJOj4skj83B-UEUC74WH2YmaERkpcf9-3wXYNU1DjwwcbN5u3aUnM8ILfmws64qCpVDXqsJSAFgdmJn9NOrCJhhWL5SzSLwL26eQUXDxbRTgnLbBF5RKEJdZ2s4EMN-qK" class="kg-image"><figcaption>At a glance: the three corresponding consumers, when needing multiple enum sets</figcaption></figure><p>Look closer at each approach and what do we see?</p><p><strong>HOC:</strong></p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://lh6.googleusercontent.com/_pfIGwfne4TgIzJlSB02wvUGhJ_B6qMcf2Vpg3A0DrsOMLWFimHwpOgpnTaNHnJP2qNfLgMhex_gt6VFhXjoflerVrF5INGRqSIxCbKIZnQ9onP6OxXX6i0EJD754Ps9-JoEeWO1" class="kg-image"><figcaption>Consumer of the HOC approach</figcaption></figure><ul><li>Unclear which props come from which HOCs 🤔</li><li>Props naming collisions 🚗</li></ul><p><strong>Render props:</strong></p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://lh3.googleusercontent.com/XzWJY27mzm6MIjh_-gktwQ6340waBuTiEeVpcIjafovvGCgb60AiIkhHMojS4lRUUHBUU3RtQxoWNpLydWiAEQcL1k8ujRWf7atNNTFQxmbIdrBK90ocGsCKISBqNTeMl5hp-rP2" class="kg-image"><figcaption>Consumer of the render props approach</figcaption></figure><ul><li>Nesting hell, difficult to read and comprehend 😵</li><li>Too many inline functions, which could affect performance 🐌</li></ul><p><strong>Custom hooks:</strong></p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://lh4.googleusercontent.com/Qd8K_cQCs71kTiSZEuyJ2AhSXmLJU4d8z7YfmbLfi4yxCGhJwC7d8eEUoK8py4aaXvEfVHLGolnKIlPUZKrnKQruEziOHtmn7-s3S2HZTn4-7cV7m2rHWEjdQpG8MijPj2ZaF_pI" class="kg-image"><figcaption>Consumer of the custom hook</figcaption></figure><ul><li>It’s clear which attributes come from which hooks 🧐</li><li>Can use multiple hooks without fear of naming collisions 🦺</li></ul><h1 id="conclusion">Conclusion</h1><p>HOC, render props, and hooks are all useful React patterns that will help refactor a code base, making logic in your apps more reusable. <strong>HOCs</strong> are still in use, although several developers in the React community advise against it (<a href="https://github.com/mjackson">Michael Jackson</a> from <a href="https://github.com/ReactTraining">ReactTraining</a> is one of such vocal advocates). <strong>Render props</strong> are one step better. Particularly with its inline-style, this pattern makes composing simple JSX tags short and sweet, improving readability. However, as we’ve seen in the example above, this pattern can become an anti-pattern if it results in too deep nesting. Since <a href="https://reactjs.org/blog/2019/02/06/react-v16.8.0.html">React 16.8</a> and <a href="https://facebook.github.io/react-native/blog/2019/03/12/releasing-react-native-059">React Native 0.59</a>, <strong>hooks</strong> entered the scene and as shown above, they can mitigate certain drawbacks of the other two patterns, such as wrapper hell and naming collisions.</p><ul><li><strong>Do I need to rewrite all my HOCs and render props components using hooks now?</strong> No, I don’t think so. The patterns should be at your mercy, not you being a slave to them. Therefore, if the existing patterns already solve your needs, let them be. Learning about patterns is just for you to have more options next time.</li></ul><h1 id="references">References</h1><ul><li>[Docs] <a href="https://reactjs.org/docs/higher-order-components.html">Higher-Order Components - React</a></li><li>[Docs] <a href="https://reactjs.org/docs/render-props.html">Render Props - React</a></li><li>[Docs] Motivation for hooks: “<a href="https://reactjs.org/docs/hooks-intro.html#its-hard-to-reuse-stateful-logic-between-components">It’s hard to reuse stateful logic between components</a>”</li><li>[Docs] <a href="https://reactjs.org/docs/hooks-custom.html">Building Your Own Hooks – React</a></li><li>Render props over HOCs: <a href="https://youtu.be/BcVAq3YFiuc">speech</a> and <a href="https://cdb.reacttraining.com/use-a-render-prop-50de598f11ce">article</a> by Michael Jackson</li><li>Hooks over render props: <a href="https://youtu.be/35Xi8ssyfMk">tutorial</a> by Better Coding Academy</li></ul>]]></content:encoded></item></channel></rss>