And how is that even a fix? The problem is that a seemingly empty textarea has overflow in the first place. Adding `overflow: hidden` just sweeps the issue under the rug.
In my experience, the results from those who claim they can judge skills based on a lunch conversation have not been good. I think people who can do it are the exception, not the norm.
And yet six years later still no widespread support for the 'safe' keyword. Which means the content can overflow the container without a way to scroll to some parts of it: https://jsfiddle.net/r50qseah/
I was recently writing a function that returns early if all items in a list meet a certain condition. It was interesting to think about what should happen if that list is empty.
The most important reason is semantics. If "O" and "0" look alike in a certain font, should we use the same character code for both? No, because they have different meaning.
Here are some contexts in which this semantic difference is important: search (compare search results for "cop" and "сор"), alphabetical sorting, text-to-speech, spellchecking, case conversion ("ATOM" -> "atom", but "АТОМ" -> "атом", note the difference between t-т and m-м).
> But it covers many cases, including the one here.
In my experience, it doesn't even cover cases such as this one, but it certainly makes developers confident they don't need to apply contextual escaping.
I think you define passion too narrowly. It's hard to monetize your passion if the only thing you enjoy is drawing pumpkins with charcoal on the walls of 18th century buildings.
But flexibility helps. You could, for example, make a living working on V8 or SpiderMonkey, and work on your programming language as a hobby.
> Money is like gas in the car — you need to pay attention or you’ll end up on the side of the road — but a well-lived life is not a tour of gas stations!
See, he acknowledges the importance of money. But once your basic needs are met, you can start discovering what matters to you. Music and creating your programming language are just to points in a huge space of things you could potentially enjoy. There are many jobs that, even though they don't sound sexy, allow you to explore this space and gravitate to things you like. The choice is not always between being a slave or dying from starvation.
Every basic emotions researcher comes up with a different list. But most of the lists include some version of fear, anger, disgust, and joy (but not sadness). "Emotional Brain" by Joseph LeDoux, chapter 5 has more info on various lists. From the same book:
James Averill, a major proponent of social constructivism, describes a behavior pattern, called “being a wild pig”, that is quite unusual by Western standards, but is common and even “normal” among the Gururumba, a horticultural people living in the highlands of New Zealand. The behavior gets its name by analogy. There are no undomesticated pigs in this culture, but occasionally, and for unknown reasons, a domesticated one will go through a temporary condition in which it runs wild. But the pig can, with appropriate measures, be redomesticated and returned to the normal pig life among the villagers. And, in a similar vein, Gururumba people can act this way, becoming violent and aggressive and looting and stealing, but seldom causing harm or taking anything of importance, and eventually returning to routine life. In some instances, after several days of living in the forest, during which time the stolen objects are destroyed, the person returns to the village spontaneously with no memory of the experience and is never reminded of the event by the villagers. Others, though, have to be captured and treated like a wild pig - held over a smoking fire until the old self returns […]
Averill uses “being a wild pig” to support his claim that “most standard emotional reactions are socially constructed or institutionalized patterns of response” rather than biologically determined events.
I gave this question to a friend and she came up with what I think is a beautiful answer. Remember min and max X and Y coordinates seen so far, and count the number of steps. When this number gets larger than (maxX - minX)*(maxY - minY) we know we're in a cycle.
It's an extension of your idea of counting the total number of visited positions. What I like most about it is that it can work with streamed data.
The question starts with: "Consider a finite checkerboard of unknown size", which means you don't know the value of size-squared. Bitmap requires O(n) space, while the Carpenter's solution requires only O(1) space. And both require O(n) time. If an interviewee failed to see the difference, honestly I doubt I would want to pursue it further.