<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: SERP.run</title>
    <description>The latest articles on DEV Community by SERP.run (@serprun).</description>
    <link>https://dev.to/serprun</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F257374%2F5b11f155-2aa8-4ab9-bad6-e496acdc13a9.jpg</url>
      <title>DEV Community: SERP.run</title>
      <link>https://dev.to/serprun</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/serprun"/>
    <language>en</language>
    <item>
      <title>How do programming languages good for AI look like?</title>
      <dc:creator>SERP.run</dc:creator>
      <pubDate>Sat, 14 Aug 2021 20:26:09 +0000</pubDate>
      <link>https://dev.to/serprun/how-do-programming-languages-good-for-ai-look-like-2ofd</link>
      <guid>https://dev.to/serprun/how-do-programming-languages-good-for-ai-look-like-2ofd</guid>
      <description>&lt;h2&gt;
  
  
  First - what do I mean by "good for AI"?
&lt;/h2&gt;

&lt;p&gt;Let's begin by stating the obvious - terms like &lt;strong&gt;Artificial Intelligence&lt;/strong&gt; and &lt;strong&gt;Machine Learning&lt;/strong&gt; are here to stay, and investing your time to learn more about it seems like a solid, safe choice. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Machine Learning&lt;/strong&gt; is used by giants like Google and by small companies alike. It is the perfect technology for solutions like speech and image recognition, and it's a perfect fit for working with &lt;a href="https://pl.wikipedia.org/wiki/Big_data"&gt;Big Data&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Artificial Intelligence&lt;/strong&gt;, on the other hand, allows us to take a step into the future with AI-based solutions straight from movies, like e.g. &lt;a href="https://deep-image.ai/"&gt;Deep-Image&lt;/a&gt;, which puts all the CSI memes to shame, by actually upscaling and enhancing images. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qPfJcAzQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y5aoc8xjlr9bfmezk3qp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qPfJcAzQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y5aoc8xjlr9bfmezk3qp.png" alt="Zoom in, enhance"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Languages that are considered to be the best for playing around with Artificial Intelligence and Machine Learning include C++, Python, Java, and a few niche (or new) languages. &lt;/p&gt;

&lt;h2&gt;
  
  
  Secondly - what do I mean by "look like"?
&lt;/h2&gt;

&lt;p&gt;There are tons of articles telling you which programming language to choose. Authors of these texts tell you in detail why you should pick this and this programming language, when it is wise to go with Python, when it is wise to go with Java, etc. &lt;/p&gt;

&lt;p&gt;They focus on your needs and capabilities of each language, and obviously it's a very good strategy to take that into consideration :) &lt;strong&gt;However&lt;/strong&gt;, I would like to point out something less critical, but also important - the code itself, as in - its looks. &lt;/p&gt;

&lt;p&gt;I believe you should know how the syntax looks like, how easy it is to take a glance at code and understand it, and how hard it can be to create it. &lt;/p&gt;

&lt;p&gt;In the case of human-to-human relationships, it may be a bad idea to pick a life partner based solely on the looks, but it's hard to say that visual attractiveness doesn't matter. It is very similar in case of programming languages. &lt;/p&gt;

&lt;p&gt;After all - you are going to spend a lot of time actually creating it, editing, analyzing, gazing with confusion, and many others. If you do not want to be stressed and annoyed every day, you should have some kind of satisfaction, just by looking at the code.  &lt;/p&gt;

&lt;h2&gt;
  
  
  How does Python look like?
&lt;/h2&gt;

&lt;p&gt;Python deserves to be at the top of the list, as far as aesthetics are concerned. It's easy to learn, it's pleasant to read, it's popular, and it's a powerful language for machine learning.&lt;/p&gt;

&lt;p&gt;Take a look at this sample code for a Magic 8-ball from &lt;a href="https://www.pythonforbeginners.com/code-snippets-source-code/magic-8-ball-written-in-python"&gt;Python For Beginners&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Import the modules
import sys
import random

ans = True

