<?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" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ WeChat - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ WeChat - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Sat, 25 Jul 2026 22:29:19 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/wechat/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How non-Chinese developers can leverage WeChat’s 1.1B monthly active users ]]>
                </title>
                <description>
                    <![CDATA[ By William Kwan Over a million WeChat Mini-Programs have been published since the platform launched two years ago. By comparison, it took the App Store a decade to reach two million apps. The average WeChat user spends 66 minutes a day on WeChat. Min... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-non-chinese-developers-can-leverage-wechats-1-1b-monthly-active-users-285083836bb9/</link>
                <guid isPermaLink="false">66c34e93465d1b2f886ba40b</guid>
                
                    <category>
                        <![CDATA[ china ]]>
                    </category>
                
                    <category>
                        <![CDATA[ mobile app development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ General Programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tech  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ WeChat ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Thu, 14 Feb 2019 17:24:26 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*-YhMcu5J_3HtuxLOJOJgWg.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By William Kwan</p>
<p>Over a million WeChat Mini-Programs have been published since the platform launched two years ago. By comparison, it took the App Store a decade to reach two million apps.</p>
<p>The average WeChat user spends <strong>66 minutes a day on WeChat</strong>. Mini-Programs emulate the experience of a lightweight mobile app, without requiring the user to leave WeChat or wait for a long download. This expedites onboarding, both online (Mini-Programs are predominantly accessed through social sharing) and offline (typically done through QR codes).</p>
<p>This idea that you can get more users by circumventing the download process has been thrown around in the Western tech scene. Around the same time the Mini-Program platform launched, we rode the hype train for Messenger Chatbots. Android Instant found a few niche use cases, but never caught on.</p>
<p>As a Canadian software developer with Chinese heritage, I don’t think we should adopt this all-in-one user experience over here. Mobile-optimized websites and native mobile apps already cover all the important use cases.</p>
<p>But in China, WeChat has been the monolithic app for everything years before there were Mini-Programs. Everything from hailing a cab to paying for a meal, to connecting with nearby strangers is done from WeChat. Mini-Programs are the natural evolution, creating a semi-open platform in a country where the government has historically blocked foreign competitors.</p>
<p>Iconic Western brands in China have already started switching from native apps to Mini-Programs. Fast food chains like McDonald’s and KFC let you order food and claim coupons in their Mini-Program. Luxury brands like <a target="_blank" href="https://jingdaily.com/burberry-wechat-mini-program/">Gucci and Burberry are creating games and promotions</a> to market their products.</p>
<p>Many Mini-Programs are built to complement local Chinese businesses such as stores, restaurants, and hotels. For technology-focused Mini-Programs, games are leading category. Several game engines offer Mini-Program support, including <a target="_blank" href="https://docs.cocos.com/creator/manual/en/publish/publish-wechatgame.html">Cocos</a>.</p>
<p>But the platform is also a breeding ground for tech startups. The most notable is Pinduoduo, the group buying app which went public in the US in July 2018 with a $23.8B valuation and is currently seeking to raise another $1.5B just six months later.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*nzQ2FFx8FyU8Aw05lup4ZQ.png" alt="Image" width="682" height="342" loading="lazy">
<em>Image credit: GGV Capital</em></p>
<p>I’ve been working on a Mini-Program lately, and since I never learned how to read Chinese (despite a childhood of my parents’ bickering), overcoming the language and cultural barriers are really difficult. Not only is much of WeChat’s documentation Chinese-only, but Chinese software has different standards for the user experience. Simply translating an app intended for the Western market doesn’t work.</p>
<p>Furthermore, there are technical challenges involved:</p>
<ul>
<li>Mini-Programs are limited to 10 MB in size to ensure fast download</li>
<li>Hardware access is limited to what WeChat provides through their API (notably, you can’t use NFC)</li>
<li>Links to websites aren’t allowed (Tencent wants users on WeChat, and WeChat only)</li>
</ul>
<p>In spite of the obstacles, this opportunity is too large to ignore. The Chinese are the world’s most active social media users, and they already love high-quality Western products, similar to how we admire Japanese manufacturing. “Made in China” is an ironically bad way to promote a product in China. Western tech startups could use this to their advantage, but almost none of them are adopting a China-first strategy.</p>
<p>If you want to be one of the few courageous developers to give the Chinese market a shot, I made this tutorial to teach you how to make your first Mini-Program. If you’re familiar with full stack JavaScript web development, you’ll pick up the tech stack quickly. It consists of a JavaScript client and server, a modified version of HTML/CSS, and a JSON database.</p>
<p>If you found the tutorial helpful, I’d love to create more content like this and build a community for English-speaking WeChat developers. Feel free to ask any WeChat development questions in the comments and I’ll try my best to help you out!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ These common mistakes will lead to immortal bugs. Learn how to avoid them. ]]>
                </title>
                <description>
                    <![CDATA[ By David Yu Didn’t we already fix that? The question that you or your teammate would ask after the product manager posts a snapshot of the bug. This whole event feels like a Deja Vu. You try to retrace the time you fixed that bug in the commits, but ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/these-common-mistakes-will-lead-to-immortal-bugs-learn-how-to-avoid-them-eee79ee43cd5/</link>
                <guid isPermaLink="false">66c362f5020f8e9c31066e66</guid>
                
                    <category>
                        <![CDATA[ bugs ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Life Lesson ]]>
                    </category>
                
                    <category>
                        <![CDATA[ software development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ WeChat ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Tue, 13 Nov 2018 23:25:53 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/0*_tDOnN79K8WqoVD0" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By David Yu</p>
<p><strong><em>Didn’t we already fix that?</em></strong></p>
<p>The question that you or your teammate would ask after the product manager posts a snapshot of the bug.</p>
<p>This whole event feels like a Deja Vu. You try to retrace the time you fixed that bug in the commits, but what’s the point?</p>
<p>The reality is if you don’t get to the root cause of the bug, it will come back like the Hydra of Lerna.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/m8XUwZGMf2YTjk5zY2UhvOKC8qrJ2D5JEkIA" alt="Image" width="800" height="562" loading="lazy">
_Source: [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Hercules_and_the_Hydra_of_Lerna-_Hercules_grasps_his_club_with_both_hands_and_confronts_the_seven-headed_hydra,_from_the<em>series</em>%27The_Labors_of_Hercules%27_MET_DP832529.jpg" rel="noopener" target="<em>blank" title=")</em></p>
<p>Here are some patterns that lead to immortal bugs.</p>
<h3 id="heading-hardcoding-a-value">Hardcoding a value</h3>
<p>When we’re doing front-end development, we often use dummy data to build out the user interface quickly. That’s fine.</p>
<p>The problem is having dummy data at multiple locations. Then it’s easy to forget one or two when you push your code.</p>
<p>Here are some tips:</p>
<ul>
<li>Use a single variable for your dummy data and share it across different components</li>
<li>Write a comment like <code>// TODO: remove later</code> to allow easy search later</li>
<li>Don’t rely on backend data to always be the same</li>
</ul>
<pre><code><span class="hljs-comment">// ?</span>
</code></pre><pre><code>&lt;img src={<span class="hljs-built_in">require</span>(<span class="hljs-string">`./assets/<span class="hljs-subst">${backendData.fileName}</span>.png`</span>)} /&gt;
</code></pre><pre><code><span class="hljs-comment">// This will break if fileName is an unexpected string</span>
</code></pre><pre><code><span class="hljs-comment">// ?</span>
</code></pre><pre><code><span class="hljs-keyword">let</span> img;
</code></pre><pre><code><span class="hljs-keyword">try</span> {
</code></pre><pre><code>  img = <span class="hljs-built_in">require</span>(<span class="hljs-string">`./assets/<span class="hljs-subst">${backendData.fileName}</span>.png`</span>)
</code></pre><pre><code>} <span class="hljs-keyword">catch</span>(e) {  <span class="hljs-comment">// Catch error if file doesn't exist</span>
</code></pre><pre><code>}&lt;img src={img} /&gt;
</code></pre><pre><code><span class="hljs-comment">// ?</span>
</code></pre><pre><code>&lt;img src={backendData.imgUrl} /&gt;
</code></pre><h3 id="heading-lets-refactor-later">Let’s Refactor Later</h3>
<p>Your codebase will only grow larger and larger as you work on it. Your client or your boss won’t know the negative effect of not refactoring the code, because everything looks fine on the surface.</p>
<p>Plus, it’s always more satisfying to write something new and show it to other people. “Hey, check out what it can do now.”</p>
<p>So how do we know when to refactor the code?</p>
<p>According to [Refactor Guru](http://2018-10-28    14:00    21:00    2018-10    ¥300.00    7:00:00    -¥2,100.00    David    Front-End    Bug fixes: speaker/headphone control. Countdown timer based on start_time plus duration. Update call status from in_progress to ended), follow the Rule of Three</p>
<ol>
<li>When you are doing something for the first time, just get it done.</li>
<li>When you are doing something similar for the second time, cringe at having to repeat but do the same thing anyway.</li>
<li>When you are doing something for the third time, start refactoring.</li>
</ol>
<h3 id="heading-keep-everything-in-one-file">Keep everything in one file</h3>
<p>This goes along with code refactor. When the project is fresh, it’s difficult to predict how large a feature will become.</p>
<p>In the past, I had a file that grew into thousands of lines of code. Refactoring that code is like performing surgery, delicate, but rewarding at the end.</p>
<p>Most people have a principle of how their project is structured. Separation of files by pages, features, dev. or production, private or public method, MVC model, etc.</p>
<p>How to structure a project folder is a large discussion by itself. I will save that for another article.</p>
<h3 id="heading-dont-write-specs-for-api">Don’t write specs for API</h3>
<p>“Wait, why don’t the pictures show up anymore?” the product manager asks the front-end developers.</p>
<p>“Wait, why doesn’t the data have the picture_url anymore?” The front-end developer checks the console for network response.</p>
<p>“Oh yea, now the pictures come in three sizes. large_pic_url, med_pic_url, small_pic_url.” The back-end developer heard the discussion and jumped in.</p>
<p>Sounds familiar?</p>
<p>Everyone is trying to do their job. But synergy won’t happen in the silo. It’s everyone’s job to communicate what’s needed.</p>
<p>Here are some simple solutions to start.</p>
<ul>
<li>Before building an API, start with a JSON file of the data that both front-end and back-end developers have access to.</li>
<li>When the API is completed, generate the document with <a target="_blank" href="https://github.com/apidoc/apidoc">https://github.com/apidoc/apidoc</a></li>
<li>Notify of breaking changes before deployment</li>
</ul>
<p>There are more sophisticated approaches to writing specs and handling documentation. And I would love to hear about what approach your team uses in the comment section.</p>
<h3 id="heading-merge-code-without-reading-conflicts">Merge code without reading conflicts</h3>
<p>Breaking things is less of a worry since you can always revert back to the previous commit.</p>
<p>It’s your or your teammate’s code disappearing during the process that’s the problem.</p>
<p>This often happens when you want to “save time” and move forward.</p>
<p>When in doubt, get in contact with the developer who made the commit that conflicts with yours.</p>
<p>When you mess up, <code>git merge --abort</code> or <code>git-reset --hard</code>.</p>
<p>When it breaks beyond repair, remove the project and clone it again.</p>
<p>Think twice when doing <code>git push -f</code>.</p>
<h3 id="heading-fix-a-reusable-component-without-testing">Fix a reusable component without testing</h3>
<p>Reusable components are the magical trick up every developer’s sleeve. Like when the client pitches you the wireframe that contains the same date picker across several pages.</p>
<p>In your mind, you think, “I am going to make an awesome date picker component. Write less code. Do more.”</p>
<p>A few months later, the client says, “I want the date picker in this page to explode with fireworks and on other pages, different kittens to represent months”. Now you need the date picker to be more dynamic than it was.</p>
<p>Then after you make the changes, you discover that fireworks are coming out of the kittens.</p>
<p>If you are on a larger team, you can defer quality assurance to a different team.</p>
<p>But if there is no such functionality in your organization, you will have to do a global search for your component’s name to see what your component affects.</p>
<p>Make a note to yourself of those files. Test those file visually and functionally depending on what they do.</p>
<h3 id="heading-anytime-you-say-its-fine-for-now">Anytime you say, “It’s fine for now”</h3>
<p>You know you will have to go back to it later. The key is “don’t forget”</p>
<p>When you decide between speed of development and stability of the software, we must be careful not to always put speed as a top priority. It’s similar to driving a car without ever checking the condition of the car.</p>
<p>You can decide a ratio between speed and quality assurance. Maybe it’s two speedy iterations and one quality assurance iteration, whichever makes sense for your team.</p>
<h3 id="heading-conclusion">Conclusion</h3>
<ul>
<li>Avoid hardcoding a value if you can. If you have to, leave a note for yourself.</li>
<li>Refactor when you’re doing the same thing for the third time.</li>
<li>Split code and refactor often</li>
<li>Front-end and back-end engineers must work together to agree on the data being passed around.</li>
<li>If merge conflicts does not make sense to you, double check with the person who wrote the commit.</li>
<li>When making changes to a reusable component, test for the location(s) where it’s being used.</li>
<li>Find a healthy balance between speed and quality for your team.</li>
</ul>
<h3 id="heading-while-were-here">While we’re here…</h3>
<p>If you want to reach the 1 billion users of WeChat, you have to understand it first. Here’s a <a target="_blank" href="https://pages.convertkit.com/b2469604dd/0c671fdd2d"><strong>free glossary</strong></a> to get started.</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
