• 0 posts
  • 10 comments
Joined 3 years ago
Cake day: July 7th, 2023
  • One use case is if you’re running a web server that is configured to return a “maintenance” page instead of the live site if a particular file exists. Which is actually pretty cool because then you don’t have to update the config when you need to do something or let your users get a bunch of 502 errors, you just touch maintenance and you’re good.

  • Something like parsing a string that could have command codes in it of varying length. So I guess the difference is, is this a 1-, 2-, or 3-character code?

    I have something like this in a barcode generator and I keep trying to find a way to make it more elegant, but I keep coming back to index and offset as the simplest and most understandable approach.