31 December 2009

"Programming: Principles and Practice Using C++"

"Programming is learned by writing programs."
-from the Preface page xxv of Stroustrup's new book on programming using C++.

Programming: Principles and Practices Using C++
by Bjarne Strousrup.

So far the first impression of the book, built from browsing and skimming, is that one could learn the essentials of programming and software construction while using the C++ languages. The book is based on a first year course that Stroustrup taught at Texas A&M University. It appears a lot of work and thought has gone into the course and book.

This is not a typical text book as Stroustrup says, "No. This is not a traditional Computer Science 101 course. It is a book about how to construct working software. ...... It is about programming (or more generally about how to develop software), and as such it goes into more detail about fewer topics than many traditional courses."

I look forward to studying several of the book topics that I have never really used or fully looked at while developing software. As a text book about programming then this may be an excellent book about programming and learning C++ at the same time. We will see how it goes as I work through the book.


14 November 2009

Python For Scientists and Engineers: Recent Class

Steve and I took a three day class that ended up being a survey of what is available for scientists and engineers using Python. The instructor did point out a good number sites to look at for scientific software bundles in Python.

One the most interesting sites pointed to was Python(x,y) which has bundled a number of tools (mostly python) into one package that was right up our alley on the MCATK project we are working. Python(x,y) is free and all the packages bundled under it are free-ware.

Python(x,y) has downloads for two platforms so far. Windows and Ubuntu. I have downloaded the Windows version (full setup) onto two different machines and it has installed perfectly and easily.

Python(x,y) provides a small window with menus and buttons that serve up the various packages it offers. Some of the packages Eclipse, Qt, MayaVi, SciTE, IDLE, gnuplot, Python, and IPython. There are Python modules for numpy, scipy, numexpr, sympy, matplotlib, pylab, and VTK to name a few. There is easy access to documentation for all of these packages and more.

You can easily launch Eclipse from the Python(x,y) window and turn around and launch the IPython command line window too. Also in the bundle is the Spyder the interactive software development environment.

For us one nice thing is that Eclipse already has plug-ins for CDT(C++), Python, and PyDev (unit tester). This way since we already do development with Eclipse and C++ then we can now easily do any Python work within the same IDE with unit testing. Unfortunately it is only available for Windows and Ubuntu at this time.

Also downloaded is the Photran plugin for Fortran development under Eclipse. Not that we need that.

Another site pointed out to us was EnThought which has some prebundled Python tools. The bundles are not free but all the packages under them are free. So you could download them yourself if you did not want to pay. The site is a great resource for scientific computing.

All in all it seems that Python would be fine choice for many scientific computation needs. Less so for the HPC we are doing at LANL but it certainly come in handy as another tool in our toolbox. One suggested use of Python and all the available tools was as a replacement for MatLab since all the Python tools are free. Definitely a possibility especially for students.

Recently, Neopythonic (Guido van Rossum) has an interesting post about Python in the Scientific World. Check it out.

18 October 2009

Wolfram Demonstrations Project

Mathematica is a very useful and powerful tool for learning, teaching, and doing simulations. Recently, I ran across a Project page which has demonstration topics in almost every field. Very cool stuff. The demos themselves can be used as templates to create your own demonstrations.

Wigner Function of Two-Dimensional Isotropic Harmonic Oscillator

"Wigner Function of Two-Dimensional Isotropic Harmonic Oscillator" from the Wolfram Demonstrations Project


There is some really cool stuff ... check it out.

Wolfram Demonstrations Project

03 October 2009

Favorite Scientific Biography: Rabi

Back in around 1988, when I started graduate school, I decided to subscribe to a weekly science news magazine which I have now forgotten its name. Inside each issue was an advertisement to join a science book club that I could not resist. Upon joining this book club you get a complimentary book.

One day in the mail I received a biography about Isidor Rabi called Rabi: Scientist and Citizen by John Rigden as my complimentary book. I had no idea who Rabi was and was not really interested in the book. So it sat on my shelf for several years then one day I decided to read the book.

It has ever since been my favorite biography about a scientist and has not been displaced after all these years.

Some highlights of I.I. Rabi incredible life and influential work:
There was so much more to Rabi than I have listed here. I highly recommend this biography that is hard to put down once you get started.


Rabi, Scientist and Citizen (Google Books)