3 ms·
I do wonder what the parallel equivalent of headline clickbait in code is. Functions with very few LOC? :P
by minimaxir 10y ago
I do wonder what the parallel equivalent of headline clickbait in code is. Functions with very few LOC? :P
- philh 10y ago/* You won't believe the one weird trick this function uses to compute inverse square root */
- euyyn 10y agoI'd say functions and methods with overly generic names, like "process" or "prepare". You won't believe what happens inside!
- tyingq 10y agoThis one from Torvalds is close to clickbait, at least it made me want to find and read copy_page_range(). "Fork is rather simple, once you get the hang of it, but the memory management can be a bitch. See 'mm/memory.c': 'copy_page_range()'" https://github.com/torvalds/linux/blob/master/kernel/fork.c#L10 https://github.com/torvalds/linux/blob/master/kernel/fork.c#...
- jasode 10y ago>I do wonder what the parallel equivalent of headline clickbait in code is. A common example would be business logic code polluting the "View" of MVC. code reviewer: "Why are you retrieving the sales tax jurisdiction from the database and computing sales tax in the gui form?" programmer: "Well, the form has the TOTAL amount displayed to the customer so it made sense to me to put that db-dependent code there." code reviewer: "No, that's what the "Model" code is for. That's the "M" in "MVC". programmer: "Oh, the model source code is where I update the GUI progress bar because that's where the state variable that keeps track rows processed is stored. "