Learn How to Program and Build Your Own Software Applications Quickly

The world is moving at a very fast pace towards technological advancements. What was considered ground-breaking research a century ago is now part of secondary and high school curriculum. What you learnt about the universe and our solar system at secondary school level was only known to scientists and researchers back then. Information dissipation has grown at a stupendous rate, and Computer Sciences are no different than other fields of science such as Physics.

In this fast-paced era, where the world is moving towards automation, it is important for everyone to know the basics of computer sciences and be able to tell how computers work and communicate. It is only a matter of time before basic computer programming becomes part of school curriculum. Staying up to date and knowing how to program a computer is the need of the hour.

How to start learning programming

Most computer science degrees at college/university level being teaching programming with core programming languages such as C/C++ or Python. C is considered to be the mother of many popular modern languages today, and learning it enables students and enthusiasts to grasp concepts of programming easier, which they can apply to other languages as well.

However, it is also important for absolute beginners to be able to see the results of their creation in a meaningful and real-world manner. For some, writing C applications on a dull, black console screen can become boring real quick and take away the motivation for learning. That is why I believe that learning programming on tools that a lay person or beginner uses everyday is far more beneficial with respect to motivation levels and the learning curve involved.

Enter, JavaScript.

Even if you have no prior computer programming experience, JavaScript is a term many of you must have come across at some point. Websites use JavaScript to deliver and update content, and create interactivity. You can disable JavaScript in most modern Web browsers.

The good news is, you can learn how to program in JavaScript by yourself. And the best part? You don’t need to download or install any compilers, IDEs or any other software tools in order be able to write your own code and see it in action. Let me demonstrate how this works.

Writing your first computer program

JavaScript is a scripting language that can run in your browser. What you see on a Web page is basically a text document with formatting. But JavaScript runs in the background, adding interactivity to the page.

Follow the steps below to write a JavaScript program and see it in action.

  1. Create a new text document anywhere on your system

  2. Rename the file to “test.html”. Note that the extension must be .html, and you will need to change the default .txt extension.

Note: if you can’t see file extensions, open up Windows File Explorer >> View, and check the option that says “File name extensions”. File extensions are visible on Linux systems by default.

  1. Right-click the file, and click Edit. Then write the following code into the file.

<script>
console.log(“Hello World”);
</script>

  1. Now close the file, and open it inside a web browser. By default, all .html files should open up in a web browser.

  2. You should see a blank screen, but that’s ok! Open Developer Tools in your browser. The most common shortcuts for bringing up these tools is to press F10 (Chrome), F12 (Internet Explorer) or Ctrl + Shift + K (Firefox). Click on the console tab.

Congratulations! You have now successfully written your first “Hello World” program. Let’s do something a little more sophisticated, and print “Hello World” 10 times. Just edit the file again, replace the previous code with the following code, and relaunch the web page you just created.

<script>
for(var i = 1; i <= 10; i++) {
console.log(i, “Hello World”);
}
</script>

You should now see a count from 1 to 10, with the words “Hello World” written next to each number. This is called a loop, and is a very powerful tool for performing repeated tasks.

Going further

JavaScript is a very powerful language that you can use to display and remove items on a webpage, sorting data in tables, creating repeated operations, and so on. Teaching the ins and outs of programming is beyond the scope of this article, but we recommend you go ahead and use online resources for learning programming concepts.

Experimentation is the key to programming. Try out different things in your web browser right now, and see where the quest leads you! Good luck!

Written by ProgrammingMax

Leave a Comment

Your email address will not be published. Required fields are marked *