<?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: Benjamin Semah</title>
    <description>The latest articles on DEV Community by Benjamin Semah (@benjaminsemah).</description>
    <link>https://dev.to/benjaminsemah</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%2F925151%2F2338095f-5e92-4836-890a-1027205df137.jpeg</url>
      <title>DEV Community: Benjamin Semah</title>
      <link>https://dev.to/benjaminsemah</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/benjaminsemah"/>
    <language>en</language>
    <item>
      <title>What is a Canonical URL? And Why Should You Care?</title>
      <dc:creator>Benjamin Semah</dc:creator>
      <pubDate>Tue, 22 Aug 2023 22:17:25 +0000</pubDate>
      <link>https://dev.to/benjaminsemah/what-is-a-canonical-url-and-why-should-you-care-58dn</link>
      <guid>https://dev.to/benjaminsemah/what-is-a-canonical-url-and-why-should-you-care-58dn</guid>
      <description>&lt;p&gt;What do you do for your blog to reach more readers? Most bloggers share their articles on different platforms.&lt;/p&gt;

&lt;p&gt;This is a great way to promote your blog and content. But there is a right way of doing it. If you don't do it right, you will end up doing more harm than good to your blog.&lt;/p&gt;

&lt;p&gt;In this article, you will learn about canonical URLs. By the end of the article, you will know what they are, why they are important, and how to use them.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a canonical URL?
&lt;/h2&gt;

&lt;p&gt;A canonical URL shows search engines the primary source among webpages with duplicate content.&lt;/p&gt;

&lt;p&gt;Assuming you post an article on your blog. And you also share the same article on platforms like hashnode and dev.to. The same content is now available on three different pages on the internet.&lt;/p&gt;

&lt;p&gt;The canonical URL lets you decide which one should be treated as the original.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why you should use it.
&lt;/h2&gt;

&lt;p&gt;But why should you care about showing which one is the "original" version? To enable search engines like Google to properly index your articles. And know which one to direct traffic to.&lt;/p&gt;

&lt;p&gt;If you do not set canonical URLs for duplicate content, you leave it to Google to choose which one to rank (display in search results). And that might not be your preferred option. Or worse, google might treat all as spam and not rank any. Either way, you will hurt your SEO.&lt;/p&gt;

&lt;p&gt;A canonical URL lets you decide which one search engines should display among search results.&lt;/p&gt;

&lt;p&gt;Use a canonical URL anytime you share your articles across platforms. It's easy to set it up once you learn how.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to use a canonical URL
&lt;/h2&gt;

&lt;p&gt;Add a rel attribute to the HTML  tag. The value of the rel attribute should be canonical. See the example below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;link rel="canonical" href="https://yourblog.com/your-article" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This should be inside the HTML head (&lt;code&gt;&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;/code&gt;) tag.&lt;/p&gt;

&lt;p&gt;The good news is that for many blogging platforms, you don't need to worry about doing this manually.&lt;/p&gt;

&lt;p&gt;They provide space for you to copy and paste the link. And behind the scenes, it will set the canonical URL automatically for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to add a canonical URL in hashnode
&lt;/h2&gt;

&lt;p&gt;Go to the draft settings. You will see the option in the screenshot below. Copy and paste the URL of your primary source in the provided space.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--L1m_70kM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wjmxsxso1dfq5np1z973.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--L1m_70kM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wjmxsxso1dfq5np1z973.png" alt="Hashnode settings for adding canonical url" width="465" height="237"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to add a canonical URL in Dev.to
&lt;/h2&gt;

&lt;p&gt;First, click on the settings icon on the draft page. See the screenshot below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rL_I-gTQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l6ix9xbw6ztr7s21fsgk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rL_I-gTQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l6ix9xbw6ztr7s21fsgk.png" alt="Dev.to settings page" width="800" height="606"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A pop-up appears on the screen when you click the icon. Copy and paste the URL for your primary source in the space provided.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MfehFSdi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qtyqsyruk4dkvsxlau3f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MfehFSdi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qtyqsyruk4dkvsxlau3f.png" alt="Dev.to settings for adding canonical url" width="355" height="187"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;Sharing your content on different platforms is great. It helps you reach more people. But you only get better results if do it the right way of doing it.&lt;/p&gt;

