<?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 Andika D Riyandi (Rizary) on Medium]]></title>
        <description><![CDATA[Stories by Andika D Riyandi (Rizary) on Medium]]></description>
        <link>https://medium.com/@rizary?source=rss-f1b9fd3e6224------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*QgYwOnrP7GJVS1kYcCgRZQ.jpeg</url>
            <title>Stories by Andika D Riyandi (Rizary) on Medium</title>
            <link>https://medium.com/@rizary?source=rss-f1b9fd3e6224------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 23:41:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rizary/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[My Road to Web 3.0 — Challenges 1]]></title>
            <link>https://medium.com/@rizary/my-road-to-web-3-0-challenges-1-189ef50d90e0?source=rss-f1b9fd3e6224------2</link>
            <guid isPermaLink="false">https://medium.com/p/189ef50d90e0</guid>
            <dc:creator><![CDATA[Andika D Riyandi (Rizary)]]></dc:creator>
            <pubDate>Sun, 23 Oct 2022 11:12:25 GMT</pubDate>
            <atom:updated>2022-10-23T11:12:25.573Z</atom:updated>
            <content:encoded><![CDATA[<h3>My Road to Web 3.0 — Challenges 1</h3><p>This is my story in doing the first challenge in “My Road to Web 3.0 “, titled “How to Develop an NFT Smart Contract (ERC721) with Alchemy”</p><p>This blog is about my story in learning Web 3.0 (again) by doing the challenges in My Road to Web 3.0 by Alchemy.</p><p>In the first challenge, we learn how to:</p><ul><li>Connect our wallet</li><li>Writing our first smart contract</li><li>Writing our first NFT smart contract</li><li>Deploying smart contract using Remix</li><li>Connect our image using filebase as IPFS storage</li><li>Showcasing our NFT in opensea.com</li></ul><p>The first challenge is to make user not able to mint greater than 5 and it works by adding require function in our minting contract.</p><p>I hope you enjoy this short blog as required to get the NFT’s from Alchemy.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=189ef50d90e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Haskell-y Ever After: Summer Tales for Every Full-stack Developer (Part Two)]]></title>
            <link>https://medium.com/@rizary/haskell-y-ever-after-summer-tales-for-every-full-stack-developer-part-two-1a0b0c0b8879?source=rss-f1b9fd3e6224------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a0b0c0b8879</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[haskell]]></category>
            <category><![CDATA[functional-programming]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Andika D Riyandi (Rizary)]]></dc:creator>
            <pubDate>Sun, 25 Aug 2019 00:02:41 GMT</pubDate>
            <atom:updated>2019-08-31T13:03:20.022Z</atom:updated>
            <content:encoded><![CDATA[<h3>Haskelly Ever After: Summer Tales for Every Full-stack Developer (Part Two)</h3><h4>A Google Summer of Code’s student story about implementing Haskell on the Hackage Matrix Builder’s frontend application using Functional Reactive Programming approach.</h4><blockquote>TL;DR: This second part explained about what I have done during the second phase of GSoC, which implements the Hackage Matrix Builder routing part. There are two types of routing changes that I created during the second phase. The first one is standard link destination routing using href, and the other one is dropdown routing. I will also explain the challenges that I faced and the underlying Reflex-Dom concept on how to handling the routing properly. This post will also discuss some additional information that is needed for further routing references such as MTL, GHCJS, etc.</blockquote><h3>Previously…</h3><p>If you want to read the detail of part one, you can read <a href="https://medium.com/@rizary/haskelly-ever-after-summer-tales-for-every-fullstack-developer-1b1c1870154b">here</a>. In there, I have briefly explained about Hackage Matrix Builder in a nutshell, how Herbert and I are agreed to move from Purescript to Reflex-Dom, the tools that I used during Google Summer of Code, and lesson learned on how Haskell and Reflex FRP are used in the project (i.e. using reflex and reflex-dom quick reference, what is PreventDefault function, etc.).</p><h3>Preface</h3><h4>Monad, Monad Transformer, and MTL</h4><p>Waiiit… please waiiit..</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgfycat.com%2Fifr%2Fbrokenmarriedkestrel&amp;url=https%3A%2F%2Fgfycat.com%2Fbrokenmarriedkestrel&amp;image=https%3A%2F%2Fthumbs.gfycat.com%2FBrokenMarriedKestrel-size_restricted.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=gfycat" width="244" height="150" frameborder="0" scrolling="no"><a href="https://medium.com/media/9ee3351b94e9d4ffec0f2f7a569566d5/href">https://medium.com/media/9ee3351b94e9d4ffec0f2f7a569566d5/href</a></iframe><p>I know when someone read the above title, there is 2 type of Haskellers who want to shoot me. The first one is newbie Haskeller because they know that the term of a monad and its brother is tough for them. The second one is the experienced Haskeller, who think that no one should explain the topic if they do not fully understand. I agree with both of them because not only monad explanation is very challenging to learn, but also very dangerous if explained by the wrong person.</p><p>I write the title above because I learned it in the second phase of GSoC, especially about the usage of EventWriterT from Reflex library. EventWriterT is very helpful when you want to deal with the deep nested event in the top widget. While I learned about the EventWriterT, Ben helped me understand what is EventWriterT and its correlation with monad transformer. Therefore, instead of trying to explain it by myself, you can straightly read Ben’s post <a href="http://qfpl.io/posts/mtl_motivations/">here</a>.</p><h4>The Routing is Everything</h4><p>Everybody knows that Routing is essential in every web applications. We can think of it as a system to navigate the app resources. It also can be used to matching the component or resource that the people want into the URL.</p><p>Since it is crucial, every full-stack developer should pay attention to the Routing part in their web applications. And this is why working on routing in Hackage Matrix Builder is quite complicated for me because the FRP world using Reflex and Reflex-Dom is different. In Reflex-Dom, most of the Routing functionality is located in <a href="http://hackage.haskell.org/package/reflex-dom-core-0.5/docs/Reflex-Dom-Location.html">Reflex.Dom.Location</a>. I will explain it a little more detail in Lesson Learned section of this post, bear with me!</p><h4>Hackage Matrix Builder Improvement</h4><p>The Routing on Hackage Matrix Builder is working well now, and on the contrary, I feel like my work on Hackage Matrix Builder still has a long way to go to be fully featured. However, I feel very grateful for what I have learned when working on tags, package search, and routing using Reflex/Reflex-Dom.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgfycat.com%2Fifr%2Fdistantacrobaticape&amp;url=https%3A%2F%2Fgfycat.com%2Fdistantacrobaticape&amp;image=https%3A%2F%2Fthumbs.gfycat.com%2FDistantAcrobaticApe-size_restricted.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=gfycat" width="504" height="380" frameborder="0" scrolling="no"><a href="https://medium.com/media/045c8ad7a4ce5e26f890c5395fe6917d/href">https://medium.com/media/045c8ad7a4ce5e26f890c5395fe6917d/href</a></iframe><p>Thus, I hope that we can have the UI v3 which uses Reflex/Reflex-Dom finished as soon as possible and ready to take over the UI v2 that uses Purescript.</p><h3>Lesson Learned</h3><h4>Learn From The Creator by Looking Through Their Example</h4><p>Looking through example is the best lesson that I learned every time I build an application and do not know how to use a specific library or a concept. For example, <a href="http://hackage.haskell.org/package/reflex-dom-core-0.5/docs/Reflex-Dom-Location.html">Reflex.Dom.Location</a> is the key to implement Routing in your Reflex app. However, you might get confused by only looking at the library documentation. I am not saying that <a href="http://hackage.haskell.org/">Hackage</a> is bad for documenting the library. What I am trying to say is that knowing how to use every function in the library’s documentation on <a href="http://hackage.haskell.org/">Hackage</a> is essential if you want to write your application as comprehensive as possible. And we can find the example from the creator of the library itself.</p><p>The creator and maintainer of Reflex and Reflex-Dom library are people at <a href="https://obsidian.systems/">Obsidian System</a>, a company which uses Haskell that founded in 2014. I am not going to promote the company in this post. However, I am mentioning them here because it is part of my appreciation that they created Reflex and Reflex-Dom, and my work on Hackage Matrix Builder routing is heavily motivated by one of their technology called <a href="https://github.com/obsidiansystems/obelisk">Obelisk</a>. If you want to know more about the other open-sourced project, you can go to <a href="https://github.com/obsidiansystems">their repository</a>.</p><p>As stated above, the Hackage Matrix Builder’s <a href="https://github.com/haskell-CI/hackage-matrix-builder/blob/master/src-ui.v3/src/Router.hs">routing module</a> uses some code from the Obelisk’s <a href="https://github.com/obsidiansystems/obelisk/blob/develop/lib/route/src/Obelisk/Route/Frontend.hs">routing module</a>. I took almost 80% of Obelisk’s code and adjusted it based on what Hackage Matrix Builder needed. This what I mean by looking for the library creator example. You can easily find how certain library’s function works and applied in the code. And sometimes, you can also learn how the application is structured.</p><p>Looking through their example does not mean that you can copy and paste its code and it will works, No. You have to read every single line of code that is written there to make sure that you understand how, where, and when is the function applied to the code. It will take a lot of time, and I agree with that because it happened to me as well. That is why working on the routing took my entire phase, but it was definitely worth it for my learning process.</p><h4>Never Reinventing the Wheel</h4><p>Whenever you are working on a project, never reinventing the wheel. I think this is what important for every new programmer when writing their code. For me, it is quite similar to what I did when I was working on a commercial contract for my client. You do not have to write the entire contract from scratch, but you only need to make a good contract as your template so that you can copy and paste certain clauses that are used on every commercial contract. So, never reinventing the wheel in software development is very helpful as it does in contract drafting.</p><p>By looking at the library documentation and project example code made by the library creator, the chance that you reinvent the wheel will be minimized a lot. For example, I tried to reinvent themanageHistory function when I was stuck on the dropdown routing. So, what I did is read its body function, and try to recreate it as minimal as possible. This is what manageHistory function looks like:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dce84813abd8cb35a9bbd06d8ab38b66/href">https://medium.com/media/dce84813abd8cb35a9bbd06d8ab38b66/href</a></iframe><p>And this is my version when I want to manage my Hackage Matrix Builder URL history through my runRouteViewT&#39; function:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/40eb4f66749dafa1642942031ae3fd9e/href">https://medium.com/media/40eb4f66749dafa1642942031ae3fd9e/href</a></iframe><p>It is slightly different from the original version, but the dropdown routing was worked with this code except when clicking the back browser button. And it turns out, I need to use the existing manageHistory function to fix my problem in the first place. It is quite stressful when you get stuck on something. But at least you will learn from the mistake you made.</p><h4>Deep Nested Event Return? EventWriterT to the Rescue!!</h4><p>When you are working on your Reflex app project, you may encounter some cases when you need an Event(i.e. click, etc.) but it is nested like in the following code example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/33ee1e6cf8ba800f974edcb26be804ec/href">https://medium.com/media/33ee1e6cf8ba800f974edcb26be804ec/href</a></iframe><p>And this is what happened when I was working on the Hackage Matrix Builder routing. What happened is that I need to make the dropdown routing where we can go to a specific package’s index based on the URI provided by the user. So my first initial working on the dropdown routing is by having manageHistory function to handle the index change’s event like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ac0c5e69dd7a270f1d37c8b8c18f9e83/href">https://medium.com/media/ac0c5e69dd7a270f1d37c8b8c18f9e83/href</a></iframe><p>The problem is that this will only manage the routing when users are in the package’s page and not on the entire page. It is bad because I will have to manage the history between pages, in the search box and in the dropdown widget once and for all. Accordingly, manageHistory must be put in the top widget.</p><p>Putting the manageHistory in the top widget means that I need to track every single event in my widget (search box, dropdown, package list, etc.). So I have to return every Event and use leftmost function on the collection of an event to determine which route is changed. And that is when the problem comes. I have a deep nested Event that I should return for managing my routing.</p><p>EventWriterT is very helpful when you are facing a similar case. Then what is EventWriterT? It is a basic implementation of EventWriter class which is a class that used to efficiently collects Event values using tellEvent function and combines them via Semigroup to provide an Event result. So, how it is implemented in Hackage Matrix Builder code? See below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3552fa493e5cface1102cc2fcbfdea4a/href">https://medium.com/media/3552fa493e5cface1102cc2fcbfdea4a/href</a></iframe><p>In the above code, there are 2 functions that leverage the EventWriterT. The first one is routeLink which is used for every link element that use href in the HTML. The second function is routePkgIdxTs that is used for dropdown routing. “Where is the tellEvent that you are talking about?” it is right there, in the functions called setRoute. The body function of setRoute is SetRouteT . tellEvent . fmap Endo and you can see what is Endo doing there in my previous post.</p><p>This is what I am talking about “learn from the creator”. Because setRoute is taken literally from Obelisk’s source code <a href="https://github.com/obsidiansystems/obelisk/blob/develop/lib/route/src/Obelisk/Route/Frontend.hs#L271">here</a>. By doing this, I can avoid reinventing the wheel in my code. One thing that important is you need to understand the code, read the code first and make sure you know how it is created (in this case how setRoute works in Obelisk).</p><h3>Conclusion</h3><p>Routing is critical on every web application. Every frontend library will have its routing module so that their user can quickly build the app with it. In my opinion, every beginner user will be afraid to use the library that does not have a routing module.</p><p>In Reflex FRP world, the routing module is located in Reflex.Dom.Location and you can use manageHistory function to manage your application route. Since the routing is an Event in FRP context, then EventWriterT is very helpful to track when the route changes.</p><h3>What is Next?</h3><p>In the next post, I will explain my work on the matrix table and adding stylesheet for tags and search box.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a0b0c0b8879" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Haskelly Ever After: Summer Tales for Every Fullstack Developer]]></title>
            <link>https://medium.com/@rizary/haskelly-ever-after-summer-tales-for-every-fullstack-developer-1b1c1870154b?source=rss-f1b9fd3e6224------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b1c1870154b</guid>
            <category><![CDATA[haskell]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[reactive-programming]]></category>
            <category><![CDATA[functional-programming]]></category>
            <dc:creator><![CDATA[Andika D Riyandi (Rizary)]]></dc:creator>
            <pubDate>Fri, 12 Jul 2019 11:59:47 GMT</pubDate>
            <atom:updated>2019-07-12T13:13:51.067Z</atom:updated>
            <content:encoded><![CDATA[<h3>Haskell-y Ever After: Summer Tales for Every Full-stack Developer (Part One)</h3><h4>A Google Summer of Code’s student story about implementing Haskell on the Hackage Matrix Builder’s frontend application using Functional Reactive Programming approach.</h4><blockquote>TL;DR: This post is about my attempt to rewrite all of Hackage Matrix Builder’s (HMB) frontend code from Purescript to Haskell using one of Functional Reactive Programming library called Reflex/Reflex-Dom as part of Google Summer of Code (GSoC) 2019 project. This post will explain the decision to rewrite the frontend from Purescript to Haskell, and all of my lessons learned from using Reflex/Reflex-Dom (e.g., creating a simple homepage, calling backend API, creating a tag, and adding search box feature) on Hackage Matrix Builder frontend code up until GSoC first evaluation. The reader should be aware that this is not about the Reflex/Reflex-Dom tutorial nor its best practice. I will divide the article into three part and posted it after each of GSoC evaluation phase. Finally, I highly recommend to any full-stack developer out there to try Haskell on their backend or frontend web application. And if you already have backend written in Haskell, then you might want to try Reflex/Reflex-Dom for your frontend application.</blockquote><h3>Preface</h3><h4>Background</h4><p>Since this is not a fairy tales, I will not start with “once upon a time…” as an opening sentence. Instead, I will begin by letting you know about Google Summer of Code, Haskell.org, and my project as brief as possible then go to the detail afterward. Start with <strong>GSoC</strong>; this is an annual program held by Google to give all student in the world a chance to do an open-source software coding project during the summer. From my point of view, open source and student are not a good fit, so Google compensates them for their work. <strong>Haskell.org</strong>, which are one of the organizations that got accepted to participate in GSoC 2019, is an organization that provides project ideas using Haskell, a purely functional programing language. And the last part is my project, <strong>Improving Hackage Matrix Builder as a Real-world Fullstack Haskell Project</strong>, an ambitious plan to improve Hackage Matrix Builder as a full-stack Haskell web application which provides a build compatibility test service to the Haskell community for all the packages published on Hackage.</p><h4>Hackage Matrix Builder in a Nutshell</h4><p><a href="https://github.com/haskell-org/summer-of-haskell/blob/9c34b0055d06e4564f53743823b6b49ea553b9de/content/ideas/hackage-matrix-builder.md">Hackage Matrix Builder project description</a> comes up to my attention when Haskell.org held their own Haskell Summer of Code in 2017. As I quoted below:</p><blockquote>The Hackage matrix builder provides a build compatibility test service to the Haskell community for all the packages published on Hackage. Currently, it answers the question “which versions of GHC does this package build with”, which includes checking the Cabal solver can find a solution and have that solution build successfully. It works by building all versions of all packages with several GHC versions. It relies on clever nix-style caching to make this reasonably efficient. So this is a kind of QA or CI service for everyone. There is also a lot of potentials to use this kind of infrastructure for additional purposes.</blockquote><p>We can also say that Hackage Matrix Builder is a massive building bot which repeatedly tries to build packages on Hackage to help detect inaccurate metadata and other quality issues with packages. It is <em>not</em> a substitute for setting up your own CI, it’s instead intended as an additional <strong><em>line of defense</em></strong> to catch problems which weren’t caught by your project CI. Hence, Hackage Matrix Build’s goal is to help to ensure the overall health of the Hackage package collection and aid with curating Hackage (i.e. to help both package maintainers as well as Hackage Trustees).</p><p>This is really essential because Cabal/Hackage is built around the constraint solving paradigm and as such, Cabal/Hackage required that the metadata is accurate and the package collection consisting of all versions of packages has sound metadata. Moreover, it is also able to collect the basic runtime metrics of GHC during compilation (memory usage, compile time etc), and can thus help detect suspicious GHC compile time regressions over a big package collection. Interesting isn’t it? Keep on reading!!!</p><h4>Mentor and Haskell Community</h4><p>There are two mentors assigned by Haskell.org to guide me for this project in case I got lost while diving into the Haskell Great Sea. They are Herbert Valerio Riedel and Robert Klotzner. Herbert is the lead developer of the Matrix Hackage Builder project. He was also my mentor when I built the project’s user interface using Purescript, a strongly-typed functional programming language that compiles to JavaScript, written in Haskell. Robert, on the other hand, is the developer behind <a href="https://gonimo.com/en/">Gonimo</a>, a free baby monitor for smartphone, tablet or PC, also written using Reflex/Reflex-Dom library. Another mentor that is not officially assigned but tremendously helpful is Ben Kolera, FP developer, mentor, and evangelist at <a href="https://qfpl.io/">Queensland Functional Programming Lab</a>. Ben also authored the <a href="https://github.com/qfpl/reflex-realworld-example">RealWorld example app</a> using Reflex to adhere to the <strong>Reflex</strong> community style guides &amp; best practices (it is more complicated than what I did). Last but not least, all Haskell community, especially reflex’s IRC channel on #reflex-frp (I wish they can have a discord channel, so I don’t have to subscribe to IRCCloud).</p><h4>From Purescript to Haskell</h4><p>The idea to move the entire project’s frontend codebase from Purescript into Haskell happened in 2018 when I asked Herbert to mentor me on GSoC 2018. But at that time, he was swamped and also mentoring a couple of Haskell.org project in GSoC. So finally I choose to become a mentor myself too because I was a mentee in the Haskell Summer of Code in 2017. The reason behind the intention to refactor the entire codebase is because I am not too confident to be able to maintain the frontend code due to my lack of Purescript knowledge. And also, it seems that this project will attract more Haskell contributor than the Purescript one if we use Haskell for the frontend. This reason is supported by the fact that Purescript has breaking changes from 0.11 to 0.12, and I become more firm that I need to actualize my full-stack Haskell idea in Hackage Matrix Builder. It turns out Herbert already started refactoring the UI (version 3) using Reflex-Dom as a proof of concept while I was busy doing my final bachelor degree project.</p><h3>Lesson Learned</h3><h4>Tools and Operating System for Haskell Development</h4><p>There are many tools that newcomer feel confused about when trying to start their journey into Haskell programming. I have tried several tools like Stack, Cabal, and Nix for doing my pet project, and I like using Nix the most. However, since Nix is another learning curve layer, and this project aims to use a simple, yet powerful tool, so I picked Cabal for doing the development. Cabal, with its <a href="https://www.haskell.org/cabal/users-guide/nix-local-build-overview.html">Nix-style local builds (aka v2-build or new-build)</a>, is excellent nowadays and even better when we can add a non-Hackage package in our project. I remember using Stack when I started a Haskell reading group in my university, and it did not end well for them.</p><p>Using Windows 10 as my primary operating system makes developing Haskell projects more challenging. Even though we have the <a href="https://www.haskell.org/platform/">Haskell-Platform</a> and <a href="https://mail.haskell.org/pipermail/haskell-cafe/2018-July/129623.html">Chocolatey</a> to make the development more comfortable, Windows Subsystem Linux (WSL) is my way to go to help me diving into this project. Moreover, <a href="https://launchpad.net/~hvr/+archive/ubuntu/ghc">Herbert’s PPA </a>for Ubuntu 18.04 WSL more than enough for Hackage Matrix Builder project because we only need to install GHC and GHCJS, which obtained by using his PPA.</p><p>For code editor, many Haskellers prefer Emacs or Vim. While I like both Emacs and VSCode, I prefer VSCode integrations with Remote plugin so I can easily access WSL folder from my current Windows 10 desktop. And also, VSCode is relatively easy to understand for someone who does not have a Computer Science degree.</p><h4>Hackage, GitHub Source Code, or Community for a Better Reference</h4><p><a href="http://hackage.haskell.org/">Hackage</a> is the only thing that I can rely on when trying to understand some Haskell library. However, some library maintainer (I don’t know what are their reasons) forget to keep their library updated even though we have <a href="https://wiki.haskell.org/Hackage_trustees">hackage-trustee</a>. I always search for some function by appending <a href="http://hackage.haskell.org/">Hackage</a> word in Google search engine like “fromMaybe hackage” for better result. If you are new to Haskell, try to familiarize yourself with Hackage for your survival Haskell kit.</p><p>The second best thing for your reference is <a href="https://github.com/">GitHub</a> where many of Haskell library maintainer put their code. It is harder to read, but you will get used to it eventually. You can search for some functions in each of Haskell repository or use an advanced search to see how such functions are implemented in the code. In addition, since we can add <a href="https://github.com/">GitHub</a> repository in our cabal.project and build it using Cabal v2-build, it will make Haskell development easier.</p><p>The last thing but also important is finding reference through <a href="https://www.haskell.org/community/">Haskell community</a>. We have our <a href="https://discourse.haskell.org/">discourse forum server</a> which is really useful for me because having different timezone can make you missed some important conversation between Haskell developer. We also have other Haskell server out there like in Slack or Discord. But for me, I like Haskell discord server the most. The Haskell Discord server is more focused on Haskell than Functional Programming in general and it has an unlimited limitation for chat history while Slack limited its chat history for open source community for only 10,000 messages.</p><h4>Haskell is a Strange Beast, but Reflex/Reflex-Dom is a Legendary Creature</h4><p>I am not saying that both Haskell and FRP Reflex/Reflex-Dom are not tameable, but they are just hard to tame, and sometimes bite you very hard until you stop using them. And if you face that kind of situation, the only advice that I can give is to go as quickly as possible into the glorious #reflex-frp tavern (IRC channel on <a href="https://freenode.net/">freenode</a>), the place where many Reflex contributors discuss the library.</p><p>Haskell is actually for everyone, and I know that because some Haskellers who do not have a Ph.D. can still work with this language. However, if you are like me (a non-English speaker, a lawyer or any other social degree, living in a country when every job posts are about PHP language) and considering to learn Haskell or Reflex-Dom, I hope the lesson I get during GSoC below can aid your journey into programming Haskell, especially using the Reflex/Reflex-Dom Library.</p><p><strong>1. Keeping Git PRs more focused</strong></p><p>This lesson may be unrelated to Haskell or Reflex/Reflex-Dom directly, but I must confess that keeping your PR from some code refactoring that irrelevant to what you are fixing will help you being thorough on what you are doing with your project. It also can save you later. Also, participating in open source development is not only about what you achieved, but also what benefits other developers can get from your work.</p><p>One thing that I always do during my first month of GSoC project is changing some code or fixing it, but this change or fix is not related to my feature git branch. Herbert always reminds me that any unrelated code refactoring should be in separate PR from my feature git branch PR to make it easier for code reviewer.</p><p><strong>2. Reflex, Reflex-Dom Quick Reference, and Blog Tutorial are your dictionary</strong></p><p>The only thing that matter for you in your first attempt to the Reflex-Dom world is by continually reading its <a href="https://github.com/reflex-frp/reflex-dom/blob/develop/Quickref.md">quick reference</a>. I always read it back and forth even when creating a simple static page like in this homepage <a href="https://github.com/haskell-CI/hackage-matrix-builder/pull/61/files">PR</a>, or when I face a complex HTML structure in my application. However, I felt lost when I read the apostrophe function like el&#39; :: Text -&gt; m a -&gt; m (El, a), until I refer to some GitHub example on how to use it. Reflex <a href="https://github.com/reflex-frp/reflex/blob/develop/Quickref.md">quick reference</a> act the same as Reflex-Dom quick reference but more about low-level FRP systems like the function needed to create Event, Behavior, and Dynamic.</p><p>When I first learn Reflex and Reflex-Dom, Only quick reference that I have. Then when I am working on my third-year project built with Reflex, there is <a href="https://github.com/hansroland/reflex-dom-inbits/blob/master/tutorial.md">reflex-dom-inbit</a> which explained a lot about how Reflex-Dom works. After that, <a href="https://blog.qfpl.io/posts/reflex/basics/introduction/">Queensland Functional Programming Lab posted a blog post series about Reflex written by Dave Laing</a>. For me, that is the most recent Reflex’s tutorial that very helpful.</p><p><strong>3.</strong> <strong>Function “el” and “elAttr” are a simple HTML tag</strong></p><p>Another thing that I noticed is el and elAttr is just an HTML element that can be easily understood like in the below code (see further in the above-linked PR):</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cdd50339a66ec003ecb39fc1ac44ef29/href">https://medium.com/media/cdd50339a66ec003ecb39fc1ac44ef29/href</a></iframe><p>Both [2] and [C]are the content of our HTML tag element that can be nested like ul and li In the following code. You do not need to confuse about [3] and [D] because it is only a function return type.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e0aa6e2077ff66433a4f67003dd03573/href">https://medium.com/media/e0aa6e2077ff66433a4f67003dd03573/href</a></iframe><p><strong>4. PreventDefault works for certain cases</strong></p><p>Reflex-Dom has already a built-in function called button :: Text -&gt; m (Event ()) that will become &lt;button&gt; HTML element. However, there are certain conditions that you may want the default action of the event is not triggered. For example, Matrix Hackage Builder has “add tag” button for each package’s page so that <a href="https://github.com/haskell-infra/hackage-trustees/blob/master/policy.md">Trustee</a> can add specific tag they want. The code for that is:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/392be7304210b72802a25cb53c96a25e/href">https://medium.com/media/392be7304210b72802a25cb53c96a25e/href</a></iframe><p>When I first wrote the code, I use Reflex-Dom’s built-in functionbutton and when I run the application, every time I click the “Add Tag” button, the URL in the address bar change from ng/#/package/a50 into ng/?#/package/a50 . This behavior happened because the default action after clicking the button is calling the API backend to insert package’s tag. So, Ben remind me about this preventDefault function so such default action will not be triggered by clicking the button. We do that in Reflex by creating our button (I called it button_) like below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f2f48f9c8ee75105c5513739afea6a78/href">https://medium.com/media/f2f48f9c8ee75105c5513739afea6a78/href</a></iframe><p>Confused? Yeah, that happened to me also when I learned Reflex/Reflex-Dom the first time to make a mini-thesis by building a simple AWS calculator using it and WkWebView. Even after that, I still need to get myself together when reading it. Well, let me explain it as clear as I can.</p><p>This button function takes one argument “t” which later this “t” will be inside the HTML element like this &lt;button&gt; t will be here &lt;/button&gt;. The cfg variable is a configuration that will be attached to the element function. Thus, we put a preventDefault flag to the element’s config created by the element function which has the type:</p><pre>element :: Text <br>        -&gt; ElementConfig er t (DomBuilderSpace m) <br>        -&gt; m a <br>        -&gt; m (Element er (DomBuilderSpace m) t, a)</pre><p>Unless you want to become Reflex/Reflex-Dom developer, change the (Element er (DomBuiderSpace m) t, a) into (e, a) or more specifically (e, _) when I used in the code.</p><p>Once we get the element that already configured by preventDefault, then we can attach that element into click event as we use in this domEvent Click e function in the above “button.hs”.</p><p>While preventDefault will saves you from triggering the default action of the event happened, and sometimes we need that default action to occur for a specific activity. I learned this when I am working on Hackage Matrix Builder search box. The behavior of the search box is when a user clicks the search result, it will automatically change the current user page into the package’s page. In this case, using preventDefault will prevent the page changes.</p><p><strong>5. Function “foldDyn” and “appEndo” are awesome</strong></p><p>Please bear with me as I try to explain it as simple as possible. What I learned with foldDyn, and appEndo are very enlightening. The use case is still around adding tag feature to Hackage Matrix Builder.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1c28e45e2789bea8e19dd60676ac372a/href">https://medium.com/media/1c28e45e2789bea8e19dd60676ac372a/href</a></iframe><p>If we pay attention to in line 3, we are supposed to fold the list of events and create a final result based on Map.union function. The initial value will be Map.empty, so we apply Map.union to Map.empty along with the rest of the event list. However, I noticed that we have two problems using this technique: a) Delete tag is working, but still need to refresh to make the tag disappear; b) The “Add Tag” button is not working, but if I take out addTag0 from the tagsMapDyn, “Add Tag” button works but still need to refresh to make the new tag appear. Ben told me that I cannot ever delete the tag if I only have Map.union as my reducer</p><p>He then showed me the following GHCi about Endo and explained why in His reflex-realworld project, He used Endo for the same case that I have.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5a6b66e912c1c334b481c9a38f22f6c7/href">https://medium.com/media/5a6b66e912c1c334b481c9a38f22f6c7/href</a></iframe><p>It seems my first approach to use foldDyn was wrong, and if you break down how the function that “Delete Tag” button behaves, you can see the step as follows:</p><ul><li>evMapTags fires with the stuff from the backend on page load. We union those tags to Map.empty. The result is currently the full map (let&#39;s say “A”, ”B”, and ”C”)</li><li>The user clicks on the “Delete Tag” button of “B”. That calls the backend, and that button fires an event out of the list view.</li><li>delete0 fires with a value of Map.fromList [(“B”,”B”)]</li><li>This process flows into our foldDyn. We union Map.fromList [(“A”,”A”),(“B”,”B”),(“C”,”C”)] to Map.fromList [(“B”,”B”)]</li><li>Nothing changes so I have to reload the page</li></ul><p>So what Ben explained to me about using Endo is that the events that we push into foldDyn be more like “delete X” (Endo . Map.delete) &quot;add Y&quot; (Endo . Map.insert) &quot;replace the whole thing with these&quot; (Endo . const). So the tagsMapDyn become:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2d42dc8b06bdc43aa49cde0fc49664e7/href">https://medium.com/media/2d42dc8b06bdc43aa49cde0fc49664e7/href</a></iframe><p>This Endo thing is new to me, and I learned a lot about it. I have to admit that I still do not understand fully about how or when Endo will be my savior while I am struggling to tame the FRP and Reflex beasts.</p><p><strong>6. Expanding out your type API declaration for client functions</strong></p><p>On Hackage Matrix Builder project, we use a library called <a href="https://github.com/imalsogreg/servant-reflex">servant-reflex</a> to share the API between the server and frontend. We need this library to synchronize our backend which is written in servant combinators, and so the API endpoints are available in reflex’s FRP semantics. You can see my work on this <a href="https://github.com/haskell-CI/hackage-matrix-builder/pull/63/files">PR</a>. Robert gives us an alternative package to work with Servant and Reflex-Dom by pointing to <a href="https://github.com/roberth/servant/tree/servant-client-jsaddle">servant-client-jsaddle</a>. Discussions are going there, but it will be a one big and long post. This package is still under observation by us, though.</p><p>The plan on expanding out type API declaration comes from my issues when I have to put ClientFuns{..} = mkClientFuns burl on the where clause for every function which makes an API calls. The burl itself is only a BaseUrl where the API backend located (in this case is in matrix.hackage.haskell.org:443/api). So, Herbert’s primary goal is that all client functions are defined, instantiated, and exported in the API.hs module. Thus, I look into Ben’s reflex-realworld project then start to porting the code into Hackage Matrix Builder repository. While porting the code, Herbert reminds me that Hackage Matrix Builder is not as big as reflex-realworld that I have to make the code more readable and concise. He then gives me some <a href="https://github.com/haskell-CI/hackage-matrix-builder/blob/master/src-lib/WorkerApi/Client.hs">API client example written in the backend</a>.</p><p>The following code is the final version of my work on expanding out type API declaration. I use theclientWithOpts function for a basic authentication that will pop up every time Trustee adding a tag or starting some package’s queue.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/40d99ca7a3b3385d7ecca9b02a0eb605/href">https://medium.com/media/40d99ca7a3b3385d7ecca9b02a0eb605/href</a></iframe><h3>Conclusion</h3><p>Up until GSoC first evaluation, I am pleased to participate as a Google Summer of Code student for Haskell.org (although I missed Haskell Summer of Code). Haskell is a beautiful language to learn especially for frontend web development using Reflex/Reflex-Dom or FRP approach.</p><p>Furthermore, Reflex-Dom is a tameable creature for every frontend developer who wants to try a new language and learn about FRP. It is very straightforward if you are already familiar with Haskell. It will be more challenging for those who do not know some fundamental concept in Haskell (e.g. Functor, Applicative, and Monad). Also, it is harder for someone who already hates Haskell, GHCJS, or Reflex-Dom itself.</p><h3>What is Next?</h3><p>The next post will about my work on routing and fixing the matrix table for each package. So, Stay tuned!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b1c1870154b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Haskell Summer of Code : The Good, The Bad and The Ugly]]></title>
            <link>https://medium.com/@rizary/hsoc-the-good-the-bad-and-the-ugly-70571458ad4b?source=rss-f1b9fd3e6224------2</link>
            <guid isPermaLink="false">https://medium.com/p/70571458ad4b</guid>
            <category><![CDATA[haskell]]></category>
            <category><![CDATA[purescript]]></category>
            <category><![CDATA[functional-programming]]></category>
            <dc:creator><![CDATA[Andika D Riyandi (Rizary)]]></dc:creator>
            <pubDate>Mon, 25 Sep 2017 06:56:56 GMT</pubDate>
            <atom:updated>2017-09-25T12:07:37.992Z</atom:updated>
            <content:encoded><![CDATA[<h4>As part of Haskell Summer of Code student, I am more than happy to share my experience while working on the <a href="https://summer.haskell.org/news/2017-05-24-accepted-projects.html">project</a> — Improvement of Hackage Matrix Builder — and how to handle most of the problem that I encounter over the summer. As in the title, it has the good, bad and ugly part that happened since it was my first time on Haskell Summer of Code.</h4><blockquote>TL;DR: this post is not about harassing or discrediting any other third party or people whom I contacted with while working on the project. Spending my time as HSOC student this summer was became unforgettable moment for me. <strong>The good part</strong> is I can finally working on a real project that use functional programming language— even though I spent too much on Purescript which is FUN!! — as its choice of language, being able to learn from my Mentor (<strong>HVR</strong>) as well as other people on both Haskell and Purescript community was very fantastic . Also, Hackage Matrix Builder is very interesting project with a great plan in the future. <strong>The bad part </strong>is the time that I had planned was messed up with my <a href="https://github.com/Rizary/awspi">3rd year project University</a>. I didn’t know that will happened, but it’s been taken care of. <strong>The ugly part </strong>is when writing codes, It’s still hard for me to write code using KISS method. I tend to use complicated ways in my algorithm. In addition, as non-native English speaker, I found that my English skill is far from perfect.That’s it, if you interested to read about HSOC and Hackage Matrix Builder, please read below.</blockquote><p>I am not going to open my blog post by introducing myself. Instead, I have made some post <a href="https://medium.com/@rizary/from-lawyer-to-engineer-about-me-bb89a47c13fa">About Me</a> if you are willing to read. I don’t know about other HSOC awardee, but this picture is all that I can say when receiving email from <a href="https://medium.com/u/15db573e20df">Jasper Van der Jeugt</a> which telling me that I will be one of the HSOC 2017 student.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*GmUSU6W58dW9sbhcnObQng.gif" /><figcaption>Surprisingly happy</figcaption></figure><p>At that time, I still don’t remember which proposal that got approved (since I applied more than one) and soon after I know that the approved proposal is about the Improvement of Hackage Matrix Builder mentored by <a href="https://github.com/hvr">Herbert Valerio Riedel</a> (HVR).</p><p>I never thought I can got approved by the committee, as I am new to haskell and I only have one own project (using Reflex and Reflex-Dom) for my University project. However, I am not nervous but getting more excited by the announcement as I’d read someone’s quote about — more or less — :</p><blockquote>Doing a real project will increase your knowledge on functional programming more than just reading some books without making any project</blockquote><p>That’s it, I contacted my mentor and said to him that the project was approved and discuss with him about how we can make the project finished on time.</p><h3>The Project</h3><p><a href="https://matrix.hackage.haskell.org/">Hackage Matrix Builder</a> is… well… what can I say, it was already well written in the project ideas. But let me quote here:</p><blockquote>The Hackage matrix builder provides a build compatibility test service to the Haskell community for all the packages published on Hackage. Currently it answers the question “which versions of GHC does this package build with”, which includes checking the Cabal solver can find a solution and have that solution build successfully. It works by building all versions of all packages with several GHC versions. It relies on clever nix-style caching to make this reasonably efficient. So this is a kind of QA or CI service for everyone. There is also a lot of potential to use this kind of infrastructure for additional purposes.</blockquote><p>Before I apply to HSOC, this project got my attention first. It is because as one of the Haskell beginner, I never thought that I can see package or library from the compiler perspective without having to compile it myself. Moreover, if I ever be a <em>package owner</em> (hopefully soon), I can see whether my package is able or not to satisfy all the GHC version and then I just need to fix it by looking at the build log report online.</p><p>As it’s actually should be posted in the first place, the project repository is located <a href="https://github.com/hvr/hackage-matrix-builder">here</a>. Also, I encourage anyone who has some idea on features that might help the project improved to post it <a href="https://github.com/hvr/hackage-matrix-builder/issues">here</a> because I will continue to work on this project.</p><h3>The Good</h3><p>There are several good part happened during my HSOC. But what I explained here is only some of experience that might be helpful for the next HSOC’s student.</p><h4>1. Diving Into Real Project</h4><p>Making your own project when you are a “computer science” student who try to learn new language may not be always easy for everyone. Somehow you just don’t know what to build or where to start the idea. It become worst if you just depend on exercise or project example in the book you read. The truth is, it happened to me, especially when I try to learn Haskell and knowing that in my University, that word is not familiar or I can say <strong><em>students haven’t even heard at all.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*1Lxr2aT-tagR366smPO7KQ.gif" /></figure><p>Can’t find friend to discuss, to working some project together and just relying on forum or IRC to find the study materials. That’s what I feel when learning Functional Programming and Haskell.</p><p>I try to build my pet project (as I mentioned it as my 3rd year university project) but for me, it still feels not good enough. So when there is an announcement about Haskell Summer of Code (HSOC), I told myself that “This opportunity only comes once a year, so I need to try it”.</p><p>Participating in the summer of code event is foreign to me. I never thought about it before and local event like this is very rare in Indonesia. But when I got invited and start coding on real project, it feels very different. What I am doing in HSOC is to refactor the javascript codebase to Purescript, a functional programming language that compiles to JavaScript which the compiler itself wrote in Haskell.</p><p>So where is the Haskell part on it? Haskell used as the backend of the project, while for the frontend we choose to use Purescript. By the time I wrote this, I already made this contribution (it is amazing at least for me):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/1*9n-kBlsI2RU1CYXVzTzSpA.png" /><figcaption>Hackage Matrix Builder Repository</figcaption></figure><p>As you can see, participating in HSOC or other summer of code forced you to write codes. It isn’t about giving you the idea because the project is already there and you must (whether you want it or not) continue to develop the project. So is there any other way better than this? I don’t think so.</p><h4>2. Programming Language Choice</h4><p>Why Purescript? When I choose between Reflex (with its Reflex-Dom library) and Purescript, I thought it will be better for me to go with Reflex as I am more familiar with it. But when given the choice between learning something new and use your existing knowledge, I will definitely choose the first one. Purescript is not different than Haskell in term of the syntax in general, so I found it very challenging if I can learn another functional programming language which has similarity with Haskell.</p><p>So where do I start when Purescript is the language choice? First, I looked into their <a href="http://www.purescript.org/">official website</a> and then I read the “<strong>PureScript by Example</strong>” book which you can read <a href="https://leanpub.com/purescript/read">here</a>. The book is the best introduction as it is written by Purescript author <a href="https://medium.com/u/7d71556e92aa">Phil Freeman</a>. When refactoring the code, I use one of Purescript framework called <a href="https://github.com/slamdata/purescript-halogen"><strong>Halogen</strong></a>, which is developed by <a href="https://slamdata.com/">SlamData</a> team and it’s an open source project. I will not say much more about Purescript or what I learn when refactoring Hackage Matrix Builder’s old Javascript code here, as I will wrote it in another blog post.</p><h4>3. Learn From Mentor and Community</h4><p>Well when participate in HSOC, you cannot depend on your mentor because sometimes they are very busy with their day to day job. Herbert as my mentor always ask about the project progress and also discuss with me whenever I want to know a lot more about the project. Not only that, he also gives me the idea and its solution for some problem that I encountered during my work period especially when we try to upgrade the API version of Hackage Matrix Builder into version 2. I am very grateful for that, because I never had the chance to know how client-server communication between Haskell and Purescript. On the other hand, the other good part is we have the Community where you can ask or discuss with people that already familiar on what you are doing.</p><p>Getting help from other is one of the benefit on how it feels when contribute to real project. I remember when the first time <a href="https://github.com/bergmark">Adam</a> gave me explanation on the frontend side of the project since he is the one who write the 1st generation of Hackage Matrix Builder together with Herbert. He explained very briefly on what should I do and where to begin my work. He also allowed me to pick Halogen framework and refactor the existing Purescript code base that he wrote. Well, actually I just use his existing code on the API and Types as well as other useful function and combined it with the framework.</p><p>Other benefit that you can get in the community is they will response and sometimes help you whenever you get stuck or don’t know what to do. Since I use <a href="https://github.com/slamdata/purescript-halogen">Halogen</a> framework, I got help — a lot — from <a href="https://github.com/kritzcreek">@kritzcreek</a> and <a href="https://github.com/natefaubion">@natefaubion</a> and #Purescript channel both in IRC and Slack. There will be some new technique that you can learn, such as when I try to generate matrix table which each row contained version number and each of them depend on previous version. That is when Christoph told me to look at function accumResult in the <a href="https://pursuit.purescript.org/">Pursuit</a> (it is like hoogle for Haskell). And voila, using a simple code as below, I never realize that I can generate the table using this simple function.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/42aeefe4e4f2fdfb8ab5de176516f68f/href">https://medium.com/media/42aeefe4e4f2fdfb8ab5de176516f68f/href</a></iframe><p>Of course I have learned a lot more from him and it makes me finished refactor page quicker than the other page. This is important for student to actively ping/direct message someone you think can help your specific question especially for me who need to paste a lot of code. That is when I got advice from Nate about handling search box for package with the following code (I will explained it in another blog post).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9c34e88d70275aa6b39c1782946644a6/href">https://medium.com/media/9c34e88d70275aa6b39c1782946644a6/href</a></iframe><p>That is when I realized how to integrate Halogen with another library. In summary being able to use Purescript in HSOC is FUN!!! In this post, I will not talked about the back-end as I am still in the process of preparing the front-end for API v2.</p><h3>The Bad</h3><p>Bad thing sometimes happened to everyone in any condition even though everything is already well-planned. That is what I believe when I start doing something. HSOC is very helpful to me as I start to understand some terminology and idioms. However, trying to meet the deadline is not only require good understanding but also need mitigation skills to handle some unexpected event.</p><h4>1. When Your Plan Betray You</h4><p>When I apply for HSOC, I am in the middle of doing my 3rd year university project. By the end of its deadline, I need to make presentation in front of lecturers. From my understanding, it will be scheduled after HSOC final evaluation, thus I didn’t have to worry about it. I finalized my university project 1 week before “<em>Community bonding period begins</em>” and discussed with my supervisor about the report and presentation.</p><p>Everything was very smooth, I passed my HSOC mid-term evaluation and complete my presentation. So I just need to wait the date when I will present my report to the lecturers. I know that I need to prepare the administration 7–14 days until the university project is totally finished. But suddenly, I got the presentation schedule in the middle of my final evaluation period. That is when you know that your plan was betraying you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*8N17-OC6eNKJQcfErTR0YQ.gif" /></figure><p>When you experienced this, be calm and discuss with your mentor about how to handle the situation. Luckily for me, Herbert give me time to finished my project first and advise me to reduce my time spent on Hackage Matrix Builder a little. One thing that I forgot was to tell Jasper about the situation. So in addition to mentor, you need to tell your committee too.</p><h4>2. You Are Not Smart Enough</h4><p>Do you ever feel that you are actually not smart enough to be selected? Well… it happened to me when I stuck for more than 3 days on how to refactor certain div from Javascript into Purescript. I didn’t ask anyone because I thought it is an easy task, anyone can do it without a blink at all. I waited for 3 days because I assume that 3 days is your limit to solve your code on your own. You need to start asking around when you can solve it more than 3 days. So I start talking to my mentor and told him that I think HSOC is not for me, or I am not smart enough to participate in event like this.</p><p>Again, he told me that HSOC is not for super brilliant student and it never was. It was meant for student who want to improve their skills in functional programming especially Haskell. So it is okay for you when “not smart enough” feeling came up in the middle of your project in HSOC. You just need to share it to your mentor so he knows that you are actually working on the project but got a little obstacle and try to solve it on your own. And also it is good to have mentor who not only tell you how to code but also embrace you to keep going.</p><h3>The Ugly</h3><p>I have two ugly part that I think one is for student in general, and the other is for every student in Indonesia that maybe interested to apply HSOC 2018.</p><h4>1. Keep It Simple Student!!</h4><p>Think simple is one of the skill that developer should have. It will help you solving some problem easily. You are not in the middle of “competitive programming”, so being simple will reduce your coding time for certain project a lot. That is where— as beginner — I am still bad on it. As a beginner, you always want to be perfect in your code especially when you have been granted as participant of a great event like HSOC. Also, sometimes you try to impress your skill to your mentor.</p><p>The ugly part that I feel in HSOC is I tried to be as perfect as I can. Sometime it makes me thinking too much on how my code should look like. I try to write 10 lines of code when it is actually only need 3–4 lines of code for certain algorithm. Being complicated not only will make your app slow, but it is also will kill your time which is very precious for the deadline. In this part, I can’t tell you how to work it out because I am still struggling on that too.</p><h4>2. Non-native English Speaker</h4><p>I don’t know which English level that other participant have. However, since I am not at “mother tongue” level, this is my ugly part on HSOC. Not because I can’t communicate with my mentor, but explaining something on plain English is not my best skill during HSOC period. I tend to misunderstand about certain library or explanation on how the Hackage Matrix Builder’s API works. It slows me a lot when I try to re read the library or understand the example on certain library.</p><p>Maybe this part is not for people who already have good skill at English. But for my Indonesian friends, I think you need to prepare yourself before applying HSOC by make yourself comfortable read a lot of library documentation as well as its example. Try not only read it, but write and test the example until you understand how the library works. After that, you need to start asking the community to get better understanding on certain documentation.</p><h3>What’s Next?</h3><p>If somebody asked me about what to do next, of course I will directly said, “write a lot of code both Haskell and Purescript”. As this is my last year study, maybe I will try to find some remote jobs in Haskell / Purescript to increase my skill. But beyond that, I have plan to spread Haskell and Purescript here in Indonesia. I feel that I need to gather more people to learn it together from basic to advance topics. I don’t know if I am able to explain what Monad is, or even Applicative and Functor. But I believe that by being part of HSOC student will gave more confidence to invite others to learn Haskell.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70571458ad4b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Lawyer To Engineer — About Me]]></title>
            <link>https://medium.com/@rizary/from-lawyer-to-engineer-about-me-bb89a47c13fa?source=rss-f1b9fd3e6224------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb89a47c13fa</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[inspirational-stories]]></category>
            <category><![CDATA[biography]]></category>
            <category><![CDATA[lawyers]]></category>
            <dc:creator><![CDATA[Andika D Riyandi (Rizary)]]></dc:creator>
            <pubDate>Fri, 22 Sep 2017 08:36:35 GMT</pubDate>
            <atom:updated>2017-09-27T00:54:52.084Z</atom:updated>
            <content:encoded><![CDATA[<h4>This is one of my blog posts series on how I start to change my career from Licensed Advocates to Software Engineer (especially choosing Functional Language as my main interest).</h4><blockquote>TL;DR:<em> In this blog, I write about myself and why I decide to change my career into Software Engineer. This might be a boring post, but maybe there are someone who need to read it.</em></blockquote><p>My name is Andika D. Riyandi -<em>you can call me </em><strong><em>Riyan </em></strong><em>or</em><strong><em> Andika</em></strong>-, a licensed advocate in Indonesia (the country where beautiful people with different culture live together). I started my career as a Legal Consultant when I was 22 years old at one of the <a href="http://www.accountingverse.com/articles/big-4-accounting-firms.html">big four accounting firm</a>. As a young law graduates, I realized that -<em>after working for about 1 year</em>- expecting to gain experience as Corporate Lawyer in the accounting firm is obviously not enough due to its scope of business.</p><p>I finally landed to one of the Jakarta-Based law firm -<em>associated with one of U.K law firm</em>- to master my corporate commercial and transaction skills, and left the firm to start my own law firm. I finally got clients in 2013 under the new firm I create -<em>which since then, my specialization is within Telecommunication Industry</em>- and help their legal problems. Truthfully, it is not easy for getting clients at my age -<em>25 years old</em>- and using my newly established law firm. My goal is simple, to provide the best legal service and assistance to Company who do not have their own legal division.</p><p>As a child who raised by Father who like programming, I keep seeing him study VB.Net and making software as his side job for years. Both of us have the same interests, that is <strong><em>Computer and Game</em></strong>. So can you imagine, almost my entire life filled with spending lot of time with computer than paper -<em>or reading regulation</em>- and I ended up as a Lawyer? Yeah, its boring. Not because being Lawyer is boring, but from my point of view, solving technology problem is more fun than solving legal problem. And nowadays, knowing technology is a must, even for Lawyer. The other reason is that from what I am seeing, <strong>there is a gap between Law and Technology </strong>that I want to fill. Some people asking me why I don’t just hire a programmer instead? Well, to be honest, if you like some tools and you can use it to help yourself solve some problem, why don’t you learn how to use it instead of rely to others?</p><p>That’s it, in 2014 I decided to take another <strong>bachelor degree</strong> in Computer Science at one of private University here. Why not taking bootcamp course instead? I will make another blog post for that.</p><h3>Became Computer Sciences’ students</h3><p>Being a computer science student is not that easy, especially when you just had your first newborn baby -she died on the 5th weeks-. I had to learn math again after 8 years since high school. But I have to do this, I need to struggle more and compete with younger student as well as realize that some of them are already know how to coding. At first, it felt like I am wasting my time and money. How can I compete when I graduate in 2018? Which programming language that I should learn? And any other first year student thoughts that happened to us all.</p><p>Now on my 4th year, I realized that all of my fear and question was not a problem or obstacle to learn programming at all. I won’t explain my experience in one post, but as summary, it is worthed to learn programming as one of your activity even though you are not computer science graduates. But for you who want to change your career like me, it depends on your readiness to take the risk for whatever it takes.</p><p><em>PS: You’ll find on some grammatical error in this post, for that I am sorry. I don’t want to make an excuse as I am not native English speaker, but yeah I hope you enjoy this post.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb89a47c13fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>