Why You Shouldn't Worry About Programming Languages?

Why You Shouldn't Worry About Programming Languages?

·

3 min read

Hey folks!

This is my first post here so I hope everything goes well and you like it!

Are you still trying to choose a programming language to start learning? Don't do that! Believe me, programming languages are just syntaxes that save you from machine codes and they all are similar to each other!

If you really want to learn programming, focus on the logic of programming, not the languages. Languages come and go. A language that is popular this year may disappear next year. What's more is that developers and engineers are most likely to know several programming languages to some extent as the projects are not always implemented solely in a specific language.

I've mentioned above that programming languages are alike. Let me prove that. I will give two pieces of code that are exactly does the same job, summing up the numbers from 1 to the given number by the user.

Here is the piece of code written in C# :

using System;

public class Program
{
    public static void Main()
    {
        Console.Write("Enter a number: ");
        int num = Convert.ToInt32(Console.ReadLine());
        int sum = 0;

        for (int i = 1; i <= num; i++)
        {
            sum += i;
        }

        Console.WriteLine("The sum of numbers from 1 to {0} is {1}.", num, sum);
    }
}

This program prompts the user to enter a number, converts the input to an integer using Convert.ToInt32(), and initializes a sum variable to 0. It then uses a for loop to iterate from 1 to the input number and adds each iteration's value to the sum variable.

After the loop completes, the program outputs the result using Console.WriteLine(), including the input number and the calculated sum.

Here is the same program written in Java:

using System;

public class Program
{
    public static void Main()
    {
        Console.Write("Enter a number: ");
        int num = Convert.ToInt32(Console.ReadLine());
        int sum = 0;

        for (int i = 1; i <= num; i++)
        {
            sum += i;
        }

        Console.WriteLine("The sum of numbers from 1 to {0} is {1}.", num, sum);
    }
}

This program works similarly to the C# program, using a Scanner object to read input from the user and a for loop to calculate the sum. The output is printed using System.out.printf().

All in all, do not waste your time thinking to decide on a programming language! Just choose one and start immediately! It's a long journey! Also do not forget that it is the algorithmic thinking ability that is important for programming.

If you still want a recommendation, search for Python or Java. These languages are beginner-friendly and they have an awesome community out there to help you when you need!


Thank you for reading my post! If you have any question or suggestion, please leave a comment! See you!