The Home Page of

James Dow Allen

Computer Programmer

I interrupt this home page with a special message from its webmaster. Credible opinions and lawsuits make damaging claims about voting irregularities in an important U.S. election. Why aren't such matters better reported on the news?

Both my vocation and avocation are computer programming.

I also dabble in recreational mathematics.

- Here are the RPS-like games when N=7.
- Here is a fallacious proof of the Four-Color Map Theorem.
- Here is a boring write-up on the Golden Ratio Scheduling Policy.
- Practice your metric prefixes! A table of natural features with 128 orders of magnitude.

Once I was involved in the IBM add-on memory industry. Here's an invention I'm proud of; and here's a detailed discussion of an interesting bug from those days. Here's an even more boring bug, with possible interest since it is arguably a weird IBM Principles violation.

I am now preparing a Digital Search Tree (Trie) which uses an especially memory-efficient technique to store pointer information. E-mail me if you're interested.

When I was first learning to create html pages, for some
reason I chose to build a list of great mathematicians
as a practice page, even though I wasn't
qualified to make such a list without a lot of advice.
Since then I've invested a lot of time reading mathematical
histories and biographies and revising the page.
I'm proud of it now: please read it!
(With 178 mini-biographies, the single page
has now grown to over 380 kbytes.
With today's fast speeds, I suppose this is *not* a problem,
but *please* tell me if I'm wrong!)

I like composing and solving a variety of puzzles: - Figure out this Family Tree.
- Guess what's special about three poems I wrote.
- Here are some very hard Nurikabe puzzles.
- A discussion of Four Kings Solitaire.
- Historical linguistics is fascinating I show
why the English words
*chef, chief, captain, head*are not only synonyms, but are cognates.
I've become fascinated with the idea of
deducing human prehistory from genetic and
linguistic evidence.
I'm also interested in Games and Gambling. Here are some comments on Connect-Four. Lately, in middle age, I'm finally trying to tune up some miscellaneous computer skills. See the animated gifs in the next section. And of course, how could an American not follow politics? Here's my Wake up call for "liberals". |

I love Go, but never found the time to pursue it so I'm just a kyu player. I've prepared animated-gifs of some famous games played by Wu Qingyuan (Go Seigen), one of the very greatest players ever.

Select which Game to view: |

One of my research interests is the hexagon grid to facilitate machine vision and other 2-D signal processing tasks. The advantages of that grid over the standard square grid have been known for a long time, but it is seldom used. (I guess the prevalance of the square grid shouldn't be surprising, considering that the advantages of Unix are even more clearcut, but MicroSoft Windows has overwhelmed the planet.)

Here is one of my research papers on the topic of ``Filter Banks for the Hexagon Grid''.

I've decided to try my hand at offering software tips. Wish me luck !!

Only a few chapters are currently on-line. I'll post more if there's interest. Most of this code was written in the 20th century and will produce oodles of warnings with today's compilers. I am addressing these problems, slowly. Meanwhile, please use the software that I have organized into tarballs.

- Preface: Programming as Poetry.

- Lesson 1: Choices for Coding
- Lesson 2: Simplicity.
- Lesson 3: Simplicity (cont'd).
- Lesson 4: Simplicity (cont'd).
- Lesson 5: Simplicity (cont'd).
- Lesson 6: Working from Specifics.
- Lesson 7: Processes and Computation
- Lesson 8: Data Structures.
- Lesson 9: Control Mechanisms.
- Lesson 10: Programming tactics.
- Lesson 11: Focus on Information.
- Lesson 12: Advanced Exercises.
- Appendix B: Discussion of Betting Odds.
- Appendix M: Memory Requirements.
- Discussion of Oblivious Sorts.
- Description of "Truffman" Code.

The textbook is free. If that makes you feel guilty, contact me for Pay-Pal number. If that makes you feel hilarious, sorry.

Eventually I'll create a webpage summarizing comments. For now:
**
> My non-gnu compiler does not accept `long long'
**

Sorry. If you can't think of a work-around, try an easier exercise.

> Those who can't, teach.

Even pejorative comments are welcome, but please attach your own exercise solutions to verify we're playing in the same league.

> I didn't think it was so bad, and parts were almost well-written.

Flattery? Yes, that works.

Recently (November 2008) I posted some hash table code here, that I hope others will find useful. Since then I've improved this software and believe it to be of "commercial quality." It's no longer available here for download; e-mail me if you have interest.

I am organizing some C-language software I've written into files and folders I'm no longer ashamed of. Here is a PARTIAL list of the C files in 6 different tarballs. (Each tarball also contains a 'makefile', a 'Readme' a few '.h' files and so on.) Download jdas_all.tar.gz to get all seven folders at once. (If jdas_all gets '404 Not Found', it means the latest '_all' is unavailable: Download the source tarballs one-by-one.)

- jdas_game
- acquire.c -- Emulate Parker Bros. Acquire Game
- bridge.c -- solve Bridge
- gsieve.c -- solve Ginnow's solitaire
- holdodds.c -- Odds for Hold'em Poker
- maverick.c -- Simulate Maverick Solitaire
- risto.c -- Solve certain "magic" puzzle
- wnim.c -- Solve and play Waldo's name
- poker_subs.c -- (help routines)
- ezhash.c -- (help routines)

- jdas_geog
- antipodes.c -- Find cities' antipodes.
- earthdist.c -- City stats
- airdist.c -- Airport stats
- starbright.c -- Star stats

- jdas_htab
- pegplay.c -- Solve peg solitaire.
- wcounter.c -- Digital trie using Tight Hash Tree
- cuckoo.c -- implementation of Cuckoo Hash
- tightch.c -- implementation of Allen's Tight Hash
- genparms.c -- (help routines)
- pharith.c -- (help routines)
- simplesubs.c -- (help routines)

- jdas_misc
- bship.c -- Construct Battleship Solitaires
- bwt.c -- Implement Burrows-Wheeler text compression/decompression
- cf.c -- Continued Fraction
- digr_simu.c -- Prepare random text per digraph statistics
- kahan_demo.c -- Demonstrate Kahan Addition
- gencombo.c -- Routines for combinations
- j_random.c -- (help routines)
- kahadd.c -- (help routines)
- quadtest.c -- Simulte Quadrilateral puzzle
- roulette.c -- Calculate odds of Compund betting
- simplesubs.c -- (help routines)
- sofa.c -- Implementation of Compressed Bit-string processing
- timelimit.c

- jdas_rps
- ratgsolv.c -- Solve RPS games
- rpsgame.c
- canoperm.c
- gsolver.c
- j_random.c -- (help routines)
- rat_arith.c -- (help routines)

- jdas_stat
- eigen_demo.c -- Calculate Eigenmatrix
- regression.c -- Perform Linear Regression
- statisty.c -- Print statistical moments
- histogram.c -- Prepare histogram
- entropy.c -- Calculate entropy
- num_occ.c -- Caluclate simple probabilities
- kahadd.c -- (help routines)
- matrix.c -- (help routines)
- simplesubs.c -- (help routines)

- jdas_common
- js_simple.h, simplesubs.c, gcd.h, j_random.c, j_random.h, kahadd.c, kahan.h, ezhash.c, rat_arith.c, rat_arith.h -- Possible common routines

I have reorganized (and improved slightly) the C code presented at this site. Please use only the sources described here, which is organized into six tarballs as follows:

- jdas_game.tar.gz -- solvers for bridge, waldo's nim, Texas Hold'em, maverick solver; and more.
- jdas_htab.tar.gz -- sample hash table applications.
- jdas_misc.tar.gz -- useful functions for developing or using pseudo-random numbers; generate battleship puzzles, various other miscellaneous routines.
- jdas_rps.tar.gz -- detailed game-solving application (for RPS-like games)
- jdas_stat.tar.gz -- calculate eigenmatrix, statistical moments; do linear regressions, etc.
- jdas_geog.tar.gz -- databases and processing for airports, stars and more!
- jdas_common.tar.gz -- simple common code

The htab_find() routine in jdas_htab/tightch.c is the most horrible routine ever written!! I'm proud of that in a very perverse way! :-)

I've just placed a few chapters on-line so far, but some of the other programming examples are available. These are mostly simple short programs with interesting or instructive features.

In (rough) order of increasing complexity.

- (from Lesson 5) Print a simple statistic about an acyclic digraph.
- (from Lesson 5) Computer plays Waldo's Nim (against teletype).
- (from Lesson 3) A system of hash tables to find the Shortest path between two game positions.
- (from Lesson 9) A program to solve
Double Dummy Bridge Problems,
and some comments on the use of ``
*goto*.'' - A comparison of the Double Dummy Bridge Program with a ``structured'' alternative.
- (from Lesson 7) Finding the optimal solution to Ginnow's Sieve.
- (from Lesson 11) Text compression and decompression with the Burrows-Wheeler Transform.

I also discuss my symbolic math software. Sorry, to get this source code you will have to request to be a beta tester.

Here's some other Html pages I've had fun preparing:

- Four classic (math-oriented) puzzles,
- Some comments on dating the Y-chromosome tree,
- A ranking of U.S. Presidents, and other political opinions.
- A tribute to My Programming Heros
- A tribute to Winston Churchill
- Click for Charles Dodgson's writeup on an elementary school math problem.
- Click for my musings on ancient man and his languages.
- Click for a A-L mnemonic to remember the Twelve Language Phyla and astound your friends!
- Click for equal-area world map with antipodes superimposed.
- Click to visit my family tree.

This site has become very popular! You are the 'th visitor to this page.

In my free time, sometimes I "surf" the Web.
Seb Przd has
some interesting photographs.
Here's Seb himself, trying to straighten a picture on his wall:

Please send me some e-mail.