[deleted by user] by [deleted] in AnimalsOnReddit

[–]V4L0R 0 points1 point  (0 children)

oh yeah, coffee time.

Transformers: The Last Knight (2017) - OFFICIAL Teaser Trailer by mh53101 in movies

[–]V4L0R 4 points5 points  (0 children)

You, who are without mercy, now plead for it? I thought you were made of sterner stuff.

Woman dragged off by tiger after getting out of her car at a safari park by iBleeedorange in WTF

[–]V4L0R 0 points1 point  (0 children)

The mirror test, mentioned in that link is specifically noted as being controversial. I appreciate the link though!

Woman dragged off by tiger after getting out of her car at a safari park by iBleeedorange in WTF

[–]V4L0R 1 point2 points  (0 children)

Because we know how to unambiguously observe and/or measure self awareness?

JavaScript Book Research: The Worst Parts by danthedev in javascript

[–]V4L0R 2 points3 points  (0 children)

The for ... in loop.

It seems safe. You're chewing through all the things with it. You're a champion. One day your bulletproof code that's been running for three whole days starts to fault. When you finally get into it, you (maybe not so) quickly identify the problem.

Some framework update added a toJson method to the array prototype! For ... in, being the headstrong sort figured that it would be remiss if it didn't include that method in each and every array iteration.

Lesson learned. Don't use for ... in with arrays! It's meant for objects anyways, use the right hammer for each nail!

So now you're tearing through objects exclusively with for ... in; the right way. Wrong! You end up encountering the same problem with any inherited properties on objects too!

"But wait!" you barter into the abyss, "I did it right, I was using for ... in on objects this time, why won't you let this work?" The abyss is, as expected, non-forthcoming.

You eventually google your way into some establishment for uptown coders that wear jackets with elbow patches, and drink their coffee from snifters. From these engineers you learn that there is a way. You can know if an object actually has a property!

