1,221 karma · joined December 8, 2022
I don't think that reduction of size is of any relevance. I admit my own refractors tend to make things smaller but it's only a tendency. Most definitely some increase the size overall. I'm currently refactoring a code base – for each item there used to be one class. Each object was examined after creation then a runtime flag was set: Rejected or Accepted. As the code crew I found I was wasting a lot of time around this Accepted/Rejected stuff. Now I'm refactoring so I have two classes for each item, one for when it's Accepted and one for when it's Rejected. The amount of boilerplate has definitely bulked up the code but it will be worth it.
As for complexity, I don't know.
The only thing I refactor for is human comprehensibility. That is the final goal. What other goal can there be?
This is how not to do it – for same problem, use same solution. I admit that's an extreme case but it's also a real one and illustrates the issue well.
(also patterns are not specific to OO, nor is OO incompatible with a functional style)
As a side note, ether is a lovely smell diluted but inhaled concentrated (for recreational purposes – it's a bit like alcohol in effect) it's bloody brutal, burning your nose & lungs.
(They used to be sweets in the UK called Victory V's which contained a very small amount of ether, and they were just lush. Bought some recently and found whatever additives that was had been removed, oh woe :) )
> I very much doubt cats understand the concept of death and can "grieve,"
My guess is someone disagrees with both of these claims. To be fair, your doubting that they can grieve is a bit ambiguous – of course they can grieve but whether they can grieve over a death, assumes they understand death as distinct from 'where have they gone?'.
But I don't think it's fair to call UK food bland. Done properly it's very good, but what it's not (usually) is heavily seasoned. In no way does that require it to be tasteless, and done properly it isn't.
(anyone tasted a potato fruit? Toxic and like little green tomatoes, but I wonder at their taste)
On heat tolerance, do some genetic thing where people get one, two or three receptors[1] which give different sensitivity to different people. I had a GF who would struggle with the level of capsaicin I literally wouldn't even notice. I knew a guy who would snack on scotch bonnet peppers straight, which would be impossibly agonising for me.
[1] from memory, doubtless incorrect as well
https://html.duckduckgo.com/html?q=%22%20heuristic%20dynamic...
I'm clearly not going to understand your motivation so I think I'll stop here.
(edit: There is absolutely nothing stopping heuristics and DP being combined; in fact they have to be in eg. database optimisation. A pure DP solution to query optimisation will be optimal, but will take unbounded (lthough finite) time, which is unacceptable. DP and heuristics are combined to both guide the DP search and bound it after a strict time (usually a couple of seconds CPU) by when it is hopefully 'good enough').
https://bioinformaticsreview.com/20210503/how-blast-works-co...
"The heart of many well-known programs is a dynamic programming algorithm, or a fast approximation of one, including sequence database search programs like BLAST..."
if (*file_lo == 127) {
++count;
with count += (*file_lo == 127);
That might save you the occasional branch mis-prediction, and might possibly open up some hardware-level loop optimisations. Any difference? ... std::cin >> v; ...
Oh come on! That's I/O for every item, I'm surprised it's not even slower.