&lt;p&gt;Setting a canonical URL is a best practice when sharing your articles on more than one platform.&lt;/p&gt;

&lt;p&gt;Now, you know what a canonical URL is, why you should use it, and how to use it. Keep creating and sharing valuable content. Happy blogging!&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's Connect!
&lt;/h2&gt;

&lt;p&gt;Thanks for reading this article.&lt;/p&gt;

&lt;p&gt;Check out my &lt;a href="https://www.youtube.com/@DevAfterHours"&gt;YouTube channel&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I would love to hear from you. Say hi via &lt;a href="https://www.linkedin.com/in/benjaminsemah/"&gt;LinkedIn&lt;/a&gt; or &lt;a href="https://twitter.com/BenjaminSemah"&gt;Twitter&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>technicalwriting</category>
      <category>blogging</category>
      <category>url</category>
      <category>writing</category>
    </item>
    <item>
      <title>What programming language should you learn first?</title>
      <dc:creator>Benjamin Semah</dc:creator>
      <pubDate>Wed, 14 Sep 2022 12:24:10 +0000</pubDate>
      <link>https://dev.to/benjaminsemah/what-programming-language-should-you-learn-first-3feo</link>
      <guid>https://dev.to/benjaminsemah/what-programming-language-should-you-learn-first-3feo</guid>
      <description>&lt;p&gt;Did you know there are over &lt;a href="https://en.wikipedia.org/wiki/List_of_programming_languages"&gt;700 programming languages&lt;/a&gt;? As a beginner, it can be totally overwhelming to decide which to learn! I am writing this post to help.&lt;/p&gt;

&lt;p&gt;This article will discuss:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  What programming languages are&lt;/li&gt;
&lt;li&gt;  Why they are important&lt;/li&gt;
&lt;li&gt;  How to choose which one to learn when you're new&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before diving into it, let's look at some popular programming languages and what they're typically used for:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zwX8xajH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://scrimba.com/articles/content/images/2022/09/programming-languages-and-their-common-uses.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zwX8xajH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://scrimba.com/articles/content/images/2022/09/programming-languages-and-their-common-uses.png" alt="Programming languages and their common uses" width="880" height="1320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Does it matter which language you choose?
&lt;/h2&gt;

&lt;p&gt;You'll get varying answers when you ask a group of programmers what their first programming language was. However, some languages are likely to be mentioned more often than others. This is because some programming languages are beginner-friendly, while others are not.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TyOJl-Ub--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://scrimba.com/articles/content/images/2022/09/programming-languages-ranking-1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TyOJl-Ub--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://scrimba.com/articles/content/images/2022/09/programming-languages-ranking-1.png" alt="Ranking of common programming languages" width="880" height="545"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Why are there so many programming languages, you ask? The main reason is that different problems require different tools suitable for solving them.&lt;/p&gt;

&lt;p&gt;As a beginner, you're not alone if you worry about learning something that will end up being a waste of your effort and time. Before you get stuck with analysis paralysis, here are three things you should note about programming languages.&lt;/p&gt;

&lt;h3&gt;
  
  
  Programming languages are tools
&lt;/h3&gt;

&lt;p&gt;A programming language is just one of many tools in a programmer's toolkit.&lt;/p&gt;

&lt;p&gt;Knowing English doesn't make you a good storyteller or novelist. Likewise, knowing JavaScript doesn't make you a good problem solver or programmer necessarily.&lt;/p&gt;

&lt;p&gt;At its core, programming is problem-solving. Problem-solving is the most challenging skill to master. A programming language is "just" how you express your solution to the computer.&lt;/p&gt;

&lt;p&gt;For this reason, big companies sometimes ask problem-solving questions on a whiteboard instead of language-specific ones.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kou2UyUN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://scrimba.com/articles/content/images/2022/09/google-interview-example.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kou2UyUN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://scrimba.com/articles/content/images/2022/09/google-interview-example.png" alt="An example of google interview" width="880" height="499"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Google don't care what programming language you use since they reason any smart programmer can &lt;a href="https://www.youtube.com/watch?v=XKu_SEDAykw"&gt;learn a language&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Moreover, experienced developers can sometimes pick up other languages by relying on their core problem-solving skills&lt;/p&gt;

