Skip to main content

7 Things You Need To Know about Programming: The Art of Programming

courtesy of SafeTrac

Is it enough to learn a single programming language and live with it?

Like working in a single language for the entire life? Oh C’mon

My answer is big NO. I mean not at all. A single language can work pretty much everywhere but one language that performs well somewhere does not mean that it will perform that much good elsewhere. There is always a better choice available.

For example JavaScript works best in web applications but it won’t work the way Python woks for Data science. I hope you got the point.

To get your hands on a well-paid job, or to make an attractive freelance profile or to pursue further studies in computer you should master one and get familiar with at least 3 languages.

Let’s throw the blue collars, white collars, t-shirts and whatever out of the scope of this article and focus on students only.

If you have read my previous post, if you haven’t then I would recommend you read it first, then you should have got the idea that it is pretty handy to end up with many choices. But in terms of programming, how could someone manage all the stuff? How to switch to a new language? Does it take as much long as it took to learn the first language?

No, it is easier than you think.

How? We cheat.

If you can work in a single programming language it means that you can work in other languages too. It will take you approximately 2 weeks or so to learn a new language but there is a learning approach which helps to achieve such an amazing result. 

Without any further ado, let’s dive in.

In order to increase your learning curve exponentially, you should know the fact that there are many things common in almost all programming languages. Learn one and master all. I will list a few here:

  1. Data structures
  2. Conditional statements
  3. Iterators / Loops
  4. Functions
  5. Class and Object
  6. Inheritance
  7. Polymorphism

In all enlisted terms above, the common thing is the concept and the difference is the syntax. To build a program you will need to make an algorithm and to create an algorithm you will use pseudo code which has no syntax but concepts. Google can surely tell us syntax for all languages, then why we would waste our own natural storage? And believe me nobody remembers syntax. If you don’t believe me then go and watch live programming sessions. You will get your answer.

It’s time to work with the list. 

1. Data structures

The most common thing is all computer languages is Data Structure. A variable will always be a variable and an array will always be an array, every time, everywhere. What is a variable? A name of memory location. What is does? Stores data. What data? The data you give it. I mean the common thing is its functionality, to store value. The difference is the limitations that different languages impose. For instance, Java does not allow you to put a string data in an integer variable but JavaScript allows. Same is the case with other data structures.

2. Conditional Statement

The switch statement, if and nested if else structure are conditional operator are conditional statements. The common thing is the overall structure. They all have a test condition, a true block and a false block. If the condition is true, true block runs and if the condition is false, the false block runs. The difference is their syntax.

3. Iterators / Loops

Every language that I have ever SEEN uses loops for repeated execution of a block of code. You will never see a loop used for something else. All you need is to feed this to your mind that anywhere you need some repetitive execution, the choice is loop. Whether you are working in java or python or a super complex alien computer language.

4. Functions

Functions, methods, procedures or whatever you call it is a way to avoid writing some code again and again and again. The purpose of functions is to save you time, space and money. Functions save money? It does not make any sense.

Time is money.

Jokes apart. Functions have 4 things in common. A name, input parameters, return data and a call to the function. That’s it. Although different languages have different rules for naming functions but almost in all languages functions do the same job.

5. Class and Objects

If we go with the traditional boring definitions then class is a blue print and an object is an instance of class. Class have methods and variables and we need to create object to use the class members, excluding static members.

You will have to create objects if you need to use the functionality provided by the class whether you are working in CPP or Java or whatever else Object Oriented language. This is the common thing.

The difference is in the syntax. Like new keyword is used to create object in Java while in CPP new isn’t needed.

6. Inheritance

Where there is a will there is a way and where there is OOP there is inheritance. The parent child business.

Inheritance is a common concept of OOP where a child class inherits some properties or behavior from another parent class. The story is the same everywhere, a child parent relation. The difference is in the syntax. Also, some languages allow one type of inheritance while others allow the other type. 

For instance, C++ allow single, multiple and multi-level inheritance and Java does not allow its users to use multiple inheritance. Although Java developers cheat with java for multiple inheritance but this is off the topic.

7. Polymorphism

Polymorphism means many forms. In OOP, a function have the same name but different implementations. It sounds like function/method overloading but it has nothing to do with function overloading.

Overloaded functions belong to the same class, having the same name but different parameters. Polymorphic functions belong to different classes. To achieve polymorphism, it is necessary to have more than one classes while for method overloading a single class is necessary. 
Above theory is common in all object oriented languages. The difference is the way how polymorphism is used.

