Hacker Newsnew | past | comments | ask | show | jobs | submit | Ragib_Zaman's commentslogin

Answering a technical question takes more time and effort than making general comments.


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.


Honest question. Do you take adhd medication?


No.

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.


The speed of light has units. The fine structure constant is a dimensionless quantity, like pi.


In special relativity and electrodynamics c is sometimes used as a dimensionless constant (equal to 1).


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).


I highly recommend watching this video:

https://youtu.be/Kvh4D_osFXs

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.

https://www.nature.com/articles/s41598-017-11362-2 "The 293 nm LED was best suited for evaluating its effectiveness for producing vitamin D in human skin due to the shorter exposure time"

I tried looking for that manufacturer/diode but it seems it is not commercially available.

By now we should be able to buy a cheap lamp at any store maybe it would save some lives.


You really shouldn't recommend possibly-dangerous dosages of Vitamin D.

https://news.ycombinator.com/item?id=24738558


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.)


that is really bad joke

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

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6060930/#:~:tex....


> but avoiding the sun when it is high in the sky

This is bad advice at high latitudes or in winter time. In those situations the highest sun should be sought.


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.


I think it's just an indicator of more concentration of non-water things, correlated with not drinking a lot of water, and slower urine production.


Yes, it is important to pay attention to urine, and poop too.


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.


Maybe a little weird, but certainly not surprising to me.

It's the closest you can get non-invasively to looking inside yourself.


Can I get weirder? What lab assessment material should I procure - as a consumer - to evaluate the most significant characteristics of my wastes?


Your nose and eyes is sufficient lab equipment.


I think it's specific to web development, in particular it tests for performance under user load.


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


It's generally pretty rare for a market maker to lose money over a whole year. Colour me surprised.


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.


Even so they’re getting fibre, vitamins and other micronutrients they wouldn’t otherwise get.


> making people fat

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.


To add to your very generic statement:

Fruit juice contains a lot of sugar; Oranges contain a lot of sugar;

Make sure you check how much calories you take in regardless of the food.

A good understanding of food healthiness is to understand what you are eating.


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)

It’s far harder to go wrong with whole fruits.


So my statement, you are commenting on, is wrong?

"Make sure you check how much calories you take in regardless of the food."


I was agreeing with you, and reinforcing your point.

It's such a shame our reflex is that if somebody responds to something they must be disagreeing.


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.


My understanding is that the fiber literally prevents absorption of fructose, so parent's comment is accurate


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.

1: https://www.sciencedirect.com/science/article/pii/S008525381...

2: https://academic.oup.com/rheumatology/article-abstract/58/7/...

3: https://www.sciencedirect.com/science/article/abs/pii/S02709...

4: https://link.springer.com/article/10.1007%252Fs11906-011-019...

5: https://www.thieme-connect.com/products/ejournals/abstract/1...


True, but what I was actually trying to get at was that sugar is also metabolized differently in the presence of fibre.


Most national dietary guidelines are backed by weak epidemiology and are rarely corroborated by RCTs. See: the food pyramid


And are instead heavily guided by ag industry lobbyists.


You are comparing the sugars in raw food to something heavily processed. That's not a good comparison.


Sugar is sugar. HFCS is a bit worse, but in the broader context of dietary intake it will make no difference.


That’s a very simplistic way of looking at things which isn’t supported by medical science.

Specifically glucose, fructose, sucrose, are worth treating differently for the purposes of diet management.


>> Sugar is sugar.

>> 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.


> When people talk about sugar like this they are talking about fructose. Bringing glucose into it confuses people

I believe people are actually usually talking about sucrose, which breaks down into equal parts fructose and glucose v early in digestion.


Fructose is the monosaccharide and is the problem. It doesn't always come from sucrose.


> 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.


Do you also think processed rice products like flours, pasta are the same as whole rice cooked?


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).


Diet containing a lot of fruit can be healthy . Sugar consumed through fruit has a massively different effect compared to consuming only that sugar.

Fiber with sugar is not the same as pure sugar.

I’m not sure there are any studies demonstrating what you claim.


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.


Let me formulate it different:

Its 'healthier' to consume the same amount of sugar through fruits than through pure sugar due to its being easier for your body.

It does not change your calorie intake at all as its the same amount.


> It does not change your calorie intake at all as its the same amount.

Glossing over what an insulin spike makes your body do with those calories is a bit disingenuous.


Exactly this.

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.


They are when you look at the calorie intake.

That is the point i made and still make.


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.


> I have no idea

Here

> I drastically cut back on fructose, limiting myself to no more than 10g/day. I have been gout-free now for 7 years.


You're implying that total calorie intake is the most (or even the only) important factor.

This is starting to resemble a political thread.


No, fiber does not have that big of an impact on absorption. That's why most fruits are a big no on keto diets


https://www.mayoclinic.org/healthy-lifestyle/nutrition-and-h....

> 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.

Seems like it impacts time to absorb


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

https://www.independent.co.uk/news/uk/home-news/monkeys-bann...


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.


I don't think 20 apples is that much.

And we are talking about people who are obese, they are consumgint oo many calories per day, every day.

Now lets take a real example: obese people tend to drink juices and replacing soda with juice because they assumed juices are healthy.

I can easily drink 2 liters of water or 2 liters of juice/soda every day. 470 calories for 1 liter -> 900 calories additional.

easy


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 think its a combination of all.

I myself stoped drinking soda because of it; Its surprsing how quick you consume extra calories due to needing caffeine.


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!


That, or 400g+ of chocolate. No conclusion to be taken here.


It is easy to eat 400g of chocolate per day. Not at one sitting, but if you have whole day for it, you can do it without any issue.

Also, it would be 350g of dark chocolate for my hypothetical guy.


> It is easy to eat 400g of chocolate per day. Not at one sitting,

Challenge Accepted.


That's only 2 apple pies, assuming you don't eat any of the crusts. I don't think that's uneatable other than the fact the crust is the best part.


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.


Fruit is pretty much sugary water in fruit form these days.


> 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.


Melons are basically sugar water: 84% water, 14% carbs, 1% protein, 1% fibre


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: