News for hackers. Stuff that matters.
Re:I Didn't Get Hired to Google by minimaxir on Wednesday January 11, 2017 @09:41AM (#13374150)
I do wonder what the parallel equivalent of headline clickbait in code is. Functions with very few LOC? :P
Re:I Didn't Get Hired to Google by philh on Wednesday January 11, 2017 @09:49AM (#13374207)

    /* You won't believe the one weird trick this function uses to compute inverse square root */
Re:I Didn't Get Hired to Google by jasode on Wednesday January 11, 2017 @10:05AM (#13374359)
>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. "

Re:I Didn't Get Hired to Google by tyingq on Wednesday January 11, 2017 @09:59AM (#13374303)
This 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#...

Re:I Didn't Get Hired to Google by euyyn on Wednesday January 11, 2017 @09:51AM (#13374228)
I'd say functions and methods with overly generic names, like "process" or "prepare". You won't believe what happens inside!