Handcrafted.codes Handcrafted.codes Real computing action! Physics, numerical programming, data science & more

Physics // Numerical methods in physics have led to new insights into old problems and have long since allowed the consideration of previously unaddressed phenomena. In its current state, computation can be viewed as complementary to the traditional routes of experiment and theory. For many physicists, myself included, computer physics provides an accessible way of doing physics without the need for substantial experimental resources. Literally one only needs a text editor, compiler, and some imagination to be able to start doing physics. Furthermore, computational algorithms provide a way of “discovering” physics in a manner similar to the traditional mode of pure research. Inevitably what follows in this process is the discovery that the same algorithms give the same results. In other words, that physics is phenomenologically unified.

Numerical Programming // Originally written in Fortran, this site (HTML + CSS = modern typesetting) houses a repository of physics programs translated into Java and JavaScript. Modern Fortran contains object‑oriented characteristics, interoperability with the C language, as well as parallel processing capabilities via the Message Passing Interface library, coarrays, or OpenMP.

Data Science // My training as a physicist also provides a natural foundation for the role of data scientist, where the roles of explorer, scientist, and analyst are effectively combined. (Experimental physicists are particularly well suited for this role as they are already trained in how to make sense of real world data, and are typically much stronger in statistics.) As demonstrated here, this translates into an individual that has the curiosity and passion for exploring new problems, data sets, and technologies. Implicit in this act of exploration is the tendency to take a clean, novel approach to an old problem. Moreover, the discipline and knowledge of my scientific background means that I am comfortable with testing my code and algorithms in a rigorous and objective manner. Lastly, my training as a scientist also aligns closely with that of an analyst, where answers are often the by‑product of details. For physicists as well as data scientists, these details are uncovered and comprehended through the enrichment of data. (But watch out for spurious correlations.)

List of Programs ()Related ContentOther Cool Stuff

  1. Sternheimer Density Effect Parameters
  2. Stopping Power of Particle Radiation
  3. Kosterlitz‑Thouless I. Mean Magnetization
  4. A Miniature Solar System
  5. One‑Dimensional Classical Ideal Gas
  6. The Double Pendulum
  7. A Simple Variational Monte Carlo Method
  8. Range‑Energy Calculator
  9. Response to External Forces
  10. Higher‑Dimensional Models
  11. The Simple Pendulum
Lines of code translated to date:
1. kt1 157
2. planet2 68
3. boltzmann 100
4. Doppelt 108
5. fermat 102
6. Dreamweaver 765
7. driven 97
8. discrete 92
9. amp 62
10. dedx 504
11. Sternheimer 175


May 2017
Sternheimer Density Effect Parameters
This program calculates the Sternheimer density effect parameters using the prescription given in The International Journal of Applied Radiation and Isotopes 33(11), 1189 (1982). This utility is a companion to the Range‑Energy Calculator.Best of 2017


December 2016
Stopping Power of Particle Radiation
Provides stopping power and kinetic energy as a function of depth for a specified projectile-target combination.Best of 2016
August 2016
Kosterlitz‑Thouless Transition in the Planar Model I. Mean Magnetization
Utilizes the Monte Carlo method to simulate the planar model on a square lattice using periodic boundary conditions.
January 2016
A Miniature Solar System
Simulates a miniature Solar system of two planets about a fixed Sun-like star.


September 2015
One‑Dimensional Classical Ideal Gas
Investigates some of the equilibrium properties of a one‑dimensional classical ideal gas.
May 2015
The Double Pendulum
Solves the coupled equations of motion of a double pendulum to simulate chaos for large amplitude oscillations.
March 2015
A Simple Variational Monte Carlo Method
Applies a simple variational Monte Carlo method to Fermat's principle of least time in geometrical optics.
January 2015
Range‑Energy Calculator
Provides range, initial kinetic energy, final kinetic energy, or linear energy transfer for a specified projectile‑target combination.Best of 2015


September 2014
Response to External Forces
Solves the equation of motion of a driven damped linear oscillator to illustrate how a harmonic system responds to perturbation.Best of 2014
August 2014
Higher‑Dimensional Models
Obtains a numerical solution to the Lorenz equations via a common fourth‑order Runge‑Kutta method.
July 2014
The Simple Pendulum
Solves the equation for the total energy of a simple pendulum to illustrate conservation of mechanical energy for large oscillations.
back-to-top Got blue milk?
Valid HTML! Valid CSS! Valid RSS!