@thebestaquaman - eviltoast
  • 14 Posts
  • 238 Comments
Joined 1 year ago
cake
Cake day: June 18th, 2023

help-circle








  • I just came back to Europe after a couple weeks in the US. The US was beautiful (travelled in the Rockies). I was surprised by the fact that I unironically would not be able to live there just because of the food. Everything was so drowned in cheese / sugar / unspecified ultraprocessed something that I had legitimate digestion issues the first week.

    • “I would like an omelette please”
    • “Yes sir, do you want eggs in that or just the cheese?”

    I had no idea I could miss just plain real bread as much as I did by the time I got back.





  • Yes, it’s a field. Specifically, a field containing human-readable information about what is going on in adjacent fields, much like a comment. I see no issue with putting such information in a json file.

    As for “you don’t comment by putting information in variables”: In Python, your objects have the __doc__ attribute, which is specifically used for this purpose.





  • In general I agree: ChatGPT sucks at writing code. However, when I want to throw together some simple stuff in a language I rarely write, I find it can save me quite some time. Typical examples would be something like

    “Write a bash script to rename all the files in the current directory according to <pattern>”, “Give me a regex pattern for <…>”, or “write a JavaScript function to do <stupid simple thing, but I never bothered to learn JS>”

    Especially using it as a regex pattern generator is nice. It can also be nice when learning a new language and you just need to check the syntax for something- often quicker than swimming though some Geeks4Geeks blog about why you should know how to do what you’re trying to do.


  • My test suite takes quite a bit of time, not because the code base is huge, but because it consists of a variety of mathematical models that should work under a range of conditions.

    This makes it very quick to write a test that’s basically “check that every pair of models gives the same output for the same conditions” or “check that re-ordering the inputs in a certain way does not change the output”.

    If you have 10 models, with three inputs that can be ordered 6 ways, you now suddenly have 60 tests that take maybe 2-3 sec each.

    Scaling up: It becomes very easy to write automated testing for a lot of stuff, so even if each individual test is relatively quick, they suddenly take 10-15 min to run total.

    The test suite now is ≈2000 unit/integration tests, and I have experienced uncovering an obscure bug because a single one of them failed.