<?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 Massimo Caliman on Medium]]></title>
        <description><![CDATA[Stories by Massimo Caliman on Medium]]></description>
        <link>https://medium.com/@mcaliman?source=rss-f185ac98cf5b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*reHBSIhiItpgNGPQ.jpg</url>
            <title>Stories by Massimo Caliman on Medium</title>
            <link>https://medium.com/@mcaliman?source=rss-f185ac98cf5b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 11:52:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mcaliman/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 is an Expert System?]]></title>
            <link>https://mcaliman.medium.com/what-is-an-expert-system-794d60f2cc00?source=rss-f185ac98cf5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/794d60f2cc00</guid>
            <category><![CDATA[computer-science-for-all]]></category>
            <category><![CDATA[expert-systems]]></category>
            <dc:creator><![CDATA[Massimo Caliman]]></dc:creator>
            <pubDate>Sun, 13 Aug 2023 13:47:20 GMT</pubDate>
            <atom:updated>2023-08-13T13:53:37.821Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VrOiUOq-aYg7vPIP" /><figcaption>Photo by <a href="https://unsplash.com/@nini_m?utm_source=medium&amp;utm_medium=referral">Nino Maghradze</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>An expert system is software that attempts to recreate the decision-making process of a human expert in a particular domain. Expert systems are often used in fields such as medicine, finance, and engineering, where rapid and complex decision-making is required.</p><p>Expert systems are composed of three main elements:</p><p>1. A knowledge base: the knowledge base contains the information that the expert system relies on to make its decisions. This information can include facts, rules, and procedures.</p><p>2. An inference engine: the inference engine is the component of the expert system that uses the knowledge base to make decisions. The inference engine uses a logical process to apply the rules to the knowledge base and generate a response.</p><p>3. A user interface: the user interface allows users to interact with the expert system. The user interface can be used to enter information, request information, or receive advice.</p><p>You can find this post and others on my blog: <a href="https://trueprogramming.com/">trueprogramming.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=794d60f2cc00" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is an inference engine?]]></title>
            <link>https://mcaliman.medium.com/what-is-an-inference-engine-a6c8b468ad65?source=rss-f185ac98cf5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/a6c8b468ad65</guid>
            <dc:creator><![CDATA[Massimo Caliman]]></dc:creator>
            <pubDate>Sun, 13 Aug 2023 10:27:18 GMT</pubDate>
            <atom:updated>2023-08-13T14:00:33.639Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eXwiYGGN1RoGYYIR" /><figcaption>Photo by <a href="https://unsplash.com/@kellysikkema?utm_source=medium&amp;utm_medium=referral">Kelly Sikkema</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>An inference engine is a component of an expert system that uses the knowledge base to make decisions. The inference engine uses a logical process to apply the rules to the knowledge base and generate a response.</p><p>The logical process used by the inference engine varies depending on the expert system. However, the standard logical process used by all inference engines includes the following steps:</p><ol><li>The inference engine starts by reading the knowledge base.</li><li>The inference engine applies the rules to the knowledge base.</li><li>The inference engine generates a response.</li></ol><p>The response generated by the inference engine can be advice, a diagnosis, or a decision.</p><p>Inference engines are used in a variety of expert systems, including: Medical diagnosis systems Financial intelligence systems, Engineering systems</p><p>Inference engines are a valuable tool for artificial intelligence. They allow expert systems to make rapid and complex decisions and can be used in various applications.</p><p>You can find this post and others on my blog: <a href="https://trueprogramming.com/">trueprogramming.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6c8b468ad65" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Domain-Specific Languages]]></title>
            <link>https://mcaliman.medium.com/understanding-domain-specific-languages-e23ec37d2d4a?source=rss-f185ac98cf5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/e23ec37d2d4a</guid>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[programming-languages]]></category>
            <category><![CDATA[domain-specific-languages]]></category>
            <dc:creator><![CDATA[Massimo Caliman]]></dc:creator>
            <pubDate>Tue, 08 Aug 2023 11:53:01 GMT</pubDate>
            <atom:updated>2023-08-13T13:55:05.967Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3BJbKHeorgvw5M7N" /><figcaption>Photo by <a href="https://unsplash.com/@santesson89?utm_source=medium&amp;utm_medium=referral">Andrea De Santis</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Due to my passion for various programming paradigms, I first became interested in DSLs back in 1999. A Domain Specific Language (DSL) is a programming language specialized for a particular application domain. This means that it has been designed to solve specific problems in a certain field, as opposed to a general-purpose programming language (GPL), which can be used across a wide range of domains.</p><p>There are many examples of DSLs, some of which are widely used and applied in various industries. For instance, HTML and SQL.</p><p>Using a DSL can bring many benefits. Firstly, it allows for clearer and more direct expression of problems and solutions, thanks to the use of domain-specific concepts and rules. Additionally, it can increase work efficiency, as not everything has to be done manually and some repetitive operations can be automated. Finally, using a DSL can improve the quality of the final product by reducing the number of errors and increasing the maintainability of the code.</p><p>I wrote my first DSL in 2000 to make a management system more flexible. The system was designed to manage payroll and, in particular, the overtime of employees in a company. I had written the management system in Java and used the Interpreter design pattern]. Today, for tasks like this, we can use more advanced tools such as ANTLR (ANother Tool for Language Recognition).</p><p>Recently, two websites have become my go-to resources for information on DSLs:</p><p>https://tomassetti.me and https://strumenta.com. These sites offer a wealth of information on the subject, including articles, tutorials, and other resources. I highly recommend checking them out if you’re interested in learning more about DSLs.</p><p>You can find this post and others on my blog: <a href="https://trueprogramming.com/">trueprogramming.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e23ec37d2d4a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The toString() method of the Object class in Java]]></title>
            <link>https://mcaliman.medium.com/the-tostring-method-of-the-object-class-in-java-fdbbe61d5d35?source=rss-f185ac98cf5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/fdbbe61d5d35</guid>
            <dc:creator><![CDATA[Massimo Caliman]]></dc:creator>
            <pubDate>Tue, 13 Jun 2023 06:06:53 GMT</pubDate>
            <atom:updated>2023-06-13T06:06:53.481Z</atom:updated>
            <content:encoded><![CDATA[<p>The toStringmethod is a fundamental method of the Object class in Java. This method returns a textual representation of the object.</p><p>To use the String.toString() correctly, it is important to follow some rules. First, the toString method must be appropriately overridden in subclasses. Additionally, the textual representation returned by the toString method should be clear and useful for understanding the state of the object.</p><p>If the toString method is not overridden in a subclass, its default implementation in the Object class will return a string representing the name of the object’s class followed by the @ symbol and the object’s hash code in hexadecimal.</p><p>Here is an example of how to override toString in a subclass:</p><pre>public class Human {<br>    private String firstName;<br>    private String lastName;<br>    private String passportNumber;<br>    public Human(String firstName, String lastName, String passportNumber) {<br>        this.firstName = firstName;<br>        this.lastName = lastName;<br>        this.passportNumber = passportNumber;<br>    }<br>    @Override<br>    public String toString() {<br>        return &quot;Human{&quot; +<br>            &quot;firstName=&#39;&quot; + firstName + &#39;\&#39;&#39; +<br>            &quot;, lastName=&#39;&quot; + lastName + &#39;\&#39;&#39; +<br>            &quot;, passportNumber=&#39;&quot; + passportNumber + &#39;\&#39;&#39; +<br>            &#39;}&#39;;<br>    }<br>}</pre><p>In this example, we have overridden the toString method in the `Human` class to return a textual representation of a Human object that includes its `firstName`, `lastName`, and `passportNumber` attributes.</p><p>Always remember to override the toString method, it costs little and can help you with debugging and logging!</p><p>You can find this post and others on my blog: <a href="https://trueprogramming.com/">trueprogramming.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fdbbe61d5d35" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Restore remote database backup to local]]></title>
            <link>https://mcaliman.medium.com/restore-remote-database-backup-to-local-6a83cbf4d546?source=rss-f185ac98cf5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a83cbf4d546</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[mysql]]></category>
            <dc:creator><![CDATA[Massimo Caliman]]></dc:creator>
            <pubDate>Sat, 19 Dec 2020 00:00:00 GMT</pubDate>
            <atom:updated>2023-08-13T14:02:20.972Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TN7PzdRff7_M1I1-" /><figcaption>Photo by <a href="https://unsplash.com/@brechtcorbeel?utm_source=medium&amp;utm_medium=referral">Brecht Corbeel</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>PySysop <a href="https://github.com/mcaliman/PySysop">https://github.com/mcaliman/PySysop</a> is a Python system operations collection utility, restore_remote_database.py is the script for create remote database dump, and download and restore to localhost instance.</p><p>My project is a work in progress. Stay tuned! Next implementation? What would you like me to add?</p><p>You can find this post and others on my blog: <a href="https://trueprogramming.com/">trueprogramming.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a83cbf4d546" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Complex Number Class For Java]]></title>
            <link>https://mcaliman.medium.com/a-complex-number-class-for-java-6805403cac71?source=rss-f185ac98cf5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/6805403cac71</guid>
            <category><![CDATA[math]]></category>
            <category><![CDATA[complex-number]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Massimo Caliman]]></dc:creator>
            <pubDate>Sat, 03 Oct 2020 05:12:00 GMT</pubDate>
            <atom:updated>2023-08-13T14:03:36.750Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JKwgm6_ofoQThe0Q" /><figcaption>Photo by <a href="https://unsplash.com/@leunesmedia?utm_source=medium&amp;utm_medium=referral">Michiel Leunens</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Does Java have an implementation for complex numbers? No, it doesn’t have a dedicated Class. It’s strange but not all that strange (Complex Number implementation is trivial), the JDK does not have one but here is an implementation I have written: <a href="https://github.com/mcaliman/JavaComplexNumber">https://github.com/mcaliman/JavaComplexNumber</a></p><p>However, there are third-party libraries for working with Complex, for example:</p><p>Apache Commons <a href="http://commons.apache.org/proper/commons-math/userguide/complex.html">http://commons.apache.org/proper/commons-math/userguide/complex.html</a></p><p>My project is work in progress. Stay tuned! Next implementation: Generics, support for BigDecimal. What would you like me to add about?</p><p>You can find this post and others on my blog: <a href="https://trueprogramming.com/">trueprogramming.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6805403cac71" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Install Python 3]]></title>
            <link>https://mcaliman.medium.com/install-python-3-fbce91d89fdb?source=rss-f185ac98cf5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/fbce91d89fdb</guid>
            <category><![CDATA[python3]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Massimo Caliman]]></dc:creator>
            <pubDate>Mon, 15 Jun 2020 18:13:13 GMT</pubDate>
            <atom:updated>2023-08-20T09:07:38.821Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-piXTu8YA4FWBZCA" /><figcaption>Photo by Growtika on Unsplash</figcaption></figure><p>Open terminal via Ctrl+Alt+T. When it opens, run the command:</p><pre>sudo apt-get install python3<br>sudo apt-get install idle3<br>sudo apt-get install python3-pip</pre><p>You can find this post and others on my blog: <a href="https://trueprogramming.com/">trueprogramming.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fbce91d89fdb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to detect machine architecture]]></title>
            <link>https://mcaliman.medium.com/how-to-detect-machine-architecture-56561a041985?source=rss-f185ac98cf5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/56561a041985</guid>
            <category><![CDATA[terminal]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Massimo Caliman]]></dc:creator>
            <pubDate>Mon, 15 Jun 2020 18:12:33 GMT</pubDate>
            <atom:updated>2023-08-14T16:08:40.064Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ug_9BjhF542SIY_3" /><figcaption>Photo by <a href="https://unsplash.com/@christianw?utm_source=medium&amp;utm_medium=referral">Christian Wiediger</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Open terminal via Ctrl+Alt+T. When it opens, run the command:</p><pre>sudo uname -m</pre><p>Will give “x86_64” for 64 bit, and something else for other 32 bit types(usually “i686”).</p><p>You can find this post and others on my blog: <a href="https://trueprogramming.com/">trueprogramming.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56561a041985" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fantastic Java API and Where to Find Them: Objects.isNull and Objects.nonNull]]></title>
            <link>https://mcaliman.medium.com/fantastic-java-api-and-where-to-find-them-objects-isnull-and-objects-nonnull-f3664294ec6d?source=rss-f185ac98cf5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3664294ec6d</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[functional-programming]]></category>
            <category><![CDATA[lambda-expressions]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Massimo Caliman]]></dc:creator>
            <pubDate>Tue, 28 Jan 2020 13:04:36 GMT</pubDate>
            <atom:updated>2023-08-14T16:09:57.254Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ypf8A1QWwxc24_bV" /><figcaption>Photo by <a href="https://unsplash.com/@neonbrand?utm_source=medium&amp;utm_medium=referral">Kenny Eliason</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Once upon a time a NullPointerException…</p><p>There are two simple, elegant, clean methods to manage null with Predicate: Object.isNull and Object.nonNull.</p><p>It’s much easier and clearer to write: stream.filter(Objects::isNull)</p><p>than to write: stream.filter(x -&gt; x == null)</p><p>However, the fact that Objects.isNull is meant for Predicates does not prevent you from using it as above…</p><p>Your code might be more readable in this fashion.</p><pre>if(isNull(aValue)) doSomething();<br>if(nonNull(aValue)) doSomething();</pre><p>Think about it.</p><p>Simple, clean, and you don’t test it. Oracle has already tested it for you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3664294ec6d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fantastic Java API and Where to Find Them: Objects.toString]]></title>
            <link>https://mcaliman.medium.com/fantastic-java-api-and-where-to-find-them-the-method-objects-tostring-e0d026618e63?source=rss-f185ac98cf5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0d026618e63</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Massimo Caliman]]></dc:creator>
            <pubDate>Thu, 23 Jan 2020 07:05:06 GMT</pubDate>
            <atom:updated>2023-06-13T06:21:06.171Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HTLiUYhEflj9WF0X" /><figcaption>Photo by <a href="https://unsplash.com/@talkingslipper?utm_source=medium&amp;utm_medium=referral">June Gathercole</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Do you have stuff like that in your code?</p><pre>string = string == null ? “” : string;</pre><p>or like this one…</p><pre>if(string==null) string=&quot;&quot;;</pre><p>or, more smart, did you create a method like this?</p><pre>String ifNullThenEmpty(String string) { <br> return string == null ? &quot;&quot; : string;<br>}</pre><p>You can put everything on <em>Utilities </em>class as a static method …</p><p>…Don’t worry, I did it too, this is not a <em>code crime</em> against Alan Turing’s memory, James Gosling won’t hate you.</p><p>However, if you use a version of Java≥ 7, why do you reinvent the wheel?</p><p>Oracle has already done it for you! Use it!</p><p>Class java.util.Objects contains a method with this segnature</p><pre>String toString(Object o, String nullDefault)</pre><p>An example is…</p><pre>string = Objects.toString(string,””);</pre><p>or, more simple, with static import</p><pre>string = toString(string,””);</pre><p>Simple, clean, and you don’t test it. Oracle has already tested it for you.</p><p>You can find this post and others on my blog: <a href="https://trueprogramming.com/">trueprogramming.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0d026618e63" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>