|
It seems to me a big part of today's problem is that companies are too stingy to pay for proper backup facilities and procedures (and possibly personnel), to cover the kind of eventuality that we saw this past week. If so, they get what they deserve!
Get me coffee and no one gets hurt!
|
|
|
|
|
I still take my nightly backup on LTO-6 tape each evening. Two weeks of tape on a rotating basis gives me 10 days I can go back in case of infection Stupidity.
|
|
|
|
|
First thing: Minimum budget.
Second thing: Many people who work in medical institutions dont know or dont care about cybernetic security at all.
Last thing: Many people think that they had a paid version of a famous anti virus will help protect them from anything, even electrical leak.
|
|
|
|
|
Simple. Make a backup and place it into a fireproof safe. Then make a second backup in case there is a fire in the fireproof safe. (Source: Hogans Heros.)
|
|
|
|
|
This is so nice.
I've got some Jasmine JavaScript tests that include NaN for my arrgh.js library, works fine.
Example:
it("should add NaN to the list", function () {
var l = new arrgh.List();
l.add(NaN);
expect(l.toArray()).toEqual([NaN]);
}); No problem at all, even though NaN does not equal NaN.
The alternative is that I manually test the entire array (I've got some other tests involving NaN).
Now I decided to add support for Node.js.
So I install jasmine-node, load my tests using require() , run them and get the following error...
Expected [ NaN ] to equal [ NaN ].
Yes, I know NaN does not equal NaN, I know it's a friggin bitch to work with, that's why I'm specifically testing with NaN!
The browser framework does it right, it treats NaN to be NaN in such cases, or this kind of tests become pretty difficult to test.
So with Node.js support my library becomes a bit more difficult to test I guess
var arr = l.toArray();
expect(arr.length).toBe(1);
expect(arr[0]).toBeNaN(); On to the bigger tests...
|
|
|
|
|
Without knowing the details...
NaN <> NaN for a very good - mathematical reason, so I'm not sure that adding a special case and make it equal you are doing the right thing...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
If I'm adding NaN to an array, how else am I going to check if NaN is, indeed, added to the array?
I'm not doing calculations with NaN (not here anyway).
There is always a way to check if some variable is NaN, they just make it difficult.
It seems only the browser library made it easy (as it should, we're making assertions here).
|
|
|
|
|
Explicitely test for NaN-ness, e.g. `isNaN` in Javascript.
(Which, in a IEEE-compliant environment could be approximated by x != x )
I agree with pwasser, adding a special case for toEqual is likely more trouble by confusion than it's worth. In a way, being not equal to itself is the definition of NaN, so to understand your special test correctly I have to know there is special handling for NaN's.
|
|
|
|
|
Yeah, I get that.
Except that it sucks when Jasmine does add a special case and Jasmine-Node doesn't.
You'd expect your tests to run on Node like they do in the browser since it's still Jasmine (and I'm not talking about whether the tests still pass, just that the assertions etc. stay the same).
To be honest, I was surprised that Jasmine could compare [NaN] with [NaN], but it did. And now I had to rewrite my tests. Luckily, only a few of over 700
|
|
|
|
|
Off topic, but similar. I have some simple Python code that implements a 5 line server that receives POST requests with some JSON content. Everything parsed fine, etc. This is on a Window 10 machine.
I ran the same code on my W7 machine, nothing worked. Getting the JSON content becomes a slightly different method call. For some reason, the string doesn't look like JSON (it does on the W10) machine, requiring further massaging. Even the JSON converter needed something slightly different.
WTF? I'm running the exact same Python version and the exact same versions (at least so they tell me) of the dependent packages. Heck, I even had to use Postman instead of Advanced REST Client (Chrome plugins) because ARC didn't seem to respect the JSON content type!
Maybe it's my W7 machine, maybe the package version number is lying, who knows.
Marc
Latest Article - Create a Dockerized Python Fiddle Web App
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
Crazy sh*t
Try explaining that kind of issue to your manager.
"Why did it take you so long?"
"Because my code doesn't know how to run "
|
|
|
|
|
|
Much of the UK health service has already been shut down as a safety measure.
|
|
|
|
|
Richard MacCutchan wrote: the UK health service has already been shut down as a safety measure.
Considering the number of people they kill, I'm not surprised!
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
There are at least 2 different variants out there. 1 has a hard coded Url and has been "Sink holed". A system may still get infected but if it can find the url it will Exit the Infection process.
|
|
|
|
|
"As the WSJ confirms, the attacks could worsen on Monday morning because of how the virus works"
With friends like the NSA we do not need enemies
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: With friends like the NSA we do not need enemies Or the overly self-important jackasses that made the code public.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
I saw a question on Quora about a new developer, who forbidden to write comments (he have to write self-documenting code) because comments take memory...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
|
Please remove your comment! It takes up valuable bits of my memory
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
They make you remember the perverse thoughts you were having while writing the code.
There's a reason I block such things from my memory, I wouldn't want to be remembered!
|
|
|
|
|
Don't laugh too much. Back in the early 1980's, I had access to a Rockwell AIM-65[^] (built into a briefcase), and decided to write a Mastermind game for it in its built-in BASIC. I did so successfully, but one bug that still has me scratching my head to this day. My program had comments, but one of those comments caused the program to crash - remove the comment, it worked fine. reinstate the comment, it invariably crashed.
Go figure.
Cheers,
Mick
------------------------------------------------
A programmer is a person who always checks both ways when crossing a one-way street.
|
|
|
|
|
Reduce the font size - it takes less memory space that way.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
That is precisely the reason we use semicolons to terminate lines of code now. Full colons take up more memory.
Speed of sound - 1100 ft/sec
Speed of light - 186,000 mi/sec
Speed of stupid - instantaneous.
|
|
|
|
|
His boss, yeah, but not Bob.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|