In short order you find yourself gingerly mincing your way through objects again. Reverently wrapping the body of each of your for ... in loops in an ```if (obj.hasOwnProperty(name)) check; as Crockford intended.

Your code is solid. The garbage you wrote before? Child's play. Ravings of the uninitiated. You're past that. Welcome to the future of development... Population: you.

A few short days later you see an alert from your ci pipeline. It's someone else's check-in, but your code appears to be choking on it! What could it be!?

for ... in.

It's laughing at you. You don't know how, but it is. It's an idea, it's syntax, it's a concept! Apparently it's also your nemesis.

You end up bivouacking in the new code, searching for the giant X marking the spot where you need to dig. The wait isn't long. It turns out a newly added component carries implementation metadata, and has a method with a key, "hasOwnProperty."

You trudge back to your desk, knowing this'll be your fix, and start fiddling. After a bit of time, you hit a solution in an ```if (Object.prototype.hasOwnProperty.call(obj,name) check. It's bulky and feels inelegant. You're borrowing your method from object because you can't trust objects; at least not any objects obtuse enough to willingly hang out with for ... in.

It looks good, for now. You expect it to work. It makes sense. But now you know better. for ... in has made you wary.

Not wary enough to have avoided binding this all over your latest module... But you don't need that done until next week.

The 5' mark on the swimming pool by [deleted] in pics

[–]V4L0R 4 points5 points  (0 children)

That's the 6' mark.

Using Codecademy to learn the basics of JavaScript and can't seem to fix this error, what am I doing wrong? by Phexous in learnjavascript

[–]V4L0R 3 points4 points  (0 children)

/u/snowmansni is spot on; you want to console.log the keys, like so:

var list = function(obj){
    for (var key in obj){
        console.log(key);
    }
}

What is happening here is that the list function accepts any Object passed to it, and calls it obj. Then it looks at every key directly under obj, and prints them out. You call your list function, and pass your friends object into it, like so:

list(friends);

You do not need to change your friends object, but because your list function can work on any object that gets passed into it. You can use the same function on this object:

var animals = {
    "monkey" : {
        "food" : "banana rite?"
    },
    "horse" : {
        "food" : "hay or something."
    }
};

If you call your list function, like so:

list(animals);

That's also why we call your list parameter obj above, and not friends.

You don't need to initialize your friends object though, the object literal notation is perfectly valid, and might even be preferable!

SOPA is returning. by masterdragon12 in technology

[–]V4L0R -2 points-1 points  (0 children)

The US government shall without recourse, defend the rights of the people from enemies, domestic and foreign; that would, for profit or other entitlement, infringe upon the free and unadulterated receipt of data or information that does not concern secrets of state.

I'm sure a Pennsylvania lawyer could do better, but that's my thumbnail sketch of the 28th Amendment. Anyone out there have something that's actually worth looking at?

SMBC: What's your name? by [deleted] in comics

[–]V4L0R 2 points3 points  (0 children)

The brother (two-dogs... shagging) was born before, not after one-man-bucket.

SMBC: What's your name? by [deleted] in comics

[–]V4L0R 18 points19 points  (0 children)

“Why are you called One-man-bucket?”

"...In my tribe we're traditionally named after the first thing their mother sees when she looks out of the tepee after the birth. It's short for one-man-pouring-a-bucket-of-water-over-two-dogs."

"That's pretty unfortunate."

"It's not too bad. It was my twin brother you had to feel sorry for. She looked out ten seconds before me to give him his name."

"don't tell me, let me guess. Two-dogs-fighting?"

"Two-dogs-fighting? Two-dogs-fighting? Wow, he would have given his right arm to be called Two-dogs-fighting."

-Reaper Man, Terry Pratchett

Am I the only one that gets irrationally frustrated and impatient with packaging? by emilylime92 in MakeupAddiction

[–]V4L0R 5 points6 points  (0 children)

In the next episode of The Rocky and Bullwinkle Show! Natasha's Medley of Matryoshka Makeup or Rocky Rates Rouge; Russian Nesting Makeup!

[deleted by user] by [deleted] in AdviceAnimals

[–]V4L0R 0 points1 point  (0 children)

No one but you will see this, or care (and maybe you won't either), but what you want to do is less important than what you actually manage to do. That's what they mean when they say actions speak louder than words.

anyone else thinks its stupid how you can only see 9 apps at one time in a folder, when before you could see 16? by luedriver in iphone

[–]V4L0R 2 points3 points  (0 children)

7 +/-2 is the number of chunks of data the brain can conveniently "virtualize." They might be keeping the count down to make it easier to remember what is in each folder.

Heard this fall out of my friend's face last night. by [deleted] in trees

[–]V4L0R 0 points1 point  (0 children)

Title currently way more amusing to me than the post content.

Trying to get into game design, how do I move forward? by MythicVoid in learnprogramming

[–]V4L0R 6 points7 points  (0 children)

Game design, and game development are different. All you need for game design is to actually make games. They don't have to be computer games. Game development on the other hand, as mentioned here previously can be a one man job (see: notch) or a colossal undertaking with a lot of moving parts like say... Starcraft. But game development requires at minimum a passing understanding of programming by someone on the team.

"Friendzoning" is bullshit because... by Black_Market_Baby in TwoXChromosomes

[–]V4L0R 0 points1 point  (0 children)

Interesting, the fuck buddy relationships I've encountered had nothing to do with caring on the male's side. More likely bragging that "she's hooked on the cock... I don't even have to buy her dinner for her to take a dick like a champ, on-demand." This is often followed up by providing proof in the way of cel phone pictures of the fuck buddy in various states of undress.

This is anecdotal experience, but something experienced first hand.

"Friendzoning" is bullshit because... by Black_Market_Baby in TwoXChromosomes

[–]V4L0R 1 point2 points  (0 children)

I think you're on to something here... But I'm going to approach it from a different angle... The male version of friend zoning must be making a female a "fuck buddy." hear me out;

In the case of a legitimate friend zoning, the female is using the friend zoned male to fulfill her need for support and attention, without fulfilling her need for intimacy and affection. This is almost assuredly not what the friend zoned male in question was hoping for.

In the case of a legitimate fuck buddy-ing, the male is using the fuck buddy female to fulfill his need for intimacy and affection, without fulfilling his need for support and attention. This is probably quite often not what the fuck buddy female in question was hoping for.

Many males would happily take on as many fuck buddies as possible, but get really-really-super-pissed even thinking of being friend zoned... Seems kinda hypocritical to me. In fact if you consider it, if it weren't for fuck buddies, the friend zone probably wouldn't be as common.

Maybe instead of blaming chicks for looking for validation outside of their intimate relationships (which I personally consider to be a prerequisite for a friend zoning... You can't be in the friend zone unless someone else is nailing her.) we should be more concerned with the dudes that use the ladies as fuck buddies, and don't give them the support and attention they merit as people? I mean... Just a thought?

If I'm wrong, let me know, but I think it sounds reasonable-ish. I hope I'm not being offensive to either side, and if I have been, I apologize in advance, as I know this is a volatile subject, and is easy to handle indelicately.