2,960 karma · joined Apr 1, 2014 (12y ago) · 995 submissions
comment 5y ago · link · parent
One is being immature and frustrated at the lack of planning and control in one's life, so one retaliatorally "plays" when one actually has the power to decide.
There was an article not too long ago about overly-controlled/time-regimented children doing this same thing. When they have no power over how to spend their day, they decide to control their night, to their own detriment, health-wise.
comment 5y ago · link · parent
One audience matches your description and is the invested reader. They want that blogger's story telling. they might make the recipe, but they're a dedicated reader.
The other audience is not the recipe-searcher, but instead Google. Food bloggers know that recipe-searchers are there to drop in, get an ingredient list, and move on. They won't even remember the blog's name. So the site isn't optimized for them. It's optimized for Google.
"Slow the parasitic recipe-searcher down. They're leeches, here for a freebie. Well they'll pay me in Google Rank time blocks."
comment 5y ago · link · parent
OP clearly stated he didn't understand it:
> When it's just "if" it goes after the "for", when it's "if/else" it goes, all of it, before. I still don't understand why it's this way
and discussing it here on HN shouldn't be punished.
...
Back to the topic at hand ...
List comprehensions save you enough syntax to be worth it, IMHO:
mylist=[]
for i in container:
if i > 10:
mylist.append(i*2)
vs mylist = [x*2 for x in container if x > 10]
... That's a very terse, clean request for work and arguably it's easier to read than "for(int i=0; i<10; i++)", which we've all acclimated to by the end of CS101. I think they're quite worth the trade-off.comment 5y ago · link · parent
In your case you were conditionally choosing a manipulated return value for x and didn't care at all about filtering the list. Here's one with both:
[x if x > y else x*2 for x in a if x % 2 == 0]
^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^
return x as... filter down to only...
x or x*2 even 'x's
There's not really a semantically logical place for an "else" in the latter half because it's only looking for a true statement so it can return x (or not).For example this makes sense:
... if x % 2 == 0 or x == 3
(filter the list to even values of x or the value 3)but this does not:
... if x % 2 == 0 else x == 3
(filter the list to even values, otherwise wait, otherwise?)comment 5y ago · link · parent
https://www.cnn.com/2021/08/17/tech/apple-child-safety-tools...
comment 5y ago · link · parent
comment 5y ago · link · parent
In short, I think OP's observation is that of a pessimist's.
If not "MAJOR.MINOR.BUG" (which needs no improvement IMO) I'd go with...
TECTONIC.FEATURE.FIX.
comment 5y ago · link · parent
"Oh, nothing will happen to this [corrupt politician|naughty rich guy|corporation doing a thing I don't like], because they're all [bad thing]. It's all over already." :facepalm:
(Also, I couldn't read the original article because my work thinks it's spreading malware or something so I'm really only referring to the fatalism thing here, not Apple.)
comment 5y ago · link · parent
[snip]The English used to feel pretty uncomfortable about yanks grinning away at everything[/snip]
That surprised me, since our cultural norms largely stemmed from there.So what would account for the difference? It must've come about after we split as a country.
I wonder if it's our Declaration of Independence including "the pursuit of Happiness". See:
We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness.
Nowhere else in the world (up until then, anyway) gave as its founding commandment that being happy was an indicator of a life well-lived.Thus, perhaps, while other places reserve the effort of smiling for the emotion of irrepressible joy, Americans -- to prove they're living a good life -- present a smile.