Forgot your password?
typodupeerror

Comment: Simple Unit Test to catch Apple's bug. (Score 1) 116

by Decameron81 (#47020827) Attached to: Finding More Than One Worm In the Apple

At least Apple's bug could've been caught with basic unit-testing. This is the snippet of code from Apple's bug:

static OSStatus
SSLVerifySignedServerKeyExchange(SSLContext *ctx, bool isRsa, SSLBuffer signedParams,
                                                          uint8_t *signature, UInt16 signatureLen)
{
        OSStatus err; ...

        if ((err = SSLHashSHA1.update(&hashCtx, &serverRandom)) != 0)
                goto fail;
        if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0)
                goto fail;
                goto fail;
        if ((err = SSLHashSHA1.final(&hashCtx, &hashOut)) != 0)
                goto fail; ...

fail:
        SSLFreeBuffer(&signedHashes);
        SSLFreeBuffer(&hashCtx);
        return err;
}

Just implement a unit test with the following logic:

1. When SSLHashSHA1.update() is called, DO NOT return an error.
2. Expect 2 calls to SSLHashSHA1.update() and check the input parameter on each call.
3. Expect 1 call to SSLHashSHA1.final() and check the input parameters are what you'd expect.

That simple unit test would've caught this issue without any need of duplicating code.

Games

'The Door Problem' of Game Design 305

Posted by Soulskill
from the making-adoorable-games dept.
An anonymous reader writes "Game design is one of those jobs everybody thinks they can do. After all, they've played a few games, and they know what they liked and disliked, right? How hard could it be? Well, professional game designer Liz England has summed up the difficulty of the job and the breadth of knowledge needed to do it in what she calls 'the door problem.' Quoting: 'Premise: You are making a game. Are there doors in your game? Can the player open them? Can the player open every door in the game? What tells a player a door is locked and will open, as opposed to a door that they will never open? What happens if there are two players? Does it only lock after both players pass through the door? What if the level is REALLY BIG and can't all exist at the same time?' This is just a few of the questions that need answering. She then goes through how other employees in the company respond to the issue, often complicating it. 'Network Programmer: "Do all the players need to see the door open at the same time?" Release Engineer: "You need to get your doors in by 3pm if you want them on the disk." Producer: "Do we need to give everyone those doors or can we save them for a pre-order bonus?"'"

Comment: Jesus Motherfucking Christ ... (Score 2) 673

