HackerTrans
TopNewTrendsCommentsPastAskShowJobs

sinkwool

no profile record

comments

sinkwool
·2 года назад·discuss
https://github.com/rubocop/rubocop/issues/8091#issuecomment-...

perhaps they are biased against the tool from participating in a campaign to police the name in the past.

But also, there's nothing wrong with more tools in this space. This is clearly an experiment, it should be welcomed.
sinkwool
·2 года назад·discuss
I remember when I was a kid, Kangaroo math puzzles were incredibly fun. I don't know if you can get your hands on some materials, but they were such a blast. https://mathkangaroo.org/mks/

I recommend getting some math olympiad books; at that level they're just like puzzles so should be fun.

https://artofproblemsolving.com/wiki/index.php/Olympiad_book...

Go for general problem books (non-topic-specific), and start with the easiest problems that they find fun.

I remember the following two books were interesting (though might be somewhat harder). You might find them on the internet archive or pdf's online.

Challenging Mathematical Problems With Elementary Solutions (Volume I, Combinatorial Analysis and Probability Theory) - A. M. Yaglom, I. M. Yaglom.

Challenging Mathematical Problems With Elementary Solutions (Volume II, Problem From Various Branches of Mathematics) - A. M. Yaglom, I. M. Yaglom.

Additionally, look into various olympiads:

American AMC 8 and AMC 10 from various years should be easiest:

https://artofproblemsolving.com/wiki/index.php/AMC_Problems_...

And when they feel adventurous, take a look at contests. Some countries (e.g. Romania, Russia) have contests for lower grades, though they are still quite difficult.

https://artofproblemsolving.com/community/c3754998_aops_year...
sinkwool
·2 года назад·discuss
so aliens did build the pyramids!
sinkwool
·2 года назад·discuss
of course they are. The Chinese team selection tests are notoriously more difficult than the IMO, and they enforce a one-time participation limit. If they were to send 24 people, not only would they probably be returning with ~20 golds, they'd be taking away the golds of the other nations (as only the top 1/12 get gold)
sinkwool
·2 года назад·discuss
Yeah, that was a very weird comparison. Not only do those countries send 6 people each, those four started participating in 1959 while US started in 1974 and China in 1985. Though arguably, those first olympiads featured fewer countries, (with presumably stronger competition) so they had to compete against each other for medals.

Another factor might be the number of distinct participants. I believe the Chinese enforce a one-participation limit, though I don't know if that would make it more or less likely to get gold.
sinkwool
·3 года назад·discuss
There's gotta be something between Satya and "C-tier code out of rural India".

There are of course lots of bad coders in India, but there are also many really good ones. And whereas in the past they had to emigrate to US or Europe to fully make use of their talents, nowadays some(many?) choose to remain in India and work remotely. It's silly to dismiss and underestimate their skills.

As far your experience with developers that follow the specs literally, in an almost maliciously compliant way, that might be learned behavior from working on projects where the tasks are spec-ed and estimated and any attempts at going above and beyond ultimately result in late delivery and punishment, so developers quickly learn to only do the bare minimum of what is described. Granted your examples are extreme and pathological, so maybe you just had the misfortune of working with really bad people.

Additionally, unless you pick the developers yourself, you're at the mercy of the agencies who assemble those offshore teams, and often the economics are such that it doesn't incentivize them to hire the best people available. From my experience, many good developers find work on their own, outside of an agency, contracting directly with the remote company.
sinkwool
·3 года назад·discuss
aren't most languages invented and initially developed within a private company? Go, Dart, Java, JavaScript, C#, F#, VBA, Kotlin, Erlang, C(at AT&T), Rust (at Mozilla). The list is probably very long
sinkwool
·3 года назад·discuss
> I always find out both fascinating and alien how much focus the US system puts on extracurriculars

One factor could be that, AFAIU, schools in US have many more electives than in Europe. As a student you have the choice to take more advanced classes for one subject, and only basic in other subjects, whereas in Europe, the curriculum is standard for all. So Universities in US need to compare performance on different axes.

> Of course, that also has its downsides. People end up re-taking HS exams year after year, because someone beat their GPA with a decimal point.

Another downside to the one-size-fits-all standard curriculum, is that it forces you to care about classes that you don't really care about, while not being able to focus on the subjects that you're really interested in. I think in US, if you're really good at something, universities may ignore average-to-poor performance in other areas.
sinkwool
·3 года назад·discuss
I believe what GP is saying is: coming from python, which uses `and` and `not` and `or` you expect those to be the binary operators in ruby as well. You are then surprised when they behave unexpectedly. Who is then to blame for your frustration? Is ruby a bad language for having both `and` and `&&`, or are you at fault for not doing enough research? (I don't see why someone coming from python would look any further after trying `and` and seeing that it seems to work just fine). I think this is an unfortunate situation, but one that doesn't really happen to someone that does ruby day-to-day; so it shouldn't really factor in as an argument to write ruby off.

But then is being surprised by `["0","1","10"].map(parseInt) // => [0, NaN, 2]` in JavaScript a sign of bad language design or does it just mean that you don't have enough experience with the language yet?
sinkwool
·3 года назад·discuss
Kotlin is very ruby-like and performant, check it out. If you don't mind using JetBrains IDEs, I'd give kotlin a try.
sinkwool
·3 года назад·discuss
`and`, `or`, `not` have much lower precedence than `&&`, `||` and `!` . I would just avoid `and` and `or` in general.

For some more explanation see https://graceful.dev/courses/the-freebies/modules/ruby-langu...
sinkwool
·3 года назад·discuss
> Writers merely append new content to the end of the WAL file. Because writers do nothing that would interfere with the actions of readers, writers and readers can run at the same time. However, since there is only one WAL file, there can only be one writer at a time.

I think the OP meant that updates have to run sequentially.
sinkwool
·3 года назад·discuss
Or it could be a typo (as in man-made) My guess is that they only use Youtube videos that already have subtitles in the target language.

But I'm curious to know how exactly they've built their database of videos/transcripts. I wonder if they curate the videos manually at all.
sinkwool
·3 года назад·discuss
But they don't have the same area. The donut seems to be at least 1.5x larger than the cup (check out the screenshots posted by latexr in another comment. The area covered by the donut is half that of the cup but it's clearly less than half that of the donut, it looks more like a third or even a quarter of the donut)
sinkwool
·3 года назад·discuss
Thanks for the reply and for the screenshots. before writing my initial reply, I went back and tried to get a 50/50 split based on your comment and came up with the same solution. But I didn't understand why it worked. I now believe it's either pure luck, or there's something about the sizes that result in a 50/50 split.

I think it's easy to see that if the central hole of the doughnut were either smaller or larger, or if the handle of the cup was smaller or larger, these splits would not work.

> I’m not a mathematician; maybe I got lucky with my approach. Crucially this is a brain teaser so it plays by the rules of a game. I formulated an hypothesis by starting from the assumption that they give you a satisfactory fighting chance.

Sure, that's fair, it's just that your original explanation for how the solution is to swap the problem from splitting the cup to splitting the doughnut was so intriguing and puzzling that got me curious.
sinkwool
·3 года назад·discuss
Can you explain more? (I might be stupid and don't see some obvious proof of why your approach is correct), but intuitively it doesn't seem that the fact that the cup is symmetrical is enough. Say if the handle of the cup was really really big, while still preserving symmetry, then its outstanding area would be huge compared to what the doughnut could cover.
sinkwool
·3 года назад·discuss
ruby is strongly typed, in that it doesn't allow you to implicitly coerce between types*: 1 + "1" will raise an error. (As opposed to weak typing in C or JS)

ruby however is not statically typed.

*(there are actually ways to implement certain types of coercions by defining to_ary, to_str, to_int)
sinkwool
·3 года назад·discuss
Leetcode is fine: lots of supported languages, large community, lots of solutions and editorials.

Here are some more resources:

- USACO: https://train.usaco.org/ and https://usaco.guide/general/

- Codeforces: https://codeforces.com/ the de facto standard community for competitive programmers, regular contests with editorials, huge archive of problems (https://codeforces.com/problemset) with pretty accurate difficulty ratings so you can focus on problems of suitable difficulty if you want to progress quickly. They also have an incipient EDU section: https://codeforces.com/edu/courses that covers basic algorithms with practice problems.
sinkwool
·3 года назад·discuss
Great resource, but it's hard to practice there as a beginner because there are no solutions (unless you solve the problem yourself). So you might have to get comfortable with being stuck. Which is fine when you're experienced, but will demotivate you if you're just starting.
sinkwool
·3 года назад·discuss
> - not hijack CTRL-f for its own built-in search.

Just in case you(or others) don't know, you can press Ctr-F twice to get the native browser page search.