<?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 Batista Harahap on Medium]]></title>
        <description><![CDATA[Stories by Batista Harahap on Medium]]></description>
        <link>https://medium.com/@tista?source=rss-9483775d7dab------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*yfcBAinqlFsxbXLZlwdNFg.jpeg</url>
            <title>Stories by Batista Harahap on Medium</title>
            <link>https://medium.com/@tista?source=rss-9483775d7dab------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 21:15:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tista/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[PlayGame — An Update for 2019]]></title>
            <link>https://medium.com/playgame-pxg/playgame-an-update-for-2019-f6d6d6374b8d?source=rss-9483775d7dab------2</link>
            <guid isPermaLink="false">https://medium.com/p/f6d6d6374b8d</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[playgames]]></category>
            <category><![CDATA[pxg]]></category>
            <dc:creator><![CDATA[Batista Harahap]]></dc:creator>
            <pubDate>Sat, 09 Feb 2019 08:21:57 GMT</pubDate>
            <atom:updated>2019-02-11T03:31:38.954Z</atom:updated>
            <content:encoded><![CDATA[<h3>PlayGame — An Update for 2019</h3><p>English | <a href="https://medium.com/playgame-pxg/playgame-menyongsong-2019-682f8411a50c">Bahasa Indonesia</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*TUqkN5rJLiR7D3pGqi7fXQ.jpeg" /></figure><p>It has been an exhilarating 2018 coming up to 2019 for us at PlayGame. Everything ran so quick, so fast and so deep.</p><p>A year ago today, it all started when <a href="https://twitter.com/antonsoeharyo">Anton Soeharyo</a> our CEO wrote down with his hand, what was supposed to be our “whitepaper” on a pink paper note. Today that concept has taken form as a rocket ship destined for the moon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*VMhk7rI0OYV80aznV4BegQ.jpeg" /><figcaption>The Famous Pink Notes</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XOBNKcCk_PqiSWkEiZWqOA.jpeg" /><figcaption>Anton gathering support by meeting likeminded people and some of whom eventually become our advisor and supporter</figcaption></figure><p>Let me take you on a retro tour of PlayGame’s journey from 2018 to 2019.</p><p>The date was July 5th, 2018.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/150/1*5WjgCTdJbSGn3KKm1p94fQ@2x.png" /><figcaption>PXG Logo designed by <a href="https://medium.com/u/80f796519ac2">Aria Rajasa</a> our Cofounder</figcaption></figure><p>This is the date our PXG token was deployed in the Ethereum main-net. At that time there were only 7 of us full time. Here’s a link below to the transaction to deploy the Smart Contract.</p><p><a href="https://etherscan.io/tx/0x662ab62319ec8cbe28cc02e2f24bc8fc07081280e699eba81666f505d82f8ac7">Ethereum Transaction 0x662ab62319ec8cbe28cc02e2f24bc8fc07081280e699eba81666f505d82f8ac7</a></p><p>The date was July 27th, 2018.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/125/1*iIKQVouf8yBF14uEzjWr8Q.jpeg" /><figcaption>The first competition was for T-rex Runner</figcaption></figure><p>The first competition is played in <a href="https://playgame.com/">PlayGame.com</a>. Although it was ran by the people who built PlayGame, this was monumental for us. As the CTO, me, 3 other software engineers and a designer who believes in PlayGame early coded through the month to make this happen.</p><p>The date was August 27th, 2018.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*m_ytEy9uQMrZcrr04LgLWA.png" /><figcaption>TEN To The Moon in partnership with Tokenomy</figcaption></figure><p>During our Pre-ICO, we partnered with <a href="https://tokenomy.com/">Tokenomy</a> to bring <a href="https://twitter.com/OscarDarmawan">Oscar Darmawan</a> their CMO who is also CEO of <a href="https://indodax.com/">Indodax</a> to life. There were 10,000 TEN to be awarded for the winners.</p><p>This competition taught us the hard way that money oriented incentives will surely invite people to try to game the game. We are grateful for this as this becomes the foundation for our next efforts to use blockchain as the answer for cheaters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*sMHt6W7iQmpdnqkvom_zuQ.png" /><figcaption>TEN To The Moon Competition</figcaption></figure><p>During this period, our peak Daily Active Users (DAU) skyrocketed to <strong>1,793 users</strong> producing a peak day of <strong>25,949 competition matches</strong>. An interesting fact made us shake our heads in amazement, instead of the <a href="https://playgame.com/game/tentothemoon">TEN To The Moon</a> game, our <a href="https://playgame.com/game/flappybird">Floppy Bird</a> was the most played game. It has stayed true to this day that made us decide to have this game as our <a href="https://medium.com/playgame-pxg/term-and-condition-for-super-competition-6e7d4caa449">Super Tournament</a> running today.</p><p>Another fact is that during this period there were a total of more than <strong>125,000 competition matches</strong> played on all of our games at the moment.</p><p>The dates were Sep 24th, 2018 and Oct 24th, 2018.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LOmqkx5EWD77AeROAJjlcA.png" /><figcaption>Thank You!</figcaption></figure><p>Those dates were the date for when we started the<a href="https://launchpad.tokenomy.com/playgame"> ICO on Tokenomy’s</a> brand new <a href="https://launchpad.tokenomy.com/">Launchpad platform</a> and when it ended. In total we sold 600,000,000 PXG tokens out of a supply of 1,000,000,000 PXG. Thank you everyone for your support!</p><p>To be successful in such a bear market is an achievement we hold dear. Again, we thank you for your believe in PlayGame.</p><p>The date was Oct 24th, 2018.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*Xqd05MS11OIxs9h4zC_DdQ.jpeg" /><figcaption>Proof of Play (PoP)</figcaption></figure><p>We closed our ICO with a new innovative concept of dealing with cheaters. PlayGame calls this <a href="https://medium.com/playgame-pxg/introducing-proof-of-play-solving-online-game-cheaters-with-blockchain-technology-4e309a833b18"><strong>Proof of Play (PoP)</strong></a>. Instead of trusting the scores generated by games, we compile player moves into final scores. These data is then validated and stored eternally on a Sidechain based on <a href="https://tendermint.com/">Tendermint</a>.</p><p>It is our belief that Tendermint will change the ball game in the blockchain side of things. By enabling us to do custom logic on top of the Distributed Proof of Stake (DPoS) consensus layer, we can focus more on getting our product right. We applaud Tendermint for bringing this innovation to the world!</p><p>The months were September to December 2018.</p><p>We learnt about the blockchain business from China. The cofounders flew back and forth to China visiting 5 cities there to learn about how blockchain is being used there. During our trip we met with a lot of blockchain companies both big and small. We are lucky enough to be invited to their offices and learn firsthand how China is leading the innovation.</p><p>Our CSO William Riyadi and CEO Anton Soeharyo paved the way for PlayGame to be recognized. One of the deeds of their work resulted in a <a href="https://medium.com/playgame-pxg/playgame-adds-achain-as-a-strategic-partnership-f2d47f94c984">strategic partnership with Achain</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BSQo62SPhLJRzMRnSZEt6A.jpeg" /><figcaption>PlayGame x Achain (ACT)</figcaption></figure><p>PXG was also listed the first time on an exchange called CoinTiger. They boast 1.1 million users coming from Greater China and the rest of the world. It was a cold and rainy day when we shook hands. PXG is currently trading in ETH and BTC markets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b6EpH5wmRUbz2bBig-5H8Q.jpeg" /><figcaption>PlayGame x Cointiger</figcaption></figure><p>During the China trips we visited companies from the Top 30 coins with the largest market cap.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hW1KVQr4886wheTRBMy3gA.jpeg" /><figcaption>PlayGame x Onchain (ONT)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UBEdhgTKrflqmiwAWgnL9w.jpeg" /><figcaption>PlayGame x Tron (TRX)</figcaption></figure><p>On Dec 11, 2018 we announced that Walt Disney SEA is partnering with us. We agreed upon a partnership that will bring Disney games into PlayGame.com.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*500BKIAalG6mSelmalX3xw.jpeg" /><figcaption>PlayGame x Disney</figcaption></figure><p>To top it off, on Dec 12th, 2018 <a href="https://medium.com/playgame-pxg/playgames-pxg-joins-top-tier-exchange-hitbtc-fa8619041557">PXG is listed on HitBTC</a>. PXG is traded in the BTC and USDT market.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*0IPiYDH9_kA3PI_KM2cgsA.png" /><figcaption>PXG Listed on HitBTC</figcaption></figure><p>No we’re not done yet, on Dec 13th, 2018 <a href="https://medium.com/playgame-pxg/playgame-wins-4-awards-at-shanghais-blockchainer-forum-2018-c472ff59e67f">PlayGame won 4 awards at Chain Plus Shanghai</a>. The awards are for:</p><ul><li>The most popular game award of blockchain in 2018</li><li>The best industry application award of blockchain in 2018</li><li>2018 blockchain best game creativity award</li><li>2018 Blockchain technology innovation award</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ndt5Eju6pVK7HX14ppW3dg.jpeg" /><figcaption>William Riyadi our CSO accepting one of the award</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L4-mxVF-kZ6ZnBVhaZVBqg.jpeg" /><figcaption>The awards we won</figcaption></figure><p>The date was Jan 4th, 2018.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*THpf1ZVWqWJ_P-SkcGxJAQ.jpeg" /><figcaption>PXG Listed on Tokenomy</figcaption></figure><p><a href="https://medium.com/playgame-pxg/pxg-now-listed-at-tokenomy-exchange-b3d982569e5c">PXG is listed on Tokenomy</a> where we had our ICO. This listing brings us closer to our home, Indonesia. PXG is traded in the BTC and TEN markets. To this day, PXG’s volume in Tokenomy continues to grow larger and larger.</p><p>The date was Jan 14th, 2019.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nICc41zb-FqloxCmS4X2Og.png" /></figure><p>We announced that without the gamers knowing, <a href="https://medium.com/playgame-pxg/we-proudly-present-proof-of-play-in-a-centralized-version-6a2d55ead4aa">we have implemented Proof of Play centrally</a>. We implemented it on our Tower Blocks game adapted to be played in Telegram through <a href="https://medium.com/playgame-pxg/telegram-group-game-competition-2-76024c02d4a4">this competition</a>.</p><p>The date was Jan 23rd, 2019.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NHNTFyPwvdfuH90JN-QLpA.png" /></figure><p><a href="https://medium.com/playgame-pxg/playgame-clinches-first-place-at-indodax-community-coin-voting-vi-5f9c7fcd0c39">PXG won Indodax Community Coin Voting</a> by a landslide. We outvoted the previous period’s runner up and also other coins which are in the Top 30 largest coin by market cap. Thank you for voting us!</p><p>On the same day, we also announced that PlayGame.com’s wallet is fully operational. Gamers can now deposit and withdraw PXG on our platform. To our amazement, since then <strong>paid competitions tops up 67% of all competitions being played</strong> in PlayGame.com.</p><p>With our wallet fully operational, this vindicates our product/market fit. We have a product we are proud for.</p><p>The date was Jan 30th, 2019.</p><p><a href="https://medium.com/playgame-pxg/playgame-super-tournament-d766fbcc9829">PlayGame launches our first Super Tournament</a> with rewards of PXG and also iPhone X.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*N5YGosErZ_a0tFuYBI5NMA.png" /></figure><p>The date was Feb 8th, 2019.</p><p><a href="https://medium.com/playgame-pxg/pxg-listing-on-indodax-d7041a428a53">PXG is announced to be listed in Indodax’s IDR market</a> on Feb 12th, 2019 at 12:00 PM UTC+7 along with BNB. Binance’s CEO himself tweeted about it.</p><h3>CZ Binance on Twitter</h3><p>Indodax is a big exchange in Indonesia, now supporting $bnb. #usebnb Apologies for the typo earlier. https://t.co/PetbZQmENq</p><p>We are now 23 people strong and PXG is now held in more than 8,000 wallets worldwide.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*U2k3nkN9Zfjzo2xl8LZFKQ.png" /><figcaption><a href="https://coinmarketcap.com/currencies/playgame/">https://coinmarketcap.com/currencies/playgame/</a></figcaption></figure><p>As you can see, during 2018 and 2019, we at PlayGame have made great strides on our quest to become the world’s choice for crypto arcade game competition platform. Our team is a team of seasoned and experienced entrepreneurs, engineers, designers, marketers, accountants and community workers. We focus on our fundamentals, our product.</p><p>In Q1 2019, we are focused to deliver more features to accelerate the adoption of cryptocurrencies in the gaming world. As early as this month, you will see that owning PXG will be easier, faster and friendlier. You can invite your friends to PlayGame.com and let them get their PXG directly from our platform to compete with you.</p><p>Stay tuned for an eventful Q1 2019. PXG to the moon 🚀</p><p>One more thing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D2yeWC0GOMB26gaGyRApmg.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f6d6d6374b8d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/playgame-pxg/playgame-an-update-for-2019-f6d6d6374b8d">PlayGame — An Update for 2019</a> was originally published in <a href="https://medium.com/playgame-pxg">playgame_pxg</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PlayGame — Menyongsong 2019]]></title>
            <link>https://medium.com/playgame-pxg/playgame-menyongsong-2019-682f8411a50c?source=rss-9483775d7dab------2</link>
            <guid isPermaLink="false">https://medium.com/p/682f8411a50c</guid>
            <category><![CDATA[pxg]]></category>
            <category><![CDATA[playgames]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Batista Harahap]]></dc:creator>
            <pubDate>Sat, 09 Feb 2019 08:21:48 GMT</pubDate>
            <atom:updated>2019-02-11T03:31:18.734Z</atom:updated>
            <content:encoded><![CDATA[<h3>PlayGame — Menyongsong 2019</h3><p><a href="https://medium.com/playgame-pxg/playgame-an-update-for-2019-f6d6d6374b8d">English</a> | Bahasa Indonesia</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*TUqkN5rJLiR7D3pGqi7fXQ.jpeg" /></figure><p>Tahun 2018 menjadi tahun yang penuh momen menuju 2019 bagi PlayGame. Berbagai hal yang kami lakukan berjalan dengan cepat dan menyeluruh.</p><p>Tepat 1 tahun lalu hari ini, semuanya bermulai ketika <a href="https://twitter.com/antonsoeharyo">Anton Soeharyo</a> CEO kami menulis dengan tangannya apa yang semestinya menjadi “whitepaper” kami di setumpuk kertas merah muda. Hari ini konsep tersebut telah memiliki bentuk sebagai roket dengan tujuan ke bulan.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*VMhk7rI0OYV80aznV4BegQ.jpeg" /><figcaption>Kertas Merah Muda yang Terkenal</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XOBNKcCk_PqiSWkEiZWqOA.jpeg" /><figcaption>Anton bersama pendukung-pendukung awal PlayGame yang nantinya menjadi <em>advisor</em> kami</figcaption></figure><p>Ijinkan saya membawa anda dalam tur retro dalam perjalanan PlayGame dari 2018 menuju 2019.</p><p>Tanggalnya 25 Juli 2018.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/150/1*5WjgCTdJbSGn3KKm1p94fQ@2x.png" /><figcaption>Logo PXG didesain oleh <a href="https://medium.com/u/80f796519ac2">Aria Rajasa</a> Cofounder kami</figcaption></figure><p>Hari ini adalah ketika PXG token kami distribusi di Ethereum main-net. Saat itu baru ada 7 orang dari kami bekerja penuh. Di bawah ini adalah pranala kepada transaksi untuk distribusi Smart Contract.</p><p><a href="https://etherscan.io/tx/0x662ab62319ec8cbe28cc02e2f24bc8fc07081280e699eba81666f505d82f8ac7">Ethereum Transaction 0x662ab62319ec8cbe28cc02e2f24bc8fc07081280e699eba81666f505d82f8ac7</a></p><p>Tanggalnya 27 Juli 2018.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*m_ytEy9uQMrZcrr04LgLWA.png" /><figcaption>TEN To The Moon kerjasama dengan Tokenomy</figcaption></figure><p>Dalam periode Pre-ICO kami kerjasama dengan <a href="https://tokenomy.com/">Tokenomy</a> untuk membawa <a href="https://twitter.com/OscarDarmawan">Oscar Darmawan</a> CMO mereka dan juga CEO dari <a href="https://indodax.com/">Indodax</a> ke dunia kami. Saat itu ada 10.000 TEN sebagai hadiah kepada para pemenang.</p><p>Kompetisi ini mengajarkan kami bahwa insentif finansial akan mengundang peserta-pesertanya untuk berusaha mengakali kompetisinya. Kami bersyukur akan hal ini karena ini menjadi fondasi kami untuk menggunakan Blockchain sebagai solusi.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*sMHt6W7iQmpdnqkvom_zuQ.png" /><figcaption>Kompetisi TEN To The Moon</figcaption></figure><p>Dalam periode ini, Daily Active Users kami meroket ke <strong>1,793 gamer</strong> yang menghasilkan <strong>25,949 pertandingan dalam 1 hari</strong> saja. Fakta menarik yang membuat kami geleng-geleng kepala adalah permainan <a href="https://playgame.com/game/flappybird">Floppy Bird</a> menjadi yang paling dimainkan dibandingkan <a href="https://playgame.com/game/tentothemoon">TEN To The Moon</a>. Inilah yang menjadi dasar keputusan kami untuk Floppy Bird menjadi permainan untuk <a href="https://medium.com/playgame-pxg/playgame-super-tournament-d766fbcc9829">Super Tournament</a> kami.</p><p>Fakta lainnya adalah dalam periode ini ada <strong>lebih dari 125.000 pertandingan dimainkan di seluruh permainan kami</strong> pada saat itu.</p><p>Tanggal-tanggalnya 24 September 2018 dan 24 Oktober 2018.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LOmqkx5EWD77AeROAJjlcA.png" /><figcaption>Terima Kasih!</figcaption></figure><p>Tanggal-tanggal tersebut adalah tanggal bermula dan berakhirnya <a href="https://launchpad.tokenomy.com/playgame">ICO kami</a> di <a href="https://launchpad.tokenomy.com/">Tokenomy Launchpad</a>. Kami menjual 600.000.000 PXG dari total persediaan 1.000.000.000 PXG. Terima kasih kepada anda pendukung kami!</p><p>Untuk menjadi sukses dalam keadaan pasar bearish, ini adalah prestasi tersendiri untuk kami. Sekali lagi, terima kasih atas kepercayaan anda terhadap PlayGame.</p><p>Tanggalnya 24 Oktober 2018.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*Xqd05MS11OIxs9h4zC_DdQ.jpeg" /><figcaption>Proof of Play (PoP)</figcaption></figure><p>Kami menutup ICO kami dengan sebuah konsep inovatif untuk berhadapan dengan cheaters bertajuk <a href="https://medium.com/playgame-pxg/introducing-proof-of-play-solving-online-game-cheaters-with-blockchain-technology-4e309a833b18">Proof of Play (PoP)</a>. Untuk semua gerakan yang anda sebagai gamer lakukan dalam sebuah permainan, kami susun gerakan-gerakan tersebut dan validasi untuk menghasilkan skor. Jika sebelumnya skor dihasilkan oleh setiap permainan, kali ini skor hanya ditentukan oleh algoritma kami. Data ini kemudian divalidasi dan disimpan secara kekal di Sidechain kami yang dibuat dengan <a href="https://tendermint.com/">Tendermint</a>.</p><p>Adalah kepercayaan kami bahwa Tendermint akan memberikan hembusan baru kepada teknologi blockchain. Dengan memberikan kami kesempatan untuk bisa membuat algoritma diatas sistem konsensus Distributed Proof of Stake, kami dapat fokus lebih ke produk kami. Tepuk tangan untuk Tendermint yang membawa inovasi ini kepada dunia!</p><p>Bulan-bulannya adalah September hingga Desember 2018.</p><p>Kami belajar mengenai bisnis blockchain dari negri Tiongkok. Para Cofounder terbang bolak-balik ke Tiongkok mengunjungi 5 kota disana untuk mempelajari bagaimana blockchain digunakan. Dalam perjalanan kami, kami bertemu dengan banyak perusahaan blockchain baik yang kecil maupun besar. Kami merasa beruntung dapat diundang ke kantor mereka dan belajar langsung bagaimana Tiongkok memimpin inovasi di ruang ini.</p><p>CSO kami William Riyadi dan CEO kami Anton Soeharyo membuka jalan agar PlayGame dapat dikenal. Salah satu hasil kerja keras mereka adalah sebuah <a href="https://medium.com/playgame-pxg/playgame-mengumumkan-kerjasama-strategis-dengan-achain-ad76a4409716">rekanan strategis dengan Achain</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BSQo62SPhLJRzMRnSZEt6A.jpeg" /><figcaption>PlayGame x Achain (ACT)</figcaption></figure><p>Untuk pertama kalinya PXG juga listed di sebuah exchange bernama CoinTiger. Mereka memiliki lebih dari 1,1 juta pengguna dari Tiongkok &amp; sekitarnya berikut dunia. PXG diperdagangkan di pasar ETH dan BTC.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b6EpH5wmRUbz2bBig-5H8Q.jpeg" /><figcaption>PlayGame x Cointiger</figcaption></figure><p>Dalam perjalanan kami di Cina, kami mengunjungi perusahaan-perusahaan Top 30 berdasarkan market cap.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hW1KVQr4886wheTRBMy3gA.jpeg" /><figcaption>PlayGame x Onchain (ONT)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UBEdhgTKrflqmiwAWgnL9w.jpeg" /><figcaption>PlayGame x Tron (TRX)</figcaption></figure><p>Pada 11 Desember 2018 kami mengumumkan kepada dunia bahwa <a href="https://medium.com/playgame-pxg/playgame-berkolaborasi-dengan-the-walt-disney-company-southeast-asia-untuk-menghadirkan-rangkaian-7ea938c1da0a">Walt Disney SEA kerjasama dengan kami</a>. Kami sepakat untuk membawa permainan-permainan Disney ke PlayGame.com.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*500BKIAalG6mSelmalX3xw.jpeg" /><figcaption>PlayGame x Disney</figcaption></figure><p>Untuk menutupnya pada 12 Desember 2018 kami <a href="https://medium.com/playgame-pxg/playgames-pxg-joins-top-tier-exchange-hitbtc-fa8619041557">listing di HitBTC</a>. PXG diperdagangkan di pasar BTC dan USDT.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*0IPiYDH9_kA3PI_KM2cgsA.png" /></figure><p>Kami belum selesai. Di 13 Desember 2018, <a href="https://medium.com/playgame-pxg/playgame-wins-4-awards-at-shanghais-blockchainer-forum-2018-c472ff59e67f">PlayGame memenangkan 4 penghargaan di Chain Plus Shanghai</a>. Kami memenangkan penghargaan di kategori-kategori ini:</p><ul><li>The Most Popular Game Award of Blockchain in 2018</li><li>The Best Industry Application Award of Blockchain in 2018</li><li>2018 Blockchain Best Game Creativity Award</li><li>2018 Blockchain Technology Innovation Award</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ndt5Eju6pVK7HX14ppW3dg.jpeg" /><figcaption>William Riyadi CSO kami menerima penghargaan</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L4-mxVF-kZ6ZnBVhaZVBqg.jpeg" /><figcaption>Penghargaan-penghargaan yang kami menangkan</figcaption></figure><p>Tanggalnya 4 Januari 2019.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*THpf1ZVWqWJ_P-SkcGxJAQ.jpeg" /></figure><p><a href="https://medium.com/playgame-pxg/pxg-now-listed-at-tokenomy-exchange-b3d982569e5c">PXG listing di Tokenomy</a> dimana ICO kami berlangsung. Dengan listing ini, kami makin dekat dengan Indonesia. PXG diperdagangkan di pasar BTC dan TEN. Hingga hari ini, volume PXG di Tokenomy semakin membesar.</p><p>Tanggalnya 14 Januari 2019.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nICc41zb-FqloxCmS4X2Og.png" /></figure><p>Kami mengumumkan bahwa tanpa diketahui oleh gamer, <a href="https://medium.com/playgame-pxg/we-proudly-present-proof-of-play-in-a-centralized-version-6a2d55ead4aa?source=---------9">kami telah implementasi Proof of Play secara tersentral</a>. Implementasi tersebut hadir di permainan Tower Blocks yang bisa dimainkan di Telegram melalui <a href="https://medium.com/playgame-pxg/telegram-group-game-competition-2-25c4be25824e">kompetisi ini</a>.</p><p>Tanggalnya 23 Januari 2019.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NHNTFyPwvdfuH90JN-QLpA.png" /></figure><p><a href="https://medium.com/playgame-pxg/playgame-clinches-first-place-at-indodax-community-coin-voting-vi-5f9c7fcd0c39?source=---------7">PXG memenangkan Indodax Community Coin Voting</a> secara absolut. Kami mengungguli runner up periode sebelumnya dan juga koin-koin Top 30 lainnya. Terima kasih atas kepercayaan anda!</p><p>Di hari yang sama, kami juga mengumumkan bahwa wallet di PlayGame.com telah berfungsi penuh. Anda kini dapat deposit dan withdraw PXG di platform kami. Sejak ini, <strong>kompetisi berbayar menguasai 67% dari keseluruhan kompetisi yang terjadi</strong> di PlayGame.com.</p><p>Dengan wallet kami yang sudah berfungsi penuh, ini membuktikan keteguhan kami bahwa kami telah menemukan kecocokan antar produk dan pasar. Kami sangat bangga!</p><p>Tanggalnya 30 Januari 2019.</p><p><a href="https://medium.com/playgame-pxg/playgame-super-tournament-d766fbcc9829?source=---------3">PlayGame meluncurkan Super Tournament pertama kami</a> dengan hadiah PXG dan iPhone X.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*N5YGosErZ_a0tFuYBI5NMA.png" /></figure><p>Tanggalnya 8 Februari 2019.</p><p><a href="https://medium.com/playgame-pxg/pxg-akan-segera-listing-di-indodax-4f5c841a9f14?source=---------1">PXG diumumkan untuk listing di pasar IDR Indodax</a> pada 12 Februari 2019 pukul 12:00 UTC+7 berbarengan dengan BNB. Bahkan CEO Binance menyerukan hal ini juga lewat akun Twitter-nya.</p><h3>CZ Binance on Twitter</h3><p>Indodax is a big exchange in Indonesia, now supporting $bnb. #usebnb Apologies for the typo earlier. https://t.co/PetbZQmENq</p><p>Kami sekarang terdiri dari 23 orang dan PXG sekarang telah disimpan di lebih dari 8.000 wallet di seluruh dunia.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*U2k3nkN9Zfjzo2xl8LZFKQ.png" /><figcaption><a href="https://coinmarketcap.com/currencies/playgame/">https://coinmarketcap.com/currencies/playgame/</a></figcaption></figure><p>Seperti yang saya paparkan disini, dari 2018 menuju 2019 kami di PlayGame telah melakukan banyak hal besar dan kecil dalam misi kami untuk menjadi pilihan dunia untuk platform kompetisi crypto arcade game. Tim kami terdiri dari orang-orang yang berpengalaman dalam di bidangnya masing-masing. Kami fokus pada fundamental kami yaitu <strong>produk</strong>.</p><p>Dalam Q1 2019, kami fokus untuk menghantarkan lebih banyak fitur yang akan akselerasi adopsi cryptocurrency di dunia gaming. Seawal-awalnya bulan ini, anda akan dapat merasakan sendiri betapa mudah dan cepatnya memiliki PXG. Undang teman-teman ke PlayGame.com dimana mereka dapat langsung membeli PXG di platform kami.</p><p>Siap-siap untuk Q1 2019 yang penuh kejutan dari kami. PXG to the moon 🚀</p><p>Satu lagi.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D2yeWC0GOMB26gaGyRApmg.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=682f8411a50c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/playgame-pxg/playgame-menyongsong-2019-682f8411a50c">PlayGame — Menyongsong 2019</a> was originally published in <a href="https://medium.com/playgame-pxg">playgame_pxg</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Storing, Calculating and Communicating Big Numbers]]></title>
            <link>https://medium.com/playgame-pxg/storing-calculating-and-communicating-big-numbers-747222972f7f?source=rss-9483775d7dab------2</link>
            <guid isPermaLink="false">https://medium.com/p/747222972f7f</guid>
            <category><![CDATA[playgames]]></category>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[big-number]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <dc:creator><![CDATA[Batista Harahap]]></dc:creator>
            <pubDate>Wed, 24 Oct 2018 13:02:17 GMT</pubDate>
            <atom:updated>2018-10-24T13:02:17.586Z</atom:updated>
            <content:encoded><![CDATA[<p>Building PlayGame from scratch brings the engineering team to something new every day. One of those things is dealing with very large numbers. The smallest unit of Ether is Wei. This post is written to address how to store, calculate and communicate big numbers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8tr1lwX46SStpZO0-oyDPA.png" /><figcaption>Big Numbers</figcaption></figure><p>Our first rule of thumb is that we will always communicate in Wei anywhere in the stack. A single Ether is equal to 10 to the power of 18 Wei. As you can see, this is a very big number. We communicate in Wei so that there will be no rounding and precision is lost during operations. More about the units <a href="http://ethdocs.org/en/latest/ether.html">here</a>.</p><p>Disclosure: Before PlayGame, we’ve built a stateless trading bot. We got a little bit of experience there to prepare for building a cryptocurrency platform. We know a little bit more now.</p><p>Most programming languages and databases will come with these constraints with Integers:</p><ul><li>Positive integers max size is usually 2⁶⁴-1</li><li>JavaScript’s Number.MAX_SAFE_INTEGER is 2⁵³-1</li></ul><p>Our frontend is based entirely in <a href="https://reactjs.org/">React</a> so I figure I put in a language specific constraint. The backend is Python3 based and we can do arbitrary sizes for integer without losing precision.</p><p>The big questions is how do we store the numbers?</p><p>I’ve looked into databases and the max integer limit holds at 2⁶⁴-1. You’d ask why is this a problem right? Here’s how Ether is represented to explain:</p><pre>1 Ether = 10^18 Wei</pre><pre>&gt;&gt;&gt;((2 ** 64) - 1) - (1000000000 * (10 ** 18))<br>-999999981553255926290448385</pre><p>PXG has 18 decimals with a supply of 1 billion tokens, hence the above equation.</p><p>The answer on how to store: Strings. This affected the whole cycle of not just storing but also calculating and communicating very big numbers.</p><p>I choose MongoDB since it store <a href="https://docs.mongodb.com/manual/reference/bson-types/#string">strings as UTF-8</a>. Since Python3 also store strings as UTF-8, let’s see how big the storage would take up.</p><pre>&gt;&gt;&gt; a = &#39;1000000000000000000000000000&#39;<br>&gt;&gt;&gt; sys.getsizeof(a)<br>77</pre><p>The largest string value to be stored is exactly 77 bytes. A MongoDB BSON document can have a maximum size of 16 Megabytes which is more than enough.</p><p>With the information above, let’s simulate how big the storage would be with these assumptions:</p><ul><li>1 million users</li><li>1000 ledger entries per user</li></ul><pre>&gt;&gt;&gt; users = 1000000<br>&gt;&gt;&gt; ledger_entries = 1000<br>&gt;&gt;&gt; size_of_entry = 77<br>&gt;&gt;&gt; users * ledger_entries * size_of_entry / 1024 / 1024 / 1024<br>71.71183824539185</pre><p>There we have it, <strong>71.7 GB</strong> of storage. Not bad since storage is cheap nowadays. Since we’re using MongoDB, the data will be around 35% smaller due to being saved as BSON. This would reduce the total size to <strong>25 GB</strong>.</p><p>Storing numbers as strings has its own computing overhead. To avoid precision loss, we need to calculate using the CPU. There are ways to mitigate this which I would gladly write about in the next postings.</p><p>PlayGame is hiring new talents, join our <a href="https://its.playgame.com/">Telegram community</a> and mention me there. Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=747222972f7f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/playgame-pxg/storing-calculating-and-communicating-big-numbers-747222972f7f">Storing, Calculating and Communicating Big Numbers</a> was originally published in <a href="https://medium.com/playgame-pxg">playgame_pxg</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Handlersocket is MyNoSQL]]></title>
            <link>https://medium.com/prismapp/handlersocket-is-mynosql-80a34dd2e779?source=rss-9483775d7dab------2</link>
            <guid isPermaLink="false">https://medium.com/p/80a34dd2e779</guid>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Batista Harahap]]></dc:creator>
            <pubDate>Wed, 14 Sep 2016 10:42:32 GMT</pubDate>
            <atom:updated>2017-04-21T08:28:53.972Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/485/1*y8ZIqX7DJHAJeUjYzlyv4A.jpeg" /></figure><p>Some years back, I was trying to solve a session storage problem. The session data was already in MySQL but it’s slowing down the whole user experience. Needed to find a solution which introduced me to <a href="https://github.com/DeNA/HandlerSocket-Plugin-for-MySQL">Handlersocket</a>. Although in the end I decided to not use Handlersocket but the learning helped me to pick up performance in other parts of the website.</p><blockquote>HandlerSocket is a NoSQL plugin for MySQL, working as a daemon inside the mysqld process, to accept tcp connections, and execute requests from clients. HandlerSocket does not support SQL queries; instead it supports simple CRUD operations on tables.</blockquote><p>In short, it’s MySQL without SQL and Redis with SQL.</p><p>Go ahead and have a read at <a href="https://github.com/DeNA/HandlerSocket-Plugin-for-MySQL">https://github.com/DeNA/HandlerSocket-Plugin-for-MySQL</a></p><p>To follow through the article make sure you have these:</p><ol><li>MariaDB 10.1.x</li><li>Python 2.7.x</li><li>PIP</li></ol><p>Let’s enable Handlersocket in MariaDB following the MariaDB KB from <a href="https://mariadb.com/kb/en/mariadb/handlersocket-installation/">here</a>. If you’re successful, query <em>SHOW PROCESSLIST</em> and you will see the result below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vRm3U2NXOLcOb5BWONDJRw.png" /><figcaption>Handlersocket active in MariaDB</figcaption></figure><p>For this article, let’s create a table like below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f4e4f2b3bec3cb088ef20dba98e6b81b/href">https://medium.com/media/f4e4f2b3bec3cb088ef20dba98e6b81b/href</a></iframe><p>Next, let’s add some data to it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*TBy4f6IHmnA9OWwSJrG3zA.png" /><figcaption>User table content</figcaption></figure><p>Now let’s do retrieve some data using Handlersocket with Python.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a5582ffbfe17f5d2cc2a28539598e86f/href">https://medium.com/media/a5582ffbfe17f5d2cc2a28539598e86f/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a51455bd6419e377c5be19cf27c34d72/href">https://medium.com/media/a51455bd6419e377c5be19cf27c34d72/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2685aae7c6d49d3d857a352b7af9744a/href">https://medium.com/media/2685aae7c6d49d3d857a352b7af9744a/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e79e5d95fc293943d61f14537b7f1b9b/href">https://medium.com/media/e79e5d95fc293943d61f14537b7f1b9b/href</a></iframe><p>The example above retrieved a user by using the user’s ID on the database <em>fun</em>. As you can see, we determine which columns we want from each query. However, the <em>get</em> method is only usable if we want to query the PRIMARY KEY, what if we want to query the <em>user_name</em> column?</p><p>Let’s add another index and see how the query goes.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e2f5be7e0afaade67fceedaf078cac8c/href">https://medium.com/media/e2f5be7e0afaade67fceedaf078cac8c/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a76d2dde4e17e05ae0eb6c300fc52237/href">https://medium.com/media/a76d2dde4e17e05ae0eb6c300fc52237/href</a></iframe><p>In case you have a composite index then you should remember that the order of the indexed columns must match the order of the column values you want to query.</p><p>So to cut things short, let’s benchmark! Let’s measure request/second when using Handlersocket VS MySQL with the codes below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7f474149f6783f3080597be8f7ba2934/href">https://medium.com/media/7f474149f6783f3080597be8f7ba2934/href</a></iframe><p>The results on my laptop are in:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7c837ec5e1dc5fe5b85827f830765ced/href">https://medium.com/media/7c837ec5e1dc5fe5b85827f830765ced/href</a></iframe><p><strong>DISCLAIMER:</strong> the codes are ran on a single core meaning Python &amp; MySQL are racing for CPU time.</p><p>During the benchmark, I watched the CPU by doing `$ top -F -R -o cpu` on my Macbook. On the first Handlersocket run, MySQL used <strong>~35%</strong> CPU and the rest for Python while on the second MySQL run, MySQL used <strong>~65%</strong>. This is expected since the SQL layer of MySQL got to work on the MySQL run.</p><p>With Handlersocket we get a <strong>~130%</strong> more queries/second compared to MySQL raw query with almost half the MySQL cpu time needed.</p><p>Our next bite sized blog post will try and create a web session storage based on Handlersocket. Until next time!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=80a34dd2e779" width="1" height="1" alt=""><hr><p><a href="https://medium.com/prismapp/handlersocket-is-mynosql-80a34dd2e779">Handlersocket is MyNoSQL</a> was originally published in <a href="https://medium.com/prismapp">prismapp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Composite Indexes in MySQL]]></title>
            <link>https://medium.com/prismapp/composite-indexes-in-mysql-bb77be1dde6e?source=rss-9483775d7dab------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb77be1dde6e</guid>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Batista Harahap]]></dc:creator>
            <pubDate>Tue, 30 Aug 2016 04:19:23 GMT</pubDate>
            <atom:updated>2017-04-21T08:28:26.992Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/826/1*Yfo7gXgtmKbNiMjtPhZTXw.jpeg" /></figure><p>My <a href="https://medium.com/skyfishtech/indexing-mysql-with-examples-f426332ea3ec">last MySQL article</a> talked about the basics of indexes in MySQL, now let’s do more with what we know. Introducing <em>Composite Index</em>, the kind of index that is comprised of more than 1 column. Read on.</p><p>So let’s start with a simple table like below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4334d3e0a99c5538405b663a3ca67f67/href">https://medium.com/media/4334d3e0a99c5538405b663a3ca67f67/href</a></iframe><p>The only index is the <em>Primary Key</em>, no other index is created yet. Here’s our initial data.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/58a9f6faf2ad7546a9b21ec7a9404edc/href">https://medium.com/media/58a9f6faf2ad7546a9b21ec7a9404edc/href</a></iframe><p>For our next task, we want to query MySQL based on the user’s first and last name. Here’s the query and the result.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/608377b29075ae8ca38fab3d40b0ab6f/href">https://medium.com/media/608377b29075ae8ca38fab3d40b0ab6f/href</a></iframe><p>The above done, let’s add the <em>EXPLAIN</em> statement like we did before.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6fe066acb1c1a8650650a14e6186eee5/href">https://medium.com/media/6fe066acb1c1a8650650a14e6186eee5/href</a></iframe><p>As you can see, MySQL scanned through the whole table rows to get the result. Let’s try to add an index for both the <em>first_name</em> and <em>last_name</em> column. Afterwards, let’s rerun the <em>EXPLAIN</em> query one more time.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/04ef587e5694df2c3cdcb89ea2b30fe6/href">https://medium.com/media/04ef587e5694df2c3cdcb89ea2b30fe6/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/eec229ae8d9cce5bd628ae72f52fc98a/href">https://medium.com/media/eec229ae8d9cce5bd628ae72f52fc98a/href</a></iframe><p>We can see from the <em>EXPLAIN</em> result that MySQL got the result directly by using our newly created composite index.</p><p>Now that we have our footing firmer, we need to know what the columns mean whenever we do an <em>EXPLAIN</em>. For the sake of brevity, I’m pasting the explanation from <a href="https://www.sitepoint.com/using-explain-to-write-better-mysql-queries/">here</a> below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8b9e21ab7a85d72568d2ad321d927675/href">https://medium.com/media/8b9e21ab7a85d72568d2ad321d927675/href</a></iframe><p>On my next article, let’s talk more about utopian ideals when planning for queries. Until then, Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb77be1dde6e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/prismapp/composite-indexes-in-mysql-bb77be1dde6e">Composite Indexes in MySQL</a> was originally published in <a href="https://medium.com/prismapp">prismapp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cython: C Extensions for Python]]></title>
            <link>https://medium.com/prismapp/cython-c-extensions-for-python-33acbd53c5e8?source=rss-9483775d7dab------2</link>
            <guid isPermaLink="false">https://medium.com/p/33acbd53c5e8</guid>
            <category><![CDATA[cython]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Batista Harahap]]></dc:creator>
            <pubDate>Sun, 28 Aug 2016 16:01:12 GMT</pubDate>
            <atom:updated>2017-04-21T08:28:04.276Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*xUaFmP--DyCXCZOLuEAkxA.png" /></figure><p>A few years back I was learning something that is CPU intensive. It was written in PHP at first, wasn’t satisfied with the performance. Rewrote the whole thing in Python, it was worse, same thing with PyPy only a bit better. So f*ck it I said to myself, let’s learn Cython.</p><p><strong>Problem Domain</strong></p><p>Let me reiterate what I want to achieve:</p><ol><li>Write codes in Python (sort of)</li><li>Do CPU intensive tasks</li><li>Fast</li></ol><p>Also, I don’t want to waste too much time researching and not getting anything done. So there you go, the perfect reasonings to learn something new: Cython.</p><p>For demo purposes, let’s write some codes and Cythonize.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bca8d2031418951421eb6ba85ba03a35/href">https://medium.com/media/bca8d2031418951421eb6ba85ba03a35/href</a></iframe><p>I’m using a 2015 i5 Macbook Air and here is my result using plain Python:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5b017afa25f90cac46e918060c3fcc91/href">https://medium.com/media/5b017afa25f90cac46e918060c3fcc91/href</a></iframe><p>Our first exercise will just Cythonize the plain source code above, this is what we do.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d9586975fe51594d99cc6dd92087bc40/href">https://medium.com/media/d9586975fe51594d99cc6dd92087bc40/href</a></iframe><p>As you can see there’s a new file called <em>cpuload.c</em> generated by Cython. Satisfy your curiosity, go ahead and see what’s inside.</p><p>Next up, we need to compile the C source code into a C extension we can use in our Python code. Now we need to create a <em>setup.py</em> file to do this.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0fd4b7bb2ac2f4f12c621abefb4aa22c/href">https://medium.com/media/0fd4b7bb2ac2f4f12c621abefb4aa22c/href</a></iframe><p>Ok let’s compile then.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5c8874ed1603d07dee2d7041b7f21b1d/href">https://medium.com/media/5c8874ed1603d07dee2d7041b7f21b1d/href</a></iframe><p>Next up is to benchmark the C extension, let’s write some codes.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f2e32640e96f4dfcf910226e0460fc98/href">https://medium.com/media/f2e32640e96f4dfcf910226e0460fc98/href</a></iframe><p>If you see the code above, it looks the same with the Cythonized codes right? The only difference is that instead of defining the <em>load()</em> function, we <em>import</em> it from from the C Extension <em>cpuload</em>. So how did we fare so far in performance?</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4fecc6b0c0bb42ceb1589b9c78fbe18c/href">https://medium.com/media/4fecc6b0c0bb42ceb1589b9c78fbe18c/href</a></iframe><p>The first plain Python codes gave us <em>13,018,765.56 operations/second</em> while the Cythonized codes gave us <strong><em>25,903,031.00 operations/second</em></strong>. This is a <strong>198%</strong> speed up from plain Python. Happy right?</p><p>This concludes the first Cython piece, I will be writing more about how to gain more speedups and also some pitfalls. Until then! Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33acbd53c5e8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/prismapp/cython-c-extensions-for-python-33acbd53c5e8">Cython: C Extensions for Python</a> was originally published in <a href="https://medium.com/prismapp">prismapp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Indexing MySQL with Examples]]></title>
            <link>https://medium.com/prismapp/indexing-mysql-with-examples-f426332ea3ec?source=rss-9483775d7dab------2</link>
            <guid isPermaLink="false">https://medium.com/p/f426332ea3ec</guid>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[rdbms]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Batista Harahap]]></dc:creator>
            <pubDate>Sat, 27 Aug 2016 13:03:25 GMT</pubDate>
            <atom:updated>2017-04-21T08:27:19.969Z</atom:updated>
            <content:encoded><![CDATA[<p>Yesterday one of the mobile engineer in Skyfish asked me how indexes work in RDBMS, SQLite to be exact. He was looking for ways to shave time from a chat app he’s building. I told him the only explanation that makes sense for me is that an index equals the index in any book you’ve read.</p><p>I also told him that I don’t know about SQLite that much but I know MySQL. So the conversation continued with some writings on a paper. For this blog post, let’s say that we have an imaginary table of full names like below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4334d3e0a99c5538405b663a3ca67f67/href">https://medium.com/media/4334d3e0a99c5538405b663a3ca67f67/href</a></iframe><p>Let’s populate the table with some names.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/186/1*9aM1Vyw155OPe79hnoDrSQ.png" /><figcaption>Names Table</figcaption></figure><p>The only index in that table is the default, the <em>Primary Key</em>.</p><p>Let’s do a quick glance on how the <em>EXPLAIN</em> statement in MySQL will help you.</p><blockquote>The <a href="http://dev.mysql.com/doc/refman/5.7/en/describe.html">DESCRIBE</a> and <a href="http://dev.mysql.com/doc/refman/5.7/en/explain.html">EXPLAIN</a> statements are synonyms. In practice, the <a href="http://dev.mysql.com/doc/refman/5.7/en/describe.html">DESCRIBE</a> keyword is more often used to obtain information about table structure, whereas <a href="http://dev.mysql.com/doc/refman/5.7/en/explain.html">EXPLAIN</a> is used to obtain a query execution plan (that is, an explanation of how MySQL would execute a query) — <a href="http://dev.mysql.com/doc/refman/5.7/en/explain.html">Link</a></blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/61d6a1d0e2454a4e38cc08d6da37aadc/href">https://medium.com/media/61d6a1d0e2454a4e38cc08d6da37aadc/href</a></iframe><p>Pretty simple query right? Let’s make it more complex.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d34b83e7ab2b8449946ccbb34ba76798/href">https://medium.com/media/d34b83e7ab2b8449946ccbb34ba76798/href</a></iframe><p>Still simple right? Now let’s add the <em>EXPLAIN</em> statement.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6e98f2caabb860966b1574afa5dca6b2/href">https://medium.com/media/6e98f2caabb860966b1574afa5dca6b2/href</a></iframe><p>The output is saying to us that there are now index keys used and it scanned through the whole table (10 rows) to satisfy the <em>WHERE</em> clause. Let’s optimize this by giving an index to the last name.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d412d598ce87cf9a52610ce7ba67ed80/href">https://medium.com/media/d412d598ce87cf9a52610ce7ba67ed80/href</a></iframe><p>Let’s re-run the <em>EXPLAIN</em> query.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e5df9403b0dfd7886efc7005d3f88053/href">https://medium.com/media/e5df9403b0dfd7886efc7005d3f88053/href</a></iframe><p>As you can see, the query only scanned through 2 rows instead of 10 rows pre-index. It’s also saying that it’s using the <em>last_names</em> index we created for this query.</p><p>Question: how do we make sure that our queries are set up for success with the right indexes? To answer this, let’s take a look at another term you should be familiar with.</p><blockquote>Cardinality is a property which affects the ability to cluster, sort and search data. It is therefore an important measurement for the query planners in DBs, it is a heuristic which they can use to choose the best plans — <a href="http://stackoverflow.com/questions/2566211/what-is-cardinality-in-mysql">Link</a></blockquote><p>So what’s the cardinality of our <em>last_names</em> index then?</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2cf7fd7acc44729806a25444a4885c1d/href">https://medium.com/media/2cf7fd7acc44729806a25444a4885c1d/href</a></iframe><p>The output says 9 while we actually have 10 rows. But we have row 1 and row 2 with the same <em>last_name</em> value: Harahap. This means that other than the unique value Harahap, there are 8 other values for the column. This is why on our last <em>EXPLAIN</em> query, MySQL only scanned through 2 rows which are in fact the only rows with the Harahap value.</p><p>However, low or high cardinalities don’t necessarily mean that your indexes are set for success (low latency reads). The success of an index relies more on the dataset and the queries themselves but I’m gonna save it for another day.</p><p>As software engineers are taking up more roles in the engineering process, one must be able to appreciate the roles they are taking up.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f426332ea3ec" width="1" height="1" alt=""><hr><p><a href="https://medium.com/prismapp/indexing-mysql-with-examples-f426332ea3ec">Indexing MySQL with Examples</a> was originally published in <a href="https://medium.com/prismapp">prismapp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>