2013-11-06 Do the C programmers know the auxilary tools, their system pro- vides for them? Of course, we all know grep(1), wc(1), and the like, but do we also know the special development tools? Lex(1) and yacc(1) are often only known by name, but it's not them that I mean. I mean size(1), nm(1) and ldd(1), for instance. I've heard about them, but rarely used them. Today, I've used them to demonstrate the process of compilation to some non-programmers. 1) The C source code in text form and the stored bytes: less foo.c hd foo.c # equals: hexdump -C foo.c 2) Compiled to assembler code, displayed in text form: cc -S foo.c less foo.s 3) Compiled and linked to machine code, examined in various ways: cc foo.c less a.out hd a.out nm a.out size a.out ldd a.out 4) Comparision to the static linked executable: gcc --static foo.c nm a.out size a.out ldd a.out If you are a programmer: Know your tools! The non-programmers had problems to see the ones and zeros in the hexdump. They simply weren't fluent in hex and didn't wanted to simply accept that hex is just the same as binary but more com- pact. They wanted to actually *see* the single bits. I couldn't see how this would assure them more that the computer really works with bits, but I though took five minutes to write a small program that displays the single bits: #include int main(int argc, char *argv[]) { int c, i, bytes=0; while ((c = getchar()) != EOF) { for (i=7; i>=0; i--) { putchar((c & (1<