Defragging Management
Brilliant phrase, must implement that soon
"It's like progress bars," I say to the PFY during a discussion about the relative merits of the company management as we ride the lift to the CEO's office to fix some laptop crisis. "All too often the bar itself bears no relationship whatsoever to the amount of time you're going to wait. In the same way the salary of a …
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <errno.h>
#include <string.h>
int main(void)
{
char *g1[] = {"Essential", "Directed", "Measurable"};
char *g2[] = {"Vision", "Service", "Delivery"};
char *g3[] = {"Targets", "Metrics", "Outcomes"};
size_t n1 = sizeof(g1) / sizeof(g1[0]);
size_t n2 = sizeof(g2) / sizeof(g2[0]);
size_t n3 = sizeof(g3) / sizeof(g3[0]);
unsigned int seed;
int w1, w2, w3;
FILE *dev_random = fopen("/dev/random", "rb");
if ( dev_random == NULL )
return EXIT_FAILURE;
if ( fread(&seed, sizeof seed, 1, dev_random) != 1 )
return EXIT_FAILURE;
fclose(dev_random);
srand(seed);
w1 = n1 * (rand() / (RAND_MAX + 1.0));
w2 = n2 * (rand() / (RAND_MAX + 1.0));
w3 = n3 * (rand() / (RAND_MAX + 1.0));
printf("%s %s %s\n", g1[w1], g2[w2], g3[w3]);
return 0;
}
This post has been deleted by its author