## Wednesday, June 22, 2011

I sense a common thread through the following "three" video links. Do you?

1. RSAAnimate: Series of videos (including Ted Robinson's "education" video) using free form comics to explain important ideas.

2. ChromeBook: Or essentially any other "Google" video.

3. Subversion: Poor man's version, yet very effective! I wish I could do stuff like that :)

## Saturday, June 18, 2011

### Linux: Forcing cp to overwrite

As a precaution, I have the following three lines in my .bashrc file.

# SAFETY ALIASES

alias rm="rm -i"
alias mv="mv -i"
alias cp="cp -i"

When I try to move or copy something onto a file that already exists it gives me a warning prompt. So far, so good.

Sometimes, I intentionally want to overwrite a bunch of files. With mv, I just say something to the effect of

mv -f dir1/*.dat .

to move all the *.dat files from dir1 into the current working directory. Unfortunately cp -f dir1/*.dat . does not work. A trick is to use the command "yes".

So yes | cp -f dir1/*.dat . seems to fix the problem.

## Thursday, June 16, 2011

### Contour Length of a Gaussian Bead-Spring Chain

Consider a Gaussian bead-spring chain with N springs of mean-squared length b*b. The distribution of the end-to-end vector is the standard Gaussian distribution:

With well known properties:

and,

However, note that,

which means that average spring length (N=1) is smaller b. Therefore the average contour length is not Nb.

## Friday, June 10, 2011

1. In defense of inefficient code: Mike Croucher makes a case for working-but-not-particularly-efficient code written by practitioners in high-level languages (Matlab, Mathematica, python). As he puts it:
It comes down to this. CPU time is cheap. Very cheap. Human time, particularly specialised human time, is expensive.
and also:
In my opinion, high level programming languages such as Mathematica, MATLAB and Python have democratised scientific programming. Now, almost anyone who can think logically can turn their scientific ideas into working code. I’ve seen people who have had no formal programming training at all whip up models, get results and move on with their research. Let’s be clear here – It’s results that matter not how you coded them.
I often use these high-level languages to rapidly prototype new ideas. If and when required, it can always be translated into C++ or Fortran. Also from a practical perspective inefficient code that runs 10 times slower than highly optimized code is acceptable, if it still takes only 10 seconds to run.

2. Geeky jokes on Tanya Khovanova's Blog:

I like this one:
I just learned that 4,416,237 people got married in the US in 2010. Not to nitpick, but shouldn’t it be an even number?
Obviously, you can understand the audience she caters to from this comment.

## Monday, June 6, 2011

### Mathematica 8 on sale at Amazon

In preparation for a course I am teaching over Fall, I have been learning/following Mathematica quite closely. I found out last week that Amazon has a sale on "Mathematica 8 Home Edition" for $239. I've never used Mathematica extensively in the past, for three reasons: • the price sucks ($1000+ bucks, if I try to buy it directly from Wolfram).
• I do not really need it for my research,
• my department has a site license for teaching, if I need to use it.
But it is an amazing piece of software. I always suspected that it was. Now that I am learning how to use it better, I am finding that it is even more amazing than I thought it was.

Under different circumstances (if none of the above three reasons were valid, for example), I would probably buy it.

## Wednesday, June 1, 2011

### Why numerical differentiation may be trickier than you think?

Here is a link to a fascinating presentation by Harvey Stein ("Risky Measures of Risk: Error Analysis of Numerical Differentiation").

He makes a very "visual" case for why one needs to think carefully before using large (convexity error) or small step sizes (cancellation error).