That's okay, but does not make the change hard to make.
527 karma · joined April 24, 2019
That's okay, but does not make the change hard to make.
I can vaguely recall (but it's 1AM so I didn't verify - take with a grain of salt) that nodejs uses an a thread pool for IO, but I guess that's only for IO for which there is no async API, otherwise that would be wasteful.
I imagine a quick search about the event loop and said thread pool would yield better researched answers :)
This is actually an important property of JavaScript that allows it to work without locks (as long as you do not await, your code runs completely synchronously and will not be interrupted). It's not a flaw, but definitely requires awareness.
Gevent code that doesn't spawn more than one native thread (the one that runs the event loop) also has this property - you don't need locks as long as you do not perform IO. In Python's case it can be more tricky, as you might end up yielding to the event loop by indirectly performing IO when logging or something similar.
In JavaScript, the only case, AFAIK, where this can happen is when you await. Nothing else will cause you to yield to the event loop.
Rachel says that a thread is only ever doing one thing at a time - it is handling one request, not many. But that's only true when you do CPU bound work. There is no way to write code using blocking IO-style code without using some form of event loop (gevent, async/await). You cannot spin up 100K native threads to handle 100K requests that are IO bound (which is very common in a microservice architecture, since requests will very quickly block on requests to other services). Or well, you can, but the native thread context switch overhead is very quickly going to grind the machine to a halt as you grow.
I'm a big fan of gevent, and while it does have these shortcomings - they are there because it's all on top of Python, a language which started out with the classic async model (native threads), rather than this model.
Golang, on the other hand, doesn't suffer from them as it was designed from the get-go with this threading model in mind. So it allows you to write blocking style code and get the benefits of an event loop (you never have to think about whether you need to await this operation). And on the other hand, goroutines can be preempted if they spend too long doing CPU work, just like normal threads.
I don't think that whether it has this property (and value) is in question - the question is how much of BTC's price is fueled by that value.
I definitely wouldn't do anything "to teach somebody a lesson", that seems culturally unhealthy. Talk to them about the issue.
That's one plausible explanation, but in any case, even if my explanation is wrong, I doubt the explanation is interesting.
I definitely agree - I've watched people painstakingly stare at code, add print/log statements and waste enormous amounts of time -- and then I asked them why they don't just use a debugger and always got unsatisfactory answers that seem to hide the fact they have a hard time using the tool effectively.
Of course, like you say, using a debugger effectively in many settings is difficult. A multi-threaded program setting a breakpoint and inspecting state difficult, as finding the right thread to inspect can be difficult -- not to mention having other threads alter your debugger's display state by breaking once you're already inspecting the correct thread. I've had this happen with native software (e.g. C++), for which rr is great (but unfortunately I've worked mostly on Windows), but also for backend software written in higher level languages such as Python.
Using a classic debugger effectively in a multithreaded environment requires being aware of the issues you're about to encounter, and knowing how to deal with them with the debugger's tooling -- which ranges between difficult and not possible. For example, with Windbg - it is possible to break on the correct thread, but setting a conditional breakpoint (even a simple one) is nothing less than an incantation to someone who's never used it before. As such, the cost of entry is very high, and I've watched kernel driver developers use prints and asserts to debug.
While at my previous job, I thought that logs are a really crappy way of debugging an issue in production when it arises - if you have all the right information and can fetch it quickly, great. But often, that's not the case - you might end up needing to add logs, or worse - the issue will be in a hotspot where you simply can't log - since you'll have _too much_ data, or you can't log everything for compliance reasons.
I had a similar idea to Rookout's (and even almost accidentally raised money just by talking to the right people, although I was not prepared at the time to start a company), and discovered Rookout later on, going on to use them.
When I left my last job, I joined Rookout because -- like O'Callahan (and Pernosco) -- I'm very much a strong believer that the way debugging is today isn't good enough, and can be a lot better.
Nowadays Rookout's product for interactive debugging backend apps is pretty much complete, works well and fast -- and we're exploring other ways to make debugging easier.
Rookout's a bit different to rr/Pernosco in that it allows you to collect variables from anywhere during runtime (instead of allowing you to replay a recording) -- it's a bit similar to allowing you to add a log that logs locals() anywhere, except without changing your code, redeploying, etc.
Also, if the person does not respond positively (and I don't mean they respond negatively, but if they say no for whatever reason), don't ask again. They now know you want to and will let you know when they're free, and once they do, even if you're the one whose busy, you'll know you're not bothering them.
At least in Israel, lunch is regarded as inherently acceptable in a professional setting, since it's in the middle of the workday, even if you're eating out. Generally I'll only ask people to meet on their personal time if I feel like we know each other well enough and they like me back, otherwise it's an inconvenience -- asking for somebody's personal time is a big ask. With the opposite sex, I find it's really hard for a simple invite for dinner or beer to be misconstrued as an advance. It also helps that the vast majority of female engineers I know are in a relationship, so that makes my intent blatantly obvious.
Facebook also lets engineers (and only engineers, oddly) eat out on Wednesdays.
He put on a gas mask and called for liberation of HK. I'm with him, but I definitely see why Blizzard has the rule in place, and it would not be right to overlook this - they would then have to be OK with others doing other protests. Blizzard should not pick a side.
Just as Google maintains their search engine for "free" to show you ads, they maintain Kubernetes so that you use it on their cloud platform. You fix bugs in Kubernetes so you can have the fix you need, at work, when you need it.