&lt;h3&gt;
  
  
  You can (and probably will) switch programming languages
&lt;/h3&gt;

&lt;p&gt;Different languages are better suited for different tasks and switching from one language to another is common.&lt;/p&gt;

&lt;p&gt;Often, the language you use will depend on the project you're working on or even the company you work for. Maybe company A was built with Java but company B uses C#.&lt;/p&gt;

&lt;p&gt;Some companies even create their own languages! For example, Facebook was originally coded in PHP. As the company scaled, they developed Hack - a new programming language built on top of PHP to improve performance and security. Funnily enough our own website that teaches you how to code, &lt;a href="https://scrimba.com/"&gt;Scrimba&lt;/a&gt;, is coded in a custom programming language called &lt;a href="https://imba.io/"&gt;Imba&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You'll most likely learn several languages throughout your career.&lt;/p&gt;

&lt;p&gt;Eventually a new programming language will come along and take the industry by storm. For example, in the 1980s most developers used Delphi but now it's hard to stumble upon Delphi code. Every decade or so the landscape shifts and we gradually learn new tools. It's all part of being a web developer!&lt;/p&gt;

&lt;h3&gt;
  
  
  Once you learn one, it's easier to learn another
&lt;/h3&gt;

&lt;p&gt;Some programming languages are similar. A solid grasp of one can be a good foundation for learning another.&lt;/p&gt;

&lt;p&gt;Granted, it won't be a walk in the park. There will still be tons of new things to learn. However, you'll be in a better position approaching it than when starting with your first language.&lt;/p&gt;

&lt;p&gt;For example, if you learn JavaScript as your first language, you should become familiar with concepts such as variables, loops, arrays, conditionals, etc. Many languages like Python have these concepts too. Thus, learning Python after you've learned JavaScript would be easier.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to pick your first programming language
&lt;/h2&gt;

&lt;p&gt;So how do you choose which language to learn first? What should you look out for as a beginner when making a choice?&lt;/p&gt;

&lt;p&gt;There're no hard and fast rules when answering these questions. But the following pointers can help you make an informed decision.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why do you want to learn to program?
&lt;/h3&gt;

&lt;p&gt;First, it's essential to consider why you want to &lt;a href="https://scrimba.com/articles/how-long-to-learn-code/"&gt;learn programming&lt;/a&gt;. How you answer this can help point you in the right direction.&lt;/p&gt;

&lt;p&gt;Do you want to learn as a hobby? Or maybe you have an idea for an application you want to build. It could also be that you want to switch careers and &lt;a href="https://scrimba.com/articles/become-web-developer-in-6-months/"&gt;become a professional web developer&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Let's consider example cases and some great first language choices.&lt;/p&gt;

&lt;p&gt;These are not the only ones that can be used for these purposes. However, they are beginner-friendly languages.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  You want to become a web developer, learn JavaScript.&lt;/li&gt;
&lt;li&gt;  Your goal is to build a Mac or IOS app, learn Swift.&lt;/li&gt;
&lt;li&gt;  You want to build an Android app, learn Kotlin or JavaScript.&lt;/li&gt;
&lt;li&gt;  You are interested in data science, learn Python.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Ease of learning the language
&lt;/h3&gt;

&lt;p&gt;Another factor to consider is the learning curve.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JO1iVteA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://scrimba.com/articles/content/images/2022/09/learning-programming.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JO1iVteA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://scrimba.com/articles/content/images/2022/09/learning-programming.png" alt="Guy learning programming" width="880" height="616"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://unsplash.com/photos/4-EeTnaC1S4"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Some programming languages are easier to learn than others. At the same time, some languages will take a longer time to learn than others!&lt;/p&gt;

&lt;p&gt;For example, a language like Python reads almost like English. Thus, it is less challenging to learn the syntax.&lt;/p&gt;

&lt;p&gt;Comparatively, languages like C and C++ have more complex syntax. They offer more control over hardware aspects, like memory management and CPU usage, but this also means less abstraction and increased complexity&lt;/p&gt;

