What Is the Best Book for Aspiring Physicists to Learn Computer Science?

In summary: There are a few technologies that allow this: Object Linking and Embedding (OLE), Component Object Model (COM), and .NET. .NET is the most recent and most standardized.
  • #1
bjnartowt
284
3
Hi everyone, I was wondering: is there a book out there that can show an aspiring-physicist how to become proficient with a computer? Namely: learning about file-types, how to get programs to "talk" to one another, using data-analysis "things" (?) like ROOT (the one that's C++ based), etc.?

I use the Windows operating-system, but I'm thinking of relying solely on Linux (when I get around to surmounting the learning-curve).
 
Physics news on Phys.org
  • #2
bjnartowt said:
Hi everyone, I was wondering: is there a book out there that can show an aspiring-physicist how to become proficient with a computer? Namely: learning about file-types, how to get programs to "talk" to one another, using data-analysis "things" (?) like ROOT (the one that's C++ based), etc.?

I use the Windows operating-system, but I'm thinking of relying solely on Linux (when I get around to surmounting the learning-curve).

I'm not sure about linux but I'll share with you what I know about windows.

As far as getting programs to "talk" to each other there are a few technologies that allow this:

1) Object Linking and Embedding

This allows generic objects to be embedded from one software program to another program. Its like when you take a spreadsheet and embed it in a word document. Theres a whole standard on this and it will introduce you to a general framework of getting objects from one program and using them in another.

2) Component Object Model

This came after OLE and it can be fairly complicated but through its use of dynamic
interfaces and object definitions it allows software to be used like an object where more or less the software becomes like a "service" where its functionality can be access through the standard.

The newer platform which is .NET has standardized libraries and interfaces that allow fairly high level procedures to be written more quickly that can allow any program written in the .NET platform to respond and act to messages and events and due to the fact that software can be written to be compiled "Just In Time" or JIT you can get the same sort of advantages that Java offers by being compiled on the fly if need be.

There are actually quite a few ways of getting software to communicate to each other.

If you are going to learn about computer science you should take a course in Operating Systems. In this you should learn about processes and threads and its here where you will learn about how you can get two or more processes to share data. One way is using a pipe, another way is using a shared file but most boil down to using some location in memory which is process independent. The way processes are setup in operating systems is that they have their own address space that is reserved for them. Processes typically can't access other processes memory. However threads can typically access other threads memory in the same process.

If you're going to commit to learning C++ I would learn as much as you can about everything that's involved with programming including Operating Systems, Data Structures, Procedural Programming, Version control, as well as any applied programming that will help you get going from say the theory of signal processing or say solving an ODE or PDE to an implementation of Runge-Kutta solution to an ODE. If you're a physicist I will see you typically working on something more along those lines like say calculating FFT's than doing another Facebook clone. Typically many applied math courses have some form of programming but its typically not done in C++ usually a pre-existing package and framework is used that allows one to get results a lot quicker than having to write your own library up.

Also getting programs to "talk" to one another involves a great deal of attention to modern design techniques. Windows for example has a heap of examples where programs are talking to each other all the time. Even if you don't want to program in Windows I strongly recommend that you get a book on standards that have been introduced that talk about software being formed as a "generic service".

Theres just so much to learn but hopefully you can explore the surface and dig deeper when it becomes necessary. Good luck!
 
  • #3
chiro has some good advice but I'll add a few points:

-YES definitely get your programming experience with Linux. It's easier to learn more different types of programming on Linux, plus it's cheaper (i.e. free), plus you will feel right at home when you're given access to a shared computer cluster which will almost certainly be running Linux or some UNIX-like operating system. And besides, the main tool that scientists use for writing papers, LaTeX, is developed on Linux and is far easier to set up and to use on Linux than on Windows.

-As far as getting programs to talk to one another, all the methods chiro mentioned are Windows-only. In Linux & friends, the primary method of interprocess communication (IPC) is the pipe, which simply takes whatever text is printed by one program and feeds it into another. (It can also handle binary data as well as text) The UNIX philosophy, "do one thing and do it well," basically means that each individual program should be focused on one task, and when you want to do something complicated, you do it by chaining together whatever small programs you need using pipes. If this seems rather clunky... just trust me, it's not. It's simple and powerful, it just takes some getting used to.

-If you use pipes for IPC, you don't really need to understand the internals of the operating system. If you're using other methods, like shared memory, then knowing how an OS works would be somewhat helpful. I generally recommend that anyone who is going to be doing frequent programming take a class in operating systems, because even if you're not going to be doing the kind of low-level programming that actually goes into an operating system, it's still helpful to see how things work "under the hood." In particular, it helps you make your programs more efficient, and when you're writing scientific programs, efficiency is often a major concern because the computations involved can be rather lengthy. Of course, before you take an OS course, you'll need to have a solid grounding in data structures and basic sorting and searching algorithms, and at least some exposure to assembly language and C.

-Things you're likely to run into when doing scientific programming that they don't usually teach you in a computer science class are numerical algorithms, like numerical integration and differentiation. For these kinds of things, I'd recommend having a look at the book Numerical Recipes (there's a website for it which you can search for). It's a large book with a lot of information, and it's intended as a reference, so don't expect to just read through it in a few months; better to get a copy to keep on your bookshelf to use as necessary. You can skim through it in your free time to familiarize yourself with the contents, and when you see an algorithm that interests you, try writing a program to give yourself practice with it.

-Regarding programming languages: don't worry about it too much, because generally once you learn the basic concepts of programming (including, but not limited to, the basic data structures and sorting/searching algorithms I mentioned earlier) in anyone language, it's going to be fairly easy to pick up another language. The same concepts apply. The languages used most often these days in scientific computing are Python, C++, and Fortran (Fortran is perhaps on its way out, albeit slowly) so you might want to start with those; conveniently, Python is widely regarded as a good language to first learn programming with. Once you are comfortable with object-oriented programming in Python, it won't be a huge leap to C++.

-Addendum to the previous point: there is also shell scripting, learning to use the Linux command prompt effectively. Now, using the command prompt at a basic level is pretty simple: you type the name of a program, and the computer runs it. But there are lots of fancier things you can do with the command prompt, and it's worth your while to learn at least some of the basics (like input/output redirection and pipes) if you're going to be using Linux.
 

1. What is the relationship between computer science and physics?

The relationship between computer science and physics is a complex and evolving one. Computer science involves the study of algorithms, data structures, and computation, while physics is concerned with understanding the fundamental laws and principles that govern the physical world. In recent years, there has been an increasing overlap between the two fields, as computers and advanced technology are being used to aid in the study and analysis of complex physical phenomena.

2. How can computer science be applied in the field of physics?

Computer science has a wide range of applications in the field of physics. One of the most common uses is in simulation and modeling, where computers are used to simulate complex physical systems and predict their behavior. Computers are also used in data analysis and visualization, allowing physicists to make sense of large amounts of data and identify patterns and trends. Additionally, computer science is used in the development of advanced instrumentation and equipment for experiments in physics.

3. What skills are necessary for a career in computer science for physics?

To pursue a career in computer science for physics, one must have a strong foundation in both computer science and physics. This includes a thorough understanding of programming languages, data structures, and algorithms, as well as a solid grasp of the principles of physics and their mathematical applications. Additionally, strong problem-solving and analytical skills, as well as the ability to work with complex data and systems, are important for success in this field.

4. Is computer science for physics a growing field?

Yes, computer science for physics is a rapidly growing field. With the increasing use of advanced technology and computing in all areas of physics, the demand for professionals with knowledge and skills in both computer science and physics is on the rise. This trend is expected to continue as technology continues to play a crucial role in advancing our understanding of the physical world.

5. What are some current research topics in computer science for physics?

Some current research topics in computer science for physics include quantum computing, machine learning, and data-driven simulations. Other areas of interest include the development of new algorithms and computational methods for solving complex physics problems, as well as the application of computer science in emerging fields such as biophysics and astrophysics.

Similar threads

Replies
2
Views
947
  • STEM Academic Advising
Replies
6
Views
1K
  • STEM Academic Advising
Replies
10
Views
1K
Replies
4
Views
1K
  • STEM Academic Advising
Replies
15
Views
1K
  • STEM Academic Advising
Replies
1
Views
1K
Replies
1
Views
806
  • New Member Introductions
Replies
1
Views
64
  • STEM Academic Advising
Replies
2
Views
2K
  • STEM Academic Advising
Replies
9
Views
1K
Back
Top