while ans:
    question = raw_input("Ask the magic 8 ball a question: (press enter to quit) ")

    answers = random.randint(1,8)

    if question == "":
        sys.exit()

    elif answers == 1:
        print "It is certain"

    elif answers == 2:
        print "Outlook good"

    elif answers == 3:
        print "You may rely on it"

    elif answers == 4:
        print "Ask again later"

    elif answers == 5:
        print "Concentrate and ask again"

    elif answers == 6:
        print "Reply hazy, try again"

    elif answers == 7:
        print "My reply is no"

    elif answers == 8:
        print "My sources say no"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How does Java look like?
&lt;/h2&gt;

&lt;p&gt;The core strength of Java is that it's available for a number of different platforms, it's popular, and it's powerful for creating mobile apps. &lt;/p&gt;

&lt;p&gt;Below, you can find a simple source code of a word-count tool.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import java.io.File;
import java.io.IOException;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;

public class SimpleWordCounter {

    public static void main(String[] args) {
        try {
            File f = new File("ciaFactBook2008.txt");
            Scanner sc;
            sc = new Scanner(f);
            // sc.useDelimiter("[^a-zA-Z']+");
            Map&amp;lt;String, Integer&amp;gt; wordCount = new TreeMap&amp;lt;String, Integer&amp;gt;();
            while(sc.hasNext()) {
                String word = sc.next();
                if(!wordCount.containsKey(word))
                    wordCount.put(word, 1);
                else
                    wordCount.put(word, wordCount.get(word) + 1);
            }

            // show results
            for(String word : wordCount.keySet())
                System.out.println(word + " " + wordCount.get(word));
            System.out.println(wordCount.size());
        }
        catch(IOException e) {
            System.out.println("Unable to read from file.");
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How does C++ look like?
&lt;/h2&gt;

&lt;p&gt;Super popular language, with possibilities as big as its popularity. You can take a look at many samples on &lt;a href="https://www.programiz.com/cpp-programming/examples"&gt;Programiz&lt;/a&gt;, with Fibonacci Series up to n number of terms (shown below) being one of them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;iostream&amp;gt;
using namespace std;

int main() {
    int n, t1 = 0, t2 = 1, nextTerm = 0;

    cout &amp;lt;&amp;lt; "Enter the number of terms: ";
    cin &amp;gt;&amp;gt; n;

    cout &amp;lt;&amp;lt; "Fibonacci Series: ";

    for (int i = 1; i &amp;lt;= n; ++i) {
        // Prints the first two terms.
        if(i == 1) {
            cout &amp;lt;&amp;lt; t1 &amp;lt;&amp;lt; ", ";
            continue;
        }
        if(i == 2) {
            cout &amp;lt;&amp;lt; t2 &amp;lt;&amp;lt; ", ";
            continue;
        }
        nextTerm = t1 + t2;
        t1 = t2;
        t2 = nextTerm;

        cout &amp;lt;&amp;lt; nextTerm &amp;lt;&amp;lt; ", ";
    }
    return 0;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  How does R language look like?
&lt;/h1&gt;

&lt;p&gt;R may not be the most popular language, but it is suitable for both Machine Learning and Artificial Intelligence. &lt;/p&gt;

&lt;p&gt;You can find some cool examples on &lt;a href="https://www.datamentor.io/r-programming/examples/"&gt;Datamentor&lt;/a&gt;, below you can check a simple calculator:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Program make a simple calculator that can add, subtract, multiply and divide using functions
add &amp;lt;- function(x, y) {
return(x + y)
}
subtract &amp;lt;- function(x, y) {
return(x - y)
}
multiply &amp;lt;- function(x, y) {
return(x * y)
}
divide &amp;lt;- function(x, y) {
return(x / y)
}
# take input from the user
print("Select operation.")
print("1.Add")
print("2.Subtract")
print("3.Multiply")
print("4.Divide")
choice = as.integer(readline(prompt="Enter choice[1/2/3/4]: "))
num1 = as.integer(readline(prompt="Enter first number: "))
num2 = as.integer(readline(prompt="Enter second number: "))
operator &amp;lt;- switch(choice,"+","-","*","/")
result &amp;lt;- switch(choice, add(num1, num2), subtract(num1, num2), multiply(num1, num2), divide(num1, num2))
print(paste(num1, operator, num2, "=", result))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Any suggestions?
&lt;/h2&gt;

&lt;p&gt;Do you think there are some other examples of languages that deserve to be mentioned on this list? Leave a comment below, and I will add it to this post :) &lt;/p&gt;

</description>
      <category>programming</category>
      <category>python</category>
      <category>cpp</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Is it worth switching to PHP 7?</title>
      <dc:creator>SERP.run</dc:creator>
      <pubDate>Tue, 05 May 2020 09:46:16 +0000</pubDate>
      <link>https://dev.to/serprun/is-it-worth-switching-to-php-7-e8p</link>
      <guid>https://dev.to/serprun/is-it-worth-switching-to-php-7-e8p</guid>
      <description>&lt;h2&gt;
  
  
  1. PERFORMANCE
&lt;/h2&gt;

&lt;p&gt;In benchmarks, version 7.x works up to 14 times faster than version 5.x, and the speed of pages on WordPress increases by up to 100%, however, developers safely say about an increase in performance from 20 to 70% without changing the page code.&lt;/p&gt;

&lt;p&gt;Check other advantages put together for dev.to by &lt;a href="https://www.softeris.pl/en"&gt;Softeris Software House&lt;/a&gt;:&lt;/p&gt;

&lt;h2&gt;
  
  
  2. COMPATIBILITY
&lt;/h2&gt;

&lt;p&gt;Not all CMS or frameworks were immediately ready for PHP 7, but this compatibility appeared over time. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Zend Framework - since ver. 2.4+&lt;/li&gt;
&lt;li&gt;WordPress - since ver. 4.3&lt;/li&gt;
&lt;li&gt;Drupal - since ver. 8&lt;/li&gt;
&lt;li&gt;Joomla - since ver. 3.5&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. INTELLIGENT RESOURCES
&lt;/h2&gt;

&lt;p&gt;The increase in efficiency is not only te increase in speed, but also the reduction of resources necessary to launch individual subpages. As a result, website owners can reduce the required infrastructure to some extent, and thus save money.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. SYNTAX UNIFICATION
&lt;/h2&gt;

&lt;p&gt;One of the many complaints of PHP users was the lack of consistency in syntax. The latest PHP 7 release has finally solved this problem. Many operations have been added that make the sytnax more compact. This will allow to make fuller use of functional programming. &lt;/p&gt;

&lt;h2&gt;
  
  
  5. EXCEPTIONS INSTEAD OF ERRORS
&lt;/h2&gt;

&lt;p&gt;From version 7, critical errors are engine exceptions, which can be caught and handled like all other exceptions. Wise! &lt;/p&gt;

&lt;h2&gt;
  
  
  6. SCALAR TYPE DECLARATIONS
&lt;/h2&gt;

&lt;p&gt;A revolutionary change in PHP 7 is the addition of declarations for scalar types, they can be declared strings (integers), integers (int) and floating point (float) and logical types (boolean).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't wait! Enter the future today&lt;/strong&gt; :) &lt;/p&gt;

</description>
      <category>php</category>
    </item>
    <item>
      <title>What are the best programming languages for Blockchain?</title>
      <dc:creator>SERP.run</dc:creator>
      <pubDate>Fri, 25 Oct 2019 15:14:04 +0000</pubDate>
      <link>https://dev.to/serprun/what-are-the-best-programming-languages-for-blockchain-22hb</link>
      <guid>https://dev.to/serprun/what-are-the-best-programming-languages-for-blockchain-22hb</guid>
      <description>&lt;p&gt;No matter if you need a Blockchain development work or if you just want to deepen your knowledge in the field, it is crucial that you choose the right language for your programming. The languages I have listed below are now considered to be the best tools of the trade in the world of Blockchain development.&lt;/p&gt;

&lt;h2&gt;
  
  
  JavaScript
&lt;/h2&gt;

&lt;p&gt;JavaScript's biggest supremacy comes from the fact that JavaScript is already installed on most systems – every web system utilizes it somehow. This way, developers can effortlessly build creative Blockchain applications with no worries about integration. &lt;/p&gt;

&lt;p&gt;JS is dynamic and weakly typed which makes it a bit difficult to learn, especially if you are a beginner. The language supports functional, imperative and event-driven programming styles. It is powered by an event queue which is invisible to developers and you cannot do anything if the event queue is not working. JavaScript is kind of waiting until something happens and then triggers the right code at the right time. Being a developer you need to trust that the event queue will do the right thing.&lt;/p&gt;

&lt;p&gt;Currently, JavaScript is one of the most famous programming languages in the whole world. Actually, almost every IT company needs its frameworks. &lt;/p&gt;

&lt;p&gt;The most popular Blockchain ‘places’ where JavaScript is used are ethereum.js and web3.js. The language is also used in Hyperledger Fabric SDK node.js and then NEO. JavaScript is supported by TRON, Ark, Lisk and NEBLIO. &lt;/p&gt;

&lt;h2&gt;
  
  
  C++
&lt;/h2&gt;

&lt;p&gt;C++ is probably one of the best-known programming languages. It is an object-oriented language which means that it kind of packs the data in the form of objects and then sends it to the user. &lt;/p&gt;

&lt;p&gt;You should know that initially Bitcoin was written in C++. We are talking about the first ever implementation of Blockchain here, if you want to know the background then read some history behind Bitcoin in the article “&lt;a href="https://www.cryptocoinzone.com/everything-you-need-to-know-about-bitcoin/"&gt;Everything you need to know about Bitcoin - the complete guide&lt;/a&gt;”. There is even more information on trading in general on the &lt;a href="https://www.cryptocointrade.com/education/"&gt;Education section on CryptoCoinTrade&lt;/a&gt; which you can check out as well.   &lt;/p&gt;

&lt;p&gt;C++ has a great control over memory and some highly advanced multithreading capabilities. It is an object-oriented language which means that it kind of packs the data in the form of objects and then sends it to the user. It means that developers can bind the data and the methods together, just like Blockchain binds blocks. The language is strongly static, compiled and high-speed. C++ is easy to learn and apply in many formats. It has high-level efficiency and access to hardware. The only disadvantage is that C++ is complex which makes it difficult to debug sometimes. Unfortunately, it also does not support garbage collection.&lt;/p&gt;

&lt;p&gt;The most famous use of C++ is now EOS – C++ is its main programming language, mainly because of its flexibility to run extensive applications on top of the Blockchain. Besides Bitcoin and EOS, C++ is also used in Ripple, LiteCoin, Monero, Stellar, NEO and QTUM. &lt;/p&gt;

&lt;h2&gt;
  
  
  Java
&lt;/h2&gt;

&lt;p&gt;Java is very similar to C++ as it’s also object-oriented and it also has many third-party applications and platforms. On top of that, its highly-capable portability is just awesome. &lt;/p&gt;

&lt;p&gt;Java runs on almost any format of computers with just a small installation of JRE or the Java runtime environment. Java is very often used in big companies, mainly because it is relatively easy in development. It Is totally independent of the operational system and there is no problem with allocation of memory. Java has a strong support for object-oriented programming, as well as a huge community and libraries collection. Programs written in Java do not rely on system-specific architecture which means they are portable across any computational device. They just use the universal Java Virtual Machine for execution. The only disadvantage of Java is that it is a bit slower than C++.&lt;/p&gt;

&lt;p&gt;Among the others, NEM’s core Blockchain network has been written in Java. The language is very popular in the Blockchain industry; besides NEM it is used in IOTA, NEO’s and Hyperledger’s contracts, IBM Blockchain, Tron, NEBLIO and Ethereum.&lt;/p&gt;

&lt;h2&gt;
  
  
  Python
&lt;/h2&gt;

&lt;p&gt;One of the best languages for programmers who want to prototype their ideas quickly. While using Python, you can easily perform many tasks with a single command. It means, you can build blocks and link them together easily. Besides, it isn’t very hard to learn, and it has massive open source support (there are plugins and libraries for every problem you can think of). &lt;/p&gt;

&lt;p&gt;To be honest, Python is so user-friendly that even some AI and machine learning companies have adopted the use of it. It is also one of the most popular languages for creating chatbots. The only disadvantage is that Python, because of its interpreted nature, may underperform during complex cryptographic operations. What is more, libraries are not always documented enough.&lt;/p&gt;

&lt;p&gt;Python has become one of the most preferred language for Blockchain and website development. In the Blockchain industry, Python has own implementation of Ethereum and it can be used to create contracts for Hyperledger and NEO. It is also supported by NEBLIO and Icon.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ruby
&lt;/h2&gt;

&lt;p&gt;Although it is one of the oldest languages, Ruby can be a good Blockchain programming language for many reasons. Ruby is an interpreted high-level language, it has object-oriented features. Its main plus is that you can prototype your ideas instantly using open source plugins and third-party API. Ruby is very versatile and enables you to use a combination of languages. This way you can create Blockchain that is difficult to hack by other users. What is more, Ruby users can easily and quickly customize it so that it suits their needs and requirements best. Additionally, it is available for users for free.&lt;/p&gt;

&lt;p&gt;If you are a newbie in the field of Blockchain programming, Ruby is generally one of the easiest languages as it has less of a learning curve than e.g. C++ or Java. It can be easily used for Blockchain coding. Among the others, Ruby is supported by Ethereum.&lt;/p&gt;

&lt;h2&gt;
  
  
  Simplicity
&lt;/h2&gt;

&lt;p&gt;Simplicity has been introduced in the industry in the end of 2017 and very quickly it became considered to be one of the best Blockchain programming languages. It was originally designed for smart contracts. Simplicity is extremely easy to learn which is a big plus. Its low-level logical components are hidden from developers, so the productivity is naturally higher. Simplicity is a functional, typed, combinatory-based language that can enable Bitcoin’s script to handle much more smart contracts at the same time. It provides the flexibility and expressiveness for whatever computations needed. &lt;/p&gt;

&lt;p&gt;At the same time Simplicity is safe and secure. It is more akin to assembler languages than to Python or Java. It is possible that in the future all smart contracts will be written in one or more higher-level languages which will be then compiled to Simplicity.&lt;/p&gt;

&lt;p&gt;Simplicity comes with formal denotational semantics (defined in Coq) and includes operational semantics defined in the Bit Machine (a tool for measuring the computational space and time resources that are needed to evaluate Simplicity programs). &lt;/p&gt;

&lt;h2&gt;
  
  
  Solidity
&lt;/h2&gt;

&lt;p&gt;Solidity has been considered to be the fastest growing Blockchain programming language so far. It has been mainly used to develop smart contracts and enhance the use of EVM machines. A great advantage behind the statistically-typed Solidity is that you can catch hold of any iteration while coding which saves you a lot of time. The language is very easy to learn for programmers and accessible to the masses because information and tutorials on the language are easy to procure. &lt;/p&gt;

&lt;p&gt;Recently, its popularity has been growing extremely fast. The Solidity community isn’t very big yet, but this is because the language is still very young. This also makes it a bit vulnerable. On top of that, it is very easy to make a critical mistake, so you need to make sure you test your code in a very detailed way.&lt;/p&gt;

&lt;p&gt;Solidity was designed by the Ethereum team. This is why the language solves many unique problems faced by experienced Blockchain developers. Solidity is also supported by DFINITY, Wanchain, Expanse, QTUM, UBIQ, Cardano and Vechain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The fact that you are reading this probably means that you are already familiar with programming and know that there is no single answer on any choice of a programming language. Just remember that this is not a decision for life, and you can always try out many choices. Why not start with JavaScript and stay here for a while?&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>javascript</category>
      <category>cpp</category>
      <category>java</category>
    </item>
  </channel>
</rss>
