The pinche squirrels do this to our Japanese pear tree! They take one single bite out of every fruit on the tree. It’s so annoying! We managed to get 2 whole pears off of the tree last summer. They do the same thing with our peach tree, but we were unable to salvage even a single peach. Of course we could probably get rid of the squirrels if we stopped feeding the birds, but the birds are awesome, and the squirrels are pretty fun to watch.
Me right now, discovering that our archives data have file sizes… sometimes in bytes, sometimes in kilobytes. I found some pattern this morning thinking I could know which was which, then the pattern collapsed at some date in the past.
Joy.
Love it , wouldnt work where i live , no flat roads. , Would be a new extreme sport going downhill though :) but I think I am gonna go for the one in the comments perhaps hackaday.io/…/180836-desk-ercising-with-the-exer-…
Depending on whether this code is in a hotpath (and considering how "elementary" it is, I figure that's a possibility), this could very well be a significant speed improvement.
Though I'd say that only excuses it if it's truly an elementary function (and not one line as part of a larger function), as otherwise it's unreadable garbage. But on its own it:
has a clear purpose
(presumably) isn't reimplementing functionality
is easily tested
can be modified with no side effects (besides breaking your calendar, but that's beside the point)
It’s one line as part of a larger function. Also, it doesn’t actually say weekend, it just executes some other functionality if !(day % 6). I made it more readable so that everyone here could understand what it does
programmer_humor
Top
This magazine is from a federated server and may be incomplete. Browse more on the original instance.