5 ms·
The Spherical Cows of Programming
- SoulMan 1y ago2025-20-29 ?
- TomatoCo 1y agoLooks like the first digit of each part of the date was incremented by 1. I think it's meant to say 1025-10-19.
- JadeNB 1y agoA rare pre-William the Conqueror essay on functional programming.
- mkoubaa 1y agoI've always known the Green Knight was something of a time traveler. Knew too much.
- indigoabstract 1y agoHad the battle at Hastings went the other way, the state of functional programming might have been much different, methinks. Alas, 'tis not meant to be.
- bos 1y agoThis is a bizarre essay by someone who understands neither functional programming nor the history of computers. > To be kind, we’ve spent several decades twisting hardware to make the FP spherical cow work “faster”, at the expense of exponential growth in memory usage, and, some would argue, at the expense of increased fragility of software. There is not one iota of support for functional programming in any modern CPU.
- imtringued 1y agoThe definition of spherical cow is also butchered beyond recognition. Spherical cows are about simplifying assumptions that lead to absurd conclusions, not simplified models or simplified notation in general. Calling functional programming a spherical cow when you mean that automatic memory management is a simplifying assumption, is such a gross sign of incompetence that nobody should keep reading the rest of the blog.
- JumpCrisscross 1y ago> Spherical cows are about simplifying assumptions that lead to absurd conclusions There aren’t any commonly-accepted conclusions from spherical cows because the bit is the punch line. It’s a joke a physics 101 student makes when toughing through problems that assume away any real-world complexity and thus applicability. Spherical cows, in the real world, are pedagogical tools first, approximations second, and mis-applied models by inexperienced practitioners third. “Hello World” is a spherical cow. Simplifying assumptions about data are spherical cows. (And real dairy farmers implicitly assume flat cows when using square feet to determine how much room and grazing area they need per head.)
- dragontamer 1y agoSpherical cows? The joke as I recall it, was a physics student who brags that he can predict the winner of any horserace, so long as all of the horses were perfectly spherical perfectly elastic horses. I'm actually not sure where cows came in, but maybe there's a different version of the joke out there.
- seanhunter 1y agoThe spherical cow joke generally goes that a farmer has some problems with his cows (maybe it’s how much milk they’re producing I don’t remember) and so his daughter says “you should ask my boyfriend to help - he’s a physicist and really clever”. So the farmer asks the boyfriend and he says “Well, assume the cows are spherical…” The joke being because when you do mechanics you generally start modelling any problem with a lot of simplifying assumptions. In particular, that certain things are particles- spherical and uniform.
- bitwize 1y agoI would say "sequential execution of CPU instructions" and "O(1) memory access" are two major spherical cows in computing. Probably the biggest, though, is the "fast, reliable network". We build systems that treat networked resources as if they were local: always there and instantly available. Heck, most of our stuff wouldn't even run without the database being online, and that's usually provided over the network.
- Yoric 1y agoYou are, of course, right, although I'd say that it's fairly unusual for the "sequential execution of CPU instructions" abstraction to leak. The wrongfully assumed "O(1) memory access" (or worse, wrongfully assumed O(1) data structure access even when the data structure actually isn't O(1)) showed up more frequently in my experience. And I still don't understand how we keep writing code that assumes "fast, reliable network" when we're reminded every day that code is neither fast nor reliable.
- bitwize 1y ago> You are, of course, right, although I'd say that it's fairly unusual for the "sequential execution of CPU instructions" abstraction to leak. On x86. x86 and x86-64 usually do a good job of enforcing memory access order as if the instructions were executed sequentially. Other architectures, not so much. On PowerPC you had to put explicit memory barriers guaranteeing a certain access order with the 'eieio' instruction. ARM processors feature similar weak memory order, but the Apple M1 and later feature a special mode that guarantees strong x86-64 memory order, to make emulation for programs written for Intel Macs easier.
- Yoric 1y agoAh, good point, I haven't programmed for anything other than x86-64 in a while. But even then, if you're using any kind of compiler, either this is successfully hidden from you... or you've hit some UB in C or C++ and you're in nasal demon territory anyway, no?
- deleted 1y ago[deleted]
- KerrAvon 1y agoCalling random things “spiritual cows” is a fine comedy bit, but has no place in a professional environment where you have to be able to communicate with others to achieve a common goal. TFA is just shitposting in blog form. Not sure if the author realizes that.
- jagged-chisel 1y agoDid ... did you mean "spiritual"? Because, depending on culture, spiritual cows would indeed be a fine comedy bit.
- ok123456 1y agoSpherical. "Spherical cows" is a common expression in physics that means an oversimplified model (e.g., modeling a cow as a sphere). https://en.wikipedia.org/wiki/Spherical_cow https://en.wikipedia.org/wiki/Spherical_cow
- hinkley 1y agoI’m also having trouble figuring out why mentioning sacred cows would be a problem in business. Other than potential career suicide for handling the news poorly.
- ErroneousBosh 1y ago"Sacred Cows" crop up in business surprisingly often, if you deal with agricultural services in parts of the world with a significant Hindu population. You have to be absolutely certain you've got the right cows in the right trailer, for one thing.
- hinkley 1y agoOh you mean literal sacred cows. Yeah I was talking metaphysical. (I used to know someone with an ostensibly Hindu coworker who she caught eating a burger. His response to being caught was to say that Indians aren’t reincarnated as American cows.)
- deleted 1y ago[deleted]
- DiggyJohnson 1y agoI’m more DevOps but we have issues wear we discuss the spherical cow of build pipelines like we have a handful of static environments in the same cloud account with the same permissions and database requirements that does not stand up to encountering the actual requirements where we have destructible and static environments, an environment in a different cloud account for our customer to review per contract requirements, and a prod environment with heavy security and data protection requirements hosted by a entirely different cloud vendor with bad infrastructure support resources.
- DiggyJohnson 1y agoThis might be my longest run on sentence since I learned to write lol
- cttet 1y agoAt least most functional language tutorial claim to be based on abstract machines, not like the C language, which is a spherical cow that people not often aware of. https://queue.acm.org/detail.cfm?id=3212479 https://queue.acm.org/detail.cfm?id=3212479