<?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 Josua B Simanungkalit on Medium]]></title>
        <description><![CDATA[Stories by Josua B Simanungkalit on Medium]]></description>
        <link>https://medium.com/@jbkalit?source=rss-ed0e606a68de------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*0-WHHaN04mOiCbYG1ve9vw.jpeg</url>
            <title>Stories by Josua B Simanungkalit on Medium</title>
            <link>https://medium.com/@jbkalit?source=rss-ed0e606a68de------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 16:15:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jbkalit/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[What Things That Make You An Elegant Software Engineer ?]]></title>
            <link>https://medium.com/@jbkalit/what-things-that-make-you-an-elegant-software-engineer-dd30abc19bde?source=rss-ed0e606a68de------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd30abc19bde</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[clean-code]]></category>
            <dc:creator><![CDATA[Josua B Simanungkalit]]></dc:creator>
            <pubDate>Tue, 04 Dec 2018 08:58:13 GMT</pubDate>
            <atom:updated>2019-04-16T10:12:44.617Z</atom:updated>
            <content:encoded><![CDATA[<h3>What Things That Make You An Elegant Software Engineer ?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AQ-gvGoWpQ9EDD_JXZkKjA.jpeg" /><figcaption><a href="http://www.mens-folio.com/27984/oliver-peoples-30th-year-anniversary-new-collection/">Original foto here</a></figcaption></figure><p>From what i learned and reading books, articles from many sources, in a field varied and vast as software engineering, constant reading and exploring are essential for building foundational knowledge and exploring branch knowledge.</p><p>When we exploring and reading all software engineering stuff, its all have same basic and the basic is programming its small part of software concept, everything we know and wanna know in software engineering we always have to meet “someone”— it called code.</p><p>As software engineering we have to know how to program, it is a must ! even if we just want to be a Quality Assurance we have to know how to program, make simple hello world and triangle stars is better than know nothing, and the part of program that makes a program to be a program — it called code. wtf !</p><blockquote>When we dont know how to code or coding and we are a software engineering we same like a salt whitout salty, what is the use of salt if it’s not salty ? people just step of it.</blockquote><p>There are two things — programing and good programming. Programming is what we have all been doing, now its time to do a good thing. We all know that even bad code can works, but it takes much resources to make a program good and programmers will feel pressure to meet deadlines, some tasks, features that not finish in right time, especially business value of company not achieved. Moreover, other developers mock we when they are trying to find whats all is happening in your code. This is incorrect, but its never to late to care for your programs, this is simple things to be an Elegant Software Engineer, <strong>DO A CLEAN CODE </strong>as often as possible in your program.</p><p>The book that all people recommended to learn how to do clean code is</p><blockquote>“Clean Code - A Handbook of Agile Software Craftsmanship” — Robert C. Martin</blockquote><p>and i took some points of clean code from this book and explain what i got.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*czt3QlaJe7yQM4Nd" /><figcaption>Photo by <a href="https://unsplash.com/@rawpixel?utm_source=medium&amp;utm_medium=referral">rawpixel</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3><strong>To much talk, lets get straight to the point !</strong></h3><h4>Characteristics of a Clean Code</h4><ul><li>It should be elegant.</li><li>Clean code is focused.</li><li>Clean code is taken care of.</li><li>Runs all the tests.</li><li>Contains no duplication.</li><li>Minimize the number of entities such as classes, functions, methods, etc.</li></ul><h3>How to write Clean Code ?</h3><h3><strong>Meaningful Names</strong></h3><ul><li><strong><em>Use Intention-Revealing Names</em> — </strong>Two hard problems in Computer Science are cache invalidation and naming things. If you and your team aren’t good at naming things in your code, it will become an unmaintainable nightmare and you won’t get anything done. You’ll lose your best developers and your company will soon go out of business. Use intention revealing names, choosing good names takes time but saves more than it takes.</li><li><strong><em>Avoid Disinformation — </em></strong>Programmers must avoid using ambigous names in code, such as hp, aix, a, b, etc.</li><li><strong><em>Make Meaningful Distinctions </em>— </strong>Make meaningful differences !, programmers must be able name the code independently, naming series of number like a1, a2, b1, b2 has no meaning in itself.</li><li><strong><em>Use Pronounceable Names </em>— </strong>Do not set names that are not readable a loud, such as genymdhms, which is make for generating year, month, day, hour, minute, and second, but genymdhms can not be pronounced, so avoid naming it in this way.</li><li><strong><em>Use Searchable Names </em>— </strong>Sometimes programmer use only one letter for naming, it may cause problems. Because it is difficult to find by searching, so it should avoided.</li><li><strong><em>Avoid Encodings </em>—</strong> Encoding names by specifying type, such as String variable named phoneString, naming String as the name is optional. But it may also create another annoyance.</li><li><strong><em>Class Names </em>—</strong> Classes and objects should have noun or noun phrase names like Customer, WikiPage, Account, and AddressParser. Avoid words like Manager, Processor, Data, or Info in the name of a class. A class name should not be a verb.</li><li><strong><em>Method Names — </em></strong>Methods should have verb or verb phrase names like postPayment, deletePage, or save. Accessors, mutators, and predicates should be named for their value and prefixed with get, set.</li><li><strong><em>Do Not Be cute — </em></strong>Do not name it, to look smart. The name should be clear. Do not name it for fun or because it looks cool.</li><li><strong><em>Pick One Word Per Concepts — </em></strong>Pick one word for one abstract concept and stick with it. For instance, it’s confusing to have fetch, retrieve, and get as equivalent methods of different classes. How do we remember which one method name goes with which class ? Likewise, it’s confusing to have a controller and a manager and a driver in the same code base.</li></ul><h3><strong>Functions</strong></h3><ul><li><strong><em>Small —</em></strong> The length of code per line should not exceed 150 characters, function should not exceed 20 lines.</li><li><strong><em>Do One Thing — </em></strong>Function must work only one. Do not do many things in the same function.</li><li><strong><em>Use Descriptive Names — </em></strong>Name the meaning of the function by using a clear name to communicate the function does.</li><li><strong><em>Function Arguments — </em></strong>Function Arguments should not exceed 3 arguments, and don’t use arguments, such as booleans, because it imply that the function is more than one. If the arguments are large, consider wrapping those arguments using the class and passing that class as an argument.</li><li><strong><em>Have No Side Effects — </em></strong>Side effects are truly evil and make it extremely difficult to create code without bugs. Make sure that the function does not have side effects. Especially coding in functional programming.</li><li><strong><em>Command Query Seperation — </em></strong>The function should be implemented as a result set or return result must be one. Do not do both.</li><li><strong><em>Do Not Repeat Yourself — </em></strong>Avoid making duplicate code, dude !</li></ul><h3><strong>Comments</strong></h3><p>We write comments usually just to prove our point of the code we write. Ideally, comments are not required at all. If we code needs commenting, we are doing something wrong. Our code should explain everything. Comments also use to notify other programmer, that something not finish in this code or something required. Correct naming can prevent comments.</p><p>Legal comments are not considered here. They are necessary to write. Legal comments means copyright and licenses statements.</p><h3><strong>Formatting</strong></h3><p>We need to be aware and appreciate the code formatting attention to detail and code integrity at all times. Code formatting demonstrates professionalism.</p><p>Formatting rules should be set by the team. Formatting rules it can use with tools. For example, maven checkstyle or gradle checkstyle that built in IDE , but each company or team may have a slight difference in formatting rules. The team must agree on the formatting rules to be used together.</p><p>Another code formatting, that may help us and we can set the rules :</p><ul><li>Prettier</li><li>ESLint</li><li>Automate Format and Lint on Save</li><li>Husky</li><li>Lint-staged</li><li>With Husky and Lint-staged Combined</li><li>EditorConfig</li></ul><h3><strong>Error Handling</strong></h3><ul><li><strong><em>Use Exceptions Rather Than Return Codes </em>— </strong>Use the ability of the language we write to make some benefits. If the language supports exceptions, use exceptions to deal with errors instead of return error codes.</li><li><strong><em>Write Your Try-Catch-Finally Statement First </em>— </strong>The code in try blocks is like transactions because the catch block can capture the program in the corresponding state and use the finally block to clean up resources in case resources permissions are used.</li><li><strong><em>Use Unchecked Exceptions — </em></strong>Use Unchecked Exceptions acts as a program defect. Sometimes there is an incorrect value. Let our method use Unchecked Exceptions to deal with this type of condition. Unchecked Exceptions are also subclasses of RuntimeException.</li><li><strong><em>Do Not Return Null — </em></strong>Do not return Null to re-throwing exception or return special object that we created to deal with exception. Instead of returning null, we do not know the cause of the error.</li></ul><h3><strong>Unit Tests</strong></h3><blockquote><strong>“If it isn’t tested, it’s broken”</strong></blockquote><ul><li><strong><em>The Three Laws of TDD :</em></strong></li></ul><ol><li>Do not write production code until the test is written.</li><li>Do not write a unit test first, do test case to cover the fail case, and we must write the test by superfluity and over thinking.</li><li>Do not write production code except it will pass the current failing test.</li></ol><ul><li><strong><em>Clean Test — </em></strong>The factors that make our tests clean are :</li></ul><ol><li>Readability</li><li>Readability</li><li>Readability</li></ol><p>The nature of the readable code must be clear and simple.</p><ul><li><strong><em>Five Rules of Cleans Test</em></strong></li></ul><ol><li>Fast</li><li>Free</li><li>Repeatable</li><li>Have Self Validation</li><li>Take The Right Time</li></ol><h3><strong>Conclusion</strong></h3><p>They said, being <strong>Elegant</strong> and <strong>Professional</strong> skilled in writing code requires constant learning, training and development, i do also trying to do constant learning, training and development, just try to do all that things mentioned above.</p><p>All of informations above i got from book “Clean Code”, i just explained what i got. May this information help you !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd30abc19bde" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>