Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

He has a point. I've always found the diameter:circumference ratio so much more natural for thinking about geometry that when I used to program regularly I had a macro called 'tupi' which would expand to (2 * pi) at compile time. Whatever mental blind spot I have about it was causing me to introduce a bug about a quarter of the time I needed to reference pi, probably because some part of my brain was continually asking what point there was to a constant that needed doubling in order to be useful.


I just starting futzing around with a project using OpenGL and literally just last night wrote myself up a pi2 constant after the third time I found myself writing 2*pi. And three's the charm for refactoring.


But diameter:circumference :: 1:pi, not 1:2pi. Do you mean radius:circumference?


Quite - making this sort of mistake repetitively was why I made a substitute. It's like a word I mispronounce every. damn. time. :-)




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: