Latest Tech News

Stay updated with the latest in technology, AI, cybersecurity, and more

Filtered by: bool Clear Filter

That boolean should probably be something else

Monday, June 30, 2025 One of the first types we learn about is the boolean. It's pretty natural to use, because boolean logic underpins much of modern computing. And yet, it's one of the types we should probably be using a lot less of. In almost every single instance when you use a boolean, it should be something else. The trick is figuring out what "something else" is. Doing this is worth the effort. It tells you a lot about your system, and it will improve your design (even if you end up usi

Writing memory efficient C structs

29 July 2025 Writing memory efficient C structs by Tom Scheers A struct in C is the best way to organize your data so that you can easily use the data later in your program. However, there are a few caveats to C structures, mainly how their memory works. Our struct struct Monster { bool is_alive ; // Used to see whether or not the monster is alive int health ; // Health of the monster int damage_hit ; // Damage they deal per hit char name [ 64 ]; // Name of the monster with a max of 63 char