news
Programming Leftovers
-
Max Bernstein ☛ How to use snprintf | Max Bernstein
The sprintf family of functions (sprintf, snprintf, vsnprintf, …) have this little-known feature to what size your buffer should be. In cases where you don’t have a fixed upper bound, this is really useful.
-
Daniel Lemire ☛ Why do we even need SIMD instructions ?
Last week, I was chatting with a student and I was explaining what SIMD instructions were. I was making the point that, in practice, all modern processors have SIMD instructions or the equivalent. Admittedly, some small embedded processors do not, but they lack many other standard features as well. SIMD stands for Single Instruction, Multiple Data, a type of parallel computing architecture that allows a single instruction to process multiple data elements simultaneously. For example, you can compare 16 bytes with 16 other bytes using a single instruction.
-
[Old] ESR ☛ Basics of the Unix Philosophy
Rule 4. Fancy algorithms are buggier than simple ones, and they're much harder to implement. Use simple algorithms as well as simple data structures.
-
[Old] Klara ☛ Unix Philosophy: A Quick Look at the Ideas that Made Unix
Regardless of which version of the Unix Philosophy you follow, the end goal is to combat software complexity and promote portability. These ideas were created by people who had a lot of programming experience and spent time thinking about the best methods of creating clean and simple tools.
-
[Old] Harvard University ☛ Chapter 1: Philosophy Matters
The explosive recent growth of Linux, and the increasing importance of the Internet, give us good reasons to suppose that the skeptic's case is wrong. But even supposing the skeptical assessment is true, Unix culture is worth learning because there are some things it clearly does better than any other operating system.
-
Julik Tarkhanov ☛ If you need subdomains: just use subdomains
Eelco recently wrote about using subdomains in Rails, outlining a seemingly neat idea about having them as subdomains in production but using paths in development. It is clever and looks very usable at first sight. It’s also a very bad idea that is likely to get you side effects you really won’t be happy about. I normally don’t do “rebuttal” posts, but in this case — since I have dealt with that problem before — it feels warranted. Without being too lyrical about it, I want to outline why you don’t want to use that approach and propose a couple of alternatives.
-
[Old] Bruce Schneier ☛ A Plea for Simplicity: You can't secure what you don't understand.
The other choice is to slow down, simplify and try to add security. Customers won’t demand this—the issues are too complex for them to understand—so a consumer advocacy group is required. This solution might not be economically viable for the Internet, but it is the only way to get security.
-
[Old] Bruce Schneier ☛ “Complexity Is The Worst Enemy of Security”: Studying Cybersecurity Through the Lens of Organizational Complexity [PDF]
Schneier (2000a, p. 354) wrote: “Complexity is the worst enemy of security. This has been true since the beginning of computers, and is likely to be true for the foreseeable future. And as cyberspace continues to get more complex, it will continue to get less secure.” We similarly expect that as organizations and their use of IT continue to become more complex, their inherent cybersecurity risk will also increase. In this essay, we explain why this is the case for information systems broadly, considering people, IT systems, and organizations together. The next two articles in this issue — Liang et al. (2025) and Tanriverdi et al. (2025) — illustrate the value of using complexity as a lens to better understand cybersecurity problems. We call on scholars to continue to use and test this approach on a range of cybersecurity issues.