3 ms·
Research is great except when its results are misinterpreted, its tests are poorly designed, etc. I could easily redesign the horizontal whitespace test to sho
by greggman 14y ago
Research is great except when its results are misinterpreted, its tests are poorly designed, etc.
I could easily redesign the horizontal whitespace test to show that horizontal whitespace matters.
Compare: spot the error
class FruitCollection
{
pubic:
FruitCollection()
: num_apple(0),
num_apricot(0),
num_avocado(0),
num_banana(0),
num_breadfruit(0),
num_bilberry(0),
num_blackberry(0),
num_blackcurrant(0),
num_blueberry(0),
num_currant(0),
num_cherry(0),
num_cherimoya(0),
num_clementine(0),
num_cloudberry(0),
num_coconut(0),
num_damson(0),
num_date(0),
num_dragonfruit(0),
num_durian(0),
num_elderberry(0),
num_feijoa(0),
num_fig(0),
num_gooseberry(0),
num_grape(0),
num_grapefruit(0),
num_guava(0),
num_huckleberry(0),
num_honeydew(0)
num_jackfruit(0),
num_jettamelon(0),
num_jambul(0),
num_jujube(0),
num_kiwifruit(0),
num_kumquat(0),
num_legume(0),
num_lemon(0),
num_lime(0),
num_loquat(0),
num_lychee(0),
num_mandarine(0),
num_mango(0),
num_melon(0)
{
};
};
Now spot the error here
class FruitCollection
{
public:
FruitCollection()
: num_apple(0)
, num_apricot(0)
, num_avocado(0)
, num_banana(0)
, num_breadfruit(0)
, num_bilberry(0)
, num_blackberry(0)
, num_blackcurrant(0)
, num_blueberry(0)
, num_currant(0)
, num_cherry(0)
, num_cherimoya(0)
, num_clementine(0)
, num_cloudberry(0)
, num_coconut(0)
, num_damson(0)
, num_date(0)
, num_dragonfruit(0)
, num_durian(0)
, num_elderberry(0)
, num_feijoa(0)
, num_fig(0)
, num_gooseberry(0)
, num_grape(0)
, num_grapefruit(0)
, num_guava(0)
, num_huckleberry(0)
, num_honeydew(0)
num_jackfruit(0)
, num_jettamelon(0)
, num_jambul(0)
, num_jujube(0)
, num_kiwifruit(0)
, num_kumquat(0)
, num_legume(0)
, num_lemon(0)
, num_lime(0)
, num_loquat(0)
, num_lychee(0)
, num_mandarine(0)
, num_mango(0)
, num_melon(0)
{
};
};
Similarly the rectangle with tuples. I'm only guessing on this one but I suspect if you change it to vectors then
a = Vector(1, 2, 3, 4)
b = Vector(3, 4, 5, 6)
c = mul(a, b);
Is far more understandable than
a = Vector(1, 2, 3, 4)
b = Vector(3, 4, 5, 6)
c = mul(a.x, a.y, a.z, a.w, b.x, b.y, b.z, b.w);
And that the more complex the math the worse it would get. Even for rectangles a larger example that did various intersections and unions I suspect the results would change.
- groovy2shoes 14y agoI haven't had time to brush up on C++11 yet. Is pubic a new keyword? In all seriousness, you make some good points, but I don't think they invalidate the findings so much as they demonstrate avenues for further inquiry.