Physics 20 Reading List #3
This week we have readings about the practicalities of working with emacs and with three graphing applications (xmgrace, gnuplot, and Mathematica; pick one), and about working with C++.
1. Emacs
The best emacs tutorial comes with the program itself (just type 'CTRL-h' and then 't'). But see also the emacs wiki, and this tutorial. We have also a good emacs book in the physlab library, Learning GNU Emacs, by D. Cameron, B. Rosenblatt, E. S. Raymond (O'Reilly, Sebastopol, CA, 1996).
2. Graphing
This week's assignment will introduce you to some graphing tools. The first tool, xmgrace has a useful and intuitive menu-driven interface. The second, gnuplot, has a command-line interface and is somewhat easier to automate the generation of a set of similar graphs. The third tool is our old friend Mathematica, which has a full range of graphing capabilities as well as access to a huge set of functions. See this link for some information on all these tools and some hints on how to use them.
2a. Graphing with xmgrace
This is the tool I use to create 2D graphs in my research. It is very powerful and has easy-to-use menus that can produce high-quality graphs with little effort. Its documentation is somewhat incomplete, but its possible to figure out much just by playing around with the menus. See the tutorial and the user's guide at the Grace homepage, and also see this link for some hints.
2b. Graphing with gnuplot
Don't waste time with the gnuplot manual, whose logic is counterintuitive at the best. See instead this tutorial from IBM; for tricks (which will be become necessary almost immediately; such is the nature of the tool), see this (Not so) FAQ.
2c. Graphing with Mathematica
The chief tool to plot data with Mathematica is ListPlot[]; the entire section 1.9 of the manual is also relevant. Mathematica can be a very powerful environment for graphics programming, where you write code to map your data structures directly into graphics primitives. For further information, look at section 2.10 of the manual.
4. C++ help.
For this week's (and future) assignments, you should use C++. A C++ tutorial can be found here. Bjarne Stroustroup, the creator of C++, has a C++ FAQ that you may find helpful. An extremely useful book on C++ style and techniques is Effective C++ by Scott Meyers.
A few tips on C++ for starters:
1. Try to avoid pointers whenever possible. Most of the time you can use C++ references instead.
2. Use const as often as possible to tell the compiler that certain variables are not supposed to change. It may seem silly to type more characters, but it is so much nicer to have the compiler tell you "you are trying to change a const variable" than it is to spend 3 hours trying to figure out why your program is behaving so strangely.
I will also be posting more C++ hints in future readings and in the assignments.
1. Emacs
The best emacs tutorial comes with the program itself (just type 'CTRL-h' and then 't'). But see also the emacs wiki, and this tutorial. We have also a good emacs book in the physlab library, Learning GNU Emacs, by D. Cameron, B. Rosenblatt, E. S. Raymond (O'Reilly, Sebastopol, CA, 1996).
2. Graphing
This week's assignment will introduce you to some graphing tools. The first tool, xmgrace has a useful and intuitive menu-driven interface. The second, gnuplot, has a command-line interface and is somewhat easier to automate the generation of a set of similar graphs. The third tool is our old friend Mathematica, which has a full range of graphing capabilities as well as access to a huge set of functions. See this link for some information on all these tools and some hints on how to use them.
2a. Graphing with xmgrace
This is the tool I use to create 2D graphs in my research. It is very powerful and has easy-to-use menus that can produce high-quality graphs with little effort. Its documentation is somewhat incomplete, but its possible to figure out much just by playing around with the menus. See the tutorial and the user's guide at the Grace homepage, and also see this link for some hints.
2b. Graphing with gnuplot
Don't waste time with the gnuplot manual, whose logic is counterintuitive at the best. See instead this tutorial from IBM; for tricks (which will be become necessary almost immediately; such is the nature of the tool), see this (Not so) FAQ.
2c. Graphing with Mathematica
The chief tool to plot data with Mathematica is ListPlot[]; the entire section 1.9 of the manual is also relevant. Mathematica can be a very powerful environment for graphics programming, where you write code to map your data structures directly into graphics primitives. For further information, look at section 2.10 of the manual.
4. C++ help.
For this week's (and future) assignments, you should use C++. A C++ tutorial can be found here. Bjarne Stroustroup, the creator of C++, has a C++ FAQ that you may find helpful. An extremely useful book on C++ style and techniques is Effective C++ by Scott Meyers.
A few tips on C++ for starters:
1. Try to avoid pointers whenever possible. Most of the time you can use C++ references instead.
2. Use const as often as possible to tell the compiler that certain variables are not supposed to change. It may seem silly to type more characters, but it is so much nicer to have the compiler tell you "you are trying to change a const variable" than it is to spend 3 hours trying to figure out why your program is behaving so strangely.
I will also be posting more C++ hints in future readings and in the assignments.

0 Comments:
Post a Comment
<< Home