【Hacker News搬运】为LeetCode访谈辩护
-
Title: In Defense of LeetCode Interviews
为LeetCode访谈辩护
Text:
Url: https://www.alexmolas.com/2024/06/21/leetcode-interviews.html
很抱歉,作为一个AI,我无法直接访问或分析外部网站的内容。不过,我可以提供一些指导,告诉你如何使用JinaReader(一个文本处理和阅读理解工具)来抓取和分析网页内容,并对其进行总结。 以下是一个使用JinaReader处理网页内容的基本步骤: 1. **安装JinaReader**: 如果你还没有安装JinaReader,你需要首先通过pip安装它: ```bash pip install jina
-
抓取网页内容:
使用JinaReader的搜索引擎来抓取网页内容。以下是一个基本的Python脚本示例,用于抓取指定URL的内容:from jina import Document, Client # 创建一个Jina搜索引擎客户端 client = Client() # 使用搜索引擎抓取网页内容 response = client.post( method="search", input={"uri": "https://www.alexmolas.com/2024/06/21/leetcode-interviews.html"}, flow_control={"num_docs": 1} ) # 获取抓取的文档内容 document = response.docs[0] print(document.text)
-
翻译非中文内容:
如果抓取到的内容不是中文,你可以使用JinaReader的翻译功能将其翻译成中文。以下是一个示例:from jina import Document, Client # 创建一个Jina搜索引擎客户端 client = Client() # 使用翻译功能翻译非中文内容 response = client.post( method="translate", input={"text": "This is an English sentence"}, flow_control={"num_docs": 1} ) # 获取翻译后的内容 print(response.docs[0].text)
-
分析内容并进行总结:
一旦你有了抓取和翻译后的内容,你可以使用JinaReader的NLP工具来分析文本并生成总结。以下是一个基本的总结流程:from jina import Document, Client # 创建一个Jina搜索引擎客户端 client = Client() # 使用NLP工具分析文本并生成摘要 response = client.post( method="summarize", input={"text": "The text to be summarized"}, flow_control={"num_docs": 1} ) # 获取摘要 print(response.docs[0].text)
请注意,上述代码仅为示例,实际使用时可能需要根据JinaReader的具体API和功能进行调整。以上步骤假定你已经有了一个运行中的Jina后端服务,并且你的机器上有足够的权限来安装和使用Python库。如果你需要具体的翻译和摘要实现,你可能需要使用专门的NLP服务或API,如Google Translate API或Hugging Face的Transformers库中的模型。
## Post by: alexmolas ### Comments: **waythenewsgoes**: I have always seen LeetCode problems as effectively hazing rituals in a job interview setting. A high pressure interview situation simply won’t bring out peak problem-solving capabilities in many people. At best you get some superficial insight into someone’s problem solving methodology, but at worst you filter out otherwise excellent fits for not being able to solve an ultimately inconsequential problem under pressure.<p>LeetCode questions as interview questions are mostly theater. Most people who do well on these aren’t actually “solving them” on the fly from scratch. They just happen to have seen the exact same problem before and retake the steps they’ve memorized to get to the answer. Testing whether or not someone can regurgitate the solution they have memorized to a math problem doesn’t tell you much about how they will perform in a truly novel non-contrived constraint problem scenario, which is generally what most dev work entails.<p>Perhaps if you are working at Bespoke Algorithms ‘R Us, benchmarking this would have more value to your org, but for most dev roles at most companies it is hard to see it as more than a compliance exercise, or maybe even as a tool to weed out those with families that can’t devote the hours/day to LC memorization. > **waythenewsgoes**: 我一直认为LeetCode问题在面试中是一种有效的欺侮仪式。高压的面试环境根本无法激发许多人解决问题的能力。充其量,你对某人的问题解决方法有一些肤浅的了解,但最坏的情况是,你过滤掉了那些在压力下无法解决最终无关紧要的问题的优秀人才<p> LeetCode问题作为面试问题大多是戏剧化的。大多数在这些方面做得很好的人实际上并没有从头开始“解决它们”。他们只是碰巧以前见过完全相同的问题,并重新采取他们记住的步骤来找到答案。测试某人是否能复述他们记住的数学问题的解决方案,并不能告诉你他们在真正新颖的非人为约束问题场景中的表现,而这通常是大多数开发工作所需要的<p> 也许如果你在Bespoke Algorithms的R Us工作,对你的组织进行基准测试会更有价值,但对于大多数公司的大多数开发人员来说,很难将其视为一种合规性练习,甚至可能是一种工具,用于淘汰那些家庭无法投入时间的人;一天到LC记忆。 **habitue**: Leetcode is just a proxy for an IQ test. That's it. If you can study up and do well on leetcode, then you're smart. People getting hung up on how realistic the questions are, or whether you ever need to implement X data structure are confused.<p>Fact is that no job can give a reasonable test for how it is to work there short of working there. There's team dynamics, developer / project fit, etc etc. All you can ever do is measure some proxies. Leetcode is just a much better proxy than the old "how many ping-pong balls fit in a school bus" questions. > **habitue**: Leetcode只是智商测试的代理。那;就是这样。如果你能在leetcode上好好学习,那么你;再聪明。人们对问题的现实性或是否需要实现X数据结构感到困惑<p> 事实上,没有一份工作可以合理地测试在那里工作的情况。那里;团队动态、开发人员;项目契合度等。你所能做的就是衡量一些代理。Leetcode只是一个比旧的更好的代理";一辆校车能装多少个乒乓球";问题。 **000ooo000**: >However, I usually trust my intuition quite a lot, and before giving it up I decided to find some strong arguments in favor of Leetcode (LC) interviews, and here they are.<p>Sounds like confirmation bias to me.. > **000ooo000**: >;然而,我通常非常信任我的直觉,在放弃之前,我决定找到一些支持Leetcode(LC)采访的有力论据,这些论据就在这里<p> 在我看来,这听起来像是确认偏见。。 **geuis**: I did a lot of leetcode stuff this year. Dozens of interviews, no takers.<p>What got me a job was that I was a solo founder running a business and learning how to make the most of limited resources. Aka I was someone that gets things done and spends the least amount possible to get there. Use the resources you have and show you can create value.<p>Again, it all comes down to show don't tell.<p>Leetcode is valuable as a way to practice and maybe reaffirm skills. It's not useful for hiring in a direct way. > **geuis**: 今年我做了很多leetcode的东西。数十次采访,无人接听<p> 让我找到工作的是,我是一名独自创业者,经营着一家企业,学习如何充分利用有限的资源。Aka我是一个能把事情做好,花最少的钱到达那里的人。利用你拥有的资源,展示你可以创造价值<p> 再一次,这一切都归结为唐;不要说<p> Leetcode作为一种练习和重申技能的方法很有价值。它;这对直接招聘没有用。 **MarkMarine**: I have a couple great companies on my resume because I ground these leetcode questions, but now that I’ve been working and in industry for 14 years… I don’t have the time to do the grind unless I’m explicitly looking for a job. The DS&A skills are still there, I use them and I’m glad I have them, but when someone reaches out to me to join their startup out of the blue and then hits me with the leetcode hard question that I haven’t seen in 8 years… well I’ve not passed those interviews. Usually I don’t say “ok, I’ll study for 4 weeks before the rounds” so I go in cold.<p>I never give these type of questions in my interviews of senior/staff+, I build out topical problems for the space I’m actually hiring for, then simplify it down to the interesting bits. I give a ramp, a simple problem, a more complex tweak to the simple problem that needs an interesting data structure (maybe needs a heap or similar) and then another tweak that forces them to abandon that data structure and do something novel. You can also fail this and still get hired.<p>With junior engineers, I’m sorry but I need something that looks like leetcode so I know you put the work in, and I can’t ask the topical questions because they have no frame of reference. These questions are like the common denominator for someone with no real world skills. I need to see that you’re driven and self motivated enough to teach yourself this (probably useless, when is the last time you had to implement merge sort) skill.<p>I also don’t think there is a great alternative. I put an extraordinary amount of work into making my questions that aren’t Leetcode, when they leak I’m heartbroken. I don’t want to just let a fancy school be the decision point, so I need to find a fair way to test. Asking people to do 1-2 days work or pair program… it’s usually caused a lot of dropping out of the funnel. So I would love to hear alternatives that are working for others > **MarkMarine**: 我的简历上有几家很棒的公司,因为我提出了这些leetcode问题,但现在我已经在这个行业工作了14年……除非我明确地在找工作,否则我没有时间去做这些工作。DS&;技能仍然存在,我使用它们,我很高兴我有它们,但当有人突然联系我加入他们的初创公司,然后用我8年来从未见过的leetcode难题来问我时……好吧,我还没有通过这些面试。通常我不会说“好吧,我会在查房前学习4周”,所以我会在寒冷中去<p> 在大四学生的面试中,我从未提出过这类问题;staff+,我为我实际招聘的空间构建了主题问题,然后将其简化为有趣的部分。我给出了一个斜坡,一个简单的问题,对需要有趣数据结构(可能需要堆或类似结构)的简单问题进行了更复杂的调整,然后进行了另一个调整,迫使他们放弃该数据结构并做一些新颖的事情。你也可以失败,但仍然被录用<p> 对于初级工程师,我很抱歉,但我需要一个看起来像leetcode的东西,这样我就知道你把工作放进去了,我不能问一些主题问题,因为它们没有参考框架。这些问题就像没有现实世界技能的人的共同点。我需要看到你有足够的动力和自我激励来自学这项技能(可能没用,你最后一次必须实现合并排序是什么时候)<p> 我也不认为有什么好的选择。我投入了大量的工作来制作不是Leetcode的问题,当它们泄露时,我伤心欲绝。我不想让一所高档学校成为决定点,所以我需要找到一种公平的考试方式。要求人们做1-2天的工作或配对项目……这通常会导致很多人从漏斗中退出。所以我很想听听对其他人有效的替代方案
-