
Twelve years ago today, this blog had its first post. It’s been run consistently since, with new Lessons posted every Saturday and a new Exercise posted on the first of each month.
Continue reading
Author Archives: dgookin
Silicon Valley Encryption, Part I
I’m a fan of the HBO Series, Silicon Valley. From creator Mike Judge, it excellently showcases the antics of the nerds who populate California’s Silicon Valley and the companies they work for. It’s a brilliant series that I highly recommend to my techy friends. Plus, it’s chock full of digitally delightful easter eggs.
Continue reading
A Nutty Non-Loop – Solution
The insane challenge for this month’s Exercise is to generate a countdown loop without using any looping functions. And, no, you can’t just use a buncha printf() statements to output the values.
Continue reading
The Phone Number Value
As a string, a phone number is easy to parse, left-to-right, as shown in last week’s Lesson. As a value, however, the processing requires mathematical manipulation to work it from left-to-right.
Continue reading
A Nutty Non-Loop
Difficulty: ★ ★ ★ ★
Loops are fun. They’re easy to learn. But not everything that repeats in a C program is constructed as a loop.
Continue reading
The Phone Number String
This Lesson’s topic is more about database programming than C programming, but the philosophy still applies. When do you store a number as a value as opposed to storing it as a string? Two famous examples are zip codes and phone numbers.
Continue reading
To Prefix or Postfix
Being curious, I asked ChatGPT which C programming questions it gets asked most frequently. Some of the topics are complex, such as back peddling through a linked list. I cover double-linked lists on this blog, though I don’t demonstrate how to work backwards through one.
Continue reading
A Problem with Strings in Two-Dimensional Arrays
Declaring an array of strings as a pointer has many advantages, as demonstrated in last week’s Lesson. Above all, I like that I don’t have to calculate the longest string’s length to set the size for the second dimension. But what happens when set this size incorrectly?
Continue reading
Keep Finding That String – Solution
The task for this month’s Exercise is to repeatedly call the strstr() function, locating all instances of one string (“needle”) inside another (“haystack”). Obviously your first task, which also helps with the solution, is to perform error checking on the return value from the strstr() function.
Continue reading
Rotating an Array of Strings
Last month, I posted about rotating values in an array. This post used integers, but the question has come to me about doing the same thing with an array of strings. Yes, it’s possible — and just as easy.
Continue reading