<?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 Gibran Wisesa on Medium]]></title>
        <description><![CDATA[Stories by Gibran Wisesa on Medium]]></description>
        <link>https://medium.com/@gibranmfw?source=rss-1c642392c35d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*j5XuRYTm5Ky6FOrYHpV2Mw.png</url>
            <title>Stories by Gibran Wisesa on Medium</title>
            <link>https://medium.com/@gibranmfw?source=rss-1c642392c35d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 12:15:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gibranmfw/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[Day Nine, Month Nine, List of Nine]]></title>
            <link>https://medium.com/@gibranmfw/day-nine-month-nine-list-of-nine-6650247818ba?source=rss-1c642392c35d------2</link>
            <guid isPermaLink="false">https://medium.com/p/6650247818ba</guid>
            <category><![CDATA[visual-novel]]></category>
            <category><![CDATA[review]]></category>
            <dc:creator><![CDATA[Gibran Wisesa]]></dc:creator>
            <pubDate>Sat, 10 Sep 2022 04:37:03 GMT</pubDate>
            <atom:updated>2022-09-10T04:37:03.460Z</atom:updated>
            <content:encoded><![CDATA[<p>Because today in some country still 9 September and i finished Nirvana Initiative not too long ago. I want to share my top 9 Uchikoshi game that i have read. So without further ado, here is the list.</p><p>9. Never7 -the end of infinity-</p><p>The first game of infinity series and my least favorite in this list. From what i can remember, it’s their first game that try to branching out from SoL type of VN and be more sci-fi and mistery. It’s not that bad and it’s also contains a bit of context for further game. But the writing of each heroine is weak, i still remember that i had to endure my urge to skimming Haruka’s route.</p><p>My favorite is of course Yuka Append. It gives more context and life to Yuka original route. I also really like Yuka chemistry with MC in this route.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/0*neHgIXqDwwR0N8yI.jpg" /><figcaption>Yuka best girl</figcaption></figure><p>8. Punch Line</p><p>A fresh breath compares to other Uchikoshi game. Punch Line tells us a story about a boy named Yuuta who upon seeing an underwear can destroy a whole world. It’s more ecchi and comedy compares to other Uchikoshi works that more serious, but you can still feel his hand on this game with the time loop stuff.</p><p>Overall I think its a fun game (or anime if you want a different media) for Uchikoshi fan to enjoy.</p><p>7. Zero Escape: Zero Time Dilemma</p><p>The third of Zero Escape trilogy, and i think the weakest compares to other two. ZTD continue from what VLR left us for, with a mission to stop humanity for collapsing.</p><p>The same as other Zero Escape game, i enjoy playing the thematic puzzle of each room that ZTD provided. It’s challenging but unique and not repetitive. But still, there are some part that was confusing, and rely on perfect precision to click on the perfect position. Like i wasted an hour to then later find myself just missing a little to the right of the solution area. Oh and also they remove the note menu, even though i really like that feature.</p><p>The story itself is good, but i still think they can improve it more. Like there many plot hole or some question remains after i finished the game. Also in VLR they said that the tragedy in ZTD is more bloody and have more trap compares to what happen in VLR. But as i playing it, it’s not that different than the escape game in VLR. Maybe what they means of trap is in ZTD someone needs to die so other can escape (?), but nevertheless it’s different from what i expected.</p><p>6. Remember11 -the age of infinity-</p><p>A plane crash occurs during a fierce snowstorm. Yuka and other survivors then took a shelter in a small cabin in the middle of mountain, unable to communicate with the outside world. They decided to wait until the storm subsides before seeking for help. On the other side, a man pushed by someone from a top of a facility building. Upon waking up he found that he lost some of his memories. Because of a fierce snowstorm outside, he can’t escape and trapped with the culprit inside that facility. The strange things continue when Yuka and the man found out that they had been switching bodies.</p><p>Remember11 follows the same pattern as its previous game, that is it has two main characters and two PoV that we can follows. The interesting part is because they switch bodies every day, so upon playing i oftentimes backtrack to get the whole pictures of the story. Backtrack is a must if you play this game, because Remember11 true route has open ending. It didn’t tells you directly the resolution of the mystery, so you need to read every lines in every ending (it has a lot of bad ending).</p><p>If someone asks me one memorable tings from Remember11 the most is the “Kagome song”. That whole scene when Keiko sang Kagome song before credit roll is the eeriest scene of all Uchikoshi works.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*XqF6rvVM_vo4IRpr.jpg" /><figcaption>Keiko singing Kagome Song</figcaption></figure><p>Overall it’s a fun game. I hope that they release the resolution in the future so i can know whether i have the correct answer or not.</p><p>Now we go to top 5 of the list.</p><p>5. AI: Somnium Files - nirvanA Initiative</p><p>Nirvana Initiative continue the story from the last AI: Somnium Files, but now we play as Mizuki, one of the cast from the last game that now after six years works as an intern detective for ABIS. That what i most hype about, and they delivered it. I like Mizuki and her interacting with other cast.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*zbOHB5b907MeMSFYaSuNPw.png" /><figcaption>Mizuki Smug face</figcaption></figure><p>For the story, it still follows what i like about AI: Somnium Files compares to other Uchikoshi works, that is using used pseudoscience from his previous game (in this case is time travel) as an initial resolution then dissected it with a more plausible explanation. Compare to the first Somnium Files, Nirvana Initiative is less gore but they replace it with more horror that makes you uncomfortable, i think it’s the same type of horror as DDLC albeit not that much. The puzzle also improving a lot compares to the first game, i hope that in the next Uchikoshi game, he fused Somnium Files puzzle with Zero Escape puzzle, like the post game somnium.</p><p>Unfortunately i didn’t like the resolution as much as the first game. My complain is they put that kind of twist just to make us as the player more confused and didn’t have a direct impact to the story itself or what the character feels. For example, in 999, the twist is relevant because that also explain the motive of Zero and why he / she organize that escape game.</p><p>Overall its an enjoyable game. I put it in the top five because i really like the perfect balance of SoL and mystery and Somnium files really shine in that category.</p><p>4. Zero Escape: Nine Hours, Nine Persons, Nine Doors</p><p>The first Zero Escape game, and maybe the gate that introduce Uchikoshi to much more people. I already said in my review, that 999 has a strong cast, and with that we can really enjoy the journey of all nine peoples to escape the sinking ship.</p><p>Of course, one of the strong point of Zero Escape game is their puzzle. For the first of the trilogy, its good and challenging. I really like that we can put a note, because in this kind of game we really need to note a bunch of stuff.</p><p>999 for me is a benchmark for how i will evaluate other game with the same genre. It’s got a good puzzle, story was engaging, strong cast of characters, and the payoff was satisfying.</p><p>3. AI: Somnium Files</p><p>Now we go to top 3 with AI: Somnium Files as the third position. Why i rate Somnium Files higher than 999 is because i really like a mix of SoL and mystery. Somnium Files has the perfect mix of the two.</p><p>For the SoL part, we can enjoy each casts daily life, what they like, what they aspire to be. I also didn’t got bored following the SoL part, because first the cast got a good chemistry with each other, second they put a good amount of comedy albeit some were lost in translation in the english localization. I also really like they reserve one route that is not about resolving or giving a hint to the mystery but more focus on building the “feels”. In this case is Ota route. I really like his and his mom relationship and i can sympathized on his mom feeling about Ota.</p><p>The mystery is also a strong point in Somnium Files. After playing a three quarter of the game, i can see how the culprit kill it’s victim but still can’t determined who’s who. So the payoff in the last part of the game for me is really satisfying and more fresh compare to when i played Zero Escape game. And same with nirvanA Initiative i’m glad they Uchikoshi used a different approach with this game and not used parallel world theory or time traveling.</p><p>Maybe my minor complain is the action scene that seems out of place, and too over for me. It makes the the scene less serious than i hope for. But overall i really enjoy playing Somnium Files.</p><p>Oh and also invisible rainbow arrow with that dance is a banger.</p><p>2. Zero Escape: Virtue’s Last Reward</p><p>I think and maybe some will agree, that VLR is the best Zero Escape other compares to the other. VLR for me is 999 but more improvement and also address some of my complain about 999.</p><p>My complain about 999 is they used the same concept and twist that for me already familiar with after playing Uchikoshi previous games so that the payoff in the end is predictable. For VLR on the other hand, for me it’s exiting because i can’t read what the ending is. Of course i have some theory formed while playing the game, but i still unsure it is the correct one or they have other way to resolve the mystery.</p><p>The main cast also interesting, i really like Sigma and Phi. Their banter is hilarious, the returning of Clover from 999 and the mysterious Alice that only appears in the ending scene of 999.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/0*CXM5LcvLuhGvpmMc" /><figcaption>Don’t forgot about Luna, she needs to be protected at all cost</figcaption></figure><p>But same as 999, some of the cast for me didn’t flesh their background as much as the other cast. Like clover for me didn’t get as much love as in 999, but maybe because she already got her time in 999.</p><p>Overall, my experience while playing VLR is much more exiting and engaging, and i hope i can experience this kind of thing again in the future.</p><ol><li>Ever17 -the out of infinity-</li></ol><p>So here it is my most favorite of Uchikoshi game. Some people may think that VLR or 999 is better than Ever17. But for me Ever17 is my most favorite visual novels till this day. Not only it is really good, but it also the gate for me to read more of visual novels and the reason why i want to read more visual novels.</p><p>Ever17 tells us a story about a group of youngster that got trapped in an underwater theme park named LeMU unable to escape because of some accident. In addition, LeMU is under large water pressure, limiting time to find a means of escape to a few days.</p><p>What i really like about Ever17 is what i want from a show, books, or even games. I got it all from Ever17. Previously i said that i like a story mix of SoL and mystery. And oh boy Ever17 is spoils me to the rotten.</p><p>First they really fleshing out all of the cast, their background, and also their interaction between each other. Of course because they were trapped and no death game that will endanger their life. The story can be more focused about how each character interact with each other and how they can tolerate the other shortcoming.</p><p>Second, the heroine route. Don’t get me wrong, i still think the story in each of the heroines route is one of the weakness of Ever17. They just happens and no memorable moment that i can think of. But the non-true route has a role to put hints and foreshadowing that will be exploded out in the true route.</p><p>Third, the romance. I really like a story where the protagonist has a choose his own partner in the true route. And they took it further to rather than just partner, he makes a family. The whole theme of family took me by surprise but it’s one of the theme that i really like to see and relate to.</p><p>Fourth, the feels. It’s really rare for Uchikoshi works to have a really good building up the “feels” that i had start to cry. Ever17 delivered the “feels” incredibly, it’s one of the scene that i most like. Really sweet but also bitter. I don’t know how many times i reread that part.</p><p>Fifth, the mystery. Of course its Uchikoshi works, so the mystery part should be the greatest. If people ask what i want to forget the most in my entire life, without hesitant i want to forgot Ever17, so i can experience the twist, the last payoff in the true route again.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6650247818ba" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Review] Zero Escape: Nine Hours, Nine Persons, Nine Doors]]></title>
            <link>https://medium.com/@gibranmfw/review-zero-escape-nine-hours-nine-persons-nine-doors-f0a6ffe905d2?source=rss-1c642392c35d------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0a6ffe905d2</guid>
            <category><![CDATA[games]]></category>
            <category><![CDATA[review]]></category>
            <category><![CDATA[reviews-in-english]]></category>
            <category><![CDATA[zero-escape]]></category>
            <category><![CDATA[game-review]]></category>
            <dc:creator><![CDATA[Gibran Wisesa]]></dc:creator>
            <pubDate>Sun, 26 Sep 2021 10:04:11 GMT</pubDate>
            <atom:updated>2021-09-26T12:48:30.967Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*Q6ZbMs-r9Yt2_VYjrUeRDw.jpeg" /></figure><p>So finally I got the motivation to clear Zero Escape: Nine Hours, Nine Persons, Nine Doors (i will abbreviate it to 999) ever since I put it on my backlog during high school days. The author is the main author of Ever17 (my kamige FYI) and also the one who wrote the true ending of it.</p><p>Honestly the reason I lost the will to play it is because people said it is similar to Danganronpa, and I don’t really like “death game” genre. But to my surprise the game is more similar to Ever17 in terms of the overall plot. I’m glad it’s not a “choose who to die to proceed” and more like “trapped in a closed room” type of game.</p><h4>The Review</h4><p>Overall it’s a fun ride. It’s a mystery novel, so expect many expositions, word plays, and complicated terms. The puzzle is not too complicated and it’s fun figuring out the answer to the puzzle. I really like that they make us play with number base, digit sum, magic square and other math based puzzles. It’s not really complicated but still fun doing all the calculations. Still the early puzzle, the one where we must choose a correct item is a bit boring because it is just click this, click that, and we can just brute force it.</p><p>The cast is great, each has its own goals and background. Although there is one character that I feel has tin importance in the overall plot. I hope it will be explained more in the next game. The twist, albeit some is predictable, it’s still good. I also really like that the author chose titanic and the urban legend surrounding it as this game theme and incorporated it with other more technical things.</p><p>The minus, there is no glossary so I had to load that part just to re-read all of the explanations of the terms introduced in this game. I had a lot of fun when I compared the in-game info in the glossary with the actual explanation from Wikipedia when I played the infinity series. So it’s a bummer when I know there is no such feature in this game.</p><h4>Common Patterns</h4><p>For the rest of this review, I want to talk about the common pattern i found. Like i said before they use a similar pattern to Ever17 and other infinity series. There’s a girl, the MC, with other people trapped. They must find a way to escape within a time limit. The great reveal is something you think is obvious and tied to the theme of the story but they twisted it, plus a little time paradox for flavor. What makes it more funny is because the same pattern is used in Takumi Nakazawa (The author former co-writer in KID, and now work together for Too Kyo Games) games.</p><p>The author works that I have finished outside the Infinity Series is Punch Line. Albeit it’s more comedic, it also follows that same pattern. I plan to finish the other two games of the trilogy in one go, and now still at the beginning of Virtue Last Reward. So I really hope those other two games have something to trick me, so the big reveal at the end can be much more impactful and exciting. Because on 999, I can already make a rough guess about the twist that will happen at the end.</p><p>I think Key also suffers the same things, they keep reusing the same formula for years on their games. For Key it still works because even if you predicted something as long as you feel the “feels” it will still feel satisfied. But with a mystery game the same logic cannot be applied. One of the fun things following a mystery story is creating your own theory from the hints given and comparing it to the grand reveal at the end. But when I played 999, I just followed my experience with the author’s past works and incorporated it with the given hints and voila your guess is close to the correct answer. It’s a bummer because for me it’s not a really genuine experience the same as the first time i played ever17 and i want to experience the excitement more than this.</p><p>If there is a tool to forget only one things in my life, I want to forget the part where I played ever17 so I can re-experiencing it again with this game.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0a6ffe905d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Perjalanan PPL Gibran] Day 15: Refactor in Prima]]></title>
            <link>https://medium.com/usagi-studio/perjalanan-ppl-gibran-day-15-refactor-in-prima-fee8ff08e1d7?source=rss-1c642392c35d------2</link>
            <guid isPermaLink="false">https://medium.com/p/fee8ff08e1d7</guid>
            <dc:creator><![CDATA[Gibran Wisesa]]></dc:creator>
            <pubDate>Thu, 17 May 2018 16:07:53 GMT</pubDate>
            <atom:updated>2018-05-17T16:12:42.911Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Set story [Perjalanan PPL Gibran] berisi tutorial, progress, laporan, dan keluh kesah selama saya mengambil dan mengerjakan proyek mata kuliah PPL di Fakultas Saya<br><a href="https://medium.com/usagi-studio/week-5-ppl-blog-faiz-ce5ced251f13">Awal perjalanan usagi studio :<br>https://medium.com/usagi-studio/week-5-ppl-blog-faiz-ce5ced251f13</a></blockquote><p>Untuk story kali ini saya akan lebih membahas mengenai refactor yang terjadi di Prima, semoga bisa menjadi referensi untuk membuat sistem yang lebih baik kedepannya</p><p>sesuai dengan <a href="https://medium.com/usagi-studio/perjalanan-ppl-gibran-day-11-scalability-in-prima-9625d2ee7e58">story day 11</a> kami menemukan dari hasil profiling bahwa fungsi-fungsi yang kami buat sangat tidak efisien bisa dilihat dari lamanya waktu untuk menjalankan masing-masing fungsi</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*5uztZma0Ch3Q9CJxACWzZQ.jpeg" /><figcaption>Top10 cara menunggu waktu buka puasa</figcaption></figure><p>Sehingga diperlukan refactoring pada fungsi-fungsi tersebut khususnya fungsi get sks untuk mengurangi loading time ketika berganti page.</p><p>Beberapa refactor telah kami lakukan, salah satu nya refactor sederhana yang sudah pernah saya bahas pada set <a href="https://medium.com/usagi-studio/perjalanan-ppl-gibran-day-13-refactoring-design-pattern-a332673ddc23">story sebelumnya</a></p><p>Refactoring lain yang sudah saya coba dan eksperimenkan adalah menggunakan berbagai macam library multiprocessing seperti yang sudah pernah saya bahas pada <a href="https://medium.com/usagi-studio/perjalanan-ppl-gibran-day-11-scalability-in-prima-9625d2ee7e58">story sebelumnya,</a> tapi untuk memperjelas berikut beberapa fungsi requests asynchronous yang saya buat dengan berbagai library yang berbeda:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*7UI1wU5WsyDI3KrjHR8B1A.png" /></figure><p>Dan hasil nya tidak memuaskan, di lokal saya bisa mendapatkan kecepatan yang memuaskan, namun ketika di deploy pada server heroku <strong>gratis</strong>, terdapat limitasi hardward yang diterapkan heroku sehingga process multiprocessing tidak dapat berjalan dengan baik bahkan sama saja dengan sequential.</p><p>Pada akhirnya solusi kami adalah menggunakan caching. Meskipun untuk login pertama agak sedikit lama karena harus requests data-data yang diperlukan. Namun karena setelah login data tersebut sudah disimpan didalam cache sehingga loading time untuk selanjutnya akan lebih cepat</p><p>berikut hasil profiling dengan data yang sudah ada dalam cache</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/1*Kft8CsCuCKv8ss0IxwIklQ.png" /><figcaption>profiling pada lokal saya</figcaption></figure><p>Meskipun tidak sempurna tapi dengan keterbatasan server yang ada saya cukup puas dengan hasil yang didapat</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fee8ff08e1d7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/usagi-studio/perjalanan-ppl-gibran-day-15-refactor-in-prima-fee8ff08e1d7">[Perjalanan PPL Gibran] Day 15: Refactor in Prima</a> was originally published in <a href="https://medium.com/usagi-studio">Usagi Studio</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Perjalanan PPL Gibran] Day 14: Experiment]]></title>
            <link>https://medium.com/usagi-studio/perjalanan-ppl-gibran-day-14-experiment-d56a2f39179?source=rss-1c642392c35d------2</link>
            <guid isPermaLink="false">https://medium.com/p/d56a2f39179</guid>
            <dc:creator><![CDATA[Gibran Wisesa]]></dc:creator>
            <pubDate>Thu, 17 May 2018 02:46:35 GMT</pubDate>
            <atom:updated>2018-05-17T02:46:35.844Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Set story [Perjalanan PPL Gibran] berisi tutorial, progress, laporan, dan keluh kesah selama saya mengambil dan mengerjakan proyek mata kuliah PPL di Fakultas Saya<br><a href="https://medium.com/usagi-studio/week-5-ppl-blog-faiz-ce5ced251f13">Awal perjalanan usagi studio :<br>https://medium.com/usagi-studio/week-5-ppl-blog-faiz-ce5ced251f13</a></blockquote><p>Untuk task-task diawal sprint ini, saya lebih banyak melakukan experiment-experiment untuk membuat model machine learning yang baik karena data yang dibutuhkan baru didapatkan pada awal sprint 3 ini.</p><p>Percobaan dilakukan dengan membandingkan antara algoritma decision tree dengan naive bayes serta membandingkan teknik oversampling random oversampling dengan SMOTE.</p><p>Hasil yang didapatkan sebenarnya tidak terlalu memuaskan, karena rata-rata hanya mendapatkan akurasi sebesar 0.5 dengan teknik apapun. Teman sasya <a href="https://medium.com/u/2747db8c0365">Faizal Adhitama Prabowo</a> mendapat akurasi paling tinggi sebanyak 0.7 dengan decision tree tapi tanpa melakukan handling terhadap data yang imbalance.</p><p>Untuk kedepannya mungkin saya akan mencoba untuk mengubah dataset nya yang awalnya dibagi berdasarkan matkul menjadi digabungkan beberapa matkul sehingga jumlah data yang digunakan sebagai training lebih banyak.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d56a2f39179" width="1" height="1" alt=""><hr><p><a href="https://medium.com/usagi-studio/perjalanan-ppl-gibran-day-14-experiment-d56a2f39179">Perjalanan PPL Gibran] Day 14: Experiment</a> was originally published in <a href="https://medium.com/usagi-studio">Usagi Studio</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Perjalanan PPL Gibran] Day 13: Refactoring & Design Pattern]]></title>
            <link>https://medium.com/usagi-studio/perjalanan-ppl-gibran-day-13-refactoring-design-pattern-a332673ddc23?source=rss-1c642392c35d------2</link>
            <guid isPermaLink="false">https://medium.com/p/a332673ddc23</guid>
            <dc:creator><![CDATA[Gibran Wisesa]]></dc:creator>
            <pubDate>Wed, 16 May 2018 23:54:20 GMT</pubDate>
            <atom:updated>2018-05-16T23:54:20.983Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Set story [Perjalanan PPL Gibran] berisi tutorial, progress, laporan, dan keluh kesah selama saya mengambil dan mengerjakan proyek mata kuliah PPL di Fakultas Saya<br><a href="https://medium.com/usagi-studio/week-5-ppl-blog-faiz-ce5ced251f13">Awal perjalanan usagi studio :<br>https://medium.com/usagi-studio/week-5-ppl-blog-faiz-ce5ced251f13</a></blockquote><p><strong>Refactor</strong></p><p>Menurut Martin Fowler, Refactor adalah kegiatan dimana kita mengubah struktur internal suatu kode tanpa mengubah fungsi atau behaviour dari kode tersebut. Refactor berguna untuk membersihkan kode dan meminimalkan bug atau error yang dapat terjadi.</p><p>Beberapa aspek pada clean code:</p><ol><li>Tidak ada duplikasi</li><li>Dapat dibaca</li><li>Mudah untuk dikembangkan</li><li>Simple</li><li>Efisien</li><li>Tidak ada comment yang tidak seharusnya</li></ol><p>Pada beberapa minggu lalu, kami lebih sibuk melakukan refactor untuk mengurangi loading time dalam merequests data dari API CS. Berikut contoh dari refactor yang dapat dilakukan di Prima:</p><pre>def get_sks_sequential(access_token, npm):<br>    try:<br>        data = caching(&quot;request_mahasiswa_data&quot;, Requester.request_mahasiswa_data,<br>                       (npm, os.environ[&#39;CLIENT_ID&#39;], access_token), npm)<br>        angkatan = data[&#39;program&#39;][0][&#39;angkatan&#39;]</pre><pre>now = datetime.datetime.now()</pre><pre>tot_sks = 0</pre><pre>for year in range(int(angkatan), now.year + 1):<br>            for term in range(1, 4):<br>                res = Requester.request_sks(npm, term, year, os.environ[&#39;CLIENT_ID&#39;], access_token)<br>                for course in res:<br>                    if course[&#39;kelas&#39;] != None and cek_huruf_lulus(course[&#39;nilai&#39;]):<br>                        tot_sks = tot_sks + course[&#39;kelas&#39;][&#39;nm_mk_cl&#39;][&#39;jml_sks&#39;]<br>                    elif course[&#39;kelas&#39;] is None and cek_huruf_lulus(course[&#39;nilai&#39;]):<br>                        tot_sks = tot_sks + cek_mpkos(course[&#39;kd_mk&#39;])</pre><pre>return tot_sks, None<br>    except ValueError as exception:<br>        return None, str(exception)<br>    except requests.ConnectionError as exception:<br>        return None, str(exception)<br>    except requests.HTTPError as exception:<br>        return None, str(exception)</pre><pre>def get_all_sks_term(access_token, npm):<br>    try:<br>        taken_course = []<br>        data = caching(&quot;request_mahasiswa_data&quot;, Requester.request_mahasiswa_data,<br>                       (npm, os.environ[&#39;CLIENT_ID&#39;], access_token), npm)<br>        angkatan = data[&#39;program&#39;][0][&#39;angkatan&#39;]</pre><pre>now = datetime.datetime.now()</pre><pre>sks_map = {}</pre><pre>for year in range(int(angkatan), now.year + 1):<br>            sks_terms = []<br>            for term in range(1, 4):<br>                tot_sks = 0<br>                key_name = &quot;request_sks&quot;+&quot;_&quot;+str(term)+&quot;_&quot;+str(year)<br>                res = caching(key_name, Requester.request_sks,<br>                              (npm, term, year, os.environ[&#39;CLIENT_ID&#39;], access_token), npm)<br>              <br>                for course in res:<br>                    crs_not_none = course[&#39;kelas&#39;] != None<br>                    if course[&#39;kd_mk&#39;] in taken_course:<br>                        continue<br>                    elif crs_not_none and cek_huruf_lulus(course[&#39;nilai&#39;]):<br>                        tot_sks = tot_sks + course[&#39;kelas&#39;][&#39;nm_mk_cl&#39;][&#39;jml_sks&#39;]<br>                        taken_course.append(course[&#39;kd_mk&#39;])<br>                    elif course[&#39;kelas&#39;] is None and cek_huruf_lulus(course[&#39;nilai&#39;]):<br>                        tot_sks = tot_sks + cek_mpkos(course[&#39;kd_mk&#39;])<br>                        taken_course.append(course[&#39;kd_mk&#39;])<br>                sks_terms.append(tot_sks)<br>            sks_map[year] = sks_terms<br>        return sks_map, None<br>    except ValueError as exception:<br>        return {}, str(exception)<br>    except requests.ConnectionError as exception:<br>        return {}, str(exception)<br>    except requests.HTTPError as exception:<br>        return {}, str(exception)</pre><p>2 fungsi tersebut sebenarnya sama, yaitu merequests ke API CS detail matkul yang diambil oleh seorang mahasiswa, perbedaan nya adalah pada fungsi pertama hanya mengembalikan total sks dari semua matkul yang lulus sementara pada fungsi kedua mengembalikan dictionary dari total sks untuk setiap term</p><p>Untuk merefactor nya sebenar nya bisa dilakukan dengan cara fungsi pertama memanggil fungsi kedua, kemudian untuk mengambil total sks dapat loop dari return value fungsi kedua.</p><pre>def get_sks_sequential(access_token, npm):<br>    try:<br>        data = get_all_sks_term(access_token, npm)<br>        tot_sks = 0</pre><pre>        for year in data:<br>            for sks in data[year]:<br>                tot_sks = tot_sks + sks</pre><pre>    return tot_sks, None<br>    except ValueError as exception:<br>        return None, str(exception)<br>    except requests.ConnectionError as exception:<br>        return None, str(exception)<br>    except requests.HTTPError as exception:<br>        return None, str(exception)</pre><p>Namun hal ini bisa diimprove lagi dengan menggunakan caching, sehingga kita tidak perlu melakukan panggilan requests untuk setiap pemanggilan fungsi get_sks</p><p><strong>Design Pattern</strong></p><p>Design pattern adalah sebuah pattern atau cara melakukan kode yang general dan reusable dalam untuk mencegah beberapa masalah atau error yang sering muncul dalam membuat sebuah sistem.</p><p>Kami menggunakan django yang sudah menerapkan design pattern MVC. MVC adalah design pattern yang sering digunakan untuk aplikasi berbasis web, dimana sistem akan dibagi menjadi Model, View, dan Controller.</p><ol><li>Model: Interface dari data, memudahkan dalam pengambilan data dari database</li><li>View: Berisi kode dan definisi dari user layout atau GUI dari sistem atau software</li><li>Controller: Mengontrol flow atau arus informasi antara model dan view</li></ol><p>Karena django langsung menghandle controller, maka django sering disebut sebagai MTV (Model, Template, View)</p><ol><li>Model: Interface untuk mengakses data</li><li>Template: Presentation layer, dimana kita dapat mengatur bagaimana sistem kita ditampilkan pada layar</li><li>View: Menjebatani Model dengan template</li></ol><p>Contoh Model:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*XInKHP_ME31QGIUY5Qz9Cg.png" /><figcaption>api.db (<a href="https://gitlab.com/PPL2018csui/Kelas-C/PPL2018-C7/blob/prediksi_kelulusan_matkul/api/db/utils.py">https://gitlab.com/PPL2018csui/Kelas-C/PPL2018-C7/blob/prediksi_kelulusan_matkul/api/db/utils.py</a>)</figcaption></figure><p>Contoh Template:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*uHgJ584irDCaar7xWvnvLg.png" /><figcaption>templates (<a href="https://gitlab.com/PPL2018csui/Kelas-C/PPL2018-C7/blob/prediksi_kelulusan_matkul/templates/mahasiswa/index.tpl">https://gitlab.com/PPL2018csui/Kelas-C/PPL2018-C7/blob/prediksi_kelulusan_matkul/templates/mahasiswa/index.tpl</a>)</figcaption></figure><p>Contoh View:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*Gm_s7RFIqb-AbL1tEQGfHA.png" /><figcaption>mahasiswa/views.py (<a href="https://gitlab.com/PPL2018csui/Kelas-C/PPL2018-C7/blob/prediksi_kelulusan_matkul/mahasiswa/views.py">https://gitlab.com/PPL2018csui/Kelas-C/PPL2018-C7/blob/prediksi_kelulusan_matkul/mahasiswa/views.py</a>)</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a332673ddc23" width="1" height="1" alt=""><hr><p><a href="https://medium.com/usagi-studio/perjalanan-ppl-gibran-day-13-refactoring-design-pattern-a332673ddc23">[Perjalanan PPL Gibran] Day 13: Refactoring &amp; Design Pattern</a> was originally published in <a href="https://medium.com/usagi-studio">Usagi Studio</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Perjalanan PPL Gibran] Day 12: Error Code]]></title>
            <link>https://medium.com/usagi-studio/perjalanan-ppl-gibran-day-12-error-code-673deb1c1451?source=rss-1c642392c35d------2</link>
            <guid isPermaLink="false">https://medium.com/p/673deb1c1451</guid>
            <dc:creator><![CDATA[Gibran Wisesa]]></dc:creator>
            <pubDate>Wed, 16 May 2018 23:06:17 GMT</pubDate>
            <atom:updated>2018-05-16T23:06:17.367Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Set story [Perjalanan PPL Gibran] berisi tutorial, progress, laporan, dan keluh kesah selama saya mengambil dan mengerjakan proyek mata kuliah PPL di Fakultas Saya<br><a href="https://medium.com/usagi-studio/week-5-ppl-blog-faiz-ce5ced251f13">Awal perjalanan usagi studio :<br>https://medium.com/usagi-studio/week-5-ppl-blog-faiz-ce5ced251f13</a></blockquote><p>Story ini adalah lanjutan dari story yang pernah saya buat mengenai <a href="https://medium.com/usagi-studio/perjalanan-ppl-gibran-day-8-error-code-exception-handling-c9d18261861e">error code dan exception handling</a></p><p><strong>Apa itu error code ?<br></strong>error code merupakan sebuah nilai yang menunjukkan status dari sebuah sistem atau software. Status ini berguna ketika kita ingin mengetahui keadaan dari sebuah sistem akibat dari fungsi atau implementasi yang kita jalankan. Misal pada HTTP terdapat status 404 ketika halaman yang ingin dibuka ternayta tidak ada pada server yang dimaksud.</p><p>Untuk setiap sistem memiliki error code tersendiri, misal pada sistem windows terdapat 16000 error code, untuk detail rinciannya dapat dilihat di halaman ini:</p><ol><li>windows : <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms681381(v=vs.85).aspx">https://msdn.microsoft.com/en-us/library/windows/desktop/ms681381(v=vs.85).aspx</a></li><li>HTTP : <a href="http://www.restapitutorial.com/httpstatuscodes.html">http://www.restapitutorial.com/httpstatuscodes.html</a></li><li>C &amp; Linux : <a href="https://web.archive.org/web/20110115230351/http://www.barricane.com/c-error-codes-include-errno">https://web.archive.org/web/20110115230351/http://www.barricane.com/c-error-codes-include-errno</a></li><li>FTP Server : <a href="https://en.wikipedia.org/wiki/List_of_FTP_server_return_codes">https://en.wikipedia.org/wiki/List_of_FTP_server_return_codes</a></li></ol><p>Untuk membuat error code custom sendiri sebenarnya cukup mudah, hanya membuat sebuah list dengan angka sebagai key dan value nya adalah error serta deskripsi dari error tersebut. Tetapi untuk beberapa bahasa pemrograman seperti yang sedang kami gunakan yaitu python, lebih mudah untuk menggunakan exception dari pada errror code. Dikarenakan exception dapat menggunakan try dan except</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=673deb1c1451" width="1" height="1" alt=""><hr><p><a href="https://medium.com/usagi-studio/perjalanan-ppl-gibran-day-12-error-code-673deb1c1451">[Perjalanan PPL Gibran] Day 12: Error Code</a> was originally published in <a href="https://medium.com/usagi-studio">Usagi Studio</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Perjalanan PPL Gibran] Day 11: Scalability in PRIMA]]></title>
            <link>https://medium.com/usagi-studio/perjalanan-ppl-gibran-day-11-scalability-in-prima-9625d2ee7e58?source=rss-1c642392c35d------2</link>
            <guid isPermaLink="false">https://medium.com/p/9625d2ee7e58</guid>
            <dc:creator><![CDATA[Gibran Wisesa]]></dc:creator>
            <pubDate>Wed, 02 May 2018 06:46:54 GMT</pubDate>
            <atom:updated>2018-05-02T06:47:58.123Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Set story [Perjalanan PPL Gibran] berisi tutorial, progress, laporan, dan keluh kesah selama saya mengambil dan mengerjakan proyek mata kuliah PPL di Fakultas Saya<br><a href="https://medium.com/usagi-studio/week-5-ppl-blog-faiz-ce5ced251f13">Awal perjalanan usagi studio :<br>https://medium.com/usagi-studio/week-5-ppl-blog-faiz-ce5ced251f13</a></blockquote><p>Terdapat hal yang tidak terduga pada jam-jam terakhir sebelum kami sprint review kemarin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*5uztZma0Ch3Q9CJxACWzZQ.jpeg" /><figcaption>gambar runtime fungsi-fungsi pada PRIMA</figcaption></figure><p>Bisa dilihat bahwa untuk 1 user saja loading time bisa lebih dari 2 detik, bagaimana dengan 100, 1000, 1 juta ??</p><p>Oleh karena itu, pada awal sprint ketiga 3 saya lebih berfokus untuk melakukan refactoring sembari mempercepat loading time dari PRIMA</p><p>Sebelum nya saya ingin menjelaskan tentang penting nya scalability hasil dari searching google karena kasus diatas</p><p><strong>The Importance of Scalability</strong></p><p>Dari hasil searching yang saya lakukan, scalability adalah kemampuan software atau sebuah sistem untuk menghadapi task atau work yang terus berkembang.</p><p>Sebagai contoh, bagaimana google mencari webpage yang sesuai keyword dari user dari berjuta-juta webpage yang ada di database google, serta bagaimana juga google dapat menghandle berjuta-juta requests yang ada setiap harinya.</p><p>Dari sana dapat dilihat bahwa jika google kurang scalable maka user akan menunggu waktu yang mungkin lebih lama dari biasa nya.</p><p>Sama seperti kasus PRIMA diatas bahwa 1 user saja dapat menunggu 136 detik untuk masuk kedalam halaman PRIMA. Tentu saja dalam sisi user experience hal ini tidak terlalu nyaman.</p><p>Scalability bisa dilihat dari sisi:</p><ol><li>Algoritma</li></ol><p>Pada sisi algoritma, bagaimana kita bisa mencari algoritma yang efisien untuk task-task yang akan kita gunakan</p><p>2. Arsitektur</p><p>Pada sisi arsitektur, bagaimana kita bisa mencari arsitektur yang sesuai dengan sistem kita sehingga tidak memberatkan dalam hal loading time dan waktu komunikasi</p><p>3. Organisasi</p><p>dalam sisi organisasi, bagaimana kita bisa menghandle berkembangan developer yang bisa saja bertambah sangat cepat</p><p>Untuk PRIMA, saya berfikir solusi dari masalah diatas dapat diselesaikan dengan point 1 dan 2</p><p><strong>PRIMA: Resolve Scalability Issue</strong></p><p>Untuk loading time, pada akhirnya kami memutuskan untuk mengubah beberapa fungsi menjadi asynchronous</p><p>Saya sendiri mendapat tugas untuk mengubah fungsi yang banyak sekali melakukan request menjadi asynchronous</p><p>Pada python banyak sekali library yang dapat digunakan, dan saya mencoba beberapa library untuk melihat yang paling cocok dibagai yang mana, berikut library yang saya coba:</p><ol><li>grequests (requests + grevent)</li><li>requests_futures (requests dengan menggunakan future)</li><li>multiprocessing dengan pool</li><li>threading</li><li>multiprocessing dengan process</li></ol><p>dari kelima itu, yang paling cepat adalah dengan menggunakan multiprocessing</p><p>untuk membuat asynchronous requests pada python dengan menggunakan multiprocessing dengan pool bertama kita initiasi class Pool</p><pre>from multiprocessing import Pool</pre><pre>def async_requests(urls):<br>    pool = Pool(processes=5)</pre><p>input dari fungsi async_requsts adalah semua url yang ingin dilakukan HTTP get atau pun post, pada kasus saya adalah HTTP get.</p><p>Setelah itu buat fungsi untuk melakukan HTTP get</p><pre>import requests</pre><pre>def http_get(url):<br>    result = requests.get(url)<br>    return result.json()</pre><p>Jika sudah kita petakan fungsi http_get dengan argument nya yaitu setiap elemen pada list urls. Hal ini bisa dilakukan dengan 2 cara yaitu dengan menggunakan pool.map dan pool.imap, perbedaan nya adalah pada pool.map akan menunggu semua requests selesai kemudian baru melakukan hal lainnya. Pada pool.imap kita tidak menunggu requests selesai melainkan langsung melakukan hal lainnya.</p><p>Saya menggunakan fungsi pool.map dengan alalasan bahwa fungsi-fungsi dibawah nya memerlukan data hasil requests nya untuk diolah</p><p>maka hasil program secara keseluruhan adalah:</p><pre>from multiprocessing import Pool<br>import requests</pre><pre>def http_get(url):<br>    result = requests.get(url)<br>    return result.json()</pre><pre>def async_requests(urls):<br>    pool = Pool(processes=5)<br>    results = pool.map(http_get, urls)<br>    #lakukan pengolahan data hasil requests</pre><p>Untuk lebih mempercepat lagi, jika dimungkinkan pengolahan data juga dilakukan secara asynchronous, sehingga tidak perlu lagi melakukan looping terhadap hasil requests dari pool.map</p><p>Secara arsitektur kami berencana untuk mengimplementasikan caching. Dengan caching data — data requests yang perlu diambil hanya dilakukan sekali ketika user login, dan setelah nya hanya perlu mengambil nya dari cache. Menurut saya hal ini dapat lebih mempercepat load time karena memotong waktu komunikasi dan pemrosesan data.</p><p>sumber:</p><ol><li>Slide di Scele</li><li>Googling</li><li>Hasil percobaan sendiri</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9625d2ee7e58" width="1" height="1" alt=""><hr><p><a href="https://medium.com/usagi-studio/perjalanan-ppl-gibran-day-11-scalability-in-prima-9625d2ee7e58">[Perjalanan PPL Gibran] Day 11: Scalability in PRIMA</a> was originally published in <a href="https://medium.com/usagi-studio">Usagi Studio</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Perjalanan PPL Gibran] Day 9: Architecture of Prima]]></title>
            <link>https://medium.com/usagi-studio/perjalanan-ppl-gibran-day-9-architecture-of-prima-11930ba84187?source=rss-1c642392c35d------2</link>
            <guid isPermaLink="false">https://medium.com/p/11930ba84187</guid>
            <dc:creator><![CDATA[Gibran Wisesa]]></dc:creator>
            <pubDate>Wed, 02 May 2018 05:38:56 GMT</pubDate>
            <atom:updated>2018-05-17T03:39:09.227Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Set story [Perjalanan PPL Gibran] berisi tutorial, progress, laporan, dan keluh kesah selama saya mengambil dan mengerjakan proyek mata kuliah PPL di Fakultas Saya<br><a href="https://medium.com/usagi-studio/week-5-ppl-blog-faiz-ce5ced251f13">Awal perjalanan usagi studio :<br>https://medium.com/usagi-studio/week-5-ppl-blog-faiz-ce5ced251f13</a></blockquote><p>Kali ini saya akan menjelaskan Architecture yang ada pada Prima, berikut gambaran architecture Prima saat ini :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/1*VUbAf2nI_it2naIbA8CgPA.png" /></figure><p>Sederhana bukan ?</p><p>Kami menggunakan heroku sebagai tempat PRIMA dideploy, pada PRIMA berisi implementasi front end dan backend. User atau client dapat mengakses nya dengan menggunakna browser dengan HTTP seperti biasa.</p><p>Kami menggunakan API CSUI untuk mengambil data mahasiswa yang sebenarnya sulit untuk didapat sendiri seperti data pribadi mahasiswa, rekam jejak akademis, dll. Dari data itu kemudian akan diolah untuk memprediksi lolos apa tidak dalam evaluasi akademik.</p><p>Database kami gunakan untuk menyimpan model prediksi kelulusan mata kuliah serta hasilnya dan hasil dari prediksi evaluasi akademik sehingga tidak perlu dalam waktu yang dekat untuk melakukan prediksi karena pasti hasilnya akan sama.</p><p>Untuk menambah kecepatan, kami menyimpan beberapa data yang sering direquests dari API luar ke dalam cache, sehingga akan mengurangi load time setiap pergantian page.</p><p>Harapan saya sebenarnya ingin menjadikan architecture Prima sebagai microservice tetapi beberapa fitur dari Prima masih menjadi satu seperti bagian frontend dan backend yang sebenarnya bisa dijadikan microservice sehingga frontend hanya requests saja kebagian backend. Selain itu, beberapa fungsionality masih belum dijadikan microservice, seperti search matakuliah, prediksi kelulusan matakuliah dll.</p><p>Tapi Prima juga tidak monolithic, karena beberapa fungsionality menggunakan microservice, seperti fungsi login/logout, mengambil list matakuliah dll.</p><p>Sehingga saya menamakannya sebagai semi-monolithic</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11930ba84187" width="1" height="1" alt=""><hr><p><a href="https://medium.com/usagi-studio/perjalanan-ppl-gibran-day-9-architecture-of-prima-11930ba84187">[Perjalanan PPL Gibran] Day 9: Architecture of Prima</a> was originally published in <a href="https://medium.com/usagi-studio">Usagi Studio</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Perjalanan PPL Gibran] Day 10: Software Environment: CobaCoba, SIT_UAT, dan Production Environment]]></title>
            <link>https://medium.com/usagi-studio/perjalanan-ppl-gibran-day-10-software-environment-cobacoba-sit-uat-dan-production-environment-ecb375b1870f?source=rss-1c642392c35d------2</link>
            <guid isPermaLink="false">https://medium.com/p/ecb375b1870f</guid>
            <dc:creator><![CDATA[Gibran Wisesa]]></dc:creator>
            <pubDate>Wed, 02 May 2018 05:14:14 GMT</pubDate>
            <atom:updated>2018-05-02T05:14:14.171Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Set story [Perjalanan PPL Gibran] berisi tutorial, progress, laporan, dan keluh kesah selama saya mengambil dan mengerjakan proyek mata kuliah PPL di Fakultas Saya<br><a href="https://medium.com/usagi-studio/week-5-ppl-blog-faiz-ce5ced251f13">Awal perjalanan usagi studio :<br>https://medium.com/usagi-studio/week-5-ppl-blog-faiz-ce5ced251f13</a></blockquote><p>Pada kesempatan kali ini saya ingin bercerita tentang environment yang digunakan Prima</p><p>Terdapat 3 environment yang kami gunakan dengan fungsi masing — masing</p><ol><li><strong>Environment CobaCoba</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RcYnDR8nI33XDdg9_G2uqw.png" /><figcaption>Deployment yang dilakukan di CobaCoba</figcaption></figure><p>CobaCoba adalah environment yang digunakan untuk mengetest atau menguji apakah fungsi dan implementasi yang sudah dibuat berjalan dengan baik. Environment ini digunakan pada tahap development.</p><p>Bagi yang ingin melihat environment CobaCoba Prima bisa dilihat dengan link : <a href="http://prima-cobacoba.herokuapp.com/">prima-cobacoba.herokuapp.com</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u_DyBCNCjhbt6pg_EANXsQ.png" /></figure><p><strong>2. Environment SIT_UAT</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wGnQkOFJY71UWd4AsIEwag.png" /></figure><p>Environment SIT_UAT atau staging digunakan untuk melakukan final check pada sistem atau program sebelum masuk kedalam tahap production, pada tahap ini dilakukan testing terhadap depedencies luar, migration database, installasi, dan configurasi.</p><p>Selain itu, hal penting lainnya adalah melakukan performance testing, yaitu mengecek loading time dari web Prima apakah sudah cukup cepat atau tidak. Pada Awal Sprint kali ini, saya dan hacker lainnya sedang mencoba untuk refactor implementasi-implementasi yang ada sehingga bisa mengurangi loading time dari Prima yang ada Sprint sebelum nya terlalu lama.</p><p>Environment ini juga nanti akan dilihat oleh Project Owner untuk diberikan masukkan apakah ada yang kurang atau tidak.</p><p>Depoyment environment SIT_UAT dilakukan dari branch sit_uat, ini dilakukan pada akhir sprint ketika task-task backlog sudah dikerjakan semua. Bagi yang penasaran bisa membuka link ini:</p><p><a href="http://prima-sit-uat.herokuapp.com/">prima-sit-uat.herokuapp.com</a></p><p><strong>3. Environment Production</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tz2rZEp7SKPdZ-y3RUzC4g.png" /></figure><p>Environment Production adalah environment yang digunakan users atau nanti nya pengguna Prima. Pada environment ini seharus nya sudah tidak terdapat bug lagi karena akan digunakan secara langsung oleh User. Deployment environment Production dilakukan dari branch master.</p><p>Bagi yang penasaran bisa membuka link ini:</p><p><a href="http://prima-pplc7.herokuapp.com/">prima-pplc7.herokuapp.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ecb375b1870f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/usagi-studio/perjalanan-ppl-gibran-day-10-software-environment-cobacoba-sit-uat-dan-production-environment-ecb375b1870f">[Perjalanan PPL Gibran] Day 10: Software Environment: CobaCoba, SIT_UAT, dan Production Environment</a> was originally published in <a href="https://medium.com/usagi-studio">Usagi Studio</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Perjalanan PPL Gibran] Day 8: Error Code & Exception Handling]]></title>
            <link>https://medium.com/usagi-studio/perjalanan-ppl-gibran-day-8-error-code-exception-handling-c9d18261861e?source=rss-1c642392c35d------2</link>
            <guid isPermaLink="false">https://medium.com/p/c9d18261861e</guid>
            <dc:creator><![CDATA[Gibran Wisesa]]></dc:creator>
            <pubDate>Wed, 18 Apr 2018 19:01:38 GMT</pubDate>
            <atom:updated>2018-04-18T19:01:38.371Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Set story [Perjalanan PPL Gibran] berisi tutorial, progress, laporan, dan keluh kesah selama saya mengambil dan mengerjakan proyek mata kuliah PPL di Fakultas Saya<br><a href="https://medium.com/usagi-studio/week-5-ppl-blog-faiz-ce5ced251f13">Awal perjalanan usagi studio :<br>https://medium.com/usagi-studio/week-5-ppl-blog-faiz-ce5ced251f13</a></blockquote><p>Kali ini saya akan menjelaskan tentang error code dan bagaimana menghandle suatu exception</p><h4><strong>Error Code</strong></h4><p>Error code adalah suatu kode atau message yang menggambarkan status atau keadaan spesific dari sebuah software</p><p>Misal pada HTML jika kita tidak menemukan suatu alamat situs maka akan mengembalikan 404: Not Found.</p><p>Dengan adanya error code, kita bisa lebih mudah mengenali status yang terjadi pada sistem yang kita buat, sehingga bisa dapat membuat suatu implementasi untuk menangani jika kejadian tersebut terjadi</p><h4><strong>Exception</strong></h4><p>Exception adalah suatu keadaan diamana jika terjadi suatu sistem atau program kita akan berhenti. Misal jika kita membuat program calculator, lalu ternyata ada yang iseng untuk membagi suatu angka dengan 0 sementara kita tidak menghandle case tersebut, maka yang akan terjadi adalah program mengeluarkan suatu exception yaitu ZeroDivisionError.</p><p>Sebenarnya pada python lebih dikenal exception dibanding error code namun pada bahasa lain misal Java, error code harus dihandle dari bagian kode dimana fungsi yang mengembalikan error code dipanggil jika tidak akan mengembalikan error code baru. Sementara exception akan terus “bubble up” sampai bertemu command catch</p><h4><strong>Implementation</strong></h4><pre>def get_data_user(self, access_token, npm, client_id):<br>        parameters = {&quot;access_token&quot;: access_token, &quot;client_id&quot;: client_id}<br>        response = requests.get(self.api_mahasiswa + npm, params=parameters)<br>        if response.status_code == 403:<br>            raise ValueError(&quot;Forbidden :{}&quot;.format(npm))<br>        return response.json()</pre><p>Pada kodingan diatas, saya ingin mengambil data_user yang ada di suatu API dengan menggunakan HTTP GET. Kita dapat mengecek status_code pada request kita dengan menggunakan [response variable].status_code. Diatas saya mengecek apakah status_code = 403, yaitu Forbidden. Jika terjadi, program akan mengeluarkan exception baru yaitu ValueError, kenapa ValueError, karena 403 bisa terjadi dikarenakan input npm berbeda dengan token yang sudah digenerate</p><p>Ada banyak status_code yang dapat terjadi, untuk keseluruhan status_code dapat dilihat di:</p><p><a href="http://www.restapitutorial.com/httpstatuscodes.html">HTTP Status Codes</a></p><p>Untuk exception sebenarnya hanya menggunakan try dan except</p><pre>def get_data_user(access_token, npm):<br>    try:<br>        generator = AuthGenerator()<br>        return generator.get_data_user(access_token, npm, os.environ[&#39;CLIENT_ID&#39;]), None<br>    except ValueError as exception:<br>        return None, str(exception)<br>    except requests.ConnectionError as exception:<br>        return None, str(exception)</pre><p>Seperti pada kodingan diatas, kita membungkus semua implementasi get_data dengan try dan except. Jika exception terjadi maka akan ditangkap oleh try, dan selanjutnya jika exception sesuai dengan maka except, maka akan dijalankan fungsi yang ada pada except tersebut.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c9d18261861e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/usagi-studio/perjalanan-ppl-gibran-day-8-error-code-exception-handling-c9d18261861e">[Perjalanan PPL Gibran] Day 8: Error Code &amp; Exception Handling</a> was originally published in <a href="https://medium.com/usagi-studio">Usagi Studio</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>