Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What computer science topic am I trying to describe?

I've been programming for around... 6->8 years, and I've begun to realize that I don't really know what really happens at the low-ish level when I do something like

int i = j%348

The thing is, I know what j%348 does, it divides j by 348 and finds the remainder. What I don't know is HOW the computer does this.

Similarly, I know that

try
{
 blah();
}catch(Exception e){
 blah2();
}

will invoke blah and if blah throws, it will invoke blah2... however, I have no idea how the computer does this instead of err... crashing or ending execution.

And I figure that in order for me to get "better" at programming, I should probably know what my code is really doing. [This would probably also help me optimize and... err... not do stupid things]

I figure that what I'm asking for is probably something huge taught in universities or something, but to be honest, if I could learn a little, I would be happy.

The point of the question is:
What topic/computer-science-course am I asking about? Because in all honesty, I don't know.

Since I don't know what the topic is called, I'm unable to actually find a book or online resource to learn about the topic, so I'm sort of stuck. I'd be eternally thankful if someone helped me =/

like image 545
Warty Avatar asked Mar 01 '10 08:03

Warty


People also ask

What is the topic of computer science?

Principal areas of study within Computer Science include artificial intelligence, computer systems and networks, security, database systems, human computer interaction, vision and graphics, numerical analysis, programming languages, software engineering, bioinformatics and theory of computing.

What are the 4 areas of computer science?

CSAB, formerly called Computing Sciences Accreditation Board—which is made up of representatives of the Association for Computing Machinery (ACM), and the IEEE Computer Society (IEEE CS)—identifies four areas that it considers crucial to the discipline of computer science: theory of computation, algorithms and data ...

How do you explain computer science?

Computer science is the study of computers and computing as well as their theoretical and practical applications. Computer science applies the principles of mathematics, engineering, and logic to a plethora of functions, including algorithm formulation, software and hardware development, and artificial intelligence.


1 Answers

I would say the first part is computer architecture, while the second part is programming language.

Some good books on computer architecture, if you are interested in understanding a bit more on how the computer executes a program are:

  • The Elements of Computing Systems: Building a Modern Computer from First Principles, By Noam Nisan and Shimon Schocken
  • Structured Computer Organization, by Andrew Tanenbaum

I'm not sure what to recommend for understanding programming language constructs such as catching exceptions. Probably a good compilers book.

Especially with your second example, different programming languages might be implemented very differently. For example, a language running on a virtual machine such as Java, would have the virtual machine to protect it and throw certain types of exceptions, while in C++ this would be handled differently.

like image 81
Avi Avatar answered Oct 01 '22 18:10

Avi