At that point you're left with two benefits: 1) Organizing your codebase so that it is easy to find which functions operate on which data 2) Controlling access to those methods on the programming language level. I.E, TankerService is the only class with Tanker instances and therefore the only part of the code with access to those methods.
HN user
raiflip
So you're filtering specifically for timeslots where the end date is null and therefore guaranteeing that you return a timeslot dated to now?
FP has also benefited from a hype cycle, and FP does improve code in a lot of ways. Making your data immutable makes it easier to reason about, and pure functions prevent surprises. However if your argument is state is bad, and FP avoids state, so that is why it is good, but you encounter a scenario in which state is required, then the benefits of FP start to degrade.
The reality is closer that, state should be immutable, and minimized as much as possible, but at the end of the day, almost every interesting problem requires storing state. Once you reach that point, classes are simply a better solution for state than closures. Especially if your class and its variables are immutable, you get all the benefits I mentioned and none of these tradeoffs. Your state is explicitly stated.
Sometimes it sounds like bay area programmers think how expensive their area is, is how it is for programmers elsewhere. I also get paid around the same range in NYC, but my mortgage is nowhere near 10k, my taxes eat maybe 40%, and I can definitely find restaurant meals for less than $30.
The high expenses of the bay area are a policy choice by the local and state government to disallow investment. As such everyone is competing for the same old housing stock and office space that cost a 1/3rd of what it does now years ago. In effect, house owners and landlords are appropriating tech profits to themselves.
I hope the banning of single home zoning in California helps to alleviate this issue.
"Turn around time to get a server spun up was ~6-8 weeks." -> ok this one threw me for a loop. I can literally get an EC2 server spun up within minutes inside Amazon. But as others have stated org quality varies a lot. If you are dealing with an org that requires you to say at the beginning of the year exactly what budget you need, I could see that.
I think this is absolutely it. A lot of best practices go down the drain when the compiler compiles the bytecode. As such a lot of best practices are about people, not the computer. APIs can be just as stable behind a network or a library, but way more people are onboard with never break your APIs than they are never break your function.
It seems reductionist to say Amazon primarily wraps around open source. What about EC2? S3? Glue? DynamoDB? Many of the services that provide the most value are services Amazon has built out.
Regardless of whether or not gravitons actually exist, it is feasible that the US government will want to signal to adversaries that they do have this technology. After all, a deterrent is useless if your adversary doesn't know it exists. You can't be deterred by something you don't know about.
Old Testament version of Christianity? You mean Judaism?
Types are just labels that a parse has already been done and doesn't need to be done again. Use them when you don't need to parse again, don't when you do want to parse again.
Eh I can see where you are coming from, but I don't necessarily agree with that. At least here in the US, corporations never accepted to unions as legitimate. It always took giant draw out strikes.
The drip is definitely correlation until proven to be causation. So it is possible the drop was a function of a common underlying cause.
The reason no other explanation makes sense to me is that any purely market based explanation, like energy or China, we would see a corresponding drop in US labor force productivity, but the whole point is that that productivity did not drop.
One question i have for you is, why didn’t the union just fight the cuts? A union is not a nicety granted by the corporation, its whole reason to be is to fight corporate power when needed. It sounds to me like that union was already made powerless by the time the crisis occurred.
Graph created by the Washington Post: https://www.washingtonpost.com/resizer/7IbsRIhRFbTYRuEjla6ki...
You can see union membership was on the decline since the 1950s, but it accelerated around the 70s. It is hard to see the timeline in that graph, in this one it is harder to see the acceleration, but it is easier to see the timeline: https://rpubs.com/jncohen/uniondensity
For sure
A fairly simple explanation that for some reason I don't see a lot of is the drop in union membership density around this time period. Such a drop would decrease bargaining power and therefore decrease the rate of wage increase
Totally agree, that’s a good point.
That example seems a bit odd as a design. You’re throwing an exception to represent a no result, but suppressing it to convert the exception to a none. Monads give you the convenience while being consistent.
What if you need to access 5 resources in a row, any of which can throw exceptions? A monad centralizes the repeated logic in its flatMap function.
A monad really is just a wrapper around a value, with flatMap and return.
For some kinds of monads, like maybe, that’s all you need.
But, some other kinds of monads need more logic. List is one, IO is another.
In OOP language, sometimes all you need is the parent class. But sometimes you need to extend the parent and add more.
I really like how this article builds up from a simple real life use case.
Shameless plug for my own article that did something similar about a week ago: https://medium.com/@ameltzer91/an-easy-to-understand-monad-g...
Thank you for being fair-minded on city vs suburban living. Too bad the top post is the usual city-hate.
I've dealt with whole teams of these kinds of people. They also get extremely defensive about anything they don't know. Even worse, this was particularly the case around proper testing. Suffice to say the team committed a lot of bugs to production.
That's not quite right, and the author is reaching for a valid definition, but it also not quite getting it right (entropy is hard).
Entropy is defined as: "It quantifies the number of microscopic configurations that are consistent with the macroscopic quantities that characterize the system."
Where there are two levels - microscopic - which in this case doesn't necessarily mean invisible to the eye, it means the individual units of the system. In this case shoes. And macroscopic - which is the system as a whole, or in this case, the set of all shoes. A single macroscopic state is the set of shoes in some (maybe random) order.
Finally "macroscopic quantities" refers to a property of the macroscopic system. In this case the author is using the macroscopic quantity of "how fast can I find a shoe of a particular order".
In this case, entropy measures, for a given macroscopic quantity, how many microscopic configurations exist. For example, lets say the given macroscopic quantity is "I find a given color shoe in O(n) time." Then every configuration of shoes that does not attempt to order the shoes is a possible microscopic state. There are lots of those, so high entropy.
Another possible macroscopic quantity is "I find a given color shoe in O(logn) time". In this case the shoes need to be ordered, leading to far fewer states. Hence lower entropy.
If this is not clear, it is easier to see if we constrain ourselves to having one pair of shoes for each color. Then the O(logn) configuration has 1 state, while O(n) clearly has many more, so obviously the O(logn) state has lower entropy.
However the same logic applies to having >1 pair of shoes for each color. In the O(logn) case, we can only swap shoes of the same color to have the same macro state. In O(n), we can always swap any shoes of any color, as long as this swap isn't the last swap needed to achieve order.
Another possibility is that the galaxy (and universe) is full of life, but the speed of light makes it impossible for life across the galaxy to interact.
From what I've read on China's mindset, they are impatient to regain middle-kingdom status. In other words, they are the economic, military, and cultural center of the world, and everyone else sends them raw materials. (trying to find the article where I read that - it was from some US diplomat).
A pre-req for that would be to secure complete control over all territorial claims. So if they can speed up the hong kong integration, they would do so.
Whatever you do, do NOT repeatedly draw penises. Bad stuff starts happening....
My question to people who think this is objectively a bad thing - given the usual line of thought to get that conclusion is that we shouldn't be prejudiced towards valuing humans any more than other living creatures (which makes sense), then why would the replacement of non-human biomass with human biomass necessarily be good or bad?
Now I kinda know some sensible answers to this question. For one, genetic diversity in life is critical for survival given diversification means at least a few strands can survive sudden unexpected events. i.e if everything were giant dinosaurs there may have been no life left after the dinosaur extinction. The other answer is that we are pre-built to aesthetically enjoy thriving nature (which is probably meant to drive us towards protecting genetic diversity).
However given the human backlash to human trashing the environment, I could easily see us settling on an equilibrium where life is not, at least for the most part, the kind of wild chaotic world that it was before us, but a world where the environment is increasingly managed to some degrees by humans. You see this as nations getting richer stop eating cats, dogs, care more about preserving the environment, raising better treated wildlife, etc.
In that case, perhaps humans can help facilitate a new epoch in nature where genetic diversity is not just a biproduct of a random process, but a conscious goal. Granted this would require a much deeper knowledge of nature, humility to know when we can't control everything, and a cultural shift towards being stewards of nature. But given the shifts that have already occurred in human thinking around nature, I don't think this is outside the realm of possibility. Given our increasing energy usage, it's probably the only route in which we don't end up causing environmental catastrophes that either kill us off, or our civilization. That and finding new planets.
That's interesting. I certainly do not claim to be an expert in raising cattle. Perhaps there are smarter ways we can raise cattle. Is that why the grass-fed label is so important?
Necessary is not the right word. More efficient might be better. It's entirely possible to get protein from plants and omega-3 from vitamins, but from a human health point of view, is it more efficient?
What about in the case where animals can extract more nutrients from plant food than we can? Cows in particular have specially built stomachs that can extract nutrients from plants than we can. I don't think this would be enough to make eating meat more efficient, but it may be necessary to eat some meat to get nutrients you wouldn't otherwise get from plants.