3 ms·
Yeah, I remember working on one of the Project Euler problems, getting the right answer, then seeing someone else had solved it with a pocket calculator in less
by eesmith 5y ago
Yeah, I remember working on one of the Project Euler problems, getting the right answer, then seeing someone else had solved it with a pocket calculator in less time than I took to write the program.
- JohnWhigham 5y agoAin't it funny how these programming exercise websites are essentially the adult versions of busywork?
- mro_name 5y agoor play. Maybe that's it. Work without purpose. I like the busywork. Less spooky than 'cultic ritual'.
- deckard1 5y agoIt was a rather embarrassing realization for me that the Fibonacci sequence has a closed-form expression and can be calculated without an algorithm. I had always seen it done in pedagogical fashion as an exercise in explaining recursion and memoization and just assumed it had to be done that way. The downside of using toy/straw problems...
- mro_name 5y agoI had that with the geohash algorithm I implemented naively as binary search until I came across https://mmcloughlin.com/posts/geohash-assembly https://mmcloughlin.com/posts/geohash-assembly that ultimately doesn't even compute it but read it from the in-memory floating point representation.