In C++, virtual keyword is used in combination with inheritance (inheritance is necessary) however in JAVA, you do not necessarily need to use inheritance. Interface is enough.

Conclusion:

Finally, we are at the end. I tried to be specific, to the point. I will write in details about each of above. To summarize, invest more of your time in understanding the concepts of programming rather than the syntax of a language. Once you master all these, it will take you less than a month to learn a new language.

The above list is not complete. I mean we can add more things but for brevity, I picked these few very basic building blocks of programming.

Happy coding…

Comments

  1. > you will use _sedo_ code

    Typo: "pseudo".

    > Where there __ a _well_ there is a way

    Word missing: "is".

    Typo: "will".

    > Finally, we are __ the end.

    Word missing: "at".

    ReplyDelete
  2. I liked your article. Would you show the different building blocks in a few different languages like Python, Java, Javascript?

    ReplyDelete
    Replies
    1. Thank you Ikem for the feedback. It really means a lot to me.
      And yes of course, I will write separate post on each point of the list. It is on my schedule.

      Delete

Post a comment

Popular posts from this blog

How Big Data Analytics Can Help You Improve And Grow Your Business?

Big Data Analytics There are certain problems that can only solve through big data. Here we discuss the field big data as "Big Data Analytics". The big data came into the picture we never thought how commodity hardware is used to store and manage the data which is reliable and feasible as compared to the costly sources. Now let us discuss a few examples of how big data analytics is useful nowadays. When you go to websites like Amazon, Youtube, Netflix, and any other websites actually they will provide some field in which recommend some product, videos, movies, and some songs for you. What do you think about how they do it? Basically what kind of data they generated on these kind websites. They make sure to analyze properly. The data generated is not small it is actually big data. Now they analysis these big data they make sure whatever you like and whatever you are the preferences accordingly they generate recommendations for you. If you go to Youtube you have noticed it kn…

AI Vs Machine Learning Vs Deep Learning

AI Vs Machine Learning Vs Deep Learning Artificial intelligence, deep learning and machine learning are often confused with each other. These terms are used interchangeably but do they do not refer to the same thing. These terms are closely related to each other which makes it difficult for beginners to spot differences among them. The reason I think of this puzzle is that AI is classified in many ways. It is divided into subfields with respect to the tasks AI is used for such as computer vision, natural language processing, forecasting and prediction, with respect to the type of approach used for learning and the type of data used. Subfields of Artificial Intelligence have much in common which makes it difficult for beginners to clearly differentiate among these areas. Different approaches of AI can process similar data to perform similar tasks. For example Deep learning and SVM both could be used for object detection task. Both have pros and cons. In some cases Machine Learning is …

How Computers Understand Human Language?

How Computers Understand Human Language? Natural languages are the languages that we speak and understand, containing large diverse vocabulary. Various words have several different meanings, speakers with different accents and all sorts of interesting word play. But for the most part human can roll right through these challenges. The skillful use of language is a major part what makes us human and for this reason the desire for computers that understand or speak human language has been around since they were first conceived. This led to the creation of natural language processing or NLP.
Natural Language Processing is a disciplinary field combining computer science and linguistics. There is an infinite number of ways to arrange words in a sentence. We can't give computers a dictionary of all possible sentences to help them understand what humans are blabbing on about. So, an early and fundamental NLP problem was deconstructing sentences into small pieces which could be more easily…

Introduction to Data Science: What is Big Data?

What Is Big Data First, we will discuss how big data is evaluated step by step process. Evolution of Data How the data evolved and how the big data came. Nowadays the data have been evaluated from different sources like the evolution of technology, IoT(Internet of Things), Social media like Facebook, Instagram, Twitter, YouTube, many other sources the data has been created day by day. 1. Evolution of  Technology We will see how technology is evolved as we see from the below image at the earlier stages we have the landline phone but now we have smartphones of Android, IoS, and HongMeng Os (Huawei)  that are making our life smarter as well as our phone smarter. Apart from that, we have heavily built a desktop for processing of Mb's data that we were using a floppy you will remember how much data it can be stored after that hard disk has been introduced which can stored data in Tb. Now due to modern technology, we can be stored data in the cloud as well. Similarly, nowadays we noticed …

The Limits of Artificial Intelligence

If you are here, it means that you are familiar with term artificial intelligence. Either you have read about it in school or have seen it in sci-fi movies or somewhere else. Talking about the limitations of AI, let me ask you one simple question first, do you know the definition of AI? You might be thinking to answer me with a yes, yes I know what is artificial intelligence. But what if I tell you that AI is a buzzword and it is almost impossible to properly define. It is this way because the definition of artificial intelligence is moving. People don’t call the things AI that they used to call. For example, a problem that seemed too complex to be solved by human and was solved by AI algorithm is no longer a problem of AI. Playing chess, is one of the examples. It was considered the peek level of artificial intelligence back in previous century. Now it hardly fits the criteria for AI. It is presented to the world as a super power that when given to a computer, it magically starts li…

How To Become A Successful Programmer?

How To Become A Successful Programmer? I have heard many novice programmers saying I want to get better at programming but there is hardly a slight improvement in their skills. I have observed that most of them say they want to get better but that is just a wish. They do not really mean it. They mere wish to improve their skills. They do not work for it. Your wish does not guarantee that you will become a successful programmer. Many other people who have developed an interest in computer programming do not know how to reach to a point where they will be called successful programmers. They either keep wandering in the middle of nowhere or just give up. The same response is for them too as it was for the wishers. Your interest does not guarantee that you will succeed. Programming is a field which requires intensive work to master. Along with improving your technical knowledge of programming, you need to work on your interest. You need to develop a habit of not giving up. You need to…

What is Multithreading? JAVA Multithreading Tutorial

It is almost end of 2017. The computer has evolved throughout its age from a simple, huge machine which was used for just simple numerical calculations to a small and swift electronic device which is affecting almost every aspect of our life. There are a lot of efforts involved in these enhancements in both hardware and software. Powerful hardware has been invented, and robust software techniques have been designed to improve hardware efficiency. One of these methods is multithreading and this is what we are going to talk about.
Multithreading is the ability of a single processing unit to execute multiple programs concurrently, apparently supported by the operating system. Multithreading is achieved either by multithreaded architecture or by software techniques or by both. All processors and OSs today support multi-thread execution.
We are talking about multithreading but what actually a thread is? A thread is a single unit a single processor can execute. The group consists of the sh…

5 Tips for Computer Science Students

You are in college now so I am skipping the basics the go to class do your homework study for tests stay out of the hospital. These are not all important pieces of advice but I am sure you have heard them. Instead, let’s talk computer science. Here are some tips I have specially collected by talking to students who wish they’d heard them when they were students. Listen up.

Seek help when you need it. Your classes are going to get harder, they are going to test your knowledge but that’s why you are there for. Some people find attending office hours or seeking extra help to be embarrassing. But these resources are there for a reason. Taking advantage of the help you are offered will not only help you prepare for future classes and learn the material better but a lot less harmful than bad grades or any other consequences of struggling.Don’t let yourself intimidated by large projects. The best thing to do, sit down a day at the assignment and break it up into smaller tasks. A lot of times…

Supervised Learning vs Unsupervised Learning vs Reinforcement Learning

Supervised Learning vs Unsupervised Learning vs Reinforcement Learning Machine learning models are useful when there is huge amount of data available, there are patterns in data and there is no algorithm other than machine learning to process that data. If any of these three conditions are not satisfied, machine learning models are most likely to under-perform. Machine learning algorithms find patterns in data and try to learn from it as much as it can. Based on the type of data available and the approach used for learning, machine learning algorithms are classified in three broad categories. Supervised learningUnsupervised learningReinforcement learning An abstract definition of above terms would be that in supervised learning, labeled data is fed to ML algorithms while in unsupervised learning, unlabeled data is provided. There is a another learning approach which lies between supervised and unsupervised learning, semi-supervised learning. Semi supervised learning algorithms are giv…

Machine Learning: A Truthy Lie?

For all these years, we all have been misguided by the term machine learning. We have been told that machines learning makes a machine capable of how to think, how to act like a human. Machine learning is the most misused term. It does not really mean what it sounds like. It is a lie, a truthy lie. What is meant by a truthy lie? Each year Merriam-Webster releases a top 10 list of most searched words. In 2003, the top word in the list was democracy. In 2004, the word blog made it to the top. The winning word for the year 2006 was trustiness, "Truth coming from the gut, not books; preferring to believe what you wish to believe, rather than what is known to be true". A word which could be a lie is used so often that it eventually feels like truth. "Bet on the jockey, not the horse" is a truthy lie. Similarly, "machine learning" has been used over time for any kind of activity to train a machine or a computer so it could think or act like a human. The word i…