2 ms·
Text, math, 2d graphics, sorting, files, color are simple as long as you don’t care about the most optimal version. Everything the author mentions in the articl
by armchairhacker 4y ago
Text, math, 2d graphics, sorting, files, color are simple as long as you don’t care about the most optimal version. Everything the author mentions in the article can also be done “simply”, if you use monospace, ASCII, ignore mobile, etc.
For example, text is just a null-terminated char array if you only support ASCII, or short or int array to support other languages and more symbols. To render the text, just loop over each char and index into an array to get a bitmap of a monospace font. Your text may look a bit ugly and take up more memory than necessary, but it’s passable, and 40 years ago it’s what we did.
There are some problems like TSP and Chess where there is a simple brute-force solution, but its not “passable” because it takes impossibly long, so you need a more optimal complex solution. And then there’s the iconic “seems simple but actually really hard” problems like generalized image recognition or walking; they are “simple” to humans and animals, but a remotely half-decent solution took a long time even with giant super-computers, and it’s still only half-decent.