That awkward moment when the code written in MATLAB is easier to read and understand than tons of explanations:
Salakhudinov’s code of RBM

This code, in my humble opinion, is a good argument when you need to explain to someone that they really need to learn at least one language or tool with vectorization, no matter whether it is R, MATLAB, NumPy, or Theano in Python.

I also want to note that vectorization is not a silver bullet.
For example, you can see Friedman’s highly optimized Fortran
code of GLM
(Generalized Linear Models).

Disclaimer: You’ll be unable to unsee this.