&lt;p&gt;If you are new to programming with no computer science background, you should start with beginner-friendly languages like JavaScript, Python, etc.&lt;/p&gt;

&lt;h3&gt;
  
  
  Demand in the job market
&lt;/h3&gt;

&lt;p&gt;Most people who decide to learn how to program do so to pursue a career as a programmer.&lt;/p&gt;

&lt;p&gt;If that is your objective, then it's essential to familiarize yourself with trends in the job market. Regardless of the field you want to venture into. Some languages are more in demand than others.&lt;/p&gt;

&lt;p&gt;If you have no idea about the technology or languages in demand in your field of interest, you can search for job postings and note the various languages that come up. This can give you an indication of the skills employers and recruiters are looking for.&lt;/p&gt;

&lt;h3&gt;
  
  
  The versatility of the language
&lt;/h3&gt;

&lt;p&gt;Some languages are versatile and can be used to build various projects.&lt;/p&gt;

&lt;p&gt;For example, a language like JavaScript can be used to build both front-end and backend applications. It can also be used to build mobile applications, games, etc.&lt;/p&gt;

&lt;p&gt;There are also numerous &lt;a href="https://scrimba.com/articles/difference-between-framework-and-library/"&gt;frameworks and libraries&lt;/a&gt; that have been built on top of JavaScript. This makes it even more versatile and powerful. Not all languages can boast of such versatility.&lt;/p&gt;

&lt;h3&gt;
  
  
  Long-term prospects
&lt;/h3&gt;

&lt;p&gt;New languages emerge now and then, but not all can stand the test of time.&lt;/p&gt;

&lt;p&gt;When considering which language to learn, you should also consider the long-term prospect.&lt;/p&gt;

&lt;p&gt;Don't just consider only what is new and most talked about. That is not always a good indicator of long-term prospects.&lt;/p&gt;

&lt;p&gt;Think about the support and the communities built around the language you're considering. How hard or easy will it be for you to get help when you start learning and get stuck - it happens to all of us.&lt;/p&gt;

&lt;h2&gt;
  
  
  Still not sure which language to choose?
&lt;/h2&gt;

&lt;p&gt;It's okay if you're still not sure which language to learn. But do not overthink it. Just choose one and learn. If you keep at it, you'll soon be able to build some cool stuff.&lt;/p&gt;

&lt;p&gt;My advice is to&lt;a href="https://scrimba.com/articles/javascript-beginner-web-developers/"&gt; go with JavaScript&lt;/a&gt;. Here is a 7-hour &lt;a href="https://scrimba.com/learn/learnjavascript"&gt;free course&lt;/a&gt; to get you started:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--25Yiv5rM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://scrimba.com/articles/content/images/2022/09/Scrimba-JavaScript-Programming-on-YouTube.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--25Yiv5rM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://scrimba.com/articles/content/images/2022/09/Scrimba-JavaScript-Programming-on-YouTube.png" alt="Scrimba JavaScript Course" width="880" height="670"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The YouTube version has 1.8 million views so you know it's good&lt;/p&gt;

&lt;h3&gt;
  
  
  The verdict
&lt;/h3&gt;

&lt;p&gt;Programming languages are essentially problem-solving "tools". Different languages are useful and ideal for different purposes. There's no one size fits all answer to the question of which one you should learn first.&lt;/p&gt;

&lt;p&gt;The most important thing is to pick one and give it your best shot. Regardless of which language you choose, It will require a great deal of practice and stick-to-itiveness to become better at it.&lt;/p&gt;

&lt;p&gt;In this article, we recommend going with JavaScript if you're still unsure.&lt;/p&gt;

&lt;p&gt;There are tons of resources available online for getting started. That in itself can also be overwhelming. If you're interested in learning how to get started, check out &lt;a href="https://scrimba.com/"&gt;Scrimba&lt;/a&gt; and &lt;a href="https://scrimba.com/learn/frontend"&gt;The Frontend Developer Career Path&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>codenewbie</category>
      <category>career</category>
    </item>
  </channel>
</rss>
