to program

updated 2002-12-26


[FIXME: move stuff from todo.html and linux.html here; ... computer_architecture.html ... also to_program.txt]

(also see directory ../program/ of programs I've written / am working on.


Programs I could write.

(was: FP(for program)list )

in order of priority:

Software Bazaar

It would be cool to have a software bazaar. A place where people who are willing to pay to have some programming done can connect with people who are willing to program.

Too often hundreds of end-users are annoyed for years by some tiny little thing that a programmer could fix in a day or 2 of tweaking.

I think the site would start up with "free" projects -- projects so small that Comsci students looking for experience and fame could knock them out in a few hours.

Later we would add "paid" projects. How can we deal with money while avoiding potential problems ?

Is the "street performer protocol" appropriate ? (sometimes incorrectly spelled "software bazzar" ).

Here are some sites that are almost, but not quite what I'm picturing.

related ideas:

visualizing hierarchial and non-hierarchial structures

Todo: write code to implement some of the ideas at psd.html , especially psd.html#treemap

Web sites that have lots of useful freeware and shareware software

[see also software_david_uses.html#macintosh -- perhaps move all links to software archives to that page ? ]

Also algorithms and source code ...

"small" data compression

small data compression

more ToProgram

and then

Programs to Write


Programs to Write (Code to Hack)

simple histogram

Mark: "I want a CGI script that ... sends email via a template file with an unknown number of variables ( names used more than once, a javascript or ".asp" loop )."

started: 1997 Nov 1 end prog.html

  • Play with the Mozilla code. In particular, help make sure compression/decompression work right . Also confirm that the build instructions work on the various platforms I have:
  • Programs to Read [FIXME: read !]
  • compressed caching [of] Linux virtual memory Could I help with this project ? This seems related to

    ``Disk compression versus file compression'' and

    and also related to the Ross Williams patent on Blocklets(TM) (especially ``Example Application: A Low-Redundancy File System'',990,810.WKU.&OS=PN/5,990,810&RS=PN/5,990,810 which claims ``The technique could be used to increase the efficiency of an on-chip cache.'' [FIXME: link to VLSI] ). The patent also mentions ``suggests that some form of universal standardization on a particular partitioning method would be a worthy goal.'' DAV thinks that one partitioning method (with a variant) is already a de-facto standard: the character 0x0A (newline character); some applications, in addition, also partition after the "." (dot period) character.

    [FIXME: make sure these 3 groups know about each other, and perhaps even crosslink to each other]

  • simulations
    my CAD
    grasscatcher - programs
    hypercard draw
    my language
    c2	write simple "oscilliscope simulator" program ... read both voltage and time value, so (from graph) it's obvious where the data dropouts are.
    c2	Saturn program -- get astronomical data to check program, accuracy.
    c3	write program to draw appolonian gasket.
    What happens when subroutine is given a negative radius?
    What is the fractal dimension of the Appolonian packing ?

    the fractal dimension of the "Appolonian packing", a rather pretty fractal made from circles. The precise value is a little difficult to compute; the most digits I have seen is 1.305686729, but that's probably only accurate up to the "7". To make the fractal, start with three circles that are just touching (tangent to) each other, and with none of the circles inside each other. Now there is exactly one way to add a 4th circle in the space between the three circles so that the new circle is tangent to all three. Then you can add three more smaller circles in the spaces between the 4th circle and two of the original three. As you continue this process indefinitely, you get an Appolonian packing. c3 write simple pascal Graph(xmin, xmax, function) w/pure ASCII output to illustrate passing functions as parameters (demo with sin(x), x, and user-defined functions like (x**2-(.25)). Do in-line functions work? ) DAC's very own time program ... think i'll call it Frameworks. timeline mode - shows autobiographical summary on the scale of 1 or 2 human lives.
  • take the random stereogram program and modify it do *animations* ... can this be done with ASCII text ? I doubt it, but ...

    FP:make paper titled "Birthdays" w/366 lines (one for each day of leap year) and on each line list people w/ that birthday (optional year of birth in parenth)

    add anniversaries.

    maze generator

    From agora!rainrgnews0!psgrain!!!uunet!!!myhost.subdomain.domain!scottco Fri Aug 11 23:02:09 1995
    Xref: agora
    Path: agora!rainrgnews0!psgrain!!!uunet!!!myhost.subdomain.domain!scottco
    From: scottco@myhost.subdomain.domain (Scott C. Cottrille)
    Subject: Re: maze algorithm wanted.
    Date: 9 Aug 1995 17:43:17 GMT
    Organization: String to put in the Organization Header
    Lines: 156
    NNTP-Posting-User: scottco
    X-Newsreader: TIN [version 1.2 PL2]
    Allan Nienhuis (Allan_Nienhuis at wrote:
    : Hi there.
    : Several (many) months ago, there was a slight bit of discussion about
    : different methods of creating simple 2d  mazes.  Naturaly, I didn't
    : bother to save any of the algorithms suggested, and now I have need of
    : just such a thing.  I would prefer something recursive in nature, but
    : I'm willing to look at any type of soution.
    : Thanks,
    : Allan Nienhuis at
    Here's one I derived from a letter sent into Compute! many many years ago.
    I modified it to be state-driven, so that I could more easily make a
    timer-based screen saver out of it (works great!)  You know, I think I've
    posted this thing about 4 times now - why don't these maze questions make
    it into a FAQ?  The algorithm below is VERY simple.
     #define rnd(n)  (rand() % n)
    #define NUMAMAZCOLORS   8
    	int Pattern[4][2] = { 0, 2, -2, 0, 0, -2, 2, 0 };
    	int     DoMaze(void);
    void main(void)
    	srand((unsigned)(time(NULL) % 1000));
    		if (DoMaze())
    	InvertTheScreen();	// black becomes nonblack, and vice versa
    int DoMaze(void)
    #define ZERO    0
    #define ONE     1
    #define TWO     2
    #define THREE   3
    #define FOUR    4
    	static int      Maxx;
    	static int      Maxy;
    	static int      xPos = 2;
    	static int      yPos = 2;
    	static int      PseudoGoto = ZERO;
    	static int      j;
    	static int      x;
    	int             nx;
    	int             ny;
    		case ZERO:
    			Maxx = 298;
    			Maxy = 198;
    			SetPixel(xPos, yPos);
    			PseudoGoto = ONE;
    		case ONE:
    			j = rnd(4);
    			x = j;
    			PseudoGoto = TWO;
    		case TWO:
    			nx = xPos + Pattern[j][1];
    			ny = yPos + Pattern[j][0];
    			if (ny < 1 || ny > Maxy || nx < 1 || nx > Maxx)
    				PseudoGoto = THREE;
    				if (GetPixel(nx, ny) == 0)
    					SetPixelColor(j + 1);
    					SetPixel(nx, ny);
    					SetPixel(xPos + Pattern[j][1] / 2, yPos + Pattern[j][0] / 2);
    					xPos = nx;
    					yPos = ny;
    					PseudoGoto = ONE;
    					PseudoGoto = THREE;
    		case THREE:
    			j = (j > 3) ? 0 : j;
    			if (j != x)
    				PseudoGoto = TWO;
    				j = GetPixel(xPos, yPos) - 1;
    				SetPixel(xPos, yPos);
    				if (j < 4)
    					xPos = xPos - Pattern[j][1];
    					yPos = yPos - Pattern[j][0];
    					PseudoGoto = TWO;
    					PseudoGoto = FOUR;
    		case FOUR:

    spectrum-analyzer program

    outputs sinewave to user's filter, inputs sinewave, displays phase and amplitude (attenuation). Or uses the nifty step-response method. (Uses Sunset Laboratory AIB board)

    waveform analysis (FFTs, wavelets, etc)

    "The most straight-forward method of adopting the FFT to handle such nonstationary signals (i.e., signals whose spectral composition change with time) is known as the Short-Time Fourier Transform (STFT). ...When the STFT is computed using the Gaussian window, it is sometimes called the Gabor Transform." -- J. Bulgrin and B. Rubal, "Time-Frequency Analysis of Heart Sounds", _Scientific Computing and Automation_ Aug. 1994.

    self-check program

    write a program with self-check checksum or CRC, to detect corruption / infection. data_compression.html#ecc

    programming questions

    do I need to do anything special to handle command-line redirection *and* command-line arguments? ex: type test.txt | myprog /verbose | more

    programs in general

    help and "about" screens. ("about" can probably be just a regular textfile, self-edited in "read only", "view" mode. title, version number and date, and where to send shareware fees. Just be sure that it can't be disconnected from the program. )

    text/program code/HTML formatting: Pretty-Printer

    See also si_metric_faq.html#iso8859 for more on using plain ASCII to name unusual characters.

    "Object Outline" from Bumble Bee Software ( extracts comments from C++ to automatically generate HTML information, with automatic hyper-linking. (Windows 95 and Windows NT; $297). has an example that converts plain text into HTML. [FIXME: this MacroXML might be useful for several of these projects:

    ] Sean Barrett, inventor of MacroXML, says here that ``I don't think XML is a panacea for human-maintained files''. Which makes me wonder: Since I think all source code should be human-readable and human-maintainable, is *any* format a panacea for human maintained files ? Apparently some formats are *better* than XML for some applications ...

    Q: compare MacroXML, sed scripts, and Perl -- which is most appropriate for writing this sort of conversion filter ?


    subroutine that takes a list. (of TTD:s, etc) asks you which is more important, [#1] or [#2].... etc. then, when done w/ last, shows sorted list in order of priority. probably insertion sort w/ binary search. able to quit then continue w/out starting over. takes top 10, puts them on "top 10" card. also do summary prog in test stack

    move all FP cards to FP stack, w/ copy of prioritized list in both stacks.

    keep data for top FP in daytimer.

    simple file -> paper print program

    compressed half-page printouts, fine type. header and/or footer, giving *source* file (full pathname, including machine name ?), time, date, page number, last page number (to give "page 4/5" style numbering, so it's obvious if you have all the pages -- this document has 5 pages).


    future: look-ahead (sacrifice a less-than-maximum move now in order to acheive a brilliant move later)

    make symbols list


    do cellular automata

    1D 2D (Conway's Life) 3D

    generalize my hashlife to handle

    "cyclic space" discovered by David Griffeath: if a cell is in a state k at a certain time, it must consume any adjacent cells that are in state k-1 before the next tick. see "Order from Chaos",_Programmer's Journal_ may/june 1990 , which references "Computer recreations" _Sci Am_ 1989#2, _Cyclic Cellular Automata in 2D_ Fisch R, _Fractal Programming in C_,Stevens, R.T.


    Pointers to other interesting task lists

    see also todo.html#others for non-software task lists.

    Tools to help write software:

    Software to write: Unwritten Software:

    basic hacking skills

    The world is full of fascinating problems waiting to be solved. In order to get in on the excitement, you need to learn the tools used to solve them.

    (from How To Become A Hacker by Eric S. Raymond )

    1. Learn how to program. In 1997 the one language you absolutely must learn is C (though it's not the one to try learning first thing). Besides C, you should also learn at least LISP and Perl (and Java is pushing hard for a place on the list).
    2. Get one of the free UNIXes and learn to use and run it.
    3. Learn how to use the World Wide Web and write HTML.
    4. Contrary to popular myth, you do *not* have to be a nerd to be a hacker. It does help, however, and many hackers are in fact nerds. Being a social outcast helps you stay concentrated on the really important things, like thinking and hacking.

    Q: What language should I learn first?

    A: HTML. ... There are a lot of glossy, hype-intensive bad HTML books out there, and distressingly few good ones. The one I like best is _HTML: The Definitive Guide_. When you're ready to start programming, I would recommend starting with Perl or Python. C is really important, but it's also much harder.

    Here is some tools seem like they might be useful. Please tell me about any other useful programming tools you find.

    You might also be interested in the jargon creed.html#jargon some hackers use.

    [FIXME: move information about programming in general here from linux.html ]

    Hacking Challenges

    Here are some challenging projects, roughly in order of the value *I* place on them.

    I challenge you to work towards pushing at least one of these towards a finished product.

    (See also The Programmer's Challenge by Bob Boonstra #programmers_challenge )

    I'd be willing to pay money for some of these ... #software_bazaar

    1. Write a molecular modeling tool .
    2. desires a simple (?) CGI script that implements "Backlinks".
    3. For program: make simple "filter filter", i.e., a UNIX filter that takes a input datafile of numbers and outputs another datafile of numbers, "filtered" in the EE sense. typical use: .... | filter -hipass 20 Hz -lowpass 20 KHz -Sample 44.1 KHz | .... perhaps 2 columns, so you can filter/separate I/Q modulation, or do hipass/lowpass filtering simultaneously. Decimation -- the output file can be *much* shorter than the input file. The -Sample tells the filter what the input sample rate is in Hz, so that the other parameters can also be specified in Hz rather than in samples.
    4. GNU Task List
    5. a freeware Typing Tutor would be appreciated
    6. A VLSI chip design program. see vlsi.html#ic_layout_tool
    7. Java on the PalmPilot. [has mailing list; interesting project] [very alpha the last time I checked]
    8. OnBoard C is a C compiler that runs on a PalmOS handheld. ...
    9. How can we build things that encourage people to learn and explore ? "I'm always reading about parental anxieties over all the bad stuff kids are exposed to on the Internet, but frankly I'm more concerned about the good stuff my daughters are missing because they lack the incentive or the interest or the knowledge to hunt for it." -- "Kids and the Web: Getting Out of the Internet Rut" By David Laskin "I've encouraged her to explore virtual communities, such as Moose Crossing, that teach kids elementary programming skills and connect them with other young surfers around the world."
    10. Create and collect converters between different font file standards. the Hofstadter book (___??) says this simple-seeming concept touches on some of the most difficult areas of AI.
    11. (help develop) GNU Yellow Vector Editor and [FIXME: computer_graphics.html]
    12. The web is cool and all, but there's still a few little things that could be better.
    13. "Project Mnemonic" is an effort to produce a Free MultiPlatform High-Performance Web Browser. Adding "a thumbs-up button and a thumbs-down button" seems like a cool thing to add to a web browser.
    14. SEUL: Simple End-User Linux project ( ) ( ) The seul-dev-help at mailing list
    15. gwp , a extremely simple text editor, except for the fact that it lets you type in Japanese. (written for the GNOME project) The project is still in the conceptual stages last time I checked. (in 1998 ?) /* was */ ...
    16. FreeDesigner project free_d.html
    17. Linux Documentation Project
    18. MacHack
    19. the SimOS project part of Stanford Flash x86 and other CPU / architecture emulators:
    20. Mnemonic a project to create the ultimate Web browser.
    21. people working on the free Netscape client code
    22. a central point of contact and community for those interested in using or improving the Netscape source code:
    23. GTSC4 HTTP://Welcome.To/GTSC4/ ????
    24. The QB Challenge lists challenges in order of complexity:
      • Some simple things to help you learn a language (that have been done hundreds of times before) (that are otherwise useless),
      • some more complicated things to help you learn a language that would be somewhat useful if they hadn't already been done a few times before.
      • ``I need ideas for more challenges! E-mail me with some!'' -- David Zohrob
      [ FIXME: mail my challenges to David Zohrob <mallard at> ] OK, so thinking up new challenges *is* pretty challenging in itself.
    25. Programmer of the Month points to another programming challenge [FIXME: do these people know about the Mac Challenge #programmers_challenge , and vice versa ?] [FIXME: should I add these computer languages to my list of computer languages ?]

      NOTE: I measure the real time, not CPU time. If your program makes a lot of calculations and doesn't wait()ing or sleep()ing you can freely use ANSI clock(), but if you want to measure time more accurately consider using ANSI time(), POSIX times() (the return value of times() is the real time measured in ticks) or POSIX alarm().

    26. [challenge] ``We don't know of any free shopping carts worth using. If you know of one, contact us and let us know -- we'll put it up on this page.'' [also lists credit card processing companies] ``for a website which is only selling a couple of items, like us, or which doesn't need ... the hassle and expense of setting up a merchant [credit card] account, PayPal is a good choice.'' many people are looking for an alternative to PayPal: ...
    27. computer programming tournaments. * In the coding phase, contestants will be given a set of problems to solve using their programming skills. * In the challenge phase, participants have the opportunity to review their competitors' code for errors.

      Tournaments they host include:

    28. "The Ultimate Editor" article by Stephen Bint challenges you to write the ultimate console-mode text editor (text mode, but with colors, mouse, pull-down menus, etc. ... but most importantly, well-documented to make it easy for others to add menu items in C++ )
    29. ``All that stuff we started, but never got finished...'' `` So we've put all our unfinished and/or part-working stuff into a big 'To-Do cupboard'. If you're brave enough to take something out and get it working, we'll put a link to it on our site.'' ... ``This is stuff that we played with, but never got finished. You're welcome to download what you want and use it, finish it off and sell it, hack it into something completely different, or just have a good laugh. And if you build anything worthwhile from it, send us a link to it so that others can see what you've done with our left-overs.'' [hacking challenges ?]
    30. [FIXME: make ``challenges'' section here and in todo.html, listing what people think other people should do ? For example:]

      No Starch Press is holding a contest for Linux game developers.

    31. ICFP 2001 Programming Contest Challenge Task compressing the SML/NG markup language (very similar to HTML).

    The Programmer's Challenge

    The Programmer's Challenge

    The contest is judged by Bob Boonstra < boonstra at >


    started 1997 Nov 1 (possibly before ?) [FIXME: better footer] errors .

    Return to index // end