Shreevatsa
shreevatsa.wordpress.com · Personal blog · on HN since 2008
Shreevatsa writes about math, programming, and computer science topics, from continued fractions to shell startup files.
What HN saysHN links it for clear explainers, such as the Zsh/Bash startup file order post and one on best rational approximations versus continued fraction convergents.
21HN people shared it
12linked it in comments
9stories submitted
20story points
6 months agolast shared
2008people per year2026
Most-shared posts
- 1Premature optimization is the root of all evil5 people · first shared 2016
- 2How does Tupper’s self-referential formula work?4 people · 4 points · first shared 2011 · discussion on HN
- 3Zsh/Bash startup files loading order3 people · 2 points · first shared 2013 · discussion on HN
- 4Boolean Blindness2 people · 1 points · first shared 2019 · discussion on HN
- 5Not all best rational approximations are the convergents of the continued fraction2 people · first shared 2019
- 6Big o notation a couple of sources2 people · first shared 2018
- 7On “trivial” in mathematics1 people · 5 points · first shared 2010 · discussion on HN
- 8Tweeter Extream Image Compression Challenge1 people · 4 points · first shared 2009 · 1 comments on HN
- 9Multi-tty Emacs1 people · 3 points · first shared 2008 · discussion on HN
- 10Don’t Mess with a Genius1 people · 1 points · first shared 2023 · discussion on HN
- 11Multiple ways of understanding1 people · first shared 2018
- 12Sanskrit and german1 people · first shared 2018
- 132014 071 people · first shared 2018
- 14Mastermind1 people · first shared 2026
- 15Homepage1 people · first shared 2025
What HN people wrote when they linked it
svat · 2026-01-23
Love it. That hijacker one is one of the excerpts in the linked post: https://shreevatsa.wordpress.com/2011/03/21/the-book-of-heroic-failure… :)
Someone · 2022-10-20
You missed 13/4 = 3.25, 16/5 = 3.2, 19/6 = 3.16667, 179/57 = 3.14035, 201/64, 223/71, 245/78, 267/85, 289/92, 333/106, 52163/16604
https://shreevatsa.wordpress.com/2011/01/10/not-all-best-rational-appr…
jcranberry · 2018-04-14
Wow, so disagreeing with the point of this article immediately provokes a typed-out condescending sigh from you? That's worth a sigh more than anything. Furthermore, I was a mathematics person first, and got into computer science later, so I'm not a "CS person" insisting on calling it an abuse of notation.
I have two points:
Firstly, although the article does a good job making the point that there's no reason to get on programming languages' case for using formalized, ad hoc syntax, it does a terrible job of backing up it's actual title. The bottom line is the equals sign is very closely associated with the concept of RST equivalence in mathematics, to the point where a specificity such as the symbol for the isomorphism (which, ironically, he used as a counterexample) is abstracted away, because isomorphism is an RST relation. If two things are isomorphic, they are, in some sense, the same (or equal), so use of an equals sign is natural.
Secondly, if you had read the first source you posted, maybe you wouldn't have claimed programmers/CS people were the ones pedantically insisting on calling it an abuse of notation since, on page 6, Bruijin writes, "The trouble is, of course, due to abusing the equality sign =."[1] Furthermore, after defining the parameters around the use of the O-symbol, he also writes, on page 7, "It is obvious that the sign = is really the wrong sign for such relations, because it suggests symmetry, and there is no such symmetry."[1]
1.…
gowld · 2026-05-06
What I do is, I'm always responding to output N while the AI is working on prompt N+1. So we are both always responding to each other's question/answer before last.
https://www.youtube.com/watch?v=CCMiyXM-1_U
https://shreevatsa.wordpress.com/2010/02/07/mastermind/
Flimm · 2023-05-06
I found this blog post really helpful in explaining the difference:
https://shreevatsa.wordpress.com/2008/03/30/zshbash-startup-files-load…
It references this blog post:
https://meta.ath0.com/2007/10/23/cleaning-up-bash-customizations/
MailNerd · 2022-03-03
Sounds reasonable, source: http://shreevatsa.wordpress.com/2008/05/16/premature-optimization-is-t…
Let me fix it.
martinhath · 2022-01-11
> Interestingly, the results of this optimization are well-described by Hoare's Dictum, often mistakenly attributed to Donald Knuth, which states
More interestingly, it is not clear at all that it's Hoares. [0] has a nice overview, and they conclude that it is indeed Knuths.
[0]: https://shreevatsa.wordpress.com/2008/05/16/premature-optimization-is-…
almostdeadguy · 2019-05-09
This comes up quite a bit in functional languages in the ML family (which all have ADTs like rust). Bob Harper's blog had a post about this called "boolean blindness" (which seems to be locked now?), but you can find a summary of it here: https://shreevatsa.wordpress.com/2015/01/31/boolean-blindness/
lower · 2017-11-25
> Pike's rules 1 and 2 restate Tony Hoare's famous maxim "Premature optimization is the root of all evil."
That quote is from Knuth, not Hoare.
https://shreevatsa.wordpress.com/2008/05/16/premature-optimization-is-…
ka3x5 · 2015-05-16
I found this link when I got curious about that [1].
[1]https://shreevatsa.wordpress.com/2008/03/30/zshbash-startup-files-load…
MaysonL · 2013-02-08
Some people, when confronted with a problem, think “I know, I’ll quote Jamie Zawinski.” Now they have two problems.
Attributed to Mark Pilgrim in a comment at http://shreevatsa.wordpress.com/2009/06/23/who-said-that/
ruslan_talpa · 2017-07-01
I kind of understand why you'd think it's a massively complicated query. You are probably thinking the types of joins on two tables on random columns with weird conditions which go into full table scan.
I am talking about queries/joins between tables that have foreign keys between them, like client/project/task/comment. I bet 90% of graphql schemas expose those kinds of relations between types.
For those type of relations (with FK) i can generate a single query that is as fast as it can be (certainly faster then dataloader) and as far as i've tested (a few millions of rows in tables, 3-7 levels in a query) i didn't leave the fast territory :) Of course there might be edge cases ...
About premature optimisations. Everyone likes to quote that, but never the full one which is "We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." https://shreevatsa.wordpress.com/2008/05/16/premature-optimization-is-…
The paper where it was published was about using goto to optimize loops and such small things, it was never "targeted" at algorithms and architecture.
As i think i mentioned here above, i was getting 10X throughput with joins compared to dataloader and i would not call that premature.