So far in my text mode graphics demonstration, I’ve shown you code that presents a graphical grid, plus the plot() function that “draws” pixels in the grid. These are the basic building blocks you need to do graphics in text mode. The next step is to craft functions that create basic geometric shapes. The most basic of those is the line.
Continue reading
Author Archives: dgookin
A Million Ways to Code in the West
Actually, it doesn’t matter west, east, north, or south, as multiple solutions exist for any programming puzzle.
Continue reading
Graphing in Text Mode, Part I
In text mode graphics, a char buffer serves as the drawing board, allowing you to plot x and y coordinates. Before any plotting takes place, however, you need a proper canvas.
Continue reading
The Big (Text Mode) Graphical Grid
To output graphics, you need a palette. That is, you need a buffer that’s so many pixels wide and rows high. Create the buffer, draw in the buffer, output the buffer. That’s how graphics works, both in graphics as well as text mode.
Continue reading
Text Mode Graphics
Graphics programming is entirely possible in the C language.
Continue reading
The Joy of Clang
If it were spelled Klang, then it might be a reference some Klingon character from Star Trek, but it’s not. Clang is one of those program names that’s a contraction. In this instance, it’s a portmanteau of C Language. It’s an über nifty command line compiler.
Continue reading
One Word at a Time
A filter is a command line tool that takes input, modifies it, and generates output. This month’s Exercise is to create such a filter, one that takes text input and spews it out one word at a time.
Continue reading
Word Wrap Filter Repair
As a programmer, always be thinking: What can go wrong? What would be an exception? Where have I made assumptions? You can’t avoid bugs by making such challenges, but you can diminish their possibilities.
Continue reading
Word Wrap Filter Walkthrough
In last week’s Lesson, I presented code that shows one way to wrap incoming streaming text. It’s not the easiest thing. Let me explain how last week’s code attempts to solve the problem.
Continue reading
A Word Wrap Filter
Unlike static text, streaming text feeds into a program one character at a time. To wrap that text, you need to know all the basics about wrapping text (covered in this Lesson), but also how to concoct a filter that buffers its output.
Continue reading