<?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 Mochammad Alamsyah on Medium]]></title>
        <description><![CDATA[Stories by Mochammad Alamsyah on Medium]]></description>
        <link>https://medium.com/@malamsyah?source=rss-af3fc0a67ddc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*V52OH1YXtXBUQFm0iGBVnw.png</url>
            <title>Stories by Mochammad Alamsyah on Medium</title>
            <link>https://medium.com/@malamsyah?source=rss-af3fc0a67ddc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 04:36:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@malamsyah/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[Gentle Introduction to Functional Programming in Clojure]]></title>
            <link>https://medium.com/@malamsyah/gentle-introduction-to-functional-programming-in-clojure-1e9449634a95?source=rss-af3fc0a67ddc------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e9449634a95</guid>
            <category><![CDATA[clojure]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[functional-programming]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Mochammad Alamsyah]]></dc:creator>
            <pubDate>Sun, 02 Dec 2018 11:47:14 GMT</pubDate>
            <atom:updated>2018-12-02T11:47:14.780Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-_IFZvgfSzg8EiRuvsRg6g.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/E2tGOeS4Ijc?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Paweł Czerwiński</a> on <a href="https://unsplash.com/search/photos/leaf?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Learning functional programming can be hard and daunting for the first time, but learning it can be fun and change your perspective about how you code especially for me that I code object-oriented since ever, also learning Clojure reignite the excitement again, just like when you first learn to code.</p><p>There are a lot of blogs that explains you about why you should use functional programming, in this blog I just want you to be comfortable code in Clojure.</p><h3>First Thing First</h3><p>Clojure is a Lisp dialect, general-purpose programming language, its a compiled language but remains completely dynamic, and runs on Java Virtual Machine (JVM). Clojure benefits from JVM rich ecosystem, we can use Java class and library from Clojure code.<br>Clojure recognizes <strong>two kinds</strong> of structures:</p><ul><li>Literal representations of data structures (like numbers, strings, maps, and vectors):</li></ul><pre>user=&gt; 1 ; a number<br>user=&gt; &quot;foo&quot; ; a string<br>user=&gt; [&quot;fus&quot; &quot;ro&quot; &quot;dah&quot;] ; a vector of strings</pre><ul><li>Operations, this is how you do things. All operations take the form opening parenthesis, operator, operands, closing parenthesis:</li></ul><pre>user=&gt; (operator operand1 operand2 ... operandn)</pre><p>For example, if you want to do math operation, you just do:</p><pre>user=&gt; (+ 1 2 3 4 5)<br>15</pre><pre>user=&gt; (str &quot;append &quot; &quot;the &quot; &quot;string&quot;) <br>&quot;append the string&quot;</pre><p>This might be different from what you used to. In other languages, different operations might have different structures depending on the operator and the operands. Clojure offers structural uniformity, no matter which operator you’re using or what kind of data you’re operating on, the structure is the same.</p><h3>Control Flow</h3><p>In Clojure, flow control operators are expressions too, there are few basic control flow:</p><h4>if</h4><p>if is the most important conditional expression - it consists of a condition, a &quot;then&quot;, and an &quot;else&quot;. if will only evaluate the branch selected by the conditional.</p><pre>user=&gt; (if boolean-form then-form optional-else-form)</pre><p>Example</p><pre>user=&gt; (str &quot;5 is &quot; (if (even? 5) &quot;even&quot; &quot;odd&quot;)) <br>5 is odd</pre><pre>user=&gt; (if (true? false) &quot;if true&quot;) <em>; else is optional</em><br>nil</pre><h4>if and do</h4><p>if only takes a single expression for the &quot;then&quot; and &quot;else&quot;. Use do to create larger blocks that are a single expression.</p><pre>user=&gt; (if (even? 5) <br>         (do (println &quot;even&quot;) &quot;foo&quot;) <br>         (do (println &quot;odd&quot;) &quot;bar&quot;))</pre><pre>;=&gt; odd<br>;=&gt; &quot;bar&quot;</pre><h4>nil, true, false, Truthiness, Equality, and Boolean Expressions</h4><p>Clojure has true and false values. nil is used to indicate<em> no</em> <em>value</em> in Clojure. You can check if a value is nil with the appropriately named nil? function:</p><pre>user=&gt; (nil? &quot;foo&quot;)<br>; =&gt; false</pre><pre>user=&gt; (nil? nil)<br>; =&gt; true</pre><p>Both nil and false are used to represent logical falseness, whereas all other values are logically truthy.</p><pre>user=&gt; (if &quot;you loves me&quot; &quot;call me&quot;)<br>call me</pre><pre>user=&gt; (if nil &quot;I always get ignored&quot; &quot;Im the one&quot;)<br>Im the one</pre><h3>What now?</h3><p>Now you install Clojure in your machine and get learning, this blog is gentle enough for you to get started learning Clojure. Here are some resources that I find it useful to learn Clojure:</p><ol><li><a href="https://clojure.org/">https://clojure.org</a>/</li><li><a href="https://www.braveclojure.com/">https://www.braveclojure.com</a>/</li></ol><p>Next blog will be discussing <em>collection</em> and f<em>unction</em> in Clojure.</p><p>Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e9449634a95" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lint]]></title>
            <link>https://medium.com/@malamsyah/lint-342e51d1ea62?source=rss-af3fc0a67ddc------2</link>
            <guid isPermaLink="false">https://medium.com/p/342e51d1ea62</guid>
            <category><![CDATA[linter]]></category>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[gojek-bootcamp]]></category>
            <category><![CDATA[gojek]]></category>
            <category><![CDATA[tools]]></category>
            <dc:creator><![CDATA[Mochammad Alamsyah]]></dc:creator>
            <pubDate>Mon, 15 Oct 2018 04:02:38 GMT</pubDate>
            <atom:updated>2018-10-15T04:02:38.768Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*ClpMBXibIvrV9gZGXO2ISg.jpeg" /><figcaption><a href="https://imgflip.com/">https://imgflip.com</a></figcaption></figure><p>When people say lint, people refer to a software that checks your source code and flag errors, style guides, and some cases bugs. Each of this flags called <strong>rules </strong>and sometimes we are not aware of the importance of this rules.</p><h4>Express Intent</h4><p>All that space, newline, conventions, its all boil down to <strong>standardization. </strong>With standardization, each team member coding style is the same hence making debugging or switching team member in ideal cases, seamless.</p><h4>When to break the rules</h4><p>In some cases, a team or community tempted to break lint rules. Breaking lint rules are okay, as long as still <strong>expressing intent</strong>, but I never encourage someone to break it, this meant to be the last resort when the case is to choose between following lint rules or expressing intent. Which is very rare to happen because lint rules are designed to express more intent.</p><p>That is my take away about lint if you want to discuss, please email me at <em>hi@malamsyah.id</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=342e51d1ea62" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Debt Metaphor]]></title>
            <link>https://medium.com/@malamsyah/debt-metaphor-96985bebb01c?source=rss-af3fc0a67ddc------2</link>
            <guid isPermaLink="false">https://medium.com/p/96985bebb01c</guid>
            <category><![CDATA[debt]]></category>
            <category><![CDATA[technical-debt]]></category>
            <category><![CDATA[gojek-bootcamp]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Mochammad Alamsyah]]></dc:creator>
            <pubDate>Mon, 08 Oct 2018 18:03:34 GMT</pubDate>
            <atom:updated>2018-10-08T18:03:34.402Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T8NjxU7KuJCfwc6tZSjANQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/Ql3ULtlplsQ?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Ehud Neuhaus</a> on <a href="https://unsplash.com/search/photos/debt?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>In a project, sometimes we are in this situation when where we are don&#39;t know enough about a domain but still pushed to deliver values with little time and we do it in a messy way that will slow you down in the future. The opposite way is a cleaner design but will take longer to put in place.</p><p>This problem called <strong><em>Technical Debt</em></strong>, first introduced by <a href="https://www.youtube.com/watch?v=pqeJFYwnkjE"><strong><em>Ward Cunningham</em></strong></a><strong><em>. </em></strong>In this metaphor, doing things the quick and dirty way sets us up with a technical debt, which is similar to a financial debt. Like a financial debt, the technical debt incurs interest payments, which come in the form of the extra effort that we have to do in future development because of the quick and dirty design choice.</p><p><strong>Technical Debt</strong> is only justified for cases when we have to make a considered decision to adopt a design strategy that is not sustainable in the long-term but yields a short-term benefit, such as making a feature to get the next funding.</p><p><strong>Writing code poorly</strong> is not a debt, produced by people who are <strong>ignorant</strong> of good design practices, shouldn’t be a debt.</p><p>The ability to <strong>pay back debt</strong> and make this <strong>debt metaphor </strong>work in our advantages depends on our ability to write clean enough code to refactor so when our understanding of the domain is better and the time pressure is less <strong>we can pay that debt</strong>.</p><p>Generating debt is used only for the<strong> last resort </strong>and sometimes debt is inevitable, <a href="https://martinfowler.com/"><strong><em>Martin Fowler</em></strong></a> describes that are 4 types of people that generating debt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*nuJA9F7QOTmYGSMkGbswiA.png" /><figcaption>Technical Debt Quadrant by Martin Fowler</figcaption></figure><p>So the lesson is at least when we are must create and will create debt, we must do it as <strong>prudent</strong> and as <strong>deliberate</strong> as possible.</p><p>So do you agree about this debt? or it&#39;s just a myth like unicorn! feel free to send me an email <a href="/service/mailto:hi@malamsyah.id"><strong><em>here</em></strong></a> for open discussion.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96985bebb01c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hackers and Painters: Design]]></title>
            <link>https://medium.com/@malamsyah/hackers-and-painters-design-eb97b9699c29?source=rss-af3fc0a67ddc------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb97b9699c29</guid>
            <category><![CDATA[gojek-bootcamp]]></category>
            <category><![CDATA[design]]></category>
            <category><![CDATA[hacker]]></category>
            <category><![CDATA[painters]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Mochammad Alamsyah]]></dc:creator>
            <pubDate>Sun, 07 Oct 2018 18:09:13 GMT</pubDate>
            <atom:updated>2018-10-07T18:09:13.182Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dNi9YHwwUlaUlKHZVCV6Ug.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/zBY6td_nVNA?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Steve Johnson</a> on <a href="https://unsplash.com/search/photos/art?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>This blog is continuation <a href="https://medium.com/@malamsyah/hackers-and-painters-beating-the-averages-2b24ab5fc9ab">my previous blog</a> about learning that I take from books “<a href="https://www.amazon.com/Hackers-Painters-Big-Ideas-Computer/dp/1449389554"><strong><em>Hackers and Painters Big Ideas From The Computer Ages</em></strong></a>” by <a href="http://www.paulgraham.com/"><strong><em>Paul Graham</em></strong></a>.</p><h4>How to design</h4><p>The difference between <strong>design</strong> and <strong>research</strong> seems to be a question of new versus good. A design doesn’t have to be new, but it has to be good. Research doesn’t have to be good, but it has to be new. Ultimately design and research are aiming for the same destination, just approaching it from different directions.</p><p><strong>Design</strong> begins by asking, who is this for and what do they need from it? A good architect, for example, does not begin by creating a design that he then imposes on the users, but by studying the intended users and figuring out <strong>what they need</strong>. Not “<strong>what they want.</strong>” making whatever the client tells you to.</p><p>The <strong>customer</strong> is <strong>always right</strong> in the sense that the <strong>measure of good design</strong> is how well it works for the user. And yet, making what works for the user doesn’t mean simply making what the user tells you to. <strong>Users don’t know</strong> what all the choices are, and are often <strong>mistaken</strong> about what they really want. To get good design you have to get close, and stay close, to your users. You have to calibrate your ideas on actual users constantly.</p><h4><strong>Delivering design</strong></h4><p>When building something new, you should get a prototype in front of users as soon as possible.</p><p>The alternative approach might be called the Hail Mary strategy. Instead of getting a prototype out quickly and gradually refining it, you try to create the complete, finished product in one long touchdown pass. Countless startups destroyed themselves this way during the Internet Bubble. I’ve never heard of a case where it worked.</p><p>Morale is key in design. If you’re bored when you’re drawing something, the drawing will look boring. Building something by gradually refining a prototype is good for morale because it keeps you engaged. There is even a saying among painters:</p><blockquote>“A painting is never finished. You just stop working on it.”</blockquote><p>This is the end of Hackers and Painters series, I hope you enjoyed it and learn something new. Have a good book suggestion? Hit me an email <a href="/service/mailto:hi@malamsyah.id">here</a>.</p><p>Thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb97b9699c29" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hackers and Painters: Beating the Averages]]></title>
            <link>https://medium.com/@malamsyah/hackers-and-painters-beating-the-averages-2b24ab5fc9ab?source=rss-af3fc0a67ddc------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b24ab5fc9ab</guid>
            <category><![CDATA[painters]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[gojek-bootcamp]]></category>
            <category><![CDATA[hacker]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Mochammad Alamsyah]]></dc:creator>
            <pubDate>Sun, 07 Oct 2018 14:44:43 GMT</pubDate>
            <atom:updated>2018-10-07T14:44:43.173Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aIVo0vHk6Aa5sY7scoAb0w.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/mfYFY0XnFug?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Steve Johnson</a> on <a href="https://unsplash.com/search/photos/art?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>This blog is continuation <a href="https://medium.com/@malamsyah/hackers-and-painters-introduction-870ee5646a4f">my previous blog</a> about learning that I take from books “<a href="https://www.amazon.com/Hackers-Painters-Big-Ideas-Computer/dp/1449389554"><strong><em>Hackers and Painters Big Ideas From The Computer Ages</em></strong></a>” by <a href="http://www.paulgraham.com/"><strong><em>Paul Graham</em></strong></a>.</p><h4>The Blub Paradox</h4><p>A programming language is just a tool and many programmers see that one programming language is better than the others, get very attached to their favorite programming language and programmers rarely switch languages voluntarily. Whatever language people happen to be used to, they tend to consider just good enough.</p><p>The only programmers in a position to see all the differences in power between the various languages are those who understand the most powerful one. You can’t trust the opinions of the others, because of the Blub paradox: they’re satisfied with whatever language they happen to use because it dictates the way they think about programs.</p><h4>Aikido for Languages</h4><p>It’s the nature of programming languages to make most people satisfied with whatever they currently use. Computer hardware changes so much faster than personal habits that programming practice is usually ten to twenty years behind the processor.</p><p>At places like MIT, they were writing programs in high-level languages in the early 1960s, but many companies continued to write code in machine language well into the 1980s.</p><p>Ordinarily, technology changes fast. But programming languages are different: programming languages are not just technology, but what programmers think in. They’re half technology and half religion.</p><p>So when we are programming using new languages that give you competitive advantages and it isn’t widely understood, you shouldn’t worry about it. You should hope that it stays that way.</p><p>That’s all for part 2 of this book series, next up, part 3.</p><p>Send me an email to discuss more ideas <a href="/service/mailto:hi@malamsyah.id">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b24ab5fc9ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hackers and Painters: Introduction]]></title>
            <link>https://medium.com/@malamsyah/hackers-and-painters-introduction-870ee5646a4f?source=rss-af3fc0a67ddc------2</link>
            <guid isPermaLink="false">https://medium.com/p/870ee5646a4f</guid>
            <category><![CDATA[hacker]]></category>
            <category><![CDATA[art]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[painters]]></category>
            <category><![CDATA[gojek-bootcamp]]></category>
            <dc:creator><![CDATA[Mochammad Alamsyah]]></dc:creator>
            <pubDate>Sun, 07 Oct 2018 12:08:32 GMT</pubDate>
            <atom:updated>2018-10-07T12:08:32.543Z</atom:updated>
            <content:encoded><![CDATA[<p>This blog is about learning that I take from books “<a href="https://www.amazon.com/Hackers-Painters-Big-Ideas-Computer/dp/1449389554"><strong><em>Hackers and Painters Big Ideas From The Computer Ages</em></strong></a>” by <a href="http://www.paulgraham.com/"><strong><em>Paul Graham</em></strong></a>. I really recommend this book to aspiring Computer Science students, product people and software engineers. Because there is a lot of great insight and wisdom from this book, I divided each topic into blogs.</p><p>Whare <strong>hackers</strong> and <strong>painters</strong> have in common is that they’re both makers, they trying to do is make beautiful things. Over time, beautiful things tend to thrive, and ugly things tend to get discarded. Unfortunately, the amounts of time involved can be longer than human lifetimes.</p><h4>Deep knowledge on your craft</h4><p>Most people <strong>misleading believes </strong>about <strong>hacking</strong> is the applied version of what theoretical computer science is the theory of. The truth is, <strong>hackers</strong> need to understand the theory of computation about as much as <strong>painters</strong> need to understand paint chemistry. You need to know how to calculate time and space complexity, and perhaps also the concept of a state machine, in case you want to write a parser. <strong>Painters</strong> have to remember a good deal more about paint chemistry than that.</p><h4>Learn from examples</h4><p>One of the ways makers learn is from examples. To a <strong>painter</strong>, a museum is a reference library of techniques. For hundreds of years, it has been part of the traditional education of painters to copy the works of the great masters, because <strong>copying forces you to look closely</strong> at the way a painting is made.</p><p><strong>Hackers</strong> can learn to program by looking at <strong>good programs</strong>, not just at what they do, but at the source code. One of the less publicized benefits of the open source movement is that it has made it easier to learn to program.</p><h4><strong>Gradual Refinement (Refactoring)</strong></h4><p>Another example we can take from painting is the way that paintings are created by <strong>gradual refinement</strong>. Paintings usually begin with a sketch. Gradually the details get filled in. But it is not merely a process of filling in. Sometimes the original plans turn out to be mistaken. Countless paintings, when you look at them in x-rays, turn out to have limbs that have been moved or facial features that have been readjusted.</p><p><strong>Hackers </strong>should work this way too. It’s unrealistic to expect that the specifications for a program will be perfect and even unrealistic if we can produce a perfect code first time in the new domain. Hackers gradually refine their code by refactoring once the domain knowledge improved.</p><h4>Better and Relentless</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Apcfba07BW559RuJb_6f3Q.jpeg" /><figcaption><strong>Portrait of Ginevra de’ Benci — by Leonardo Da Vinci</strong></figcaption></figure><p><strong>Leonardo</strong> painted the portrait of Ginevra de’ Benci in the National Gallery, he put a juniper bush behind her head. In it, he <strong>carefully painted each individual leaf</strong>. Many painters might have thought, this is just something to put in the background to frame her head. No one will look that closely at it.</p><p>All those unseen details combine to produce something that’s just stunning, like a thousand barely audible voices all singing in tune.</p><p>Great software, likewise, requires a <strong>fanatical devotion to beauty</strong>. If you look inside good software, you find that parts no one is ever supposed to see are beautiful too.<strong> Beautifully written, tested and easy to understand.</strong></p><p>That&#39;s all for part one of this book series, next up, part 2.</p><p>Send me an email to discuss more ideas <a href="/service/mailto:hi@malamsyah.id">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=870ee5646a4f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Difference Between Mocks and Stubs]]></title>
            <link>https://medium.com/@malamsyah/the-difference-between-mocks-and-stubs-5e130a7d89ff?source=rss-af3fc0a67ddc------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e130a7d89ff</guid>
            <category><![CDATA[tdd]]></category>
            <category><![CDATA[unit-testing]]></category>
            <category><![CDATA[gojek-bootcamp]]></category>
            <dc:creator><![CDATA[Mochammad Alamsyah]]></dc:creator>
            <pubDate>Wed, 03 Oct 2018 03:48:24 GMT</pubDate>
            <atom:updated>2018-10-03T03:48:24.699Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*BgRyr8a2hrKSQO4QzXzs1w.jpeg" /><figcaption>I’m not sure</figcaption></figure><p>You must be familiar with mocking of stubbing word in unit testing, but many people confused mock objects with stubs. To understand mock, you need to keep in mind that its kind of test doubles and here are the definitions of kind of objects in unit testing:</p><ul><li><strong>Dummy</strong> objects are passed around but never actually used. Usually, they are just used to fill parameter lists.</li><li><strong>Stubs</strong> provide canned answers to calls made during the test, usually not responding at all to anything outside what’s programmed in for the test.</li><li><strong>Spies</strong> are stubs that also record some information based on how they were called. One form of this might be an email service that records how many messages it was sent.</li><li><strong>Mocks</strong> are objects pre-programmed with expectations which form a specification of the calls they are expected to receive.</li></ul><p>Only <strong>mocks insist upon behavior verification</strong>. The other use state verification. Mocks actually do behave like other but differ in the setup and the verification phases.</p><p>Source : <a href="https://martinfowler.com/articles/mocksArentStubs.html">https://martinfowler.com/articles/mocksArentStubs.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e130a7d89ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Key Benefits of Microservices]]></title>
            <link>https://medium.com/@malamsyah/key-benefits-of-microservices-b1196eb64568?source=rss-af3fc0a67ddc------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1196eb64568</guid>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[gojek-bootcamp]]></category>
            <dc:creator><![CDATA[Mochammad Alamsyah]]></dc:creator>
            <pubDate>Sun, 23 Sep 2018 09:55:02 GMT</pubDate>
            <atom:updated>2018-09-23T09:55:02.767Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*NCqCKJH7xDVXkXz-qGL5nA.jpeg" /><figcaption>Image from <a href="https://plus.google.com/105779776776467952201"><strong>Anton Arhipov</strong></a><strong> </strong>blog <a href="http://arhipov.blogspot.com/2015/03/misconceptions-about-microservices.html"><strong>about microservices</strong></a></figcaption></figure><p>Continuing my blog post about microservices that you can check on my profile.</p><p>There are many and varied benefits of microservices. Many of these benefits can be applied to any distributed system. But microservices ten to achieve this benefits to a greater degree, because of how far microservices take the concepts behind a distributed systems architecture.</p><h4>Technology Heterogeneity</h4><p>With Microservices, composed of multiple collaborating services, we can decide to use different technology for each one. Allow us to use the right tool for the right job, rather than having a one-size-fits-all approach that tends to be the lowest common denominator for the system.</p><p>We are also able to adopt technology more quickly, the biggest risk of adopting new technology is the risks associated with it, but since our Microservices is small enough, we can write our service in just two weeks then it de-risks the adoption of a new technology.</p><h4>Resilience</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/1*GJoTwWy1qTbmi1ayleCx5w.jpeg" /><figcaption>Ship with bulkheads image from <a href="https://en.wikipedia.org/wiki/Bulkhead_(partition)">Wikipedia</a></figcaption></figure><p>Resilience in software engineering is the bulkhead or partition. If one service fails it doesn&#39;t cascade, you can isolate the service and the rest of the system can carry on working. With a monolithic system, if the service fails, everything stops working, you can run multiple machines to mitigate this. But with microservice, we can build a system that handles the total failure of services and degrade functionality accordingly.</p><h4>Scaling</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8nnAmToO0GI_aB53Ru3Qqw.png" /><figcaption>You can target scaling on those services that need it. Image from the book <a href="https://www.amazon.com/Building-Microservices-Designing-Fine-Grained-Systems/dp/1491950358">Building Microservices</a></figcaption></figure><p>With the monolithic system, everything is together in one package, so if you want to scale them, you need to scale all of them together, and that is not very efficient.</p><h4>Ease of Deployment</h4><p>One line of code change to a million-line-long monolithic application requires the whole application to be re-deployed in order to release the change. that is a high-impact high-risk deployment practice. Unfortunately, because of this risk and fear, deployment happening in less frequent time, making the undeployed codebase to build up and build up between releases.</p><p><a href="http://martinfowler.com/"><strong>Martin Fowler</strong></a> gives solution to this problem, the solution is to <a href="https://martinfowler.com/bliki/FrequencyReducesDifficulty.html"><strong>deploy frequently</strong></a>. This is what exactly microservice do. We can deploy new service independently of the rest of the system.</p><p>That is a few key benefits of the microservices. All my writing about microservices is part of my learning process, I take lots of the point in this book, <a href="https://www.amazon.com/Building-Microservices-Designing-Fine-Grained-Systems/dp/1491950358">Sam Newman’s Building Microservices</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1196eb64568" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Are Microservices?]]></title>
            <link>https://medium.com/@malamsyah/what-are-microservices-3234e3dda998?source=rss-af3fc0a67ddc------2</link>
            <guid isPermaLink="false">https://medium.com/p/3234e3dda998</guid>
            <category><![CDATA[gojek-bootcamp]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Mochammad Alamsyah]]></dc:creator>
            <pubDate>Thu, 20 Sep 2018 04:32:57 GMT</pubDate>
            <atom:updated>2018-09-20T04:32:57.814Z</atom:updated>
            <content:encoded><![CDATA[<p>According to this <a href="https://microservices.io/">microservices.io</a>:</p><blockquote>Microservices is an architectural style that structures an application as a collection of loosely coupled services, which implement business capabilities.</blockquote><p>Microservices are a small, autonomous system that works together. but what are the characteristics of microservices? What makes services a microservices ?! There are two characteristics according to this <a href="https://www.amazon.com/Building-Microservices-Designing-Fine-Grained-Systems/dp/1491950358">book</a> by Sam Newman.</p><ol><li>Small, and Focused on Doing One Thing Well</li><li>Autonomous</li></ol><p>Let’s discuss it one by one</p><h3>Small, and Focused on Doing One Thing Well</h3><p>At some point in our life as a software engineer, at least we have been working on the monolithic codebase. If managed well, there is nothing wrong with the well written monolithic codebase, but all too often we start code similar functions, breaking encapsulation and even don&#39;t know what to change in the monolithic code base when to add a feature, making bug fixing and implementations difficult.</p><p>We are all ways striving to write a good cohesion code, the drive to have related code grouped together. <em>Robert C. Martin’s</em> definition of <em>the</em> <em>Single Responsibility Principle (SRP)</em>, which states<em> “Gather together those things that change for the same reason, and separate those things that change for a different reason”.</em></p><p>Microservices takes <em>SRP </em>approach to next level, creating services based on business requirement boundaries. Every code has clear boundaries on functionalities, this is keeping the code not to grow too large.</p><p>The next question is, how <em>small is small</em> and how <em>big is big enough</em>. its clear how big is big enough if the service trying to solve more than one business requirement, for example, notification, SNMP, Jobs, user management, and item ordering services in one application.</p><p>But it’s sometimes hard to answer <em>how small? </em>the smaller the service, the more you maximize the benefits and downsides of microservice architecture. Balancing between complexity and interdependence in the codebase is the key, this is why there is no definite answer. We will discuss more this in the next post :)</p><h3>Autonomous</h3><p>Our services are a separate entity of deployed as an isolated service on a platform as a service(PAAS). Each service needs to be independence from each other, and deploy themselves without requiring customer change</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3234e3dda998" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Principles of Software Delivery Part 2]]></title>
            <link>https://medium.com/@malamsyah/principles-of-software-delivery-part-2-414408a36e7c?source=rss-af3fc0a67ddc------2</link>
            <guid isPermaLink="false">https://medium.com/p/414408a36e7c</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[gojek-bootcamp]]></category>
            <dc:creator><![CDATA[Mochammad Alamsyah]]></dc:creator>
            <pubDate>Sun, 16 Sep 2018 18:00:14 GMT</pubDate>
            <atom:updated>2018-09-16T18:00:14.078Z</atom:updated>
            <content:encoded><![CDATA[<p>More on Software Delivery, before you read this, make sure you read the part one first. Next, we will cover four principles:</p><ol><li>Build Quality In</li><li>Done Means Released</li><li>Everybody is Responsible for the Delivery Process</li><li>Continuous Improvement</li></ol><p>If you compare it with the first part, some of the principles may correlate and not mutually inclusive. These principles are more emphasizing on the first four principles.</p><h3><strong>Build Quality In</strong></h3><blockquote>Build quality into a product throughout production. — Dr. W. Edwards Deming</blockquote><p>Bugs are fixed most cheaply if they are never checked in to version control, fixed in the local developer machine. Continuous integration, automated testing, and automated deployment are design to catch bugs as early in the delivery process as possible. Next step is to fix them. When a build or deploy fails, everybody in the team is responsible and stop what they are currently working and fix the bug as soon as possible.</p><h3>Done Means Realised</h3><p>There is no <strong>90% done. </strong>Things are either done, or they are not. A feature is only done when it is delivering value to the users. For some agile team “Done” means released to production.</p><p>We can estimate to determine the total of work remaining, but this leads to finger-pointing when those who come out with the estimation turn out, as they invariably do, to be wrong.</p><p>That&#39;s why it&#39;s so important for everybody from release engineer, a tester, to a developer to work together from the beginning.</p><h3>Everybody is Responsible for the Delivery Process</h3><p>Ideally, Everybody in an organization is aligned and work together to achieve the organization goal. Ultimately the team succeeds or fails as a team, not as individuals.</p><p>But in reality, on too many projects, the developer usually throw their work over the wall to the tester. Then the tester throw works over the wall to the operations team at a released time. When something goes wrong, people being people, finger-pointing and blaming each other, instead of focus fixing the problem.</p><p>This is one of the core ideas of the DevOps movement. Encouraging greater collaboration between everyone involved in software delivery in order to release product more faster and reliably.</p><h3>Continuous Improvement</h3><p>We need to realize that a product evolves. When the first time its released to production more release will follow. And the delivery process evolves with it.</p><p>The whole teams should regularly gather together and hold a retrospective on the product. The team should reflect on what has gone well and what gone badly. It is essential for everybody is involved in this process. Allowing feedback to happen in the safe place.</p><p>Traditionally, the point of product released has been a time fraught with stress. But implementing those principles will help you reduce stress and make more smooth product delivery. And last I quote from the author</p><blockquote>Life is too short to spend our weekend in server rooms deploying applications.</blockquote><p>I hope this summary of the principles helps. If you have something in mind, just don&#39;t hesitate to email me <a href="/service/mailto:hi@malamsyah.id">here</a>.</p><p>Thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=414408a36e7c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>