<?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:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Katat Choi on Medium]]></title>
        <description><![CDATA[Stories by Katat Choi on Medium]]></description>
        <link>https://medium.com/@katat?source=rss-47d6913fcfe3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*EmnEpkd4pnlkIOF2.jpeg</url>
            <title>Stories by Katat Choi on Medium</title>
            <link>https://medium.com/@katat?source=rss-47d6913fcfe3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 07:40:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@katat/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[wuko.ai: Evolve your mailbox into an intelligent read-it-later hub]]></title>
            <link>https://medium.com/@katat/wuko-ai-evolve-your-mailbox-into-an-intelligent-read-it-later-hub-7ca68efa08e4?source=rss-47d6913fcfe3------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ca68efa08e4</guid>
            <category><![CDATA[read-it-later]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Katat Choi]]></dc:creator>
            <pubDate>Fri, 14 Jul 2023 11:55:26 GMT</pubDate>
            <atom:updated>2023-07-19T00:34:47.811Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*p9bqfPhAbsQ1CPkX.png" /></figure><h3>Introduction</h3><blockquote><a href="https://twitter.com/naval/status/1309040145107243010"><em>The quality of your mind is the quality of your life</em></a><em><br>Naval</em></blockquote><p>In an era abundant with digital content, cultivating a reading habit is an effective way to enhance our lives. Read-it-later apps have become essential tools for individuals keen on organizing their reading habits. These apps serve as personal knowledge hubs, transforming fragmented readings into seeds of knowledge growth.</p><p>However, many of the existing read-it-later apps have their own set of usability challenges. These include:</p><ul><li>Readers may lose motivation to revisit saved articles over time.</li><li>Manual notes could help maintain the reading motivation, but the process of adding manual notes to maintain context can be labor-intensive.</li><li>The need for installing standalone apps often limits flexibility and accessibility.</li></ul><p>What if there were a way to reinvent the typical read-it-later process, enhancing our reading experience, without the need to learn new software or install any new applications?</p><p><a href="https://wuko.ai/">wuko.ai</a> combines the power of AI with a protocol that you’re already familiar with and rely on — email. Wuko’s email-based service not only eliminates the need for additional software installations but also offers intelligent features surpassing those found in most conventional read-it-later apps.</p><p>In the following sections, we’ll delve into the features of wuko, explore how it enhances your read-it-later experience in action, and addresses the usability issues prevalent in similar apps.</p><h3>Leverage What You Already Know</h3><p>Graphical user interfaces have long served to guide user behaviors while managing expectations. However, the emergence of advanced AI, such as ChatGPT, suggests that natural language can also serve as an effective interface layer.</p><p>Traditionally, creating intuitive user experiences required meticulous UI design, often tailored to specific use cases. In contrast, a natural language-based interface can adapt to a variety of application scenarios.</p><p>Wuko offers an email service that users can leverage for ‘read-it-later’ purposes. All users need to do is send an email with a web link they wish to save for reading later to a dedicated wuko email address, read@wuko.ai. The organization of the contents, such as labeling or categorizing the emails, can follow your existing email usage habits.</p><p>This process seamlessly transforms their familiar email clients into an intelligent hub, catering to ‘read-it-later’ needs for web pages without the need to install or learn how to use a new app.</p><h3>More Than Just a Bookmark</h3><p>The service behind read@wuko.ai is powered by GPT, which automatically analyze the content of web links and answer questions from the emails it receives.</p><p>When you send a web page link to read@wuko.ai, it will reply with a summary of the webpage by default. This summary not only offers you an overview before you fully delve into the web page content, but it also serves as a reminder that would help provide a concise context for your initial motivation of saving it for reading later so it might save you from adding manual notes.</p><p>For example, try <a href="/service/mailto:read@wuko.ai?subject=Evolve%20your%20mailbox%20into%20an%20intelligent%20read-it-later%20hub&amp;body=https%3A%2F%2Fkatat.me%2Fblog%2Fwuko%2Fintro-email-gpt%2F">send email</a> to bookmark this blog post.</p><h3>Insights Tailored to Your Queries</h3><p>The features are not limited to summarization. Users can actually ask questions about the web page content. Once you have initiated an email to read@wuko.ai and received the summary of the web page, you can reply to the email thread with any follow-up questions you have about the web page content. Then, read@wuko.ai should provide answers within that email thread, serving as an interactive guide that deepens your understanding of the content.</p><p>This feature allows readers to gain insights tailored to their perspective, focusing on specific areas of interest or confusion. It aids in the efficient digestion of knowledge, offering clarity on unfamiliar concepts that might otherwise require substantial individual research.</p><p>For example, you can ask a question using this <a href="/service/mailto:7bdaa148-74ac-4271-9360-a8fc81608f46@wuko.ai?subject=%5Byou%20can%20use%20any%20subjects%20for%20your%20reminder%5D&amp;body=how%20to%20use%20wuko%20email%20for%20save%20it%20later">email template</a>. You can also simply reply with a follow up question to the email thread if you initiated the email in the previous section.</p><p>This id based dedicated email address, demonstrated in the email template above, is primary intended to facilitate sharing with others your initiated topics, which we will introduce in the next section.</p><h3>Spreading Knowledge, Inspiring Others</h3><p>Sharing a web page is a form of knowledge sharing, but read@wuko.ai takes it a step further by sharing the essence behind the web pages.<br>For every web page sent to read@wuko.ai, a dedicated email address will be generated. Any emails sent to this newly generated address will be interpreted as questions about the web page.</p><p>This paves a new way to share knowledge. Instead of sharing static content with others, now you can share an interactive experience where GPT answers questions about the content you found inspiring. Simply let others know the dedicated email address for the web page, and interested individuals can start exploring new insights by simply sending emails to the topic-specific Wuko email account, without needing any additional apps.</p><p>Do you have new thoughts to share with others in a concise way? Next time, try extracting insights with read@wuko.ai to augment your thoughts. Then you can simply share its dedicated email address or a QR code with others to talk with the <em>souls</em> you discovered!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/0*vrTxCivFNQa600Sn.png" /></figure><h3>Breaking Language Boundaries</h3><p>With the advances in GPT tech, the bar for cross-language communication has been significantly lowered. Readers can now get summaries or ask questions about a web page in their native language, regardless of the original content’s language.</p><p>Through read@wuko.ai, you can simply send emails requesting summaries or posing questions about a web page in your native language, and the system will reply to your requests in the same language.</p><p>Here are examples of using read@wuko.ai to summarize this blog post in the form of poetry in different languages:</p><ul><li><a href="/service/mailto:54649328-df57-4d52-be67-35fc6b997691@wuko.ai?subject=%5Byou%20can%20use%20any%20subjects%5D&amp;body=%E7%94%A8%E8%AF%97%E5%8F%A5%E5%BD%A2%E5%BC%8F%E6%80%BB%E7%BB%93%E6%AD%A4%E6%96%87">Chinese</a></li><li><a href="/service/mailto:%5B54649328-df57-4d52-be67-35fc6b997691@wuko.ai%5D(mailto:54649328-df57-4d52-be67-35fc6b997691@wuko.ai)?subject=%5Byou%20can%20use%20any%20subjects%5D&amp;body=Summarize%20this%20text%20in%20verse%20form.">English</a></li><li><a href="/service/mailto:54649328-df57-4d52-be67-35fc6b997691@wuko.ai?subject=%5Byou%20can%20use%20any%20subjects%5D&amp;body=%E3%81%93%E3%81%AE%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%82%92%E8%A9%A9%E3%81%AE%E5%BD%A2%E3%81%A7%E3%81%BE%E3%81%A8%E3%82%81%E3%81%A6%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84%E3%80%82">Japanese</a></li><li><a href="/service/mailto:54649328-df57-4d52-be67-35fc6b997691@wuko.ai?subject=%5Byou%20can%20use%20any%20subjects%5D&amp;body=R%C3%A9sumez%20ce%20texte%20sous%20forme%20de%20vers.">French</a></li><li><a href="/service/mailto:54649328-df57-4d52-be67-35fc6b997691@wuko.aisubject=%5Byou%20can%20use%20any%20subjects%5D&amp;body=Fassen%20Sie%20diesen%20Text%20in%20Versform%20zusammen.">German</a></li><li><a href="/service/mailto:54649328-df57-4d52-be67-35fc6b997691@wuko.ai?subject=%5Byou%20can%20use%20any%20subjects%5D&amp;body=Resuma%20este%20texto%20em%20forma%20de%20verso.">Portuguese</a></li><li><a href="/service/mailto:54649328-df57-4d52-be67-35fc6b997691@wuko.ai?subject=%5Byou%20can%20use%20any%20subjects%5D&amp;body=Resuma%20este%20texto%20en%20forma%20de%20verso.">Spanish</a></li></ul><h3>Conclusion</h3><p>As demonstrated above, wuko reimagines the ‘read-it-later’ experience, integrating seamlessly with email clients and eradicating the need for additional software.</p><p>With AI-powered features, it enhances conventional bookmarking by providing contextual summaries and tailored insights via a question-answering functionality. It also breaks down language barriers, making global content accessible in one’s preferred language. Its unique knowledge-sharing feature generates a dedicated email for each webpage, turning them into interactive learning hubs.</p><p><em>Welcome to try out read@wuko.ai and reach out if any questions or suggestions.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ca68efa08e4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[wuko: talk to the souls behind web pages]]></title>
            <link>https://medium.com/swlh/wuko-talk-to-the-souls-behind-web-pages-ac89b2544f3f?source=rss-47d6913fcfe3------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac89b2544f3f</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[chrome-extension]]></category>
            <dc:creator><![CDATA[Katat Choi]]></dc:creator>
            <pubDate>Fri, 24 Mar 2023 06:20:39 GMT</pubDate>
            <atom:updated>2023-03-24T06:20:39.440Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ItcyB7iaQPV9rdp_.png" /></figure><blockquote><em>The name “wuko” comes from Sun Wukong (孫悟空), a magical monkey in the Chinese classic novel “Journey to the West”. Wukong is a symbol of enlightenment and transcendence, overcoming countless obstacles on a journey to retrieve sacred texts.</em></blockquote><h3>Why wuko Was Born</h3><p>With the introduction of ChatGPT, it is obvious this tech and similar AI advancements will revolutionize almost everything. One of the common use cases of ChatGPT is summarizing content, which is particularly useful for reading.</p><p>I believe this technology’s capability goes far beyond just summarization. Its key value lies in enabling users to have conversations with the content itself. In other words, it is now possible for users to talk to the souls behind the content.</p><p>However, ChatGPT has some limitations when it comes to asking questions about content on a web page:</p><ul><li>It can’t load content from a URL in real-time, which is understandable due to operational challenges. Users have to copy and paste the content from a web page.</li><li>When a web page’s content is too long, ChatGPT can’t accept it all at once, forcing users to craft multiple prompts manually to submit the parts as a whole content.</li></ul><p>I was inspired to create <a href="https://wuko.ai/">wuko</a>, a Chrome extension that brings the power of ChatGPT to your reading experience on web pages, helping you comprehend content from any web page with ease.</p><p>The following introduces the features in its initial release with demos for a few scenarios, such as watching YouTube videos, reading code on GitHub, and reading long articles.</p><h3>Features</h3><p>Here are some of the features I’ve built into wuko to make your browsing experience more engaging and informative:</p><ul><li>Automatic Content Analysis: wuko detects the main content of web pages and initiates context-aware conversations with ChatGPT.</li><li>Manual Content Selection: Alternatively, you can manually select content from a web page to replace the auto-loaded content as the context. This is useful on websites, such as YouTube, where transcripts cannot be detected automatically.</li><li>Conversation History: wuko saves your discussions for each web page, so you can easily review and revisit past interactions.</li><li>Free &amp; Paid ChatGPT Account Support: Based on my experience, the paid account is more stable with the wuko extension, less likely requiring re-authentication via ChatGPT’s official web page.</li></ul><h3>wuko in Action</h3><h3>YouTube Video</h3><p>With wuko, you can ask questions about YouTube videos, helping you find key content without needing to jump through clips or search through transcriptions. Your questions will be saved locally, so you can revisit the knowledge that matters most to you.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FaGRsLmT01gY%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DaGRsLmT01gY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FaGRsLmT01gY%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/4a835255a64c8292e382bcb23697bc4c/href">https://medium.com/media/4a835255a64c8292e382bcb23697bc4c/href</a></iframe><h3>Long Article on Web Pages</h3><p>Use the wuko to comprehend long articles on the web.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F5ZByp3DBrK8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D5ZByp3DBrK8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F5ZByp3DBrK8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/2a2f61eecfa067a23221e0864bfe8bdf/href">https://medium.com/media/2a2f61eecfa067a23221e0864bfe8bdf/href</a></iframe><h3>Comprehend Source Code</h3><p>Watch how wuko assists in code reviews on GitHub, facilitating a deeper comprehension of code structure and functionality.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FFvLWrjcVjm4%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DFvLWrjcVjm4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FFvLWrjcVjm4%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/5a789707f4634a1c9f1442179ea22d9c/href">https://medium.com/media/5a789707f4634a1c9f1442179ea22d9c/href</a></iframe><p><em>Keep in mind that these are just some use case examples. It should work for other scenarios. As long as it’s a standard web page with copiable content, you should be able to ask questions via the wuko extension.</em></p><h3>Welcoming Feedbacks</h3><p>The extension is now available on the <a href="https://chrome.google.com/webstore/detail/ebomfekiklpfmoeioinjnnkjfajgnlpk">Chrome Web Store</a>. I hope wuko can serve as a pathway for you to approach truth and freewill.</p><p>Meanwhile, I’d love to hear your thoughts and suggestions. Please feel free to <a href="https://twitter.com/katat">reach</a> <a href="https://github.com/katat/wuko/discussions">out</a>.</p><p><em>This is a cross post of </em><a href="https://katat.me/blog/wuko/intro/"><em>https://katat.me/blog/wuko/intro/</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac89b2544f3f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/wuko-talk-to-the-souls-behind-web-pages-ac89b2544f3f">wuko: talk to the souls behind web pages</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[nahmii, a Gateway to Scalable Virtual Economies (Part 2)]]></title>
            <link>https://medium.com/hubii/nahmii-a-gateway-to-scalable-virtual-economies-part-2-32b697d6831e?source=rss-47d6913fcfe3------2</link>
            <guid isPermaLink="false">https://medium.com/p/32b697d6831e</guid>
            <category><![CDATA[scaling]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[economics]]></category>
            <dc:creator><![CDATA[Katat Choi]]></dc:creator>
            <pubDate>Wed, 11 Mar 2020 09:42:54 GMT</pubDate>
            <atom:updated>2020-03-11T09:42:54.095Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y-bK-S5JV8SkxLtK3EQgZQ.jpeg" /></figure><p>This is the second part of our recent series on blockchain scaling. In the first article, available <a href="https://medium.com/hubii/nahmii-a-gateway-to-scalable-virtual-economies-part-1-a4b17ee2001c">here</a>, we assessed the two main approaches to scaling — state channels and side chains — alongside the various compromises inherent in each. Today, we’re taking a closer look at our solution to the problem, nahmii, including a demonstration of the key features using its SDK. We’ll also be showing off nahmii’s new open-source web demo, where you can test the full lifecycle of functions within nahmii.</p><h3><strong>Scaling on nahmii</strong></h3><p>nahmii is a second-layer scaling solution which can act as an interoperability bridge between different blockchains. Referring back to the ‘Blockchain Trilemma’, discussed in part one, nahmii’s architecture aims to maximise <em>Scalability</em> and <em>Security</em> while relying on base-layer blockchains to achieve a degree of <em>Decentralisation</em>. The protocol is currently live on Ethereum, with plans to port nahmii to other blockchains in the near future.</p><p>The nahmii scaling protocol is implemented by a set of Ethereum contracts and an operator backend that together manage transaction states in a trustless way. Its SDK encapsulates the knowledge of how to interact with the protocol.</p><p>Our previous article outlined a number of issues that blockchain scaling solutions must address before the technology will be ready for commercial adoption. Before we dive into a technical demonstration of how nahmii solves these problems, let’s begin with a quick summary of what makes nahmii special:</p><p><strong>Real-time finality</strong></p><p><a href="https://suara.seacen.org/whats-done-is-done-economic-payment-finality-in-the-blockchain-part-1/">What is done is done</a>. Finality of payment plays a crucial role in any economy. Yet in some traditional centralised payment systems, it is common to take hours or even days to settle a transfer of value. Even when confirmed, some transactions can still be revoked or reversed at a later point. Taken together, slow confirmations and reversible transactions create uncertainty for businesses which rely on real-time transactions. These risks can be mitigated by blockchain technology, but only when applied correctly.</p><p>Most blockchain solutions are designed to maximise decentralisation and security, often at the expense of transaction finality. This is a key failing, as many commercial use cases for payments require real-time transactions.</p><p>nahmii regards the real-time finality a must-have feature for its payment function. Both parties to a payment on nahmii can be confident that their transaction is final as soon as the operator publishes a signed receipt. This process typically takes a fraction of a second, comparable to the leading centralised services. The instant finality in payments contributes to nahmii’s advantages over both the centralised payment systems and many rival blockchain solutions.</p><p><strong>Lower latency</strong></p><p><a href="https://blog.uptrends.com/web-performance/the-psychology-of-web-performance/">Recent work</a> on UX supports the common-sense idea that poor performance on a website or mobile app will drive customers away. Taking a noticeable amount of time to process a request breaks users’ focus flow, even when the delay is a matter of milliseconds. These negative psychological effects become even more obvious when it comes to making digital payments in a physical setting. In commerce, one key goal is to minimise the number of actions required by a customer to complete a transaction. Every click, confirmation or button press matters and more actions almost always translate into fewer sales. In a physical payment scenario, a simple transaction like purchasing a cup of coffee can become embarrassing for both cashier and customer if the payment takes more than a few seconds. Speed and ease of use are therefore of paramount importance when designing payment systems.</p><p>Payments within nahmii are processed directly by the operator of the system. This means that, unlike base-layer blockchains, there is no consensus mechanism underpinning the transaction. The off-chain transaction performance of nahmii is therefore simply a question of how fast our operator node can process a transaction request. Latency is currently at the millisecond level, comparable to the best centralised commercial payment services. If required, we can improve nahmii’s responsiveness even further by upgrading the operator nodes.</p><p><strong>Scalable throughput</strong></p><p>In general, conventional businesses benefit from wider adoption of their third-party services. As these services grow, suppliers can usually offer more cost-efficient products to their customers creating a win-win scenario. In the current blockchain world, we have seen the opposite. When the network became congested with transactions, consumers either have to pay a much higher gas price for their transactions to be mined in a relatively short time or wait for hours even days until the congestion is relieved.</p><p>On nahmii, the throughput capacity can be flexibly tuned based on the demand. Technical speaking, horizontally scaling operator nodes can achieve scalable throughput.</p><p><strong>Predictable fees</strong></p><p>As we all know, there is no such thing as a free lunch. It is not sustainable for a business to provide free services forever; eventually, users will always need to pay something for the services they value. This value exchange can take many forms, from straight payments to viewing advertisements or giving up user data. For traditional centralised infrastructure, suppliers calculate the value of their services by balancing cost, affordability for the user and profit. While prices can vary over time, users can normally predict how much a service will cost them in advance. Predictable fees of this type lower the risk of doing business.</p><p>On the other hand, the cost of using today’s blockchain services is unpredictable. For the majority of base-layer blockchains, transactions are processed if and only if they secure a place in the next block. This competition between customers to have their transactions mined creates conditions of uncertainty. When the network is busy, customers must pay more to ensure their transaction goes through. Given that we cannot predict how busy the network will be at any given time, transaction fees are necessarily unpredictable. As with predictable fees, so the opposite is true here: unpredictable fees introduce new risks for businesses, making adoption of blockchain technology less likely.</p><p>nahmii is designed to provide predictable, low fees at all times. This is a key requirement for making blockchain technology comparable with the best of centralised financial systems. The fees on nahmii are at a constant ratio of the currency being transferred and, unlike many rival scaling solutions and blockchains, including Ethereum, transaction fees within nahmii are paid in the currency of the transfer — no additional ‘fee tokens’ are required. Currently, payments on nahmii have a fee of 0.1% of the total transfer value; however, our fee structure is flexible and will soon include substantial discounts for larger transfers.</p><p><strong>Usability</strong></p><p>In some blockchain scaling solutions both parties must be online when making a transaction, while knowing how to sign the transaction using certain tools. There are a number of drawbacks to this approach, beginning with the high barrier to entry for both parties — particularly the recipient. These prerequisites for making transactions are a clear problem for the typical user experience and a significant barrier to adoption. No one really wants to wake up in the middle of the night to sign a transaction from a counterparty on the other side of the world.</p><p>There is a better way: nahmii aims to make trustless payments happen as seamlessly as on the base layer. To make a payment, the sender only needs to own a wallet and have a sufficient balance. As long as the recipient owns an Ethereum wallet, the recipient doesn’t have to be aware of the existence of nahmii in order to receive the funds sent from the sender. The goal here is to match the trustless features of the base layer while bettering the user experience of centralised payment systems.</p><p><strong>A smoother, flatter learning curve</strong></p><p>The majority of ICO projects have failed to ship a single usable product, why? In many cases, the answer lies in the complexity of developing software using immature developer tools. When combined with the tendency for ICOs to over-promise in order to attract investment, it’s easy to see why so many blockchain projects have failed to deliver on their vision.</p><p>The ability to evaluate and comprehend the complexity of the underlying requirements plays a key role in software development. This process encompasses a wide range of elements: teams must be able to understand the potential risks and rewards associated with their development tools and dependencies, while determining the resources and strategies to best fit their business model.</p><p>This principle applies to almost every software project. For blockchain technology, the complexity of a typical blockchain project is escalating compared to the conventional B/S or C/S architecture. Complexity leads to uncertainty, which is further multiplied by the shortage of proficient and experienced developers in the blockchain industry. Building high-quality software products is difficult, developing high-quality blockchain-based software is even more challenging. It is therefore unsurprising that so many ICO projects have failed, primarily because they have underestimated the time and expense required to build their promised products.</p><p>Complexity in development leads to increased risk and higher costs. Familiar, easier to understand developer tools can mitigate these risks and lower the barriers to entry for new blockchain projects. nahmii has been built with these principles in mind, with simple tools to help developers of all backgrounds build on the protocol. Under nahmii protocol, developers simply need to know how to use the nahmii SDK. The development experience is therefore similar to integrations with <a href="https://en.wikipedia.org/wiki/Software_as_a_service">SaaS</a> platforms.</p><h3><strong>Using nahmii SDK</strong></h3><p>Below, we set out the full cycle of the nahmii protocol using the SDK. This includes depositing ERC-20 assets, making transfer transactions with real-time finality and withdrawing the assets.</p><p>The overall scenario is as follows:</p><ol><li>Alice deposits ERC-20 assets into nahmii</li><li>Alice makes a payment to Bob on nahmii</li><li>Bob starts a settlement and then withdraw the assets back to the base layer</li></ol><p><strong>Deposit</strong></p><p>Before transacting assets within nahmii, whether it is ERC-20 or ETH, we first need to make a deposit into the contract that manages funds within the protocol. This can be done via the SDK or interacting with the contract directly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*uWWJjX4JbezhsZv1jCwmaA.png" /><figcaption>Deposit assets to nahmii</figcaption></figure><p>Once the deposit is completed and tokens have been transferred into nahmii, the relevant contract will emit an event to the operator. The operator then increments the asset balance for the wallet address on the second layer. For security reasons, we wait for <em>12 blocks</em> confirmations before the operator recognises the deposit as final.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fc161d747347b3ebbc83b007d4ff3514/href">https://medium.com/media/fc161d747347b3ebbc83b007d4ff3514/href</a></iframe><p>Once the deposit is confirmed, the client can start making payments via the second layer or start a settlement to withdraw the deposited amount by interacting directly with the contracts.</p><p><strong>Transfer on 2nd layer</strong></p><p>For the transactions in the second layer, clients only need to interact with the operator. Here is the typical procedure:</p><ol><li>Alice has a balance on the second layer.</li><li>Alice signs a payment to Bob using her wallet key, then sends the signed payment payload to the operator.</li><li>After the operator receives the payment request, it updates the second layer balances for both Alice and Bob.</li><li>The operator then generates and publishes a receipt, this shows the latest balances for both Alice and Bob.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/1*Qj2tP6qDlH_lls2MASVrrQ.png" /><figcaption>2nd layer transfers</figcaption></figure><p>At the <em>4th</em> step<em>,</em> the transaction is considered final once the operator receipt is published.<em> </em>This happens almost instantly. Transaction latency is at the millisecond level, comparable with the best centralised solutions and suitable for most of the real-world use cases.</p><p>For Bob, he doesn’t need to do anything to receive the payment or being online to sign the transaction as the counterparty during the transacting period. He doesn’t even need to be aware of the existence of nahmii until he wants to make use of his balance under the nahmii protocol. The only thing Bob needs to do before receiving funds via nahmii is to tell Alice his Ethereum wallet address. This is a significant advantage over state channel solutions, which require both parties to a transaction to be available in order to process and secure the transaction.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c6b8eab7afbebda5986b7ead8eb4e09b/href">https://medium.com/media/c6b8eab7afbebda5986b7ead8eb4e09b/href</a></iframe><p>Once the operator has received the transfer request from Alice and effectuated the request, the operator creates a receipt for both Alice and Bob. As soon as the receipt is generated, the receipt marks the finality for the transfer transaction. The transaction receipt can then be used immediately by Alice or Bob as proof to start a settlement for withdrawals by directly interacting with the contracts.</p><p><strong>Settlement</strong></p><p>Settlement is the process by which funds within nahmii become eligible for withdrawal back to the base layer. This process is required because the base layer cannot see what is happening on the second layer. Before funds are released from nahmii’s client fund contract, we must make sure that the request is valid. This requires that all settlement requests to pass a challenge period, during which anyone with proof (in the form of a valid receipt) can challenge the settlement attempt. Receipts can be used to prove that a user has tried to withdraw funds that they do not have, an attempted fraud known as a ‘double spend’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/1*TQn7xv0eyTWdkXwAFrYnRg.png" /><figcaption>Start settlements</figcaption></figure><p>Suppose Bob wants to withdraw assets from nahmii protocol back to the Ethereum base layer, the process starts by determining which type of settlement is required to fully cover the intended withdrawal amount.</p><p>Continuing the workflow in the section above, Bob wants to withdraw the assets transferred from Alice. He can start a <em>payment settlement</em> using the receipt as proof of the maximum amount of balance he is eligible to withdraw in a currency.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5c5deaebdf0bfda0734d2a9bd1cb3851/href">https://medium.com/media/5c5deaebdf0bfda0734d2a9bd1cb3851/href</a></iframe><p>There are two types of settlements.</p><ul><li><em>on-chain balance settlement</em> is used to stage funds when there has been no interaction with the backend, i.e. there is no payment receipt to start the settlement with (such as when a client has deposited into nahmii and wants to withdraw without making any payments)</li><li><em>payment settlement</em> is used to stage funds using a payment receipt as proof.</li></ul><p>The length of the challenge period for settlements is currently configured to be 5 days. During this period, anyone with proof that a settlement is fraudulent can submit the relevant receipt as a ‘challenge’ to nahmii’s smart contracts. The contract can immediately verify whether the receipt is a valid challenge candidate. If it is valid, the user who attempted the fraudulent settlement will lose their balance in the currency of the settlement (which is seized automatically by the smart contract). The challenger will receive the full amount of the seized balance from the contract.</p><p>In practice, the applications which integrate with nahmii’s settlement functions may want to collect information about the current status of the ongoing settlements so as to display appropriate messages on the UI.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b11afe4116df32bb10114d95335e5ab5/href">https://medium.com/media/b11afe4116df32bb10114d95335e5ab5/href</a></iframe><p><strong>Withdrawal</strong></p><p>Once the challenge period is passed and no challenge proof has been submitted, the settlement proposal will be marked as qualified and withdrawable.</p><p>The code below shows the procedure to complete the settlement, which will update the immediately withdrawable balance on the contracts. This balance is called <em>staged balance</em>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/768f6dccd418647d0efdf537b32bde8c/href">https://medium.com/media/768f6dccd418647d0efdf537b32bde8c/href</a></iframe><p>Here is an open-source web app for you play around with the functionalities described above. To make it easier for you to digest through the code while playing around the demo UI, I’ve kept the code base as compact as possible using a lightweight frontend framework: <a href="https://svelte.dev/">Svelte</a>. Most of the code is located within one file containing both the functions and the HTML. The web app also demonstrates the integration with wallets generated from web3 API, therefore can be used as a boilerplate for porting to integrate with other web3 compatible wallets, such as the <a href="https://walletconnect.org/">wallet-connect</a> protocol.</p><p>Web demo: <a href="https://hubiinetwork.github.io/nahmii-web-demo/">https://hubiinetwork.github.io/nahmii-web-demo</a></p><p>Repository: <a href="https://github.com/hubiinetwork/nahmii-web-demo">https://github.com/hubiinetwork/nahmii-web-demo</a></p><p>For more details about nahmii, please check out its <a href="https://www.nahmii.io/">official website</a> and <a href="https://www.nahmii.io/nahmii%20White%20Paper%20v2.0.pdf">whitepaper</a>.</p><h3><strong>Potential use cases</strong></h3><p>Blockchain technology fundamentally changes the definition of ownership, offering people the ability to exchange values on the Internet and maintain stable relationships across the world.</p><p>Once the outstanding issues relating to the finality latency and fees have been resolved, blockchain will immediately open up all the practical possibilities for real-world use cases that cannot be realised today. Eventually, this exciting technology will create a platform on which existing markets will evolve and new markets can thrive.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/389/1*iu9lW3c9uncRzaYb6Q3Jrg.jpeg" /><figcaption><a href="https://www.amazon.com/Virtual-Economies-Design-Analysis-Information-ebook/dp/B00KBEKSIO/ref=sr_1_1?keywords=virtual+economies&amp;qid=1575337322&amp;sr=8-1">Virtual Economies: Design and Analysis</a> by <a href="https://www.amazon.com/Vili-Lehdonvirta/e/B00GAPO84I/ref=dp_byline_cont_ebooks_1">Vili Lehdonvirta</a> and <a href="https://www.amazon.com/s/ref=dp_byline_sr_ebooks_2?ie=UTF8&amp;field-author=Edward+Castronova&amp;text=Edward+Castronova&amp;sort=relevancerank&amp;search-alias=digital-text">Edward Castronova</a></figcaption></figure><blockquote>In many cases, the primary purpose of a virtual economy is not even to earn revenues directly, but something more subtle yet equally powerful: to attract, hold, and manage attention; to reward referrals and incentivize contributions; to allocate resources; to lock users into a platform or to guide them around it. (Virtual Economies: Design and Analysis)</blockquote><p>Blockchain technology has a lot to teach to other money systems, both traditional and virtual. In contrast to traditional systems, blockchain offers an easy way for software developers to integrate all sorts of money-related features into their applications, providing a great platform for money-related innovation. Blockchain is natively compatible with the world of digital value.</p><p>With nahmii’s unique features, it is now commercially viable for anyone to build scalable and trustless products on the blockchain. We anticipate that the community will use nahmii in creative ways that we haven’t even thought of yet, but to give you some ideas about what is possible here are some example use cases:</p><p><strong>Payments</strong></p><p>Integration with nahmii for making transfers and payments is probably the most obvious use case. nahmii enables businesses to exchange products or services for cryptocurrencies with predictable fees and real-time finality.</p><p>Because of the inherent security of nahmii’s underlying blockchain, users only need to confirm a transaction with a standard Ethereum wallet. This removes the need for third-party middlemen from the transaction, such as banks. The user experience during the transaction can be better than using mainstream payment services such as Paypal or Stripe, as there is no need to redirect the user away to different web pages or apps between the payment service provider and the merchandise provider. Consumers only need to digitally sign a transaction and send it to the nahmii operator. Once the receipt for the payment is published by operator, the transaction is done.</p><p><strong>Token airdrop with almost zero cost</strong></p><blockquote>The value of the notes was upheld purely by a collective belief in their value. This can be called community fiat money. (Virtual Economies: Design and Analysis)</blockquote><p>On Ethereum, performing an airdrop to a large number of recipients is generally an extremely expensive process. Gas prices, which determine the cost of a transaction, rise when the Ethereum network is busy. Airdrops can cause enormous congestion on Ethereum, which in turn leads to much higher gas prices. One solution to the problem is to spread the airdrop out over a long period of time, but this can be impractical for the larger airdrops.</p><p>Performing airdrops on-chain doesn’t make economic sense unless it is certain that the resulting value of the airdrops is greater than the costs in fees and time. Usually, the ERC-20 tokens being distributed through an airdrop are merely minted from the contracts with no circulation in the market as of the time. These initial minted tokens therefore have almost zero value, so it makes no sense to pay for a large amount of fees to distribute them.</p><p>On the other hand, nahmii can be used to perform quick, inexpensive airdrops on the second layer. Due to nahmii’s greatly increased capacity over Ethereum, transactions can be processed in real-time without congesting the Ethereum network. Transaction fees are fixed at a low level and paid in the currency of the airdrop. Therefore, new ERC20 tokens can be transacted in a scaleable way within their communities while growing their virtual economies. In this sense, nahmii can also play a role similar to startup incubators.</p><p>In fact, nahmii’s own token (NII) has been the subject of twelve airdrops over the last year. The monthly nahmii ‘airdriip’ distributes 1 billion NII tokens to thousands of addresses at a total cost of less than $5. Compared to using Ethereum, second-layer airdrops on nahmii for NII have generated significant savings.</p><p><strong>Gaming currency</strong></p><blockquote>Contrary to popular belief, there is no fundamental difference between “virtual currency” and “real currency.” Both US dollars and World of Warcraft coins are fiat money. The major difference between these two moneys is in the size of their currency areas. <em>(</em>Virtual Economies: Design and Analysis<em>)</em></blockquote><p>Traditionally, the creator of a video game has absolute control over their in-game currency. This control extends to determining how many coins should be created, their purchase price and how they can be used. These variables are typically tuned over time, so that the game maximises profit while keeping players engaged.</p><p>The advent of blockchain technology brings new opportunities for the video games industry. With a blockchain, in-game currency and other collectibles can be tokenised and traded on a decentralised network. This gives players genuine ownership over their assets for the first time, which creates new and interesting monetisation opportunities. Perhaps most importantly, true ownership in this sense promises to radically reshape the relationship between content creators and consumers.</p><p>Imagine an in-game asset represented as an ERC-20 token. This token could be traded on a blockchain, sold at an exchange or even imported into other games. Similarly, tokens can be used to grant far more than simple ownership of an asset; tokens can act as vouchers, tickets, loyalty points and more. The ability to trade tokens in this sense also allows content creators to benefit from secondary item trading markets, a lucrative opportunity which is currently unavailable for most companies. Until today, these unique blockchain-based benefits have come at a significant performance cost. Gaming is a time-sensitive and highly competitive industry. If in-game transactions are to be reflected in real-time on a blockchain, that would typically introduce unacceptably high latency. To avoid breaking the focus flow of players, in-game transaction latency needs to be at the millisecond level. This is now possible with nahmii.</p><h3><strong>Conclusion</strong></h3><p>This two-part article has covered a wide range of topics in the blockchain space, including the key barriers to adoption, a comparison between rival scaling approaches, nahmii and use cases.</p><p>Our goal with nahmii has always been the same: to bring commercially-viable scaling to the blockchain industry. Scaling for us means more than just improved throughput; we understand that businesses need high-capacity, low-latency, affordable transactions with immediate finality. At the same time, we know that blockchain projects are struggling with a steep learning curve and immature development tools. That’s why we’re lowering the barrier to entry for would-be blockchain developers, with intuitive tools like our CLI, SDK, suite of APIs and web demo application.</p><p>We’re delivering on our promises, as you can see with the sample code in this article from nahmii’s web demo application and SDK. The nahmii protocol is designed to bring more developers into the blockchain industry, which in turn will drive commercial adoption. We invite you all to build on our example use cases to create new and exciting blockchain products.</p><p>As always, we welcome any comments that you might have. The community around hubii and nahmii is our greatest asset and something that we’re understandable proud of. To that end, we’re happy to help if you’re looking to integrate nahmii into your own project. For regular updates on our progress, please join our Telegram group <a href="https://t.me/hubiinetwork">here</a> and follow us on <a href="https://twitter.com/hubii">Twitter</a>.</p><p><em>Many thanks to </em><a href="https://medium.com/u/79b524df7682?source=post_page-----a4b17ee2001c----------------------">John Derbyshire</a><em> for graciously doing the proofreading and rephrasing the sentences in this article.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32b697d6831e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hubii/nahmii-a-gateway-to-scalable-virtual-economies-part-2-32b697d6831e">nahmii, a Gateway to Scalable Virtual Economies (Part 2)</a> was originally published in <a href="https://medium.com/hubii">hubii</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[nahmii, a gateway to scalable virtual economies (Part 1)]]></title>
            <link>https://medium.com/hubii/nahmii-a-gateway-to-scalable-virtual-economies-part-1-a4b17ee2001c?source=rss-47d6913fcfe3------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4b17ee2001c</guid>
            <category><![CDATA[sdk]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[second-layer]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[scaling]]></category>
            <dc:creator><![CDATA[Katat Choi]]></dc:creator>
            <pubDate>Thu, 21 Nov 2019 13:50:17 GMT</pubDate>
            <atom:updated>2019-11-21T13:50:17.221Z</atom:updated>
            <content:encoded><![CDATA[<h3>nahmii, a Gateway to Scalable Virtual Economies (Part 1)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EcWfOpw7N4nOE_yCjYYy0Q.jpeg" /></figure><p>The blockchain scaling problem has been a hot topic in the last few years, as it is one of the main barriers to making the technology practically usable and ready for mass adoption.</p><p>This article is the first in a series of two. The first part will discuss the state of blockchain technology and provide a technical overview of existing Ethereum scaling solutions, including why they are struggling to realise the full potential of the technology. In the second part, we will cover our own scaling solution, <em>nahmii</em>, which is architecturally different from the other approaches. We will also demonstrate nahmii using a simple web3 app (which can be run on any web browser) as well as explaining the key concepts using its SDK. Finally, we will discuss some potential use cases for scalable blockchains using nahmii.</p><blockquote><em>First they ignore us, then they laugh at us, then they fight us, then we win. </em><a href="https://medium.com/u/898f59563d67"><em>Andreas M. Antonopoulos</em></a></blockquote><p>Momentum has been building within the blockchain industry since the introduction of Bitcoin in 2009. In addition to generating significant media interest, the technology has also been hailed as a potential disruptive force across a wide range of industries.</p><p>Recent high-profile blockchain initiatives such as Facebook’s Libra project and China’s DCEP digital currency have seen the technology reach a new, more mainstream audience. We have now reached the point where almost all major organisations are investigating blockchain, with many moving beyond mere curiosity about the technology and into active development. This shift marks an inflection point in the evolution of blockchain. As of today, it is likely we are in <a href="https://medium.com/u/898f59563d67">Andreas M. Antonopoulos</a>’ <em>fighting phase</em> to find the equilibrium between the emerging decentralised communities and the traditional centralised organisations.</p><h3>Naval on Twitter: &quot;1/ Blockchains will replace networks with markets. / Twitter&quot;</h3><p>1/ Blockchains will replace networks with markets.</p><p>If we assume that markets work like living organisms, then liquidity provides the nutrients required to maintain their health and growth. In a competitive environment, only those organisms with a sufficient supply of nutrients will thrive. Continuing our analogy, markets without sufficient capital will die.</p><p>One of the advantages of having a central power to govern a financial system is the low latency in making new transactions compared to the decentralised organisations powered by blockchain. Centralised transactions within the traditional organisations can therefore be processed at the millisecond level with uncapped limited for the throughput.</p><p>People in China nowadays rarely carry cash in their pockets. Instead, the mobile phones are new “wallets” to make the payments daily, for both shopping online and offline. According to the People’s Bank of China (PBOC):</p><blockquote><em>Mobile transaction volume reached 277.4 trillion yuan ($41.51 trillion) in 2018, up more than 28 times from five years ago.</em></blockquote><p>On the side of blockchain-powered applications, high development costs, a steep learning curve, slow transaction processing and the complicated UX are the key barriers preventing mass adoption. Add in blockchain’s well-known scaling problems and this raises a simple question: if the centralised financial model is working so well, why experiment with blockchains that are still so cumbersome to transact in real-world use cases?</p><p>The answer is found in blockchain’s unique features: permissionless, trustless and decentralisation. The Internet offers freedom for information to flow through the networks. Blockchain offers the freedom for value to flow through the markets, reducing the costs and inefficiency introduced by the middlemen who control the rules of the market networks. Who will benefit from this technology? One obvious example is the financial industry, which inherits the traditional top-down structure of power distribution where centralising forces create a monopoly business which stifles innovation.</p><p>Consider the recent trend of DeFi applications. This new approach has revealed the potential value of mesh network structures, utilising composability atop different protocols to derive a new set of financial services. DeFi protocols, <a href="https://0x.org/">0x</a>,<a href="https://makerdao.com/en/"> MakerDao</a>, <a href="https://www.tokensets.com/">Set</a> and many others, have demonstrated the power and flexibility of decentralised technologies. Because of their permissionless nature, these innovations have allowed for such rapid iteration that traditional financial institutions may find themselves left behind in the near future.</p><p>While it is clear that some industries are unlikely to benefit from this move towards decentralisation, the competition between the two ideologies looks set to foster innovation in the markets for some time to come. Before decentralised solutions like blockchain can achieve their true potential however, major barriers to adoption must first be overcome.</p><h4><strong>Struggles on Scalability</strong></h4><p>In order to compete with the existing centralised services, blockchains must be able to scale while retaining trustlessness. The ability to make quick, convenient transactions without requiring a middleman or giving up ownership of your assets is a key differentiation point between the two approaches.</p><p>This raises an important question: if scalability is essential to the mainstream adoption of blockchain technology, why haven’t we seen a blockchain which offers both scalability, decentralisation and security? The answer lies in the <em>Blockchain Trilemma</em>.</p><p>‘<em>Blockchain Trilemma</em>’<em> </em>is a term implying a balance between the three key aspects when designing a blockchain. The limitation is that only two out of three can be maximised.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*au1bo3598YM2P8aOgO0cLQ.png" /></figure><p><a href="https://www.coinbureau.com/analysis/solving-blockchain-trilemma/">Solving the Blockchain Trilemma: Decentralization, Security &amp; Scalability - Coin Bureau</a></p><p>Because of the trustless nature that most blockchains embrace, they are optimised to maximise decentralisation and security. The base layers of these blockchains are therefore mainly built for securing the assets in a trustless manner. In theory, scalability is better handled by second-layer solutions, which build on the security and decentralisation features of the base layer.</p><p>A significant number of second-layer scaling solutions have been proposed, each claiming to complement and scale their base-layer blockchain. We can use some basic criteria to assess each approach, with a particular focus on scaling. Importantly, commercially-useful scaling solutions require more than just higher transaction throughput. As an example, any solution to the scaling problem for Ethereum should address five issues — not one: low throughput, unpredictable fees, high latency, delayed finality and steep learning curve for developers.</p><p>For more details about some of these terminologies, please refer to our previous blog post.</p><p><a href="https://medium.com/hubii/revolutionary-scaling-solution-nahmii-now-live-on-mainnet-d442f54a4146">Revolutionary Scaling Solution ‘nahmii’ Now Live on Mainnet</a></p><p>Below is a comparison matrix covering several of the key metrics across the main scaling solution approaches:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cL65YdLwOCbtXD-h9YbBBg.png" /><figcaption>Comparisons between some scaling solutions, by <a href="https://kauri.io/article/7ccaaa2fe7f344d5bf53807cb5c01530/top-5-ways-to-scale-your-ethereum-blockchain-application-(dapp)">https://kauri.io/article/7ccaaa2fe7f344d5bf53807cb5c01530/top-5-ways-to-scale-your-ethereum-blockchain-application-(dapp)</a></figcaption></figure><p>These metrics do not address finality and latency as key factors in evaluating how well a scaling solution works, thus the analysis presented here is incomplete. Consider the following example using Ethereum: During periods of congestion on the Ethereum network, it can often take many minutes or even hours for a transaction to be mined when paying a low gas price. This is due to the restricted capacity of the base layer, which can only process a limited number of transactions per block. Transactions can therefore become ‘stuck’ in a pending state, waiting to be mined.</p><p>Ethereum’s capacity issues cause uncertainty for users regarding when a transaction will go through. While it is possible to effectively ensure that a transaction will be mined quickly, this requires the user to pay a premium over the safe gas price. In some cases, transaction fees can rise by ten, twenty or even fifty times their normal rate. Transactions on Ethereum are also subject to latency and finality delays. New blocks are added to Ethereum’s blockchain at a rate of approximately one every fifteen seconds. Sometimes the network disagrees about which block should be the next official entry into the blockchain. The delay in reaching consensus leads to ‘orphan blocks’, where a transaction can appear to have been mined but is ultimately rejected as part of the official record. This impacts on Ethereum’s finality, requiring users to wait for a number of blocks before a transaction can be considered ‘safe’.</p><p>If a scaling solution can achieve instant finality while utilising the base layer to guarantee the security of assets, it would significantly improve throughput effectiveness and fee predictability of blockchains.</p><p>Today, the best-known scaling solutions utilise state channels and side chains. These two solutions have different strengths and weaknesses, depending on the target use case, with different approaches to the blockchain trilemma.</p><p>Here is a brief summary of the pros and cons of each:</p><p><strong><em>State Channel:</em></strong></p><p>pros</p><ul><li>Instant finality</li><li>Unlimited throughput</li></ul><p>cons</p><ul><li>Requires both parties to be available to sign every new transaction (requires both the sender and recipient to sign the incoming transaction)</li><li>The recipient has to connect to a channel (which also introduces fee costs on smart contracts) in order to receive funds.</li><li>Capital inefficiency. The amount that can be relayed from one channel to another is determined by the capital availability on the connected channels. This limitation poses challenges when there are a large number of value transfers to route between the channels.</li></ul><p><strong><em>Side chains:</em></strong></p><p>pros</p><ul><li>Good throughput</li></ul><p>cons</p><ul><li>Unpredictable operational costs, as the operator has to perform periodic commitments to the base layer. These costs will eventually propagate through to users.</li><li>Worse finality latency than the base layer. Side chains inherit their finality issues from the base layer, as transactions are only final once they have been committed to the base layer. The performance of the base layer therefore determines the performance of the second layer, with the caveat that the second layer can only ever be <em>at best</em> equal to the base layer. In reality, side chains will always have worse finality than their base layers.</li></ul><h4><strong>Learning curve</strong></h4><p>The issues above introduce a number of new concepts in comparison with the conventional Browser/Server or Client/Server technical architecture. Blockchain-curious developers therefore face a steep learning curve, particularly when faced with immature development tools. This issue highlights a wider problem in the blockchain space: the high barrier to entry for developers and users alike.</p><p>It is clear that these technical barriers have not been fully overcome. The impact of these issues has been felt throughout the industry, with poor user experiences, higher development costs and a general increase in risk for blockchain businesses. Therefore, in practice, it is important that second-layer scaling solutions address the problems from their base layers while simplifying the process for adoption.</p><p>When a product needs to integrate with a third-party service, developers must first evaluate its potential costs and profits. If the service is too complicated to digest, the project is often deemed too risky to proceed. When creating products based on immature technology, these risks are multiplied further. How can we make the development environment for blockchain products better?</p><p>The second part of this article will take a look at hubii’s answer to that question, <em>nahmii</em>, and how our SDK is lowering the barriers to entry for new developers with different backgrounds. Stay tuned for part two!</p><p><em>PS: I am a hubii developer mostly working on hubii core, an Ethereum desktop wallet integrated with nahmii, as well as helping with hubii’s smart contracts and backend.</em></p><p><em>Many thanks to </em><a href="https://medium.com/u/79b524df7682">John Derbyshire</a><em> for graciously doing the proofreading and rephrasing the sentences in this article.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4b17ee2001c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hubii/nahmii-a-gateway-to-scalable-virtual-economies-part-1-a4b17ee2001c">nahmii, a gateway to scalable virtual economies (Part 1)</a> was originally published in <a href="https://medium.com/hubii">hubii</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What could blockchains offer to freelancers?]]></title>
            <link>https://medium.com/swlh/what-could-blockchains-offer-to-freelancers-61019a084f80?source=rss-47d6913fcfe3------2</link>
            <guid isPermaLink="false">https://medium.com/p/61019a084f80</guid>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[dapps]]></category>
            <category><![CDATA[freelance]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[decentralization]]></category>
            <dc:creator><![CDATA[Katat Choi]]></dc:creator>
            <pubDate>Thu, 10 May 2018 09:27:38 GMT</pubDate>
            <atom:updated>2018-05-14T02:01:03.980Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*N4j_HtiHsPHsLFau6GrCeg.jpeg" /></figure><p>Freelance marketplace is one of the exciting fields that blockchain technology could help transform. Imagine the freelancers can independently setup smart contracts with the employers to get rewarded either in cryptocurrencies or tokens that can be vested over time.</p><p>It would be a fundamental change in how people work together since it cut through the middleman and be more flexible for the working relationships.</p><p>This post discusses how the blockchain technologies can be used in the freelancing marketplaces, followed by a simple Dapp to demonstrate a payment smart contract that can be independently managed by a freelancer and employer.</p><h3>The trend of freelancing</h3><p>Based on job market statistics, there is an increasing number of workers choose to escape the 9to5 jobs and work as a freelancer, desired for flexibly work contents they prefer, expand their business networks and grow their personal brands.</p><p>They have the freedom to work with preferable partners and be more flexible in making decisions in which career direction they want to go pursuit.</p><blockquote>One of the core principles of the free market is that central planning committees can never be as efficient or effective as the people doing the work.</blockquote><blockquote>The most important feature of free market economies is that each person within them is able to make independent decisions in their own best interest</blockquote><p><a href="https://medium.com/@lkanies/why-we-hate-working-for-big-companies-9e6c787a32ac">Why We Hate Working for Big Companies</a></p><p>In the era of blockchain technologies, the core value of which is decentralization, it is very likely the trend of freelancing will be accelerated.</p><h3>Freelancing marketplaces</h3><p>Most of the freelance works are landed via outsourcing platforms like upwork.com and freelancer.com. These platforms provide the facilities for the employer to post the jobs or the employee to apply for the jobs, serving as a job information center.</p><p>The key reason of why these platforms are popular is they serve as the middleman for the working contracts and the funds. They have a set of rules to collect and calculate the ratings for both the employer and employee after completed the contracts.</p><p>The main duty of these platforms is maintaining and securing the contract made between the employer and employee.</p><p>Having a middleman to execute this duty comes at prices:</p><p>1. It is inefficient especially in the payment process. It could be taking days or even weeks to withdraw the money to an oversea bank account. They charge fees for the payments and introduce a cost to both the employer and employee. The fees could be as high as 20% to work for a new client.</p><p>2. The middleman could be biased when dealing with the conflicts of the contracts.</p><p>3. They are in charge of the rules in how the rating calculated and how they are displayed. The rating is the key element for the freelancers as this is what the employer does the evaluation when making the employment, and that needs years of time to cultivate upon the platform. These rating data is owned by the platform and can’t be shared among other platforms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*lGZtW0mSBvfxZUsZ_ML0Sw.gif" /></figure><blockquote>The bad news is that it became much harder for startups, creators, and other groups to grow their internet presence without worrying about centralized platforms changing the rules on them, taking away their audiences and profits.</blockquote><p><a href="https://medium.com/@cdixon/why-decentralization-matters-5e3f79f7638e">Why Decentralization Matters</a></p><h3>What is a contract?</h3><p>Let’s get back to the question of why we need an employment contract that these centralized platforms facilitate to create.</p><p>Contract in the nutshell:</p><blockquote>Agreement about the facts and when they change — that is, a consensus about what is in the ledger, and a trust that the ledger is accurate — is one of the fundamental bases of market capitalism.</blockquote><p><a href="https://medium.com/cryptoeconomics-australia/the-blockchain-economy-a-beginners-guide-to-institutional-cryptoeconomics-64bf2f2beec4">The Blockchain Economy: A beginner’s guide to institutional cryptoeconomics</a></p><p>Platforms like upwork or freelancer is basically a centralized database that records and maintains the contracts. These contracts are relying on the trusted central authorities to maintain and validate.</p><p>There are generally two types of contracts:</p><blockquote>A <strong>complete</strong> contract specifies what is to occur under every possible contingency.</blockquote><blockquote>An <strong>incomplete</strong> contract allows the terms of the contract to be renegotiated in the case of unexpected events.</blockquote><p>It is nearly impossible to create a <strong>complete</strong> contract, particularly for small business activities such as freelancing, as it is too expensive to consider all the possible conditions within a contract period.</p><p>So how do we create <strong>incomplete </strong>contracts<strong> </strong>that are both secure and efficient?</p><blockquote>The blockchain, though smart contracts, lower the information costs and transactions costs associated with many incomplete contracts and so expands the scale and scope of economic activity that can be undertaken.</blockquote><p>The decentralized consensus and immutability features of blockchain enable the contracts to be created with embedded rules that automatically govern the ledger data within the contract.</p><p>With blockchain technologies, it is now possible to create secure contracts without 3rd party institutions.</p><h3>A simple payment contract</h3><p>To demonstrate the concept, let’s try to implement a simple payroll contract that executes itself without any 3rd party institutions, using Ethereum solidity contract for the backend and React.js for the front end.</p><p>The model of the contract is normally for one to one relationship, that is the rules between an employer and an employee. Also there are other contract models in the software outsourcing fields. The crowdsourcing platforms, such as <a href="http://topcoder.com/">TopCoder</a> and <a href="https://www.kaggle.com/">Kaggle</a>, have a model of one to many relationship. They hold competitions to reward the top performers who participate in the projects.</p><p>Suppose we want to create a very basic payment contract, which works on time based, one to one model, with the following key requirements:</p><p>1. The employee needs to know if the employer has enough capital to fund the contract agreements.</p><p>2. The employer needs to know if the employee is capable of delivering the vision of the project.</p><p>3. Both the roles should have chances to evaluate if they are in a good fit within a trial period.</p><p>If something doesn’t work well, a contract makes they eligible choose to terminate the contract, so as to avoid potential losses in either monetary or time.</p><h4>Flows of contract rules</h4><ol><li>The employer can create a smart contract with configs in contract full period and trial period in a minute.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/1*78xSoG1spxRwCU7yttJUog.png" /></figure><p>2. Once employer deposited funds into the smart contract, it will proceed to the <strong>handshake</strong> stage where there is a URL, containing the address of this contract, to share to the employee to review this contract.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/1*wGzQmfNAklkhxzlxuoUVrw.png" /></figure><p>3. With the shared URL, employee can review the periods of the contracts and the available funds deposited. Once confirmed(signed) the contract, the contract starts with the trial period, in which payment requests are disabled. From now on, the deposited fund can only be transferred to the employee’s account address or be refunded by canceling the contract.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/1*M-1zaJyj6D9cwiHbB9zeqQ.png" /></figure><p>4. The employer can choose to cancel the contract. The contract is cancelable during stages of <strong>handshake</strong> and <strong>trial period</strong>. If cancelled, the deposited funds will be withdrew from the contract back into the employer’s wallet account.</p><p>5. Once trial period passed, the employee can request payment whenever needed and get paid immediately based on the current time and the length of the contract period.</p><p>Alternatively, after the trial period, employer can authorize the contract completed to transfer the total payment to the contractor before the contract end time. This is meant to incentivize the contractor to deliver the quality work faster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*-rUh0fUGX5UMeC8nVKrXfQ.png" /></figure><p>6. The contract will mark ended when all the fund deposits were paid to the employee.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*cP7DE5-AXiZFuQcXJzoZXg.png" /></figure><p>This is a simple demo Dapp as a payment contract for the 1 to 1 employment relationship.</p><p>The smart contract demonstrated above is totally owned by the employer and employee. It doesn’t rely on any 3rd party institutions to secure the contract’s rules, which is executed automatically based on the ledger data within the contract.</p><p>It is flexible to set up the rules that are transparent to both the employee and employer to agree upon.</p><p>It costs little to create this smart contract. The only requirements to create the contract is a web browser with the Metamask extension to sign the transactions.</p><p>The source codes for the <a href="https://github.com/katat/payment-contract-app">front end</a> and the <a href="https://github.com/katat/payment-contract-solidity">solidity contract</a> have been published on github. Also, you can play around with it locally with the source codes, or with the <a href="http://katat.me/payment-contract-app">deployed version</a>.</p><p><strong>Potential issues:</strong></p><p>Normally a payment contract could span with a long period of time, during which the prices of the cryptocurrency could be fluctuated dramatically so much that is not acceptable for a normal business entity.</p><p>Fortunately, there are already stable coins emerging in the market. The stable coins, such as Dai, could be used as the primary currency in a payment contract.</p><p><a href="https://medium.com/cryptolinks/maker-for-dummies-a-plain-english-explanation-of-the-dai-stablecoin-e4481d79b90">Maker for Dummies: A Plain English Explanation of the Dai Stablecoin</a></p><p>Another notable issue is the speed of the transaction confirmation. Compared to the centralized web apps that is much easier to tune the performance, it could take a long time to get a transaction confirmed in the Ethereum network especially when the supplied gas is too low.</p><p>This would introduce challenges to the UX of the Dapp. To prevent the Dapp users get confused during the period of confirming transactions, a new way of designing the user experiences is highly desired.</p><p><a href="https://medium.com/@lyricalpolymath/web3-design-principles-f21db2f240c1">Web3 Design Principles</a></p><h3>Summary</h3><p>The simple payment Dapp above demonstrated what revolutions the blockchain technologies can help achieve and how powerful it will position itself in the freelancing market.</p><p>In fact, there are already some organizations working for this field from different perspectives, such as <a href="https://aragon.one/">Arogan</a>, <a href="http://ethlance.com/">Ethlance</a>, <a href="https://gitcoin.co/">Gitcoin</a>, <a href="http://bounty.network/">Bounty Network</a> etc.</p><p>We are still in the very early stage of the blockchain. There are a lot of possibilities the blockchain can help realize in this field. It will help freelancers achieve more freedom to work on the projects that best fit their personal interests, without being locked in a specific centralized platforms.</p><blockquote>Thanks for reading. I will appreciate any comments, please feel free to share your thoughts.</blockquote><figure><a href="https://medium.com/swlh"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YqDjlKFwScoQYQ62DWEdig.png" /></a></figure><h4>This story is published in <a href="https://medium.com/swlh">The Startup</a>, Medium’s largest entrepreneurship publication followed by 323,238+ people.</h4><h4>Subscribe to receive <a href="http://growthsupply.com/the-startup-newsletter/">our top stories here</a>.</h4><figure><a href="https://medium.com/swlh"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ouK9XR4xuNWtCes-TIUNAw.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61019a084f80" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/what-could-blockchains-offer-to-freelancers-61019a084f80">What could blockchains offer to freelancers?</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I created a SaaS product for web developers]]></title>
            <link>https://medium.com/swlh/how-i-created-a-saas-product-cf1f49fdc9c9?source=rss-47d6913fcfe3------2</link>
            <guid isPermaLink="false">https://medium.com/p/cf1f49fdc9c9</guid>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[saas]]></category>
            <dc:creator><![CDATA[Katat Choi]]></dc:creator>
            <pubDate>Mon, 01 Jan 2018 00:00:00 GMT</pubDate>
            <atom:updated>2018-04-13T02:09:07.044Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xyFQfbHsqbaTRBYjlMWssg.jpeg" /></figure><p>This post shares the journey of how I dealt with my own itch to improve testing workflows.</p><p>It discusses what problems I faced during works and how I tried to get solutions to them. I started trying existing 3rd-party solutions, then built an open source solution to better fit my own needs. Eventually, its usage in team works motivated me to build a SaaS version.</p><h3>What is the problem?</h3><p>Most of my projects are in full stack, which includes both the front end and the backend. The front end usually uses the JS MVC frameworks, such as Angular.js or React.js. The backend is using Node.js stack. The front end connects to the backend using REST API architect.</p><p>For web SPA (single page application) apps, they are usually containing many states in a page. To reproduce one of these states, it may need many operations on the page in a certain sequence.</p><p>In most cases, the front end is the central interaction point between the user and the backends. The testings of the backend may also need to go through the front end to verify the backend changes are compatible with the front end.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/262/0*BVyJgJeWcRWyIHnC.png" /></figure><p>If the depth of the target state is deep, I need to repeat a certain number of manual behaviors in the browser to do verifications. It is time consuming to do this sort of repeated manual tests. It kills my productivity and creativity as a developer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*GCLT_sms4vg91Kme.png" /><figcaption>Testing workflow</figcaption></figure><p>Does this sound familiar?</p><h3>Early try</h3><p>I love unit tests, and create unit tests to the backend codes, but never for the front end codes.</p><p>So I gave it try to use the unit test concept for the front end. At that time, I was using Angular.js as the front end framework for most of the projects. I picked and tried the Angular e2e testing stack, <a href="https://github.com/angular/protractor">Protractor</a> + <a href="https://mochajs.org/">mocha</a>. It was the most popular stack to do automated tests on the angular framework.</p><p>After some experiments, I realized this style of testing introduces other issues. It requires a tremendous amount of attention to the testing codes. The testing codes are difficult to maintain and doesn’t relieve much the pain from manual testings.</p><p>To have the tests to run repeatedly with this framework, it needs to create a lot of mocks for the backend API requests. It assumes the front-end developers to have a very good understanding of the backend, and how it works with the front end. Quite often, there are magic codes added to the tests to pass the tests. These magic codes are problematic and hard to maintain in a long run.</p><p>So, with this testing framework, it needs experienced developers to create the tests in a manageable style. Otherwise, the tests would become too fragile to maintain, and contribute more overheads than benefits to the development process. In practice, front-end developers could come from various backgrounds. They can be junior or senior developers with different coding styles.</p><p>The other problem is the testing is only verifying some parts of the logic. It doesn’t test using the actual browser behavior. Passing all the tests doesn’t give me enough confidences. I still need to run manual tests to see if it works and looks as expected in the actual browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*AjP_5kmRZ55tDjOg.gif" /><figcaption>Unit tests passed…</figcaption></figure><p>It makes me doubt if it worths writing codes with such kind of frameworks to test the UI codes.</p><h3>Try again</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/260/0*5Jq-PIcxGKeKUF_Q.jpg" /></figure><p>I am more aligned with what the book <a href="https://www.amazon.com/Fifty-Quick-Ideas-Improve-Tests-ebook/dp/B00XVFFK7E/ref=sr_1_1?ie=UTF8&amp;qid=1514258592&amp;sr=8-1&amp;keywords=fifty+ideas+of+testing">Fifty Quick Ideas To Improve Your Tests</a> emphasizes: The tests should focus on exploring the capability for the users.</p><p>I started looking for a simpler way to do the front end tests with least overheads to the development process.</p><p>There is! The other testing approach is called visual regression testing. It is like applying the <a href="https://en.wikipedia.org/wiki/WYSIWYG">WYSIWYG</a> concept in the editor to the testing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/0*qNd3sG_ihLoizrLA.jpg" /><figcaption>Let the bot spot the embarrassing stuffs quickly</figcaption></figure><blockquote><em>Basically, the idea is to compare the new UI screenshot with the old one. Then it automatically generates a image that highlights the differences between the screenshots.</em></blockquote><p>When there is a difference detected, developers can review the difference image to see if it is as expected. To accept a difference, developers only need to rebase the screenshot without the need to change the testing codes. This dramatically speeds up the testing process. It suits the human nature that our brain is good at reviewing the images than the codes.</p><p>It turns out there were already several open source libraries to do this job. I reviewed some of them, picked the one called <a href="https://github.com/garris/BackstopJS">BackstopJS</a> that seemed to easy to use to do UI testings.</p><h3>Build a new one for my own itch</h3><p>BackstopJS gave me a lot of inspirations in how visual regression test can help in the front end testing. I tried to use it to do testings against SPA (single page application) apps. It takes a final screenshot to do visual regression testing at the end of a scenario test. But, it also needs to write freestyle scripts to update the page’s states. This introduces the same maintenance problems discussed in the <strong>Early Try</strong> section. It is very likely that the freestyle scripts will become messy to maintain in the end, particularly when there are more than one developers touching the testing scripts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/0*9WvAFNlZCkpOYu9q.gif" /><figcaption>So messed that people dump it eventually</figcaption></figure><p>Also I need it to be flexible to take the screenshots and do comparisons whenever needed in any testing steps in a scenario, not only at the final step.</p><p>These experiments motivated me to wonder:</p><blockquote>Why not formatting the common browser behaviors, such as clicking/typing/select/screenshot etc, into a standard JSON format.</blockquote><p>It would be easier to read and update JSON codes than using freestyle testing scripts in a long term.</p><p>So I created an <a href="https://github.com/katat/vbot">open source library called <strong>vbot</strong></a>, which since then I have been using for testings for my front end projects.</p><h4>How my testing process has been improved?</h4><ol><li>No magic codes in the tests.</li><li>Independent of tech stacks, as long as the app can be used in web browsers, vbot can be used for testing.</li><li>Use JSON defined in WYSIWYG fashion, much easier to refer to the actual browser behavior.</li><li>Review and approve the new screenshot, instead of updating testing codes to make the test pass.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/0*ysv8uHI959SrJjZ0.png" /><figcaption>baseline/differences/new</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B4LzPaKm5mJMFUgo-65ALw.gif" /><figcaption>automate the tests and watch the playback in action</figcaption></figure><h3>Add ingredients to team works</h3><p>Since I am also the user of the tool, it is easy for me to have the first-hand feedbacks. The more I use it, the more ideas I have to improve and evolve it.</p><p>When it comes to using vbot in a team, the baseline screenshots need to be shared at somewhere, so that the other team members can run the tests against the baselines.</p><p>Git repository was the initial place to store the baseline images. But these image files became too big to store on it for the time being. Furthermore, the screenshots generated for the same UI page from different development environment would be slightly different, due to different development environment setups. Even it is a small difference, it can produce false negative results.</p><p>It will be much easier if the testing results can be stored somewhere on a server, and can be reviewed simply via a browser. So it can be more efficient to communicate with the team by sharing the test results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/383/0*8Y1R-HxPTlzShEHs.png" /></figure><p>Imagine a scenario, in which there is a failed test stored on a server, all the browser behaviors have been documented as well as the screenshots. To inform others the issue, it only needs to share an URL link, which the others open to review at the failed test. Even more convenient, they can download the playbook to run the test to quickly reproduce bugs on their local machine when trying to resolve the issue.</p><h3>Go SaaS</h3><p>There are multiple benefits in making the vbot as a service on the web. Not only does it provide a place for team members to share their tests, but also it serves as a supplement to the open source version:</p><ul><li>It enables users to create the playbooks via UI, easier for new users to start with.</li><li>Users only need a web browser to run the automated tests against public websites.</li><li>The playbooks, created on the vbot.io, can be downloaded by the vbot CLI tool and run locally with a single command line. Easier to debug issues or reproduce a bug.</li><li>Tests run under the same containerized environment on the server, reducing the odds of getting differences in the same tests due to the variety of development environment setups.</li><li>Playbooks as well as the testing results can be shared with other users, easier for the team to communicate on the issues.</li></ul><p>These potential improvements in the testing workflows gave me sufficient motivations to build a <a href="https://vbot.io/">SaaS version</a> around it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6eOwMB_Q1iVF-Kt466Uajg.gif" /><figcaption>vbot.io online test demo</figcaption></figure><h3>Final words</h3><p>The journey started in 2016, and the <a href="https://github.com/katat/vbot">first version of vbot on the GitHub</a> was released in early 2017. As a side project, I spent most of my off hours in doing iterations to make it better and easier to use. It took almost 6 months to build the SaaS version.</p><p>I wasn’t expecting I would create an open source library in the testing field, neither create a SaaS product around it. It is an experimental process of building it from the ground up, during which there were many researches and try-errors practices.</p><p>I did have some doubts come from inside of myself in the process, wondering “<strong>Does it worth?</strong>”. <em>The main driven force of this whole journey is that it is a tool built for my own itch</em>. I am glad it goes this far.</p><p>You may want to have a try on <a href="https://vbot.io/"><strong>vbot.io</strong></a> if you need a simple/efficient method to automate the tests for your web apps and improve your development workflow. There are several improvements and features planned to make the testing workflow even easier for developers. Stay tune!</p><p>This post shares a bit in the traces of my side project in UI testing. Hopefully, it will be helpful for anyone who want to build their own projects. I will be happy to interact with any thoughts, please feel free to comment.</p><p><em>Originally published at </em><a href="http://katat.me/2018/01/01/vbot-saas-journey/"><em>katat.github.io</em></a><em> on January 1, 2018.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6gfnVvkMRFtjVsWF7vkClA.png" /></figure><h4>This story is published in <a href="https://medium.com/swlh">The Startup</a>, Medium’s largest entrepreneurship publication followed by 277,994+ people.</h4><h4>Subscribe to receive <a href="http://growthsupply.com/the-startup-newsletter/">our top stories here</a>.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6gfnVvkMRFtjVsWF7vkClA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf1f49fdc9c9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/how-i-created-a-saas-product-cf1f49fdc9c9">How I created a SaaS product for web developers</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Painless UI Testing with vbot]]></title>
            <link>https://medium.com/@katat/vbot-painless-ui-testing-69f61f4a53cc?source=rss-47d6913fcfe3------2</link>
            <guid isPermaLink="false">https://medium.com/p/69f61f4a53cc</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[test-automation]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Katat Choi]]></dc:creator>
            <pubDate>Mon, 09 Jan 2017 00:00:00 GMT</pubDate>
            <atom:updated>2017-12-26T01:34:24.823Z</atom:updated>
            <content:encoded><![CDATA[<p>How long would you take to spot all the differences?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*Dz1YFbVlqoix-xrR.png" /></figure><p>During the front end development, quite often, even small updates to the code, may requires a lot of interactions, clicks and typings, on a page in order to check the changes reflected in the view as expected. Doing the repeated front end tests in the manual way, certainly kills productivity, consumes a huge amount of time and mental energy from developers.</p><p>I tried several existing automated visual regression test tools to see if it can remedy this painful manual front end tests and adhere to agile development practices, but they seem either too complicated to start with or difficult to sustain the tests in a long run. Then I created <a href="https://github.com/katat/vbot">vbot</a> with the aims to help developers quickly create tests with minimum development overhead, and automate the testings “headlessly” at local dev environment or on a continuous integration server, supports End-to-End testings which involve front end interactions covering the backend processes.</p><p>This post discuss a bit more on the motivations behind vbot, and gives a simple demo.</p><h3>Agile process</h3><p>The key of <a href="http://agilemanifesto.org/">agile development</a> process is to code up a working software, enabling users to interact with the software, and collecting the feedbacks as soon as possible. Then we repeat this process as a series of sprints until all the requirements have been satisfied. The process would introduce lots of changes to the code, as the requirements keep evolving, and probably need refactors to the source codes. With the tests covering the functionalities built in earlier sprints, it will keep the refactoring be more stable and give developers confidences to make necessary changes to maintain the health status of the source codes.</p><p>Visual regression test facilitates quickly gathering visual feedbacks for changes, making it easier to test the components used in different parts of the web applications. Also it can be used as a part of End-to-End test, which does user interaction tests at the front end to make sure the user experienced as expected while monitoring the backend system processes.</p><h3>Tedious testings in SPA</h3><p>Single Page Application or any complicated web applications, normally includes many interactions in different views, and the states of a view could depend on the previous views’s states. Manual testing on this type of application could involve a lot of clicks and typings just for a single function. No creative developers like to do this kind of dull testing work, wasting a huge amount of time in clicks and typings. The worse is that eventually it kills the developers’ motivation for doing the job without a proper automated testing tool, leaving the projects with a decent quality.</p><h3>Collaboration</h3><p>It is usual to see different developers work on the same code for the time being, and mess up the code at some point. It is also common to see there are codes at different places having the same functionality, and motivated to refactor it into a component to be reusable, but fear of the uncertain amount of time needed for the testings at different places.</p><p>Automated tests is an efficient way to pass on the works among team members. It eases the learning curve for the developers at the code written by others, and encourage them to make bold changes to the code whenever necessary to balance the technical debt in a long run.</p><p>Whenever there is a pull request, visual regression test can be used as a testing component, reducing the manual testing efforts for every pull request and be more confident on the release cycles.</p><h3>Open source VRT tools</h3><p>So what solutions are there to help?</p><h4><a href="https://github.com/garris/BackstopJS">BackstopJS</a></h4><p>The idea of writing testing definitions in a JSON file is great, just need to define the different screen sizes and what parts of the web page to take screenshots by CSS selector without writing JS code. It is easy to share and communicate with, having a clear information about what to test, compared with lengthy JS codes. It also supports simulating user interactions using CasperJS custom scripts, referenced from the JSON file. However, it is more suitable for static web pages, as the creator states in its github page.</p><blockquote><em>BackstopJS may be just the thing if you develop custom WordPress, Drupal or other CMS templates</em></blockquote><h4><a href="https://github.com/Huddle/PhantomCSS">PhantomCSS</a></h4><p>The library is designed to integrate with the <a href="http://casperjs.org/">CasperJS</a> scripts, flexible to create screenshots at any part of the web page by CSS selector, at any point of time during the UI test flow.</p><h4>vbot, a new player</h4><p>The goal of <a href="https://github.com/katat/vbot">vbot</a> is to help developers create test quickly with minimum overhead, save their <a href="http://www.johndcook.com/blog/2015/12/22/automate-to-save-mental-energy-not-time/">dev time and mental energy</a>, most importantly, sustain the quality of the work in a longer run.</p><p>Key features/goals of vbot:</p><ul><li><strong>JSON based</strong><br> Tests can be defined in JSON with simple schema, without any JS codes.</li><li><strong>Interaction flow</strong><br> Support interaction tests, particularly useful for feature-rich web app or SPA.</li><li><strong>Screenshots</strong><br> Sceenshots can be taken at any point during the testing flow, then compare with baseline and generate reports.</li><li><strong>Portable</strong><br> Run on local dev environment or on remote server to facilitate continuous integration process.</li></ul><h4>Why JSON based?</h4><p>JSON based schema makes it much easier to share tests among the team members, as the schema helps them have a common senses over the JSON definitions. When trying to make senses on how the tests work, the expected JSON syntax layout helps developers quickly skim through and locate to the spot on where they want to check more details. The natural of JSON syntax also helps highlight the test definition differences between current and previous commit.</p><h3>vbot in action</h3><p>So enough with the theory about the visual regression tests, let’s take a look at how vbot can ease the VRT process. Suppose we want to test this <a href="http://todomvc.com/examples/react">TODO</a> web app using vbot. We define the interaction flow in a JSON file as below:</p><pre>{<br>    &quot;viewWidth&quot;: 375,<br>    &quot;viewHeight&quot;: 677,<br>    &quot;captureSelector&quot;: &quot;html&quot;,<br>    &quot;host&quot;: &quot;<a href="http://todomvc.com/">http://todomvc.com</a>&quot;,<br>    &quot;scenarios&quot;: [{<br>        &quot;name&quot;: &quot;todo test&quot;,<br>        &quot;path&quot;: &quot;/examples/react&quot;,<br>        &quot;actions&quot;: [{<br>            &quot;type&quot;: &quot;assert&quot;,<br>            &quot;waitFor&quot;: &quot;.new-todo&quot;,<br>            &quot;shot&quot;: <strong>true</strong>,<br>            &quot;comment&quot;: &quot;wait for the input element .new-todo appear and take a screenshot&quot;<br>        },{<br>            &quot;type&quot;: &quot;enter&quot;,<br>            &quot;waitFor&quot;: &quot;.new-todo&quot;,<br>            &quot;value&quot;: &quot;drink a cup of coffee&quot;,<br>            &quot;enter&quot;: <strong>true</strong>,<br>            &quot;comment&quot;: &quot;enter task message and press &#39;enter&#39; key&quot;<br>        },{<br>            &quot;type&quot;: &quot;assert&quot;,<br>            &quot;waitFor&quot;: &quot;ul.todo-list li:nth-child(1)&quot;,<br>            &quot;shot&quot;: <strong>true</strong>,<br>            &quot;comment&quot;: &quot;make sure there is a newly created task in the list and take screenshot&quot;<br>        },{<br>            &quot;type&quot;: &quot;enter&quot;,<br>            &quot;waitFor&quot;: &quot;.new-todo&quot;,<br>            &quot;value&quot;: &quot;drink another cup of coffee&quot;,<br>            &quot;enter&quot;: <strong>true</strong>,<br>            &quot;comment&quot;: &quot;create second task&quot;<br>        },{<br>            &quot;type&quot;: &quot;assert&quot;,<br>            &quot;waitFor&quot;: &quot;ul.todo-list li:nth-child(2)&quot;,<br>            &quot;shot&quot;: <strong>true</strong>,<br>            &quot;comment&quot;: &quot;ensure the second task is created&quot;<br>        },{<br>            &quot;type&quot;: &quot;click&quot;,<br>            &quot;waitFor&quot;: &quot;ul.todo-list li:nth-child(1) .toggle&quot;,<br>            &quot;comment&quot;: &quot;mark the first task as completed&quot;<br>        },{<br>            &quot;type&quot;: &quot;assert&quot;,<br>            &quot;waitFor&quot;: &quot;ul.todo-list li.completed:nth-child(1)&quot;,<br>            &quot;shot&quot;: <strong>true</strong>,<br>            &quot;commend&quot;: &quot;ensure the completed status is reflected in the view and take screenshot&quot;<br>        }]<br>    }]<br>}</pre><p>The interaction flow is defined step by step, and straightforward. You probably could guess the meanings of the most parts in the definitions above. To execute the tests, run the tests targeting the json file:</p><pre>vbot --f<strong>=</strong>schema.json</pre><p>It should execute the tests and generate the screenshots as shown below:</p><pre>{<br>    &quot;type&quot;: &quot;assert&quot;,<br>    &quot;waitFor&quot;: &quot;.new-todo&quot;,<br>    &quot;shot&quot;: <strong>true</strong>,<br>    &quot;comment&quot;: &quot;wait for the input element .new-todo appear and take a screenshot&quot;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/0*jLkZia604LcvXjto.png" /></figure><pre>{<br>    &quot;type&quot;: &quot;enter&quot;,<br>    &quot;waitFor&quot;: &quot;.new-todo&quot;,<br>    &quot;value&quot;: &quot;drink a cup of coffee&quot;,<br>    &quot;enter&quot;: <strong>true</strong>,<br>    &quot;comment&quot;: &quot;enter task message and press &#39;enter&#39; key&quot;<br>}</pre><pre>{<br>    &quot;type&quot;: &quot;assert&quot;,<br>    &quot;waitFor&quot;: &quot;ul.todo-list li:nth-child(1)&quot;,<br>    &quot;shot&quot;: <strong>true</strong>,<br>    &quot;comment&quot;: &quot;make sure there is a newly created task in the list and take screenshot&quot;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/0*ZWc2NO2VDMkECLC1.png" /></figure><pre>{<br>    &quot;type&quot;: &quot;enter&quot;,<br>    &quot;waitFor&quot;: &quot;.new-todo&quot;,<br>    &quot;value&quot;: &quot;drink another cup of coffee&quot;,<br>    &quot;enter&quot;: <strong>true</strong>,<br>    &quot;comment&quot;: &quot;create second task&quot;<br>}</pre><pre>{<br>    &quot;type&quot;: &quot;assert&quot;,<br>    &quot;waitFor&quot;: &quot;ul.todo-list li:nth-child(2)&quot;,<br>    &quot;shot&quot;: <strong>true</strong>,<br>    &quot;comment&quot;: &quot;ensure the second task is created&quot;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/0*nqbVMWqgAwazFMgn.png" /></figure><pre>{<br>    &quot;type&quot;: &quot;click&quot;,<br>    &quot;waitFor&quot;: &quot;ul.todo-list li:nth-child(1) .toggle&quot;,<br>    &quot;comment&quot;: &quot;mark the first task as completed&quot;<br>}</pre><pre>{<br>    &quot;type&quot;: &quot;assert&quot;,<br>    &quot;waitFor&quot;: &quot;ul.todo-list li.completed:nth-child(1)&quot;,<br>    &quot;shot&quot;: <strong>true</strong>,<br>    &quot;commend&quot;: &quot;ensure the completed status is reflected in the view and take screenshot&quot;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/0*tb8-0vKIPa6A_CQN.png" /></figure><p>If this is the first time vbot run the tests for this JSON definition file, the images generated are the baselines. The subsequent tests will compare the newly generated image file with the baselines and highlight the differences if it is not 100% match. For example, let’s change the action definition below:</p><pre>{<br>    &quot;type&quot;: &quot;enter&quot;,<br>    &quot;waitFor&quot;: &quot;.new-todo&quot;,<br>    &quot;value&quot;: &quot;drink a cup of coffee&quot;,<br>    &quot;enter&quot;: <strong>true</strong><br>}</pre><p>to</p><pre>{<br>    &quot;type&quot;: &quot;enter&quot;,<br>    &quot;waitFor&quot;: &quot;.new-todo&quot;,<br>    &quot;value&quot;: &quot;drink a cup of milk&quot;,<br>    &quot;enter&quot;: <strong>true</strong><br>}</pre><p>After re-run the command line above, it should report there is test result mismatch the baseline and generated a image that highlights the difference:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/0*vyykJ1Tm2hTcuK2N.png" /></figure><p>When rebase is needed, run the following command to rebase the images:</p><pre>vbot --f=schema.json --rebase</pre><p>There are other features, such as preset localStorage values, set maximum timeout for waiting an element to appear, scroll element, etc. For more details about vbot, please see <a href="https://github.com/katat/vbot">github repo</a>.</p><p>I hope vbot could help a bit within your development processes. Certainly I welcome any suggestions or complaints, so feel free to leave comments.</p><p><em>Originally published at </em><a href="http://katat.me/2017/01/09/vbot/"><em>katat.github.io</em></a><em> on January 9, 2017.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69f61f4a53cc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to fall in love with Unit Test]]></title>
            <link>https://medium.com/@katat/how-to-fall-in-love-with-unit-test-490d523e0437?source=rss-47d6913fcfe3------2</link>
            <guid isPermaLink="false">https://medium.com/p/490d523e0437</guid>
            <dc:creator><![CDATA[Katat Choi]]></dc:creator>
            <pubDate>Sun, 07 Sep 2014 03:36:07 GMT</pubDate>
            <atom:updated>2014-09-07T05:03:10.761Z</atom:updated>
            <content:encoded><![CDATA[<p>There are numerous blog posts about why and how to create the unit tests along with the functions to be developed. I believe most of the developers understand the reasons of having unit tests. But I also believe, in practice, there is a large number of developers, from junior to senior, got stuck with the unit tests and start doubting about the payoff of making the efforts. Without getting any real benefits from making the unit tests, the developers lost the motivations to make that efforts. Even worse, in some situations, the unit tests built became a huge hassle for the developers to maintain.</p><p>In this post, I try to outline the possible hurdles faced during writing unit tests and suggest ways to overcome them. Also, I share the practical benefits I experienced. Hopefully, this would make you practically fall in love with unit test methodology.</p><h3>Hurdles</h3><p>The optimal time to build the unit tests is before writing any actual functional code. The unit tests should be written first, which is helpful to be served as specs and for that developers can start prototyping the functional codes based on these unit tests in the agile style.</p><p>In practice, the development schedules for most projects are highly limited. Many developers rush into the functional coding without making any efforts to unit tests. This seems making the development going fast in the early stage, but I can assure the headaches come along with the changes and new features added. Later, the development start getting slow down and is not as productive as the early stage. That is because as more changes needed, it requires more brain power, more manual tests to do the checks and more pressure to deal with. Eventually, this take more time than in the case where they got the unit tests in the beginning, and developers hate the codes written by themselves.</p><p>I have seen developers runaway from the unit tests at a certain stage, including myself. This comes to the question: Why the unit tests should be built at the earlier stage even before writing the functional code? One of the major benefits to have the unit tests is that it constrains the patterns of the actual code. It force the developers to think about the code structure when coding, making the code easier to be tested by the unit tests. This is extremely helpful to decouple the components of the software.</p><p>When there are unit tests need to handle a lot of assertions and are relating to more than one functions of the actual code, the unit tests start getting difficult to build and even hard to maintain. This probably imply there are changes needed to refactor the actual code to make it healthy. Once you got the code structured in the right way, the unit tests should be easy to build and maintain. So when you see the unit tests were difficult to maintain, it could be the signal to improve your functional code structure by refactoring.</p><p>Building Unit Test, in my opinion, is like paying taxes. It is neither good to do too much or less. It is kind of like a balance in terms of the project development schedules. In real world projects, there are many simple logics are too obvious to have unit tests. Writing unit tests for these kind of functions kills the developers’ motivation to contribute the efforts. I suggest focusing on the key components/logics in a project when building the unit tests. This way, developers can begin the works from the core parts of the projects, and able to prototype quickly around the core functions.</p><p>Prototyping around the core functions along with the unit tests, giving the developers a sense that they are making the most valuable works from the beginning, enabling them to notice the technical issue and understand the business logics quickly. The unit tests can be served as the notes of the key specifications, while they give the developers the confidences to do the necessary refactors when they faced major changes from the business side.</p><h3>Benefits</h3><p>I think most of you who read this post know and believe the DRY(Don’t Repeat Yourself) rule, even you are not a developer. Repeating manual tests destroy the motivation and energy of developers on the projects. Talent developers meant to do the creative works. Reducing the amount of the repeated works gives developers more time on the more valuable and creative stuffs. This also makes developers happier and be more productive on the projects.</p><p>If you do it right, Unit Test is an useful way to encapsulated the tests in a place, reducing a huge amount of time on the repeated manual tests and debugging. When there are certain issues needed to be re-created and debug, we can just create the unit tests for them to quickly do the debugging at the relevant parts. It is much more efficient than doing manual tests with the whole process, most of which are un-related to the issues we are trying to resolve in most of the cases. At the same time, you have supplemented the unit tests to make the program more robust.</p><p>Are you dare to change the complicated code even written by yourself? Unit Test is like doing proof reading on the text writings. It tries to further check at the writings and make sure it looks right before sending it to the readers. Different from the text writings, Unit Tests for the program code checks the key parts of the system, and try to ensure it is not going to break down when it goes production. When developers can write the code following the flow of their mind and let the unit tests to validate the new code doesn’t break the existing ones, the process of writing the code would be more enjoyable, more productive and creative.</p><p>Continuously refactoring is really the natural of the software development, particularly for the large/long term projects. Unit Test help developers to be more confident to do the refactors.</p><p>There are situations where developers don’t really know where to start coding as the key functions, even they got the detailed documentations on the business requirements. <a href="http://en.wikipedia.org/wiki/Experiential_learning">Learning by doing</a> would help people understand the business domain more quickly. In text writing, when you haven’t gotten the clear ideas on the parts you are trying to convey on a topic, writing the drafts following your mind is helpful to get a better sense of what you really want to talk about. This is similar for the coding in the fuzzy situation.</p><p>Building the key unit tests at the beginning even you are not sure whether these are really the key ones, would help the developers’ mind flow. After a few attends of building up the key parts of the software, it would help understand what the things are missing and which parts should be the key to focus on. It makes the developers to think practically and raise questions at the early stage.</p><p>In the team works, there are many chances for the team members to change the code built by others in emergency. Even it is a small change needed to be done, it could cost some time for the other team members to get the grip of the codes’ logics in order to make the change. As I mentioned earlier, if there are unit tests built for the key parts of the logics, the other team members can quickly get an overview of the key logics by looking at the assertions of the unit tests. They can also drill down to the details of the logics by playing around with the existing tests very quickly without doing lots of bored manual testings.</p><p>With the unit tests, the developers are more confident to make changes to the code not originally created by them. This implicitly create a team culture to share the knowledge of the business requirements, as well as the source code logics between the team members, so as easier to make up each others when there are emergent changes needed. There is a post talking about how to bring in the <a href="http://arstechnica.com/information-technology/2013/03/how-can-i-motivate-coworkers-to-write-unit-tests/">unit tests culture</a> to the team.</p><h3>Conclusion</h3><p>Unit Test itself doesn’t guarantee better works on the source code. Doing it in a right or wrong way could lead to the very different results. It requires a certain number of attends to get a better sense of how the unit tests should be fit in your projects.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=490d523e0437" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>