TE
TechEcho
AccueilTop 24hRécentsMeilleursQuestionsPrésentationsEmplois
GitHubTwitter
Accueil

TechEcho

Une plateforme d'actualités technologiques construite avec Next.js, fournissant des nouvelles et discussions technologiques mondiales.

GitHubTwitter

Accueil

AccueilRécentsMeilleursQuestionsPrésentationsEmplois

Ressources

HackerNews APIHackerNews OriginalNext.js

© 2025 TechEcho. Tous droits réservés.

Silly job interview questions in Haskell

85 pointspar behnamohil y a 3 jours

8 comments

sshineil y a 2 jours
I live-coded Haskell a couple of times at job interviews for non-Haskell positions where you were free to choose.<p>It’s fun because the interviewer often doesn’t grok the paradigm. In one case, I was asked to make a password generator, and I went with QuickCheck’s Gen, which lets me write a random generator of things without explicitly defining a single function (they’re all monads).<p>So you go from somehow describing the thing you want to make to “I’m done.” :-D
评论 #44070497 未加载
djtangoil y a 2 jours
I remember I did an Advent of Code day 1 in Haskell a while back.<p>The meat of the code was a one liner. But opening a file, throwing away the first line and parsing a CSV took a lot more head scratching, especially if you&#x27;ve only ever done puzzles in Haskell.<p><i>Makes the hard things easy and the easy things hard</i>
评论 #44070361 未加载
评论 #44074400 未加载
pentaphobeil y a 2 jours
Always fun to see this kind of Rosetta Code thing, feel like no matter the topic there&#x27;s something to glean from reading!<p>That said: if I ever gave the palindrome question to a candidate (I haven&#x27;t) and they pulled out a `reverse` library func&#x2F;keyword we&#x27;d be encouraging them to do more.
评论 #44072547 未加载
thdhhghgbhyil y a 2 jours
Typical Haskell coding post with no mention of order or efficiency of the algorithm solutions. The thing is, even in basic coding quizes, if the interviewer is worth their salt, they will ask about how to improve the efficiency of the naive solutions first put forward, like the palindrome answer in this post.<p>What is the order of sumNToTotal?
评论 #44070794 未加载
评论 #44072812 未加载
评论 #44070915 未加载
评论 #44070762 未加载
评论 #44070880 未加载
评论 #44070932 未加载
lynx97il y a 2 jours
Well, that fizlle implementation is not a good example of a great answer. It checks for the two conditions twice. At least I would use a where clause to define fizz and buzz.
评论 #44071328 未加载
ReDressil y a 2 jours
&gt; Silly job interview questions in Haskell.<p>Well, it&#x27;s not clear to me why we&#x27;re terming these as silly. They mostly seem simple, instead, to me.
Sourabhsss1il y a 2 jours
Words for the functions are easy to understand.
pensatoioil y a 2 jours
Fifteen years into my career, and I&#x27;m finally realizing that &quot;expressive&quot; languages are practically unreadable.
评论 #44069680 未加载
评论 #44069706 未加载
评论 #44069809 未加载
评论 #44069990 未加载