Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Maxim 6: Just because you’re a Windows application doesn’t mean that you have to be compatible with Windows.

This one is more hilarious.

    pushf
    cli
    ... five instructions later ...
    popf         ; BUG!  Does not enable interrupts
> What makes this noteworthy is not that it contains exactly the forbidden code sequence, it is noteworthy because this is not an MS-DOS application but rather a Windows application. It’s a Windows application doing something that doesn’t work under Windows. That takes nerves. A certain network driver does essentially the same thing.

And,

> Maxim 18: Do something that is supported only under Windows, and do it wrong.

> Memory lock calls are ignored in the absence of virtual memory, so make sure to abuse lock functions as much as possible. That way, when you are run in a virtual memory environment, strange and wondrous things start happening that never happened in real mode.

> Since none of the standard DOS extenders use virtual memory by default, this is an excellent opportunity to begin behaving randomly. This is so important it’s worth restating.



Yeah that cli missing the sti is baffling!

What I find ironic is that while some people go on and on about gatekeeping programming and "you're not a real programmer if..." some people are just doing that kind of thing (and they're usually the ones making more money)

I was satisified when I found out that Vista, amongst the many things it did wrong, did something right: started naming programs that were misbehaving (for example, taking too long to shutdown)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: