TL;DR: re-write the recursive function so that the 1st call doesn’t need to wait for the result from the remaining calls, all the way down to the base case, before returning.
Recursive functions continue calling themselves until the base case is hit - and then they return. The continued calls keep pushing frames onto the stack and can lead to a stack overflow for large inputs. Some languages include an optimization that cleans this up, provided that the function is written in a way that it doesn’t need to wait for the results for all the other recursive calls to resolve to return.
TL;DR - For newdepths.xyz I wanted to add a simpler way for users to log in, in that way they can avoid creating a new password just for this little site. I also wanted to implement all the parts of the flow to get a good feel for them and how they fit together. Of course there are a lot of libraries that handle this well, but I think that doing it manually with low stakes is a great way to learn how everything fits together.
TL;DR- just notes and takeaways from recent podcast episodes. They’ll mostly be about product development, software engineering, or other tech stuff (GIS related probably).
Podcasts Takeaways and notes from recent podcasts I’ve listened to - I’m finding that taking actual notes is helping me retain info and more actively listen lately - and I figured why not share publicly in case it gets someone else interested in listening to (or not) the episode.
TL;DR - working out the number of draws it will take to get an Ace if pulling cards randomly without replacing them. Just doing it as “an exercise to the reader” - sparked by some questions that came about in an Advent of Code discord server I’m in. I work out the expected number of draws to the first ‘success’ (drawing an Ace from a deck of cards, for example) from first principles, in a not-necessarily-rigorous-but-good-enough way (mathematicians don’t @ me.
TL;DR: In a recent camping trip we noticed just how cold our propane tank was getting after cooking for a while - we started out pretty chilly anyway (about 50 F). The physics of this is cool and I wanted to play with modeling it.
I have one of these little two burner propane stoves that we use when camping, it looks something like this:
While we were cooking breakfast and boiling water for coffee, we noticed that the propane tank was getting super cold - there was not only a thick layer of frost forming on the outside, but a small chunk of solid ice on the bottom of the tank where it met the picnic table…