2
$\begingroup$

As an amateur Bash/JavaScript scripter I was wondering if coding in general ("writing source code") and abstractless coding in particular (binary) is a concept of Computer Science or just an engineering implementation to ease doing the science and to automate processes.

Is coding a concept in this theoretical-logical field of study?

$\endgroup$
  • $\begingroup$ "an engineering implementation to ease doing the science" -- real programming languages and computers are usually all but intractable with scientific methods. That's why we have mathematially simpler models (which are harder to program with). $\endgroup$ – Raphael Nov 4 at 19:54
2
$\begingroup$

I read a quote by Bjarne Stroustrup which said that computer science was the study of computers in the same way astronomy is the study of telescopes.

Computer science does indeed study coding in the abstract, particularly among the study of algorithms and data structures. Both of these fields are highly mathematical in nature, and seek to understand the idea of the abstract data type more fully. Of course, practical lessons can be learned and applied to various computers languages, systems, and applications, particularly answering questions like:

  1. Can it be done?
  2. What's the way to do it fastest with the least amount of memory?
  3. How do I compare two different ways to code the same solution to a problem?

When studying algorithms, for instance, Big-O Notation is presented as a way at looking at the computational complexity of an algorithm? Will it finish in linear time? What about polynomial time? In fact, in computational comlexity theory a tremendously important question about what can be solved abstractly with coding is the question of NP-completeness.

When studying coding abstractly, often pseudocode is used to represent instructions as opposed to an implemented language. For example:

Procedure DoIt()
     Loop from 1 to 100
        If num is divisible by 3
            Print that its divisible by 3
        If num is divisible by 5
            Print that its divisible by 5
End

Other ways of studying algorithms and data structures include diagrams and graphs, often using tree data structures.

$\endgroup$
2
$\begingroup$

There has always been a very close connection between logic/mathematics and programming. Apart from the theory of data structures and algorithms, which provide a theoretical understanding of how to write good code, an important contribution of theory to everday programming is the invention of programming languages, basic computer architecture, and various specific features of programming langauges.

In fact, mathematicians and logicians essentially invented many things that you probably think were invented by engineers:

  1. The idea of a general-purpose computer, of source code, and a general programming language were all invented by a mathematician, Alan Turing.

  2. Modern CPU-centered computer architecture was invented by a mathematician John von Neumann, in cooperation with engineers Arthur Burks and Herman Goldstine.

  3. Functional programming languages such as Haskell, OCaml, Scheme, Swift and (to some extent) Javascript, are extension of $\lambda$-calculus, which was invented by a logician Alonzo Church.

  4. On of the first programming languages is FORTRAN, which stands for "(mathematical) formula translator".

The connections between mathematics, logic and programming language remain strong, and are getting even stronger. Many features of modern programming langauge were developed by theoreticians: recursion, parametric polymorphism, algebraic datatypes, continuations, etc.

These phenomena are not isolated to programing. All basic sciences (physics, chemistry, biology, ...) have had a profound impact on everyday lives of humans, who have the luxury of taking the modern life for granted. Among these are highly skilled technical experts who have first-hand experience with engineering, but may not have had the chance to see the profound impact that the so-called "theory" has had on their fields of expertise.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.