Five years (plus eight days) ago, this blog went public with its first post. It was several months before the companion book, Beginning Programming with C For Dummies appeared, but I wanted the blog to be well-stocked with posts for those first, eager readers.
This website, c-for-dummies.com, is far older than the blog. I first hosted this site back in 1997. It was a companion to the two-volume set, C For Dummies, shown in Figure 1. Historically, this is the only two-volume For Dummies title and also the longest single title at over 1,000 pages. The publisher promised me that they’d never do that again!
The volumes were necessary because I wanted to cover C in gentle, measured pace that would appeal to beginners. It took three years to finish Volume II because the publisher pulled me off the C For Dummies project to work on other books.
When it came time for the C99 update, the publisher opted for a “thinner” book. My efforts resulted in the 800+ page-long C All-In-One Desk Reference For Dummies, Figure 2. This title remains the most popular, though it’s pretty dated and has a hefty errata.
At the same time as the All-In-One came out, the publisher wanted me to write and update to the original two-volume set, C For Dummies, which would move at a slower pace. That book, shown in Figure 3, is only 380 pages, so it leaves out a lot of the C language. I put in my best, but I’m not pleased with the results because the book omits a lot C.
During this time, the website supported the books with occasional updates and bonus material. The site remained rather static, however. I wanted to do more frequent updates, but the site lacked any form of content management.
For the C11 update, I was given the opportunity to write a new C language For Dummies title, which became Beginning Programming with C For Dummies (2013). This is the current title, and I desired to tie it in tightly with this website: I created answers to exercises for this site, along with comments and updates. I also opted to use WordPress to host a blog. I would update it weekly with Lessons and monthly with Exercises and have been doing so successfully for five years now. That’s a total of 367 posts for almost 180,000 words of bonus material.
For this, the anniversary Lesson, I’ve concocted an attempt at obfuscated C. I enjoyed running programs like this when I first learned programming. Have fun!
#include <stdio.h> int main() { int m[] = { 0x2821, 0x3030, 0x3900, 0x212E, 0x2E29, 0x3625, 0x3233, 0x2132, 0x3901, 0x0000 }; int x = 0; while(m[x]) { printf("%c%c", (m[x] >> 8) + 32, (m[x] & 0x00FF) + 32 ); x++; } putchar('\n'); return(0); }
Some people obviously have way too much spare time! I got as far as H and then got bored, even though I did cheat and used a couple of online converters:
https://www.rapidtables.com/convert/number/hex-to-decimal.html
https://www.rapidtables.com/convert/number/decimal-to-binary.html
and an ASCII table.
Now try to print something with an odd number of characters . . .
The first time I saw similar code was for Z80 assembly language. The programmer hid the text so well, I could never decipher it. Alas, it was published in a magazine I eventually threw out, so I couldn’t go back to see what he did. I just remember punching in the bytes and running the thing. Amazing.
That’s strange, yesterday I posted a comment suggesting you might find the magazine on Google Books if you can remember the name and approximate date. Maybe I forgot to click the Post Comment button.
I don’t see anything in the queue. Weird. I think it was 80 Micro and the author was Hardin Brothers. I’ll look when I have time. Thanks for the tip!
Eureka
https://archive.org/details/80-microcomputing-magazine