PS: this is pretty obvious while unit-testing but I'll make it clear to avoid any confusion... the real implementation of SSLHashSHA1.update() and SSLHashSHA1.final() would not be called in this unit test, as that'd be outside of the scope of it.
At least Apple's bug could've been caught with basic unit-testing. This is the snippet of code from Apple's bug:
SSLVerifySignedServerKeyExchange(SSLContext *ctx, bool isRsa, SSLBuffer signedParams,
uint8_t *signature, UInt16 signatureLen)
if ((err = SSLHashSHA1.update(&hashCtx, &serverRandom)) != 0)
if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0)
if ((err = SSLHashSHA1.final(&hashCtx, &hashOut)) != 0)
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.
See, that whole union thing bugs me.
If you're Senior only because you've been there long enough, but you don't have the chops to show for it, just get the fuck out of the way.
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.
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.
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.
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.
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?
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.
As opposed to SF? I think this story shows that SF is not known for overly rational people..
Sure, because we should judge an entire city due to a few crazy people. That's rational.
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.
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.