4 ms·
This is an error that should probably have been caught just based upon the color of the text when it was typed/pasted into the source code. Of the uuid() call w
by mbreese 2y ago
This is an error that should probably have been caught just based upon the color of the text when it was typed/pasted into the source code. Of the uuid() call was in quotes, it would have appeared as text. When you’re blindly using so much copy/pasted code (regardless of the source), it’s really easy to miss errors like this.
But our existing tools are already built to help us avoid this.
Back in the day, I used a tool from a group in Google called “error-prone”. It was great at catching things like this (and Lorne goal NPE in Java). It would examine code before compiling to find common errors like this. I wish we had more “quick” check tools for more languages.
- thaumasiotes 2y ago> This is an error that should probably have been caught just based upon the color of the text when it was typed/pasted into the source code. Of the uuid() call was in quotes, it would have appeared as text. It's not in quotes. It's a function call. The issue is that the function call happens once, when you define the class, rather than happening each time you instantiate the class.
- mbreese 2y agoYou’re right… I was remembering it as a `server_default` attribute. Those were quoted in the other lines, but this wouldn’t have been.