Feabhas, an embedded software training company, writes about C, C++, CMake, and tooling for embedded development.
HN links it for practical C and C++ posts, with commenters citing it in discussions of memory protection, strings, and code structure.
Is't spagetti code a design pattern?
One can make use of design patterns, clean code and separation of concerns and still get working spaghetti code without all the hacky stuff.
Much less effort if use C.
Engineered C case studies as goto solutions!
https://blog.feabhas.com/2017/02/abusing-c-switch-statement-beauty-eye-beholder/
https://www.chiark.greenend.org.uk/~sgtatham/coroutines.html
Just have to impliment the program as if it was an OS. aka mix/match abstraction levels!
Mix/match assembler / language macros / foreign language calls to other language libraries
Use C20 ability to assign case statement(s) to a thread (mixed with remote procedure calling and/or function stacks across multiple threads)
Mix & match unicode/non-unicode, hex, ascii, etc. where text is code that can be run.
Mix and match C# language extensions in which same thing can be implimented different ways (e.g. strings, vectors, templating)
The only modern language that gets it right is Swift:
Apple did a fairly good job with unicode string handling starting in Cocoa and Objective-C, by providing methods to get the number of code points and/or bytes:
https://stackoverflow.com/questions/15582267/cfstring-count-of-characters-not-code-points-in-a-string/15582268#15582268
I feel that this support of both character count and buffer size in bytes is probably the way to go. But Python 3 went wrong by trying to abstract it away with encodings that have unintuitive pitfalls that broke compatibility with Python 2:
https://blog.feabhas.com/2019/02/python-3-unicode-and-byte-strings/
There's also the normalization issue. Apple goofed (IMHO) when they used NFD in HFS+ filenames while everyone else went with NFC, but fixed that in APFS:
https://unicode.org/faq/normalization.html
https://medium.com/@sthadewald/the-utf-8-hell-of-mac-osx-feef5ea42407
The "new hardware protection mechanism called MPU available on some new ARM Cortex-M microcontrollers" is a device which lets the operating system define up to eight memory regions (sixteen on the M7), optionally with holes in them. In each region, permissions can be set for read, write, and execute, and the policy for cacheing and sharing between cores can be controlled (although this is presumably not really relevant for single-core microcontrollers).
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0553a/BIHJJABA.html
https://blog.feabhas.com/2013/02/setting-up-the-cortex-m34-armv7-m-memory-protection-unit-mpu/
It's a bit like a normal MMU bit without virtual memory.