The net/http library is the caller in this case,
so that would be consistent with the rule that callers
should start goroutines.
Request handlers are a bit of a special case too, in that
they are a framework for dispatching tasks to be worked on;
what is main() for a command line program is the request
handler for a webserver. It seems fair that there is some
concurrency coordination happening at the top level.
Yeah, but it doesn't spin up a thousand for every request. And it doesn't require you to start them. It starts them under the covers as part of the API.
The article says almost exactly the opposite, and I agree.
Your API should present all of the things it does as synchronous functions/methods. If callers want to run them asynchronously, they can easily provide their own goroutine to do so, including whatever lifecycle management makes sense for them.
The concrete example was
// Do this
func (t *type) Run(ctx context.Context) { ... }
// Not this
func (t *type) Start() { ... }
func (t *type) Cancel() { ... }
This is generally good advice which stops a whole class of extremely common and very tricky to debug orchestration bugs outright.
Funny thing: in the last couple years I've seen way more back buttons broken because of backend idiossincrasias than anything else.
It is super common to see "Don't use your back button" messages after placing orders on e-commerce websites.
On the other hand, most frontend developers writing SPAs just use react-router or something like that (instead of reinventing the wheel) and it just works.
Yet there was a post about how specifically to do that on dev.to because their users couldn't tell their modal was a modal, and the solution they came up with was to hijack the back button.
Phone applications and their data are so abstracted these days, it would be difficult for even an IT expert to differentiate between cloud and local data if search takes place using the device itself (which I assume is what happens). If they connect the phone via USB and browse the contents with a workstation, that might be a different story.
Some apps won't let you access any of your content without authenticating with their servers. So even if it's local content, not having an internet connection would deny access. I can envision CBP saying they need to crack your phone to get to the local stuff.
I was thinking the same thing - for purposes of making a record of the evidence and to ensure some forensic integrity (as well as only obtaining local data) a USB connection is the best approach.
FWIW, my laptop and phone were searched going into Canada and there was no special technology used - the officer just made me unlock them and hand them back to him.
Apple should add many QA steps filtering out the vast majority of bad parts. First there would be incoming QA on any received shipments. And any well run assembly line contains many check steps to make sure the unit has good constituent parts. This way you don't burn good parts farther down the line on a unit that was never going to pass. Then there is out going inspection and burn in testing.
All that testing increases overall quality and value.
In theory that's possible true but in practice on an iPhone I highly doubt a DIY can do "the exact same thing". For one there are important ports we can't access, like JTAG testing the SOC. And there is a whole other factory OS which we have no idea what it does and why.
Bottom line: We're all in a prison, and shit sandwiches are for dinner. I'll take the one with 90% less shit until (hopefully someday) we're all released from the prison that is American democracy.
Agree 100%. I think that the city of New York has no business putting limitations on how a property (that you own) can be used and leased. If you have a community/association that's making those rules, fine... that's fair. It's fair because you agree to their terms prior to purchasing the property. If you rent a property and the lease explicitly disallows subletting, fine. That's fair too. Rules and laws should be granular, specific to their locality, rather than vast sweeping blankets.
I'm also in favor of zoning for residential and business, that makes sense. But there's a big difference between someone operating a high foot-traffic business out of their home, and seeing an occasional stranger walk into a residence every other day or so.
If there are no specific rules that a localized community has agreed on, then Airbnb should be fair game. Why should the municipal government make the rules?
Wow, just read an article on ADHD in France, and I think that their system is incredible. It really aligned with what I've thought all along: depression, ADHD, and a few other "neurological disorders" are symptoms of a person not operating in an optimal environment (for themselves specifically).
Take ADHD for example: A child won't sit still in class, is constantly distracted, and performs poorly at school work. Let's use occam's razor to figure out what's going on here. Was this child born with a rare neurological disorder causing an imbalance in monoamine neurotransmitters? Possibly... Or maybe was the real cause is this: a lack of exercise, a poor diet that includes lots of sugars and unnecessary carbohydrates, lack of socialization outside of the school context. The list goes on and on. I really believe that if you do your due diligence in ensuring your diet, health, social life, and other important factors are all in a good state, these conditions magically disappear. Sure, the kid might have low levels of dopamine because of their suboptimal lifestyle. But there are ways to fix the problem without shoving NDRIs/amphetamines down their throat: change their routine, their diet, their life.
I'm not saying that ADHD doesn't exist, I'm just saying the true percentage of ADHD cases is probably a much lower (see France) than what's purported in the US.
But in the end, it's easier to pop a pill than change you or your child's lifestyle. Plus the pharmaceutical companies make a buck, and tell you what you need to hear to believe that stimulants are the only option for treatment. Sometimes they might be a good option to jumpstart the process of digging yourself out of depression (SSRIs in this case) but I don't think that the chronic administration of drugs is healthy and optimal in the long run. There are better solutions out there.
(P.S. Obviously I'm not stating any of this as fact. It's just what makes sense to me after dealing with, and evaluating my own anxiety and depression.)
Very cool learning experience! For those of you who are into hiking volcanoes, I'd highly recommend the Tongariro Alpine Crossing in New Zealand (http://www.tongarirocrossing.org.nz/tongariro-alpine-crossin...). It was one of the best experiences of my life.
I'm not often near volcanoes nor enough of a hiker to seek them out but while in Bali for a few weeks, I did a sunrise hike of Mt. Batur. That's less than half the height of the one in the linked essay but it was still somewhat challenging for my somewhat out-of-shape body (not something I couldn't handle by any means but definitely wore me out). Getting to the top by sunrise was really impressive and I'm really glad I had the chance to hike it.
This assertion is just as unfounded as the opposite.