HN user

dsfuoi

91 karma
Posts1
Comments51
View on HN

programmers use int to index over arrays in for loops without writing asserts. That is in fact a problem with the language.

Ok let me get this clear, you're saying that the language is at fault because the programmers don't write correct code. I have no words.

In terms of sociologic development the middle-eastern countries are considered backwards with their stone-age laws, ingrained religion, and treating women like lesser beings, and yet we may soon be wearing 'burka' like clothing to protects our identity. Of course apart from the physical look, there is no connection between the two.

For the scramble suit to work, publicly available 'mixing' stations would have to be available, which would work like a black box, you could only surveil input and output.

And exits from your house would have to somehow be connected to those stations, or have your house change locations randomly.

The latter could work if houses were mostly in form of larger modular worldwide-compatible shipping containers. Also no windows, we would have VR.

I would say that ionizing radiation isn't the cause of most genetic mutations. It is just too rare and most of it doesn't penetrate the skin anyway, the rest has to be really lucky to hit the cell in the right place at the right time.

DNA copying not being perfect would be the main cause in my opinion.

There is one error on average for every billion pairs copied. The human DNA has 3 billion pairs. So every time a single(!) cell is copied, three mistakes are made.

You don't need any radiation for evolution.

You don't know if he is a sad, broken man.

There is no evidence to believe the post reflects upon his real emotions, and since the man is untrustworthy[0], the post cannot be taken as evidence about his emotional state.

[0]:Whether he is willfully or maliciously deceptive is irrelevant. Even if he has the best of intentions, his behavior is still untrustworthy.

I agree. The problem is that those single character names get abused and you end up with code that consists only of them, including the function arguments, which is the worst.

The 'style' even leaked out to file naming: a.c, ab.c, af.c, am.c, c.c, ca.c, cc.c, cd.c, cf.c, ...

Brilliant!

I doubt that this is either serious (unobfuscated) or handwritten code though.

I agree, and I have calculated this a while ago this based on average number of lines a programmer writes in 8 hours. I don't have the actual numbers but unless you type slower than ~30 words per minute, speed it isn't a bottleneck.

I have been using index instead of i in while loops lately. It's surprisingly concise.

Fabien is hinting at the confusion: sizeof(&array[0]) != sizeof(array)

&array[0] and array decay to the same thing, the pointer to the first element if they are used in an expression. But sizeof gives a different result, because array+0 'decays' to a pointer, and array doesn't.

I think the style should be avoided; code shouldn't be compact and variable names should be descriptive.

Artificial example:

    for( int i = 0 ; i < c+j ; i += b )
should be:
    for( int count = 0 ; count < sum+extra ; count += skip )
It may be allowed to use i in place of count here, but this is the only place where single name variables should be permitted and only if i is really just a simple array index iterator.

This is the first time I have seen sizeof used like this:

  sizeof( &array[0] )
This looks equal to:
  sizeof( array )
at first glance, which would give the size of the entire array in bytes, but of course the &array[0] expression is really:
  &*( array + 0 )
which simplifies to:
  array + 0 
which is a pointer. And using sizeof on it gives the size of a pointer to int.

Edit: (&* array) will also give a pointer.

---

This is just a really convoluted way to write 2:

   &array[2] - &array[0]

   &*(array+2) - &*(array+0)

   (array+2) - (array+0)

   2 - 0
Again I have never seen this written in such fashion.

Some of the examples on the comic page starting with: Huxley feared we would become a trivial culture, preoccupied with some equivalent of the feelies..., are not chosen well.

I think the opposite of a trivial culture is a culture of self improvement, and at least four of those six examples are ostensibly doing something to improve themselves. One is a competitor in online gaming, one is debating online, the two are watching and debating current politics, one is improving his body. Those are all meaningful activities. I understand that they are not intended to be in the context of the comic, and the visual space is limited.

Great comic by the way. Our society seems to be going the way of pleasure, but I don't think it will ruin us.

Actor's forced Snowden deep voice is hilarious. He's trying so hard, and yet it sounds like a 12 year old trying to sound older.

Also expect at least two forced action/drama scenes that never happened.

They are staging the Hong Kong hotel meeting, of which real footage exists, as if it were an action scene.