Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×

Comment Only if the kid is interested (Score 1) 799

When I was twelve, I moved from QBasic to C. C isn't that difficult to understand. If the child doesn't show any interest, don't push him/her. It takes a certain level of curiosity to like programming. It isn't for everyone. Choosing a dumbed-down toy-language doesn't make a difference, but being a good teacher does.

Comment Re:A big win for gamers? (Score 3, Insightful) 71

I loved AvP back in 1999. Sure, the campaign was short, but there was one for each race, remember? Besides, the *real* fun was to play multiplayer via Gamespy or MPlayer. I used to play 1 vs 7 team deathmatch against my buddies with me as alien and the other team as whatever race they wanted. I won single-handedly every time because the alien was so fast. Hit'n'run tactics for the win.

Sadly, they nerfed the alien in AvP2. That game *really* sucked. Instead of decent jumping, they added a pounce attack, which made your enemy explode, leaving no body to let you regain health. And yeah, I do agree with the franchise mix. The Alien and Predator universes are better separated than combined. I really look forward to Colonial Marines.

Comment Re:Simple... (Score 1) 477

It's not always as clear-cut as this. Some code simply *is* complex by nature, or needs to be complex to meet certain requirements, like high performance. A real-life example could be finding the type of an instructions in a RISC instruction set where all the instructions is of the same fixed length. The 'clean' solution be something like:

int ParseInstruction(unsigned int instr)
{
    int i;
    unsigned int sbo,sbz;

    for(i=0; i<NUM_INSTR; ++i){
        sbo =instr_set_mask[i]; /* instruction set bit mask */
        sbz = instr_zero_mask[i]; /* instruction mask for required zero bits */
        if((instr & sbo) == sbo && (~instr & sbz) == sbz)
            return i;
    }
    return InstrUndefined;
}

Elegant, readable and very maintainable, but yet horribly slow for most solutions. Instead you end up with a nightmare of branches in order to avoid scanning through the whole instruction set for every instruction.  My point is that in practice, there is no way you can always make super maintainable code *and* fulfill all the requirements. Some solutions are butt ugly while still being the best one for the current problem. Heck, some of the easiest algorithms to read are the ones with the highest run time. For example long multiplication vs Toom Cook multiplication.
Premature optimization is evil though, and I agree with the rest of your post. I just think it came off as a bit purist.

Comment Re:Illinois- Death Penalty Without the Death (Score 1) 328

I consider death penalty to be wrong in itself, as it works more as revenge rather than as a deterrent or rehabilitation. The government is no better than the criminal in that case.
But actually making someone *wait on death row* without knowing when he/she will die, is even more hideous. That's something I wouldn't wish my worst enemy. Or something I can imagine the worst serial killer do to a victim. It's pure evil. If capital punishment is deemed necessary, at least execute the punishment quickly without unnecessary waiting.

Comment Re:Doom (Score 1) 427

Quake was not 3D either, in the true sense of the word. The engine did not support 'roll', i.e rotation around the Z-axis. I guess it boils down to the definition of 3D. In my head, "true" 3D is freedom in 3D directions without any restrictions, and free rotation in all three axes without causing gimbal lock. I'm not sure, but perhaps Descent fits my definition.

Slashdot Top Deals

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...