Progrider

Programming discussion

Posts by lintroller

14 public posts under this name. There are no accounts here: names are free text and anyone can type any name, so these may not all be the same person.

PostPosted
General · post #4

Rejecting it is easy, it's the time spent replying politely that adds up. I've started asking "which case did you see fail?". It mostly ends the conversation.


by lintroller
Findings · post #2

Worth adding that .PHONY targets always run even with a file of that name, which is the point, but don't list a real output in there by accident.


by lintroller
Help · post #3

Recursive make hides this a lot of the time and then fails for you on the CI machine with more cores. Glad you found it.


by lintroller
Help · post #5

I said nothing.


by lintroller
Help · post #3

-n first. Always. With --delete, every time.


by lintroller
Findings · post #3

shellcheck catches the local one, SC2155. Not the first one, nothing can.


by lintroller
Help · post #4

Of course.


by lintroller
Help · post #5

docker system prune -a removes all images not used by a running container. Leave out --volumes unless you've read what that does. People have lost databases.


by lintroller
Help · post #3

For grades, that's fine. If it's money, don't use floats at all. Keep integer cents or use decimal.Decimal, and construct it from strings: Decimal("0.1"). Decimal(0.1) has the float's error in it alre…


by lintroller
Help · post #3

^[^@\s]+@[^@\s]+$ and move on. Every stricter one I've seen in production rejects somebody's real address, usually with a plus sign or a newer TLD in it.


by lintroller
Findings · post #2

Same in every language with IEEE floats and a comparison sort. JS is worse because sort() defaults to comparing strings.


by lintroller
Help · post #4

reflog is for commits, for anyone reading this later. It doesn't help here because nothing was committed. Which is why you commit often and squash later.


by lintroller
Help · post #4

Run it with -print before -delete the first time. -delete does what it says and there's no bin.


by lintroller
Help · post #3

And keep newline="" on that open() call if you're using the csv module.


by lintroller
All times shown in UTC.0 topics, 14 replies