Joel Grus
joelgrus.com · Personal blog · on HN since 2012
Joel Grus, a data scientist and software engineer, writes about Python, machine learning, and programming humor.
What HN saysHN keeps linking his satirical post solving Fizz Buzz in Tensorflow, which commenters call a favorite and a classic.
58HN people shared it
40linked it in comments
33stories submitted
1.6Kstory points
10 months agolast shared
2012people per year2026
Most-shared posts
- 1Fizz Buzz in Tensorflow40 people · 578 points · first shared 2016 · 84 comments on HN
- 2Hacking Hacker News4 people · 635 points · first shared 2012 · 82 comments on HN
- 3Why Programming Language X Is Unambiguously Better than Programming Language Y4 people · 82 points · first shared 2013 · 30 comments on HN
- 4Data Science from Scratch: First Principles with Python3 people · 237 points · first shared 2015 · 41 comments on HN
- 5Creating Games in Streamlit2 people · 8 points · first shared 2020 · discussion on HN
- 6Ten Essays on Fizz Buzz2 people · 2 points · first shared 2020 · discussion on HN
- 7Haskell-Style Fibonacci in Python2 people · 1 points · first shared 2015 · discussion on HN
- 8On the Mathematics of Spot It1 people · 9 points · first shared 2015 · discussion on HN
- 9Post-Prism Data Science Venn Diagram1 people · 6 points · first shared 2013 · discussion on HN
- 10Building a Stupid Data Product, Part 3: The Single-Page App (PureScript)1 people · 5 points · first shared 2016 · discussion on HN
- 11Polyglot Twitter Bot, Part 4: PureScript1 people · 4 points · first shared 2015 · 1 comments on HN
- 12Data Science from Scratch: Second Edition1 people · 3 points · first shared 2019 · discussion on HN
- 13Building a Stupid Data Product, Part 2: The Web Service (Haskell)1 people · 3 points · first shared 2016 · discussion on HN
- 14Building a Stupid Data Product, Part 1: The Data (Python)1 people · 2 points · first shared 2016 · discussion on HN
- 15Trump Tweets on a Globe (aka Fun with D3, Socket.io, and the Twitter API)1 people · 2 points · first shared 2016 · discussion on HN
What HN people wrote when they linked it
mft_ · 2025-12-12
Similar humour if opposite directions to an old favourite: https://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/
magnio · 2023-03-12
This is a delightful read, which reminds me of two other articles. The first is also a caricature of the technical interview, solving FizzBuz with Tensorflow: https://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/
The second is a explanatory story, or "discovery fiction" as the article classifies itself: https://paulbutler.org/2022/what-does-it-mean-to-listen-on-a-port/
I love these humorous yet pedagogic technical writings, woven with a bit of literary eloquence and down-to-earth narrative. Thank you for this.
kingaillas · 2021-03-16
His point was writing a function without conditional logic, and then of course generalizing to any "fizzbuzz category" problem.
I thought it was a fantastic post on a extremely well trodden subject, up there with solving fizzbuzz in Tensorflow post. (https://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/)
xiphias2 · 2021-03-11
My favorite is still the TensorFlow version:
https://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/
Hallucinaut · 2021-01-23
Reminds me of this classic
https://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/
bhrgunatha · 2019-01-01
My favourite Fizzbuzz articles 50 Fizzbuzzes [1] and Fizzbuzz in Tensorflow [2].
[1] http://vihart.com/fifty-fizzbuzzes/
[2] http://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/
roblabla · 2017-09-14
My favorite fizzbuzz-related story will aways be http://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/
Similar to this story, a ridiculously overengineered fizzbuzz using machine learning...
klapinat0r · 2013-02-08
I appreciate the categories, even if it wasn't personalized.
One idea for future development might be to add a point score based on Naive Bayes (which has been discussed previously). Not as a filter per say, but just as an indicator.
E.g. http://joelgrus.com/2012/02/16/hacking-hacker-news/
Sure, you can use a bookmarklet or write your own thing, but I've always thought it'd be an interesting idea to have a centralized like/hate server, where you could add different sources, say HN. That might be a different project, but adding a score based on the likelihood of "I'd read this" (not recommendation as I should note) would be a interesting in terms of skimming.
Let's say one of your users is in a hurry, he might want to skim the most (homogenous) likely news that'd interest him/her, whereas if it's late at night in leisure time, one might be more interested in new/abnormal stories.
Just a though. Good job.
vorticalbox · 2025-10-23
This reminds me of one I read a few years ago “fizzbuzz in tensorflow”
https://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/
Qem · 2023-12-12
In Python is possible to do something quite similar, using itertools:
from itertools import pairwise, chain
def f(): yield from chain([0,1], map(sum, pairwise(f())))
There's a Joel Grus post discussing it: https://joelgrus.com/2015/07/07/haskell-style-fibonacci-in-python/
The introduction of pairwise in 3.10 made possible to write it more compactly, when compared to the version discussed by Joel.
AceJohnny2 · 2023-07-07
In a very different writing style, but also mocking the technical interview: "Fizzbuzz in Tensorflow" (2016)
https://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/
To whet your appetite:
> interviewer: Um, you understand the problem is fizzbuzz, right?
> me: Do I ever. So, now let's talk models. I'm thinking a simple multi-layer-perceptron with one hidden layer.
krackers · 2023-06-03
Step 1: Train an LLM...
I'm giddy that the glib article from 7 years back has finally become reality: https://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/
mizzao · 2023-01-16
Reminds me of this oldie but goodie:
https://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/
anfractuosity · 2022-06-13
I rather like this too - https://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/
jpetso · 2021-03-25
Of course it's not, there's always a better way:
https://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/
sva_ · 2021-03-16
The example of the OP also reminded me of Max Howell, but the only other similar story was the one of the guy who was prompted to implement fizzbuzz, and attempted to do so in Tensorflow[0]. In the latter case, I can totally understand that he might've been turned down with such a cocky (though funny) attitude, if the anecdote is true.
Are there other notable cases of people who got turned down in spite of - or because of - their extensive knowledge in a case like this?
[0] https://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/
rahimnathwani · 2020-03-31
Unless it's fizzbuzz:
https://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/
kirubakaran · 2019-09-29
Joel Grus wrote that as a joke :-)
https://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/
melling · 2019-06-06
The first book on the list was recently updated:
https://joelgrus.com/2019/05/13/data-science-from-scratch-second-editi…
I bought it last week and I'm working my way through it.
ich · 2018-12-06
Nice, but kind of obsolete since you can do this in AI now: http://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/
;-)
grenoire · 2018-07-23
Now you're really gonna' piss the interviewers off!
http://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/
btown · 2018-05-11
AI-is-the-new-Java edition: http://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/
candiodari · 2017-06-21
I guess you missed http://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/
Along with a thorough discussion about why it works and how it could be improved would give me pretty good faith about a data engineer's capabilities.
ktRolster · 2017-03-16
You'd think so, but writing a book only impresses recruiters. Other programmers either give you a confused look, try to argue with you, or ask you to write FizzBuzz like this: http://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/
jnordwick · 2016-09-27
Sometimes I get these questions in interviews and I really don't know if I should be offended. My resume is pretty good, and I wonder who T.F. applies to these places that they have to have such simple weeder questions. Then I get all paranoid that there is some hidden complication and soon I'm producing FizzBuzz in TensorFlow:
http://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/
danso · 2016-09-16
There's a large number of such books, though none that are as authoritative with respect to Python (this is a statement about the size of Python's community vs. R, not necessarily about the authors):
- via Wes McKinney, creator of pandas (which makes Python about as close to R as you can get): https://www.amazon.com/Python-Data-Analysis-Wrangling-IPython/dp/14493…
- http://joelgrus.com/2015/04/26/data-science-from-scratch-first-princip…
There are a bunch of books specific to machine learning too though I haven't read them myself.
Notre1 · 2016-09-12
I think a good book that is closer to Andrew NG's course would be the An Introduction to Statistical Learning (ISL)[1]
Depending on your learning style, Data Science from Scratch[2] might be another good option.
BTW, neither of these uses Octave like Andrew NG's course does. The first one uses R and the second uses Python.
[1]: http://www-bcf.usc.edu/~gareth/ISL/
[2]: http://joelgrus.com/2015/04/26/data-science-from-scratch-first-princip…
aub3bhat · 2016-06-02
While the post by Joel Grus was intended as a joke. I thought it would be interesting to use FizzBuzz as an example to illustrate how TensorFlow represents computations as graphs. This <20 lines version relies tf.mod / tf.argmin / tf.concat to deterministically compute results.
http://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/
tariqali34 · 2016-05-25
Interestingly, I really liked [spoiler] too, but I also hoped that this blog post could be reused in future language fights (and it is a shame that [spoiler] could prevent that). Potentially a revised version of this blog post could be helpful.
Anyway, this link (http://joelgrus.com/2013/12/24/why-programming-language-x-is-unambiguo… is decent enough for copying and pasting.
joelgrus · 2015-05-21
I may be a bit biased, but my book "Data Science from Scratch" is a good choice. :)
http://joelgrus.com/2015/04/26/data-science-from-scratch-first-princip…