Loughborough PhD Social & Support Network

#BLOG – How To Start Programming

By Yang Zhou

Programming is the procedure where a computer is used to solve problems with a piece of code written by a specific programming language. Since computers are widely in service, programming is becoming an important technique for most of occupations. As PhD students in academia, it influences almost every discipline. In mathematics, knowing programming helps speeding up the verification procedure of algorithms; In design, programming can improve the creation efficiency and product presentation; In mechanical engineering, error rate can be reduced by testing the model on a computer before applying it to real life experiments. Many tutorials are available online, but most of them focus on the technical details which are not very beginner friendly. Therefore, this article will cover a general introduction of starting programming instead of technical tutorials.

Choose a language

Learning to program is an aim-oriented process, so choosing a programming language that can ultimately serve your goal is the first step. There are many programming languages such as Java, Python, C and C++.  Although current programming languages are developed to fit into as many applications as possible, experience has proved that performance and coding complexity vary from different choice of languages. Figure 1 depicts the data collected in 2018, showing the popularity of programming languages and their corresponding uses. For example, Python is one of the widely used programming languages in the machine learning (ML) that relates to artificial intelligence (AI); PHP and JavaScript are popular for website design; C and C++ are used for gaming and low-level embedded system designs. The active developer is also an important factor as it represents how many resources you can use and how large the community from which you can get help when you have coding problems is. Therefore, decision on programming language choice can be made according to your aims and the active resources.

Figure 1: Programming languages and their popular uses (source: slashdata)

Follow the tutorials

Once the programming language is decided, the second step is to practice based on a structured tutorial. Many books and online tutorials make a promise of success in a short period of time like 21 days. However, my own experience is don’t trust them! Learning to program is a practical procedure that requires practice in front of a computer instead of reading handouts full of programming language syntax. The only way to understand those syntax is coding. Programming language is like a spoken language, but the difference is that the listener is the computer, an emotion-less object. It cannot understand the sentence with wrong syntax . Therefore, remembering the correct syntax of the programming language is the only way to talk to the computer. There isn’t any shortcut at this stage, but practice makes perfect!

However, how to choose proper tutorials? From my own experiences, the tutorials need to cover two aspects:

  • Language syntax. These tutorials help with learning the language and practice the syntax. The best way to remember the syntax is to do the coding. 
  • Programming theory. In these tutorials, some fundamental knowledge is introduced like the concepts of computation; how computer process a piece of code; data structure and algorithms; testing and debugging. These theories are language independent, which means you can implement the example code in any programming languages. It is essential to have a big picture of programming so that you have a better understanding of it. Basically, programming language is the tool to implement the idea, but the programming theory is the structure and high-level design. Programming is not only the code itself but also the links between computer science and computer applications. Therefore, it is essential to gain a comprehensive understanding of programming.

Hands-on projects

After going through the first two steps, you have gained experience from plenty of coding exercises and learnt the background knowledge of programming. It’s time to start working on some practical applications such as a simple website, a simple game demo etc. There are many resources available on GitHub which is a big community where programmers share the code and experience. As in the beginner stage, you can try some simple demos to obtain some positive feedback, then slowly increase the difficulty. Meanwhile, two questions need to be considered when comparing your code with other programmers’ published code:

Why do I/they designed the logic like this?

Is there another efficient way to do that? 

Generally, programming is a procedure of solution design that shapes minds and changes the ways of thinking. Good programmers always spend more time on defining the logic and structuring the problems. Learning how to program is to learn how to break down a complex problem into logical understandable pieces. Then a computer program is designed to work on the logical pieces and produce the solution. Although the programming language provides a way to make computer work for you, it cannot solve any problems without properly designed logical algorithms. They are the key factors of programming. Therefore, programming is a training on algorithm designed and logically thinking.

Overall, programming skills cannot be achieved within a short period of time. Instead, it is a long-term process and requires some practice. Learning programming can be difficult as the computer is very strict to logical errors. A small mistake can result in a big disaster on the outputs. Steve Jobs stated in 1995:

Everybody should learn to program a computer, because it teaches you how to think

Steve Jobs

Therefore, the value of learning programming is shaping a logical mind. If you succeed in completing all of the steps in this article, then congratulations! You now are a mature programmer and able to design your own idea on the computer, but always be prepared for challenges.

Some tutorials recommendations:

Codecademy (https://www.codecademy.com/)

MIT 6.00.1x (https://www.edx.org/course/introduction-to-computer-science-and-programming-7 )

Books recommendations

How to design Programs, second edition, by Matthias Felleisen, Robert Bruce Findler, Shriram Krishnamurthi, Matthew Flatt

Introduction to Algorithms, by Thomas H. Cormen, Charles E. Leiserson, Ronald Rivest, Clifford Stein


Yang Zhou
Doctoral researcher
Computer Science Department

Next Post

Previous Post

© 2020 Loughborough PhD Social & Support Network

Theme by Anders Norén