I'm assuming you have never needed to practice these problems as you already have basic programming skills and are thus able to do every Leetcode Hard within 30 minutes of first seeing the problem?
I typically do assignments from prospective employers in half the alotted time.
I don't waste my time trying to build a leetcode / hackerank profile. Edit: Compative coding has very little to do with industrial strength software development.
I had to quit coffee earlier this year because a single cup in the morning was keeping me up at night.
But, let's be honest: One of the questions that I solved was basically "detect if a string is an anagram of another string."
So cat -> act: true, cat -> dog: false.
This was just a matter of treating the string as a series of characters, sorting them, and putting them back into a string. Then, if it's an anagram, the two sorted strings match.
Can you solve that in under an hour? Specifically, can you solve that in under an hour when you can choose from 20 popular programming languages and unit tests are provided?
More specifically, if you've been professionally programming every day for ~20 years, can you solve that in an hour?
Ok sure. This explains a lot. If that's the problem you're getting, then it is indeed testing basic programming skills. But the general landscape has gone far beyond this. Nowadays this solution would probably not get you the job. Instead of sorting, you should create hashmaps storing counts of each character and checking equality of the hashmaps. And if you didn't produce the hashmaps solution within 10 minutes, you would not be competitive with the hoardes of people drilling these problems and thus producing the hashmaps solution within 5 minutes. What most people here are complaining about are being expected to solve significantly harder problems within tight timeframes. If you are interested in what these ridiculous problems can be, go to Leetcode and browse the "Hard" problems.
A Hashmap isn't "better." For example, if you need to optimize for memory, running a bubble sort on a character array will be the most compact solution.
Likewise, if you profile, there's no guarantee that a hashmap is faster or slower, or even more readable. It gets into the nitty-gritty of how memory allocation works and the overhead of maintaining a hashmap versus whatever optimized character sorting algorithms are part of your runtime.
Anyway, I've found that companies that want to ding me for those kinds of things aren't worth working for. IMO, we're better off having an industry-standard licensing board. Plenty of other industries do the same thing.
Edit: I've also spent an afternoon with a FAANG's set of practice programming challenges. I won't go into details out of respect for confidentiality, but they weren't unreasonably difficult. I only want to work with people who can solve "most" of them. (No one's perfect.)
The best analogy is like being a musician or an athlete. Anyone can learn to play an instrument or play a sport, but to be a professional musician or athlete requires something that takes more than practice. No one's excluded from those industries due to lack of talent, but the people without the talent have to take the jobs that support the musicians and athletes.
In those subjects they choose different units so that the speed of light is 1 of that unit, but it still has that unit associated to it. So it is not dimensionless.
The reason it is indeed left dimensionless is that in formulas it is impossible to keep track of the dimension of an implied factor that is equal to 1. In d = t, therefore, distance and time are actually measured in the same units (usually of time).
Sunlight gives us vitamin D and nitric oxide (which improves blood flow and reduces hypertension). Vitamin D is crucial for the functioning of our immune systems, and the 1000IU dosage of many supplements is laughably small. A light skinned person in a singlet standing outside at noon for 30 minutes will produce between 10,000IU and 20,000IU in their skin. I would recommend supplementing 5,000IU vitamin D while also getting some exposure in the morning or afternoon (but avoiding the sun when it is high in the sky).
The amount of UV exposure you get will differ significantly based on your latitude and time of year (and your skin type and weather of course). If anyone is serious enough to look into optimizing their sunlight exposure, I'd recommend playing around with these calculators to get an idea of what exposure is effective for you: https://fastrt.nilu.no/README_VitD_quartMEDandMED_v2.html
Recently there was article/paper on HN about specific UV light wavelength from LED diodes that can produce very good response without daylight, creating significant amount of vitamin D.
Different place. Skin is big area and the vitamin gets relatively slowly transported to liver for storage. On the other hand, eaten D3 is absorbed very quickly with a fatty meal and you could obviously damage your liver with it.
EPIC series of studies suggests dosage of 2000-3000 IU for all cause lowest mortality. (Europe, regardless of diet. Caucasian.)
pretty much whole Europe and whole India is vitamin D deficient, if you check actual studies, so no, unless you spend whole day naked in sun you won't get anywhere close to sufficient amount
this is great advice for the summer, but doesn't work so well in the winter, when the UV index is a small fraction of summer values and air temps are not conducive to skin exposure.
The thirst mechanism becomes less reliable with age, so older people may find those products beneficial. But yes, for most healthy young to middle aged people, "drink when you're thirsty" is generally fine. Maybe with the added subpoint that if your urine is often colored, try to drink a little more.
> Maybe with the added subpoint that if your urine is often colored, try to drink a little more.
Honest question: why? Are there studies that point to coloured urine as the cause of disease?
It's clear to me that coloured urine is associated with disease (since the body excretes waste products via urine), but not that it can be the cause of it.
This will sound wierd, but I knew a rancher who could diagnose a calf (correctly, confirmed by a vet) based on those two things. Ironically, he had been developing diabetes, which had he been paying as close attention to waste products he might have caught sooner.
PSA: Look before you flush, it's actually not a bad way to gauge general health.
Yes, that's it. If the C++ application exposes some service, then k6 might be the tool to test how it behaves under load now (or in the future). The only protocols we currently support are HTTP(S), WebSockets and gRPC, though we plan to add a lot of others (raw TCP/UDP, various DBs, queues, messaging, DNS, etc.) in the future, and we've recently added a way to extend the k6 functionality by writing external Go modules:
- https://github.com/loadimpact/k6/blob/master/release%20notes...
- https://github.com/k6io/xk6
There's costs that aren't the PnL of buy-low-sell-high. The coders, the data, the infra. All cost money, a lot of money. Add to that there's a competitive aspect in the models interacting with each other, there's no slam-dunk.
There's at least a couple of MMs struggling these days.
True but I feel that the market maker label gets applied pretty loosely nowadays, couldve been a firm that mixes in a lot of intraday position taking trades that blew up
Facebook's tendency to display content which reflect more extreme versions of the opinions that the user already has is probably a sizeable force behind our societies growing division. They know this, but they also know that type of content stops people from clicking off their site and drives up engagement, giving them more opportunities to advertise to you. They are a net negative to society.
There's a spectrum of roles. The role you describe is that of a trader at the extreme end (little coding ability required, manual monitoring of strategies/opportunities). But there are many traders who spend a majority of their time doing data analysis and programming while monitoring mostly automated strategies out of the corner of their eye. There are researchers who focus purely on statistics and ML projects. Some even get to spend a good portion of their time reading papers, expanding their knowledge and doing basic research, not just applying their existing knowledge to financial datasets. There are also Devs. Some work on ultra low latency systems (though this is not Jane Streets expertise). Some work on Jane Street's OCaml compiler.
Apart from the OCaml compiler, everything else is fairly typical of the spectrum of roles you can find at the very large high frequency firms. And mid-sized firms are similar yet again, minus the basic research. I would say it is definitely worth working in this industry if anything above sounds interesting to you.
Most fruit are nowhere near as healthy as most people expect they are. They have been selectively bred over many hundreds of years to be far larger, sweeter and more devoid of micronutrients than they were hundreds of years ago. The amount of sugar (especially fructose) in fruits like apples, oranges and bananas is shockingly high, and can cause or exacerbate conditions such as obesity, fatty liver, type 2 diabetes, gout and other metabolic or inflammatory diseases.
Replacing some fruit with vegetables instead, and choosing less sweet fruit like various berries or melons may be a good idea for most people.
Obese people avoiding fruit is one of the biggest eye roll on offer. I had a fat roommate who measured out the raw almonds he ate because they were calorie dense the same day he’d eat two whole pizzas for dinner.
Meanwhile, almonds and bananas aren’t the things making people fat. Looking at my own fat friends, some tasty fruit is the only fiber they even get.
And vegetables aren’t even on the menu of most fat people I’ve lived with. Don’t discourage the only healthy habits people do have.
Look at the the actual diet of an obese / fatty liver / type2 person and you’ll see how silly this advice is. It ain’t the fruit.
My own anecdote is that my dad was diabetic and he definitely didn't understand how much sugar was in fruit. He did ok controlling his blood sugar, but he considered fruit to be "healthy" and so ate about as much of it as he wanted, which regularly caused blood sugar spikes.
And I know it's not the same thing, but the number of times our small kids get offered juice as a "healthy" option when it's got almost as much sugar as soda... I think it's a real phenomena that certain things have a reputation for being much healthier than they are and it causes problems.
Sadly, as said elsewhere in the thread, many (but not all!) modern fruit varieties have been selected for sugar content.
However, some fruits and vegetables are particularly important for their fiber content even if you can't get rid of the fructose.
Things like inulin or resistant starch are very important to avoid having too many Bacteroides and too few Bifidobacterium, which is one of the big differences in westernized human guts vs more traditional ones.
It wasn't "advice". It's a true statement: Most fruit isn't as healthy as people think it is.
If you've got someone eating an unhealthy diet, but sticking some token fruit in, then that means that even their token nods towards good diet aren't as good as they think, and they should be made aware of that.
This thread isn't about being fat, it was about gout.
I've never been fat but had plenty of gout attacks. Back when I was getting my worst gout attacks I was in the best shape of my life but the problem was I was consuming too much fructose. From a combination of drinking fruit juices (a single glass can have more than my limit of 10g/day!) and not paying enough attention to sugar content of regular foods. When I finally started adding it all up I was easily reaching 100g of fructose per day.
> From a combination of drinking fruit juices and [other stuff] ...
Yes! Juices and smoothies are bad for you. Eat fruit in solid form only, to make your digestive system work harder (as designed), and slow down your rate of calorie ingestion.
It's getting harder and harder to find fruit that hasn't been bred to maximised sugar content, though.
My grandfather was getting obese and had a risk of getting diabetes.
I always assumed he ate healthy food, since he always made an effort for it.
When his medic reviewed all his food choices... the issue was actually fruit, in particular various kind of oranges, my grandpa just loves oranges and will eat them often, several per day.
The difference between fruit juice and actual fruit is massive. Volume for starters it’s far easier to overconsume juice than whole fruits. Then there’s the matter of the rough fibrous matter being strained out and the glycaemic index ... (EDIT not to mention the various adulterations for shelf life and added sugar and stuff)
Most national dietary guidelines encourage eating fruits and vegetables, with an emphasis on the vegetables. The sugar amount in fruit has a direct impact on the overall calories you consume but since fruit are also high in fibre, the contained sugar is not comparable to, say, a chocolate bar.
> The sugar amount in fruit has a direct impact on the overall calories you consume but since fruit are also high in fibre, the contained sugar is not comparable to, say, a chocolate bar.
I think a more precise way to say this is:
Due to the water and fiber in fruit, they tend to be more satiating than eating something like a chocolate bar on a calorie normalized basis.
Fructose is almost always absorbed; fructose malabsorption causes SIBO. Fiber reduces the glycemic index and makes fruit more satiating. Glucose aids the absorption of fructose preventing SIBO.
But in the case of fruit w.r.t. gout, the missing variable here is that while fructose increases the production of uric acid, potassium promotes the excretion of uric acid [1], and fruits are generally an excellent source of potassium while soft drinks contain little to none. The net effect of fruit on gout risk seems to be inconclusive [2] but it's clear that fruits are much less concerning than foods with added fructose. Since a significant fraction of Westerners do not consume enough potassium [3], and potassium is key to preventing hypertension and stroke [4,5], it is bad advice to suggest reducing fruit consumption for most people, unless you're already eating like Steve Jobs.
>> That’s a very simplistic way of looking at things which isn’t supported by medical science.
I agree with you on this one but from what I've heard, it is likely that fruit juices and smoothies are not fruits either. If that is correct, the message can get very muddied.
>> Specifically glucose, fructose, sucrose, are worth treating differently for the purposes of diet management.
Now we need to not only treat different sugars differently, we also need to treat the delivery methods differently as well. At some point, the message just becomes too complicated.
> from what I've heard, it is likely that fruit juices and smoothies are not fruits either. If that is correct, the message can get very muddied.
Not really. The original comment in this chain talked about processed foods vs unprocessed. Fruit juices are fairly obviously processed so this rule works for them too.
It is simplistic, but for most people it is probably a great start.
When people talk about sugar like this they are talking about fructose. Bringing glucose into it confuses people since it is scientifically sugar, but not what people mean when they talk about eating sugar, which is just eating sweets, soda, juice, etc.
> Fructose is the monosaccharide and is the problem
Glucose is also a monosaccharide.
"sugar" (table sugar, maple syrup, etc) are mainly sucrose, which is one part fructose and one part glucose (joined together, into a disaccharide)
I agree that fructose is the troublesome part of this pair. But when people say "sugar", they aren't referring to fructose, they're referring to sucrose.
It is in the context of dieting advice “instead of a chocolate bar, eat an apple” (still about 20 grams of sugar/100 kcal, but about half that of the chocolate bar)
The other difference is that while chocolate bar makes you more active if you was low on sugar, you are still quite empty, hungry and looking for more to eat shortly after you ate that.
If you eat apples, you hit limit soon. Apples also do not work all that much if you actually need quick energy when doing something straining. It does not have that "immediately feel better" effect (which motivates you eat more and more).
The fiber will impact the absorption rate and insulin spike, but in the end you’ll have consumed the same amount of sugar. For calorie-counting purposes, or say, avoiding gout due to fructose intake, there will be no difference.
Why wouldn't the absorption rate have an impact? Seems like it could slow down absorption enough for your kidneys to filter out byproducts that can lead to gout. Interested to learn if you know something different.
The most common and pervasive misconceptions about nutrition use the extremely simplistic view of it, believing that in the end all matters is that you end up with N grams of say sugar.
The effects on the body of consuming an apple versus the equivalent two table spoons of raw sugar are not even remotely similar.
The problem is that there’s no study demonstrating what was stated. Consuming a fructose concentrate will not have the same outcome as consuming the same amount of fructose through fruits.
There isn’t a study that shows the outcomes are equivalent . I have no idea where OP got his conclusion that fruits are an issue.
Yes, keeping an eye on glycemic index or FODMAP for people with metabolic disease works but I can’t find studies showing that you can eat so much fruit to get diabetic or gout.
> Studies also have shown that high-fiber foods may have other heart-health benefits, such as reducing blood pressure and inflammation.
Helps control blood sugar levels. In people with diabetes, fiber — particularly soluble fiber — can slow the absorption of sugar and help improve blood sugar levels.
The amount of sugar (especially fructose) in fruits like apples, oranges and bananas is shockingly high, and can cause or exacerbate conditions such as obesity, fatty liver, type 2 diabetes, gout and other metabolic or inflammatory diseases.
If you want some idea of how bad it is: monkeys get diabetes from bananas now
I have yet to meet someone who is obese and his calorie intake is primary from fruits.
Edit: I just did napkin calculation. Sedentary 170cm high male weighting 66kg would need to eat 20 apples a day to keep his weight. Or 3600 grams per day. The shocking high sugar content still means nearly uneatable quantity of apples just to get enough calories for rather small office worker who does no sport.
Juice is not apple, that is competely different argument. 20 apples is quite a lot and dude I picked is small - I intentionally made him smaller then average.
I am 100% confident that pearl clutching over need to replace fruit by vegetables else people will be obese is really not even close to why people get fat.
I have yet to meet someone who is obese and his calorie intake is primary from fruits.
I see people drinking smoothies thinking they are the healthy choice not realising a smoothie has more sugar in than a Coke. They are not even a good post-surf recovery drink for the surfers who invented them and gave them the infantile name!
I would assume we talk about fresh apples. If you process it in such a heavy way it is something completely different. You can also eat a lot more dried apples then fresh ones. Or you can drink a lot more apple juice then eat apples.
> The amount of sugar (especially fructose) in fruits like apples, oranges and bananas is shockingly high, and can cause or exacerbate conditions such as obesity, fatty liver, type 2 diabetes, gout and other metabolic or inflammatory diseases.
While vegetables are often superior to fruit for the reasons you indicate, if your diet contains neither then you could still consider fruit a 'step down' from the ever-popular refined carb snacks. Most fruit contains enough fiber to help you feel more satiated than a refined carb snack would.