As a computer scientist, you need to understand the key principles of computer science to enable you to think and act to solve computing problems. It is one thing to get stuck in to a specific problem using a certain technique, tool or programming language but to truly understand how to work efficiently you need to have a good knowledge of key principles. Understanding the principles of computer science will mean that you develop a style of working that gets things done in the right way and consider how systems are maintained and designed. Some of the key principles of computer science that you will need to have a good understanding of are:
- Computational Thinking
- Algorithm Design
- Programming Paradigms
- Specific Programming Language Types
Let’s have a look at what makes up these key principles of computer science and what is considered within each.
Understanding Computational Thinking: Understanding how to think about computing problems is an essential skill required by a computer scientist. You need to think about breaking problems down and also understand the type of problem solving skills that can be best used to meet specific needs. Some examples are decomposition, pattern recognition, abstraction and algorithm design. These look at problems in different ways and come up with solutions in the best way based on understanding the initial problem. Decomposition means break a problem down into manageable steps and sharing the information with stakeholders to show how the problem can be solved. Pattern recognition is used to identify future trends but also so that code segments can be used and modified to cut down on development time. Abstraction involves eliminating what we do not need to think about when solving a problem and then concentrating on what is needed. Algorithm design can be used to pt complex problems into easy to understand plain English or graphical format to share how a problem is solved.
Being able to Develop Algorithms: To look at developing algorithms to solve computational problems in more detail, let’s summarise what methods can be used. Pseudo code can be used to represent how a computer problem is solved in plain structured English language so that both technical and non-technical people can understanding it. You could call it computer programming for dummies in that it keeps things very simple and describes how each step of a solution works. Developing algorithms using pseudocode during the planning stage is good practice as it helps recognise exactly what is required by computer programs. In addition to pseudocode, flowcharts can also be used to demonstrate a computer program or segment of code within a program in an easy to understand graphical format. Flowcharts can be used to demonstrate how data flows through a program and how complex tasks are achieved within the program to non-technical people. These are two of the standard methods and techniques used to develop algorithms and the ability to develop algorithms is essential in computer science so these skills need to be understood and used by all computer scientists.
Programming paradigms: A paradigm is style or structure that defines how to program. Whilst many define high level paradigms as Event Driven, Procedural or Object Oriented; this is a very high level look. Programming languages can be a mixture of all three of these styles, so rather than exclusively define a language under a programming paradigm we can look at the standard conventions used across all languages that help programmers build accurate and efficient code and say that these are paradigms as they help define how certain aspects of programming are managed. Some examples of the types of things that are defined and common to a number of programming languages are:
- How data is handled withing a program: Common methods are used to handle data such as the definition of specific data types. Understanding these data types and how they are available across a number of programming languages makes things easier for developers. Another common feature is how these variable types are assigned values and analysed used comparative operators.
- Arithmetic Operations: A range of mathematical functions are available across all programming languages and normally basic calculations are performed using the same symbols e.g. + is used for addition of numeric data.
- Built In Functions: In addition to arithmetic operations and functions, most programming languages come with built in functions that are common to all languages. String handling functions can be used to extract data from or append a string. They can also analyse the string to find out the characteristics of what is contained within the string. An string data can be converted to other data types if required. General functions are available to read inputs such as the mouse and keyboard and also to output data to screen and external devices such as printers if needed.
- Data Validation: Data that is handled by computer programs comes in many different formats and it needs to be accurate and checked throughout program operation. Common functions are available such as validation check techniques to check for data type, range of data and the status of data values being true or false when compared with a condition. When data is manipulated you should also use post check functions to make sure that it is presented as required.
- Control Structures: Many similar control structures follow a very similar format across programming languages. Loops, conditional branches and the ability to define and call your own functions are common control functions. Understanding how these work in one programming language normally means that it is quite easy to provide a similar solution in another language as common key word identifiers are used. An example of this would be for a conditional branch, key identifiers such as IF, THEN, ELSE are common across most languages.
- Data Structures: Another programming paradigm defines how more complex data types are defined and represented in programming languages. List, Records, Sets and single and multi-dimensional arrays are common to many programming languages.
- Standard Algorithms: Sorting algorithms such as bubble sort and quick sort are used to manage data. Searching algorithms are also available to process data within a programme. Other common algorithms can count specific occurrences of data or help validate input. LIFO and FIFO are common functions used to handle data queues and stacks and having an understanding of them being available and how they work will help programmers optimise data management if they are required.
Types of programming and mark-up languages: Typically programming languages can be defined as procedural, object oriented or event driven. In addition to this with the emergence of the www over the last 25 years, languages have evolved to focus specifically on coding for the web. Let’s have a look at some programming langauges:
- Procedural Programming: Very much based on a sequential flow and program control and uses common structures such as statements, block and sub-routines. Procedural programming also uses common control structures for selection and iteration.
- Object-oriented Programming: Based on structure programming into objects and classifying the characteristics of how certain elements within a program work. The key features are encapsulation, polymorphism and inheritance.
- Event-driven Programming: Everything that happens within the programming is driven by events sucH as inputs our outputs. A simple example of an event is a mouse click. Event-driven programs use event handlers and loops to outline what happens for each specific event that can occur.
- Programming for the web: The most common mark-up language used for the web is HTML. The current version in 2018 is HTML5 and this has evolved from HTML 1.0. HTML is complemented by CSS and scripting languages such as Javascript to add styling and functionality to websites. Mark-up gets it’s meaning from the way that data is structured and can be adapted in different ways using styling. Another variant of a mark-up language is XML that can help manage data to be published in many formats.
In conclusion, we have explored some of the key principle of computer science. You can see how having an understanding of problem solving skills, algorithm design and the rules outlined by programming paradigms helps work towards actually being able to develop and implement code in specific programming languages. Everything builds together to show how you can think and act as a computer scientist and excel using the key principles of computer science.