Edsger W. Dijkstra (1994) in a computer science class.

Introduction

Kshitiz Rimal
Becoming a Computer Scientist
4 min readOct 20, 2015

--

To make things clear, I am not an expert on computer science, I am just a student sharing while I am learning these stuffs. And I also like to clear the confusion between Computer Science and Computer Engineering, They are Not the same thing. Computer engineering deals with hardware and how the hardware the machine is organized and its architecture in low physical level is made in order to run its required software, its like making hardware but to run the software.

To my basic understanding computer science is mainly about computing, and how those computations are performed, they use programming languages as a tool but the science part is purely about these nature of computations and their interpretation by the machine. Computer science has different sub branches which solves different problems, but the founding branch is Theoretical Computer science which deals with algorithms, their optimization, their time and space complexities and stuffs like that, which we will cover when time comes but for now lets say its about algorithms and how those algorithms are converted into programming language form and how those are interpreted by the machine itself.

Algorithms are made up of statements which are part english or any other language and part mathematics or logical statements, they are specific, concise and delivers single meaning expressions. Each expression cannot have double meaning or multi meaning representation. For example following is a sample algorithm

loop if n is greater than 1 display n do n-1
end loop

Above example might not be a perfect one but you can get the idea how it is written. So, here it uses logic for looping through certain statements while n the number is greater than 1 and arithmetic operation like n-1. After the proper algorithms are created, it can be translated into a programming language representation easily.

Lets take python as a model programming language for now. You can take any programming language (like java or c/c++) which you already know if you don’t know python. So, these programming languages are just like English or Nepali or any other natural language but follows strict rule and which makes them less verbose and unambiguous. Like languages they are made up of expressions, follows grammar and their rule. Grammars are like these:

SentenceSubject Verb Object
Subject → Noun
Object → Noun
Verb → Eat
Noun → I
Noun → Bhaat

In Programming Language we represent the expressions which we want the machine to compute in a particular form, Which is Known as BN Form or Backus-Naur Form created by two computer scientists, John Backus and Peter Naur. The purpose here for this form is to represent language in very simple and concise manner. The form is like this

<Non-Terminal> → Replacement

Here <Non-Terminal> is entity that cannot terminate the expressions. For example in above grammar, the left side entities are <Non-Terminals>. They always appear on left side and the Replacement is any terminating entities or set of non terminals as well like the above first grammar rule. But the Terminating entities cannot appear at the left side of expression. Mostly many programming language follows this form in their expression. The main concept here is to derive the expression starting from non-terminals and end the final statement with terminals at the right side. We can elaborate this concept in the form of python expression as well. Consider following arithmetic expression:

Expression → Expression Operator Expression
Expression → Number
Operator → *
Operator → +
Number → 0,1,2…
Expression → (Expression)

The grammar can be elaborated as

(2 + 3)

(2–1) * (2*2)

(( 4 ))

Which are valid python expressions which can be produced from above grammar starting from expression.

So we have covered basic idea about grammars, programming language expressions and one of their form, basic concept behind computer science. In coming days I am planning on publishing more articles related to computer science but we will pickup from this article as a starting article and all the other articles in this publication will be the follow up articles. In coming days I will be covering Computer science basic concepts, programming languages, Theoretical Computer Science, Algorithms, Complexity and Computability, Functional Programming using Haskell, System Programming with Rust and many more.

This article is just a first step towards a long and beautiful journey. If you like this article, don’t forget to recommend it by clicking the heart icon below. You can follow me or this publication for new contents. If you have any suggestions or any kind of feedback, you can write below.

--

--

Kshitiz Rimal
Becoming a Computer Scientist

AI Developer, Google Developers Expert (GDE) on ML, Intel AI Student Ambassador, Co-founder @ AI for Development: ainepal.org, City AI Ambassador: Kathmandu