
{"id":2408,"date":"2016-05-31T22:06:38","date_gmt":"2016-05-31T22:06:38","guid":{"rendered":"http:\/\/www.codergears.com\/Blog\/?p=2408"},"modified":"2018-04-04T13:30:58","modified_gmt":"2018-04-04T13:30:58","slug":"pragmatic-approach-to-learn-a-new-programming-language","status":"publish","type":"post","link":"https:\/\/codergears.com\/Blog\/?p=2408","title":{"rendered":"Pragmatic approach to learn a new programming language."},"content":{"rendered":"<p>Each programmer has its way to learn a new programming language, and the difficulty to master it depends on many factors, we can enumerate:<\/p>\n<ul>\n<li>The language itself.<\/li>\n<li>The programmer experience.<\/li>\n<li>The language community.<\/li>\n<li>The existing language resources ( websites, books,&#8230;).<\/li>\n<\/ul>\n<p>Here are some pragmatic steps to learn a new programming language:<!--more--><\/p>\n<p><strong>First, Install the environment:<\/strong><\/p>\n<p>Even if you use the resources from the web, books or you do a training to learn the programming language, the trivial step is to install the environment needed to develop, execute and debug your code.<\/p>\n<p>Sometimes the environment could be just an\u00a0IDE, and for other cases you have to install many other tools. Each language has many possible environements and you have to choose yours.<\/p>\n<p>When you begin to learn a new language, it&#8217;s better to focus on the language itself rather than the environment, it&#8217;s better to use an environement which is very simple to install and use even if it&#8217;s not the most rich in features. You can after switch to another environement if you begin to master the language.<\/p>\n<p><strong>Explore and execute some samples<\/strong><\/p>\n<p>After installing the IDE, try to explore some samples, execute and debug them. The goal of this step is to familiarize yourself with the IDE capabilities.<\/p>\n<p><strong>Write and execute\u00a0your first sample<\/strong><\/p>\n<p>Create a sample from scratch is very useful to have an idea of the program structure and how to deploy it. In many cases just a &#8220;hello world&#8221; could be sufficient.<\/p>\n<p><strong>Good habits from the beginning<\/strong><\/p>\n<p>If\u00a0<span style=\"color: #212121;\">you are accustomed to develop using a specific style, it&#8217;s very hard to change your habits. If you begin a new programming language try to e<\/span>xplore some known open source projects, no need to download and build the project, you can just discover the code from GitHub. This step will help you to have an idea of the style used by these mature projects.<\/p>\n<p><strong>The headache of choosing the frameworks and libraries.<\/strong><\/p>\n<p style=\"color: #333333;\">When you begin a new programming language, sooner or later you have to choose some libraries and frameworks to use.<\/p>\n<p style=\"color: #333333;\">Choosing a software library is not always an easy task, specially if many concurrent libraries exist\u00a0for a specific need. As a beginner it&#8217;s maybe the most complicated task.<\/p>\n<p style=\"color: #333333;\">Here are some factors to consider when choosing a library:<\/p>\n<p style=\"color: #333333;\"><strong>1- Licensing<\/strong><\/p>\n<p style=\"color: #333333;\">The library license is the first thing to check, it\u2019s very important to verify if the license is compatible with your project, before going further and discover the library capabilities.<\/p>\n<p style=\"color: #333333;\"><a href=\"In%201994 Robert \u201cUncle Bob\u201d Martin proposed a\u00a0group of object-oriented metrics that are popular until now. Those metrics, unlike other object-oriented ones don\u2019t represent the full set of attributes to assess individual object-oriented design, they only focus on the relationship between packages in the project.\">http:\/\/en.wikipedia.org\/wiki\/Comparison_of_free_and_open-source_software_licenses<\/a><span id=\"more-823\"><\/span><\/p>\n<p style=\"color: #333333;\"><strong>2- Does\u00a0the library satisfy\u00a0your needs?<\/strong><\/p>\n<p style=\"color: #333333;\">It\u2019s a\u00a0trivial factor, but how many devlopers realized a mini proof of concept to check that all their needs are satistified by the library. Sometimes we discover very early that the library is not good for some reasons.<\/p>\n<p style=\"color: #333333;\"><strong>3- The community is active<\/strong><\/p>\n<p style=\"color: #333333;\">Many problems could occurs when using a library, if its community is active, it will be very easy to find quickly a solution.<\/p>\n<p style=\"color: #333333;\"><strong>4- What about the trend of using the library?<\/strong><\/p>\n<p style=\"color: #333333;\">It\u2019s interesting to know if the library grow on popularity or not? for that you can use google trends and discover the evolution of the library over years.<\/p>\n<p style=\"color: #333333;\">Here\u2019s for example the trend of d3.js API:<\/p>\n<p style=\"color: #333333;\"><a href=\"http:\/\/www.codergears.com\/Blog\/wp-content\/uploads\/trend.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-859\" src=\"http:\/\/www.codergears.com\/Blog\/wp-content\/uploads\/trend.png\" alt=\"trend\" width=\"804\" height=\"455\" \/><\/a><\/p>\n<p style=\"color: #333333;\"><strong>5- Does\u00a0the library has a break changes in the past?<\/strong><\/p>\n<p style=\"color: #333333;\">Before adopting a library, take a few minutes and search \u00a0in the web for \u00a0\u201cLibraryName breaking changes\u201d to check if for a specific version a breaking changes was done.<\/p>\n<p style=\"color: #333333;\">It could help you for the following reasons:<\/p>\n<p style=\"color: #333333;\">&#8211; Avoid \u00a0using library examples from older versions.<\/p>\n<p style=\"color: #333333;\">&#8211; it\u2019s not good sign if a library has a big breaking change. \u00a0It means the developers does not care about the library users, and it could happen again in next versions.<\/p>\n<p style=\"color: #333333;\"><strong>6- Constraints and limitations of using a library.<\/strong><\/p>\n<p style=\"color: #333333;\">Sometimes a library is awesome for a specific needs, but has one killer limitation which could force you to not use it.<\/p>\n<p style=\"color: #333333;\">Let\u2019s take as example the google chart api, it\u2019s a versy useful chart library. However, it has one annoying limitation, the user must have an internet connection.<\/p>\n<p style=\"color: #333333;\">Before choosing a library, be sure that no limitation could affect its using, you have just to search in the web for \u201cLibraryName limtations\u201d.<\/p>\n<p style=\"color: #333333;\"><strong>7- Documentation<\/strong><\/p>\n<p style=\"color: #333333;\">A well documented library will helps you considerably when you use it. specially if it contains many samples of using it.<\/p>\n<p style=\"color: #333333;\"><strong>8- Did you care about performence when using the library?<\/strong><\/p>\n<p style=\"color: #333333;\">If you plan to use a library in a context where the performence is very important, don\u2019t only trust the benchmarks found in the web. It\u2019s preferable to make a POC with your specific constraints to have a better idea of how the library behaves in your specific context.<\/p>\n<p style=\"color: #333333;\"><strong>9- Does\u00a0your application multiplatform?<\/strong><\/p>\n<p style=\"color: #333333;\">If you application must works in many platform, don\u2019t test mostly in one platform, after finishing the developement test for all the other platforms.<\/p>\n<p style=\"color: #333333;\">Always test from the begining on all the targeted plateforms, some libraries are very good implemented for an OS and very bad implemented for the others.<\/p>\n<p style=\"color: #333333;\"><strong>10- Is there any other serious alternative to the library chose, and you have a doubt?<\/strong><\/p>\n<p style=\"color: #333333;\">In some cases you could find two awesome libraries for the same needs, and you have a doubt of using one of them. In this case never \u00a0let your code highly coupled with the library. Prefer using wrappers and facade patterns to isolate it\u2019s use.<\/p>\n<p style=\"color: #333333;\">Of course there are many other factors that could influence your choice. and to minimise the risk of using a bad \u00a0library which we must change it after. It\u2019s always a good practice to isolate its use in some few places in the code, by using wrappers and facades.<\/p>\n<p style=\"color: #333333;\">Try to evaluate the coupling of your application with all the libraries used, identify the libraries highly coupled with your code, and progressivly try as possible to decouple its use.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Each programmer has its way to learn a new programming language, and the difficulty to master it depends on many factors, we can enumerate: The language itself. The programmer experience. The language community. The existing language resources ( websites, books,&#8230;). Here are some pragmatic steps to learn a new programming language:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2408","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=\/wp\/v2\/posts\/2408","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2408"}],"version-history":[{"count":13,"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=\/wp\/v2\/posts\/2408\/revisions"}],"predecessor-version":[{"id":2430,"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=\/wp\/v2\/posts\/2408\/revisions\/2430"}],"wp:attachment":[{"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2408"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codergears.com\/Blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}