A mildly humorous title, spawned by a link my friend Jon sent me about calculating Pi using a batch file. Technically interesting, if less than useful. Made me curious what had been done with Pi in SQL, so went looking:
- Short article and UDF on Pi using SQL Server by my friend Andy Novick
- It's directly supported in TSQL and returns a float
- Here's a blog post that seems to really calculate PI using TSQL
- Another TSQL solution that looks less precise
Interesting, but not incredibly useful. The problem solver portion of me can appreciate tackling something like this for the fun of it, but the more pragmatic portion of me says I should spend time on more useful things.
Which isn't to say that I've never spent time on stupid code. At various points I've had code to "net send" a sentence to another machine one word at a time (annoying to be on the other end), an exe that just emailed a mailing list to tell them that the coffee was ready, and perhaps most strange, code to convert an integer to a 12 character base 36 representation (we had an application that used them for primary keys).