Recreational Computing
Programming for Fun
If you'd like to do some recreational computing, but don't want to spend a lot of time learning a big language that you will forget if you don't use it every day, try HTML and JavaScript. These two languages are very easy to learn, and you can use them together to produce some pretty cool applications. Additionally, both languages are free, and programs are written in any text editor. You don't need to buy any books because there are many free tutorials and reference libraries online. Using only these free resources, I learned enough to create this website and write the JavaScript applications below. You can see the code that produced them by viewing the page source.
Some JavaScript Examples
These are calculators I use for running, cycling, and in my job developing new medical products.
My Programming Background
While in college (about 1977) I learned how to program in FORTRAN. Each instruction had to be entered on a separate punch card, so the final program ended up being a stack that had to be fed into a noisy card reader. If someone had walked up to me while I was waiting in line at the card reader with my "deck" of cards and told me that I would soon have my own tabletop computer, I would not have believed it. Yet, by 1980 I did have my own computer, a Timex Sinclair ZX80. I taught myself BASIC and wrote some simple utilities and games. As I upgraded to a Commodore Vic 20, a Commodore 64, then a PC which I built myself, I gave my old computers to my little brother, who eventually majored in Computer Science when he went to college.
With the help of an electronics engineer, I made an interface to my shortwave radio and wrote a program in BASIC that translated Morse Code from the radio into text on the screen. Soon after that I taught myself C (Borland's Turbo C) and started writing physical simulations (e.g.,gas pressure regulator), astronomical simulations (e.g.,comet orbits and planets orbiting double stars), and explored graphics and fractals. I wanted to write Windows applications, so I tried to move to Visual C++ a couple of times, but it is too complex to use only occasionally. So I taught myself Java, which is quite a bit easier.
In 2006 I took "Advanced Topics in Java" at Saddleback College, and for one assignment we had to create a simple Craps game. My algorithm to draw the dots on a die used only 3 statements. The instructor's version took 37 statements! He was impressed enough to post my code on the class website. If you do not see a pair of dice, download the latest Java plug-in, or just scroll down to look at lines 70, 71 and 72.
Below are a few Applets and C source files. All programs and code on this page were written by me.
A few Java Applets
A little C Source Code
Solar Orbit
Mandelbrot Set Generator
Planet and Double Star
Fractal Trees
Morse Code Reader
Solar System
Gas Pressure Regulator
Click here to return to Tom Fangrow's Home Page