by Infernal Device (#46716259) Attached to: Google: Teach Girls Coding, Get $2,500; Teach Boys, Get $0

You people will get your nose bent out of shape at any goddamn thing, won't you?

Gender shouldn't matter when it comes to writing code, period. Turns out, it does in some ways that are not good for the industry as a whole. We're missing about half the insight that the inconvenient gender (aka "women") could bring to the table if the tech industry wasn't a sweaty jock party.

So, Google is trying to do something about it. Might be the *wrong* thing (I don't think so, but I'm not omnipotent) but at least THEY ARE TRYING TO DO *SOMETHING*, which is a lot more than I see any of you other meatsacks doing. You can either start being part of the solution, or just go to Hell.

If it gets more women coding, then more power to them.

If it gets more women in tech, more power to them.

If it will shut up your goddamn special snowflake whining, full power to them.

Comment: Re:Went over my head. (Score 5, Interesting) 593

by Speare (#46152647) Attached to: Watch Bill Nye and Ken Ham Clash Over Creationism Live

Emotion is a fact.

I take from this short statement the same sentiment that Bruce Schneier was speaking about, when he stopped whining about how everything "security theater" was completely irrelevant, and started exploring the real and tangible impact and importance of the feeling of safety IN ADDITION TO actual safety controls. You cannot just dismiss grandma's warm and fuzzy acceptance of strict authoritarian searches, you have to actually include it in the calculus, the whole of which can inform the security methodology.

Security is both a feeling and a reality. The propensity for security theater comes from the interplay between the public and its leaders. When people are scared, they need something done that will make them feel safe, even if it doesn't truly make them safer. Politicians naturally want to do something in response to crisis, even if that something doesn't make any sense.

Religion is the same: you can't just dismiss religion, it's a palpable phenomenon for a large number of stakeholders. Often, you can coexist with their philosophy while still doing real science. Galileo wasn't locked up in house arrest for his science, he was locked up for being an ass to the church. The church actually had little problem with the already-common views on the shape of the solar system, and would have "come around" on the matter much faster without his goading.

Comment: Adobe and ebook DRM? Color me surprised (Score 1) 304

by Speare (#46148887) Attached to: Adobe's New Ebook DRM Will Leave Existing Users Out In the Cold Come July

So, we all know how well this worked out for Dmitry Sklyarov last time. Learning how DRM is a self-defeating technology is kinda like the cycles in the fashion industry: everything old is new again. The stakes just get higher and higher with all the maximalist lobbying that goes on between each cycle.

Comment: Re:Despise that low-profile keyboard and mouse (Score 1) 178

by Speare (#46112297) Attached to: IBM's PC Junior Turns 30, Too
The PCjr was not one of those flexible rubber keyboard things. The Mac keys are actually dense rubber/nylon, while the PCjr keys were plain hard ABS plastic of the same shape. The PCjr keyboard had a raised ridge around the whole board. Otherwise they were quite the same as the current Mac standalone keyboards. One reason for the chiclet design on the PCjr was so they could make little paper cards that fit in the raised ridge and surrounded every key, to label various key functions for specific applications.

Comment: Re:i bought one (Score 1) 178

by Speare (#46090967) Attached to: IBM's PC Junior Turns 30, Too

Funny that for all the bitching about the "chiclet" style keyboard back then, now I see way too many laptops (and even Macs) that are using what looks like the same style. I hated it then, and I hate it now.

I definitely should have said this in my other post. I laugh and laugh at the Mac's chiclet crap. They're horrible to use for touch typing, just one step above a membrane keyboard. Yet everyone "loves" them because Steve Jobs told them to.

I swapped my chiclet infrared keyboard for the heavy-ass IBM keyboard right away. As soon as Macs went to chiclet, I bought two of the last heavy-ass Apple bluetooth keyboards; one for today and one as a spare, to use them through the years.

Comment: Had one. Liked it. (Score 3, Interesting) 178

by Speare (#46090897) Attached to: IBM's PC Junior Turns 30, Too
I had one, and I really liked it. It lacked DMA on the floppy drive so things were a bit slower during a file load or save. It only had one bay. Otherwise, it was basically the same as the PC (my dad had a low-serial-number model 5150). It had a couple more graphics modes than the standard VGA, enabling a lot of games to use 16 colors rather than 4. Nobody I knew ever used the "sidecar" bus for anything worthwhile.

Comment: Re:Voice assistant (Score 1) 113

by Speare (#46082175) Attached to: Google Buys UK AI Startup Deep Mind

And it's nothing like the command line, which does no interpreting, refining or clarification at all; it just executes a limited set of commands exactly as entered, with no room for so much as a misplaced comma.

ZORK I (1979):

> unlock grating with key
Which key do you mean, the skeleton key or the rusty key?

> skeleton
Unlocked.

Comment: Re:So I was sitting behind a Gbus/Fbus on 85 today (Score 1) 692

Ahem..
BART!?

Needs to be bigger, faster and fewer strikes.

The California High Speed Rail project has been in various phases of development for over a decade.

These things aren't built overnight. It also relies on voters getting passionate about funding it, which changes depending on how the economy's doing.

The former mayor of Palo Alto wanted to hold it up awhile ago, because he's basically afraid it'll reduce property values. The new mayor basically bragged to her constituents upon taking office about successfully holding up the project at added expense to the state. So, you have those kinds of obstructions to consider as well.

Comment: Re:The problem with Google Bus (Score 1) 692

this is not as eco-friendly as you might think.

It easily beats having those people all driving themselves.

It also causes congestion in the city,

No, it reduces congestion in the city.

-jcr

No, it doesn't reduce congestion. It convinces employees working 40 miles away from the city that they can still live in San Francisco and don't have to worry about driving the commute.

Basically, it creates an inefficient working population living far from their place of work.

Chances are, far more would choose to live closer if they had to take public transit or drive their own car.

news: gotcha

Working...