Hacker News new | past | comments | ask | show | jobs | submit | FAANG_dream's comments login


Asuming you mean 'std::ios::sync_with_stdio(false);', that was already present in the original code.


That's an interesting perspective. Why do you think it could be a big risk? Maybe I am not thinking about it properly?


He said ask, not risk. And given your friend has stopped helping ... I know he says he is too busy.

You are asking someone to provide for you several hours of their time. Someone who is currently receiving $100 to $300 an hour at their company.

There are plenty of books. Get some, find other people who are trying to do the same as you, and practice together.


I am sorry for missing that. Thank you for correcting.

About friend - I know why he is busy. He is not of the type that makes lame excuses. He will say it on my face if he does not want to do it.

I understand your point though and agree with your judgement. Reason I asked was that I can imagine myself doing the same for someone else. But maybe I am too naive.


Also, I can't get over the fact that I read "ask" as "risk". Not sure what's the cause here :/


I already practiced on those sites but there's a big difference between coding alone vs coding in an interview setting. That's the aspect I am trying to work on.

I am just trying to find someone who I can connect to outside HN for this purpose.


Ohh for sure!

I tried implementing Raft, which is supposed to be the most understandable out of all available consensus algorithms, but wasn't able to make it work 100%.

I came close but in the end gave up on resolving some concurrency issues :/


I'm not sure if you are aware of it, but check out MIT 6.824 on opencourseware (pick 2020, not 2021).

In Lab 2 they provide you with a frame for raft with RPC, etc. already in place leaving only protocol for you. Lab is also split into 3 logical parts - leader election, append entries, persistence. Highly recommend.


You are not alone: https://news.ycombinator.com/item?id=23123701 and https://youtu.be/QVvFVwyElLY?t=2502

Like TFA points out, distributed consensus is punishingly hard. AWS relied on TLA+ to prove consensus in DynamoDB and other systems https://lamport.azurewebsites.net/tla/formal-methods-amazon....

Interestingly, Kinesis [0] and SQS (?) avoid consensus for those same reasons.

[0] https://news.ycombinator.com/item?id=25239100


Chain Replication (and friends) are vastly simpler than Paxos (and friends) in many ways, but do have the same requirement for determinism. That's because chain replicated systems typically need to be confluent (see https://pathelland.substack.com/p/dont-get-stuck-in-the-con-...), which means that all the replicas need to have the same value in them when replication is done. Conceptually simpler, for sure, but many of the same challenges remain.


How did you know there were still concurrency issues? I would expect issues like that to be relatively subtle.

Did you build out a test suite?


Heh... knowing for certain that you've gotten all the concurrency issues is hard. Knowing that a specific code base has concurrency issues can be very easy, by virtue of them clearly exhibiting bugs. I haven't tried to implement RAFT myself but I've certainly had code bases that clearly had concurrency bugs in them, even if I didn't know exactly what they were. :)


Yeah I shared it with a lot of people but I was feeling bad at the same time :-)

But good to know what guy enjoyed it in the end.


Depends on the type of person you are. If you are ambitious, then why not? But if the upside is capped in any way, then I see no harm in doing regular jobs. It's not just about money, there is safety, perks, social aspect etc.


That comes mostly from practice, and failing, and failing, and failing again, and finally succeeding.


People are frustrated in general and use online as a medium to vent out without much consequences?


No rain drop thinks it's responsible for the flood.


Nicely put, maybe also: "Because no raindrop thinks, it's responsible for the flood."


Very succinct, I might use this quote for other discussions!


Standing desk + monitors.

Or whatever you need to make home office setup better as offices are not opening anytime soon.


Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: