Monday, February 14, 2011

Static pages

Blow me! Static pages allow you to add stuff so that it goes at the end. Now, if I'd known this facility was available in Blogger -- maybe it wasn't until recently -- I would have used it for the Tipperary Tango. I ran a quick test to see if I could put the whole novel into a single static page, and it seems to be ok.

(The blog of TT was taken down by me when I published TT at

Saturday, February 05, 2011

Catechism

Finally finished typing in the old catechism, which didn't seem to be anywhere on the web. Been at it at odd times for over a year. My feelings about the old religion are rather mixed: they combine guilt, relief, anger, nostalgia and affection in roughly equal proportions.
One of the most interesting aspects concerns the stuff they just never mention any more, such as indulgences, the state of grace, mortal sin. Another is the number of iron rules that turned out to be malleable. And then there is the monumental consistency, certainty, and triumphalism of the establishment.
Another curiosity is that it all worked. I remember being very happy for years when I accepted all that. I had lots of questions, but had been trained to question within the system.
I just included, of the prayers, those I learned by heart as a child. I still like these, and am grateful to the people who made me learn them.
Perhaps the saddest Q+A in the whole thing is number 425, in the chapter on Extreme Unction and Holy Orders. Not many catholics have such an uncomplicated view of our priests as
this, nowadays.

Friday, February 04, 2011

B/S Bingo

Here's the source. Copy to bsbingo.c and compile with some command such as
cc -o bsbingo bsbingo.c
Then use the commands given under usage (or package them in a little script and put a handy link on your desktop).
The resulting random 5x5 grid is used to relieve the tedium of an otherwise boring meeting.
/***********************************************************/

/* bsbingo
Generates a random bsbingo card.
AOF 4-ii-2011. Copyleft...
Usage:
bsbingo > temp
lpr -o landscape -P <printername> temp
*/

#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <time.h>

#define N 5  /* number of rows and columns*/
#define PHRASE_LENGTH 18
#define PHRASES {\
" outside the box  ",\
"end of the day    ",\
"   bottom line    ",\
"   iconic         ",\
"   leverage       ",\
\
"core competencies ",\
"   synergy        ",\
"   strategic fit  ",\
"   benchmark      ",\
"   24/7           ",\
\
"   empower        ",\
"   win-win        ",\
"   game plan      ",\
" above our weight ",\
"   bandwidth      ",\
\
"the good of the X ",\
"apples and oranges",\
" green field      ",\
" hopefully        ",\
" shoot ourselves  ",\
\
"game of two 1/2s  ",\
" rennaisance      ",\
"  transparent     ",\
" SWOT(any 2)      ",\
" meltdown         "\
}

void permutation(int* k, int M){
/* places a random permutation of 0,1,2,...,M-1
in the array k[0],...,k[M-1]
*/

int i,j,temp;
int P[M];

for (i=0;i<M;i++){ P[i]=i; }
/* start with the identity */

for (j=0;j<M;j++){
for(i=0;i<M;i++){
if (rand()%2){
/* randomly apply the transposition (ij) or not */
temp = P[j];
P[j] = P[i];
P[i] = temp;
}
}
}

/* copy P to k: */
for (i=0;i<M;i++){
k[i]=P[i];
}
}

void blanks(void){
/* print some spaces */
int i;
for(i=0;i<PHRASE_LENGTH;i++){
printf(" ");
}
}

void solids(void){
/* print some underscores */
int i;
for(i=0;i<PHRASE_LENGTH;i++){
printf("_");
}
}


int main(void)
{
int i,j;
int k[N*N];
char* phrase[N*N] = PHRASES;

srand( time(NULL) );

permutation(k,N*N);

printf("\n\n");

/* print the table, using k to randomise the entries: */


for(j=0;j<N;j++){
printf("_");
solids();
}
printf("\n");

for (i=0;i<N;i++){

printf("|");
for(j=0;j<N;j++){
blanks();
printf("|");
}
printf("\n");

for (j=0;j<N;j++){
printf("|%s", phrase[k[N*i+j]]);
}
printf("|\n");

printf("|");
for(j=0;j<N;j++){
blanks();
printf("|");
}
printf("\n");

for(j=0;j<N;j++){
printf("|");
solids();
}
printf("|\n");



}
printf("\n\n");
return 0;
}

/****************************************************************/