The great thing about let and const, for me, is that it gives you crucial information about variables without having to look further down.
const should be the default, and if you're going to reassign it, then use let.
In most code, you'll use const on the vast majority of variables, and it'll make let assignments stick out, which helps a lot when you're browsing the code or refactoring.
This right here. One of my friends (a more experienced developer) told me at coffee one day, "I use const for everything" which really stuck with me. It really helps make it clear if you need a mutation to have let stand out.
Yep. In those cases, I still prefer let personally even though I know the variable itself will not be re-assigned, kind of as an indicator that I expect the referenced object to be mutated.
Coming from a background that includes some experience with C / C++, `const` here works as I expect it to. I'd prefer `const` even for the object reference case: I get errors on reassignment this way, and presumably it makes additional optimizations possible. To each their own, I suppose :)
There's also `Object.defineProperty()`, `Object.freeze()` for more control over mutability.
I just wish let was in fact const (and something like "local" could be let), simply because the keyword let is nicer to type, easier to read, and more importantly better in line with the meaning of let in Lisp/Scheme/ML/OCaml/et al.
That doesn't explain how someone can just let it happen to the point of suffering of it every day without taking simple measures to reverse it.
Most of the time the difference between steady gaining or losing weight is a few hundred calories a day. That's far from a lifestyle change.
When moving around becomes difficult, when dating becomes harder, when the aches and pain start... there's gotta be more to it than just a lot of sugar in your everyday stuff.
I always wonder (for other drugs too), if they're a way to slowly remove yourself from situations, or whatever it is, that make you uncomfortable. A way to permanently disqualify yourself from the race, because the idea of running (no pun intended) makes you anxious?
"That doesn't explain how someone can just let it happen to the point of suffering of it every day"
Abstract out the obesity, and you've described every chronic health condition, ever. A huge number of emergency room admissions read something like: I thought it was normal that road signs were getting a little blurry after 40. Sure my heart screams in agony when I climb stairs, but who's doesn't? My knees are in crippling pain for days if I hike more than two miles. Every time I drink, I drink till I pass out or are arrested, but doesn't everyone? After I eat sugary food (aka modern american diet) I feel faint and fuzzy, that's normal, right? I hear voices in my head more often as time goes on. Why how odd that pain pill has smoothly and gradually gone from something to make life bearable after surgery, to life is unbearable without it, to life is unbearable even with it.
People tend to be pretty good at getting medical care for acute things like bleeding out more than a quart or so, or broken bones, but not so good at getting help for chronic things. Gettin fat is obviously not an acute problem.
The food industry has a significant number of people employed whose whole job is to make you think foods are healthier than they are and get you to eat more of them. I mean it's not by accident that almost every food in the supermarket ended up with some health claims on the box (my favorite examples of this are, like, "natural" eggs and "gluten-free" meats).
That's assuming you're buying your own food; if you're eating in a restaurant or something you don't even really know what you are consuming.
Interesting, so I guess it's an education problem?
I guess just like real-talk sex-ed went against the interest of big-church, teaching some basics when it comes to nutrition would hurt a lot of big-food...
I don't think it's just that, although many have found it suspect that the dairy industry gave a lot of funding that helped the development of the original food pyramid with dairy as a core food group.
To me it's more like the current environment, to borrow a programming term, makes it difficult to "fall into the pit of success."
People generally do what those around them do. Why was smoking so much more popular 50 years ago? Why do people still smoke in 2016? Why is spanking almost child abuse, now?
It's not like we're rationally considering each small action. Instead, at any time, in a give society, there are a set of behaviours that are considered within the normal range. We're mostly on autopilot.
I wonder why, when we talk about obesity, there is this tendency to use language that removes responsibility from the person, or at least move it from their mind to their "body", as if they were different entities.
I think obese people fit the definition of addicts. Most of the time, other addictions are fought by pushing awareness on the person, forcing them to recognize they have a problem and that they need to change.
I don't hear much "you were born this way" or "that's just what your body wants" for other drugs. Is it because other drugs are always viewed negatively, whereas food is a pillar of life under normal circumstances?
Maybe it has to do with the very high prevalence of obesity, and the echo chamber being big enough that deflection and denial are harder to combat?
> I wonder why, when we talk about obesity, there is this tendency to use language that removes responsibility from the person, or at least move it from their mind to their "body", as if they were different entities.
I wonder why, when we talk about obesity, "responsibility" even enters the discussion. Obesity is a nationwide phenomenon, which means for "responsibility" to be the root cause, we have to posit that people as a whole are "just less responsible" than previous generations. It's ridiculous to posit that a basic biological process such as the ability to regulate food intake has changed so dramatically in just one generation.
"Personal responsibility" as the root cause of obesity also leads to questionable conclusions. 20% of black children are obese versus 14% of white children. Are black people just "less responsible" than white people? I think that conclusion requires a special level of justification for obvious reasons.
I'm just wondering why there seems to be more empathy towards people with eating habits problems, than when it comes to other addicts.
Maybe because they cause less damage to other people?
I don't think humans are less responsible, on a society scale obviously the problem is deeper. I'm just wondering why for other problems we blame people, but not for that one.
Maybe it has to do with addictions moving away from some common substances (alcohol, tobacco) and the food industry picking up the slack? And maybe in an evolving world, the number of addicts is bound to increase, as we adapt to the rise of new forms of pressure. Like the ever increasing lemon-squeeze dept system, or in-app purchases??
> I'm just wondering why there seems to be more empathy towards people with eating habits problems, than when it comes to other addicts.
Because 75% of the country doesn't have a moderate to severe coke addiction. "Addiction" is what we call behavior that falls outside the "normal range" on the bell curve. What the majority of people do is by definition "normal" and so when you have a problem that afflicts the majority of the population, the problem is considered structural rather than aberrational.
> "Addiction" is what we call behavior that falls outside the "normal range" on the bell curve.
I don't think the definition of addiction has to do with how many people are addicted. Seems uncontroversial to me that the majority of the population in the early part of the 20th century were addicted to tobacco smoking, for example.
Google brings up this definition of addiction: "physically and mentally dependent on a particular substance, and unable to stop taking it without incurring adverse effects." How widespread it is doesn't enter into it.
That may be factually true. But only now that everyone has stopped smoking do we actually talk about "smoking addiction." Back when everyone did it, it wasn't treated as an addiction with us blaming individual smokers for smoking. It was treated as a public health problem, and ultimately the blame was laid at the feet of the tobacco industry.
I think that was more of a linguistic change than anything. If the word "addiction" had been commonplace during the lead up to Prohibition, I bet you that the prohibitionist movement would have constantly used the term "alcohol addiction", despite alcohol use being ubiquitous. Nowadays, for example, you see articles talking about "caffeine addiction", despite the fact that the majority of the population drinks coffee.
I think you're absolutely right that "addiction" has a negative connotation, and all things considered most people are less likely to pass judgment on things that the majority does. But people do criticize popular things all the time too.
> But only now that everyone has stopped smoking do we actually talk about "smoking addiction."
Er, no, we started talking about nicotine addiction long before that.
> Back when everyone did it, it wasn't treated as an addiction with us blaming individual smokers for smoking.
Actually, treating it as an addiction has been exactly the opposite of "blaming individual smokers for smoking" -- while certainly the fact that it has become rarer has coincided with an increase in stigmatization (there's a two-way causal relationship there, in a positive feedback loop), that's separate entirely from treating it as an addiction (that's treating it as something people don't like around them.)
Treating it as an addiction is providing medical and counseling support for people to deal with the addiction, and placing blame on the tobacco companies for deceptively and knowingly marketing an addictive substance for many years.
> It was treated as a public health problem, and ultimately the blame was laid at the feet of the tobacco industry.
You seem to use "as an addiction" and "as a public health problem" as if they were opposites, which is odd, because actual addiction is (and is treated as) a fairly significant public health problems.
I have a coworker with a problem maintaining insulin hormone levels. He needs to work harder, pull himself up by his bootstraps like the rest of us, and stop blaming his body. He needs to recognize the need to change, IV insulin addiction is no joke. I can just wave my hand and say he needs to change his diet or lifestyle or something and it'll all go away and he won't need those nasty needles anymore.
Its pretty much the same isituation with people having leptin level problems, or dopamine and serotonin level problems for that matter. Or epinephrine levels. Or testosterone/estrogen balance level problems. Or cholesterol problems. In fact this is quite a long list...
My guess is -- correct me if I'm wrong -- it's because you're not a doctor or researcher who works in any of these areas (nutrition, obesity, addiction), and haven't read much research on the intersection of these topics.
> I think obese people fit the definition of addicts.
I'm curious how you have arrived at this conclusion.
You'd probably be surprised how much time I've spent learning about those subjects, from many different sources.
I'm an engineer. I want to understand stuff. Obesity is a perspective that I thin can give a ton of insight about human nature, society, evolution, progress, globalization, advertisement, medias, etc.
As for the definition, feel free to pull the definition from anywhere and see if there are any contradictions when applied to obese people.
This attitude is tiresome for precisely the reasons outlined in the article. That one guy in the article has to consume 800 calories a day fewer than a normal person his size to maintain his weight which likely means dealing with constant hunger. It's not exactly surprising that few people manage to succeed under those circumstances.
I also, frankly, think the opposite is true -- most material about obesity spends a lot of time vilifying fat people.
I don't think that's how hunger works. Do you think hunger is triggered by an absolute number?
Isn't hunger the sensation you feel when your body starts dipping into your fat reserves because the content of your stomach / blood is not sufficient?
No... I said no such thing. However, if you lose weight you will generally feel hungry until you start eating at levels that would restore your weight, as detailed in the linked article and also this one: http://www.nytimes.com/2015/08/30/opinion/diet-advice-that-i...
> That one guy in the article has to consume 800 calories a day fewer than a normal person his size to maintain his weight which likely means dealing with constant hunger.
And the recovering alcoholic has to consume more alcohol than the average person, at first, to make it through their days. Same effects, different substance.
Alcoholics don't have to keep drinking a beer or two a day to live; the analogy is obviously flawed. Also, this study, it says, took place years after the weight loss.
> I think obese people fit the definition of addicts.
Most, in fact, do not.
> Most of the time, other addictions are fought by pushing awareness on the person, forcing them to recognize they have a problem and that they need to change.
That's not particularly true. Some addictions are managed through medical interventions, and those that are addressed through counseling usually start with the addict coming to the realization and seeking treatment, not "pushing awareness" on the addict.
> I don't hear much "you were born this way" or "that's just what your body wants" for other drugs.
Actually, recognition that problems with substance use (whether or not they end up in actual addiction) often originate in clumsy attempts at self-medicating real conditions and that finding alternate means of addressing those underlying conditions is important in enabling people to manage substance use problems is, as I understand it, quite important in modern substance use disorder treatment.
> Is it because other drugs are always viewed negatively, whereas food is a pillar of life under normal circumstances?
Plenty of drugs to which one can be addicted are not "always viewed negatively". That's really only true (and only loosely in that case) of illegal drugs, which overlap with potentially addictive drugs.
It seems like the piece actually takes away some of the responsibility of the person. If your resting metabolism burns 400 calories per day less, you can eat exactly the same as someone else and slowly gain a lot of weight. I really don't think there is anyone to blame in that case.
That doesn't explain it though, as how much you weight and how happy you are with it should influence how you eat.
Obviously a kid and an adult, a sedentary female and an international athletes have different needs.
When you have tooth problems, you go through a lot to have it fixed. When your hair looks bad you get a haircut.
Some obese people change their lifestyle and lose that weight. So what about those who can't? Is it too hard because of whatever predisposition (or, as other comments point out, having a huge industry putting tasty things in front of them), or do they just feel better being big?
I've experimented quite a bit with how I eat, and gone through extended periods of fasting. To me, the "real" hunger, the debilitating one, only lasts so long. It feels like once your body is entirely relying on itself for food, it just goes away.
The "other" hunger seems to come with boredom or other emotional variations though.
Unfortunately I have never done those thing more than a couple weeks at a time, but I can talk about the opposite. My "natural" weight (where I end up if I only eat when I'm hungry) is too low, and even if I'm super lean at that weight I don't have enough muscle, and end up having back / knee problems.
I have to pay attention every day to eat a little bit more than I feel like. It is a big effort, and sometimes I'm just not up to it, but I'm not sure how it compares to dealing with hunger.
I think a big difference with obesity is that the obese may not exhibit any external behavioral difference. That is an obese person may eat the same amount of food (and same foods) as a non-obese person.
Being obese is probably more like not being good at math, than a heroine addiction. People who aren't good at math could probably use more work at math. Yet, just because they read the same books as Terrence Tao -- don't expect the same result.
>I wonder why, when we talk about obesity, there is this tendency to use language that removes responsibility from the person
Whether they are right or wrong, there is a significant community dedicated to promoting the view that personal responsibility has nothing to do with weight gain/loss.
I think the problem with making this change to more generic networked protocols is several aspects become a lot trickier then you can't impose limitations on the filesystem.
The biggest problem, as usual, is invalidating the local cache. For Dropbox, who own and implement the authority on the shared drive state, it is a _very_ (relatively speaking) simple problem.
Other protocols like SSHFS have to deal with filesystems of all kinds. Many of those do not support anything like inotify, and polling over huge directories would be horrible experience or performance wise (long delay or slowing down the whole host machine).
For your specific example, probably because the implementation is different.
The most notable difference is that arrow functions do not set the "arguments" variable, but there are other subtleties.
I'm not sure how it is done in V8 and co, but if the code is highly optimized, you might have to rewrite big chunks of it, even for small differences, because your optimizations do not go along with a slightly different implementation, or to avoid painful regressions.
Nitpicking but in SC2, or any video games, actions aren't analog.
A unit's position is a function of 3 _probably_ 32bits numbers, giving 2^96 discrete positions.
You can get that number much higher probably, by adding other factors like current speed, orientation, etc.
You're right though that you have to tackle the problem differently, because while you'll be able to try to define a strategy in go by iterating over a bunch of discrete possibilities in the 19x19 grid, there is no way you can do that for a 2^hundreds size grid with current tech.
I guess AlphaGo is in for a few semesters on strange attractors!
Particularly the "last mile" or "Chrome Homepage" tabs.
They cover the top websites, grouped into categories like "Retail", "Travel", "Media", etc.
The disparity across competitors is pretty stunning, with some websites getting close to 1 second to download/render a page, and others taking 6, 7, 8 , even 10 seconds. And these are all big, well known, companies.
And, for the most part, it all correlates very well to total page weight, and total number of artifacts on the page (js/css/images/etc). There are some exceptions, but it's a pretty strong correlation.
Hmm... 8 watts sounds extremely high to me. My Broadwell laptop uses less than 3 watts when idle, and most of that is the display. Even my old Ivy Bridge MacBook Air from 2012 idles at 5W. Is there some peripheral responsible for the higher idle on your system? Maybe a hard disk or dedicated GPU? I'm curious about what's causing the difference.
const should be the default, and if you're going to reassign it, then use let.
In most code, you'll use const on the vast majority of variables, and it'll make let assignments stick out, which helps a lot when you're browsing the code or refactoring.