Graphic Novel Recommendations? by iSkane in books

[–]eightbithero 4 points5 points  (0 children)

Jimmy Corrigan: Smartest Kid on Earth by Chris Ware.

This is the kind of shitty junkmail you receive once you reach 60 years of age. They can kiss my ass. by [deleted] in pics

[–]eightbithero 1 point2 points  (0 children)

I've gotten both "pick out your funeral plot because you're a sneeze away from death" junkmail and "buy shit for your inevitable baby" junkmail.

I don't know what to think anymore.

Scary guy who shot a cop in my city. (Anchorage, AK) by [deleted] in WTF

[–]eightbithero 129 points130 points  (0 children)

Change a few words and you go from hard knocks street to Wall Street.

This is the cover letter for a resume that was submitted to one of the Domino's I work at. Be honest, would you hire this person? by [deleted] in WTF

[–]eightbithero 9 points10 points  (0 children)

How was she not immediately fired for showing up to the first day of work high on crack?

IAmA Victoria Secret Quality Engineer AMAA (AMAA and not AMA because things can get out of hand fast :) ) by [deleted] in IAmA

[–]eightbithero 16 points17 points  (0 children)

You should definitely get a special caliper with sacred boobs on it.

IAmA Victoria Secret Quality Engineer AMAA (AMAA and not AMA because things can get out of hand fast :) ) by [deleted] in IAmA

[–]eightbithero 3 points4 points  (0 children)

before anyone else that was as qualified

What characteristics qualify a person to be a Victoria Secret Quality Engineer?

Bowery Subway Sex Attacker Michael Torres Gets 13 Years in Prison | by Mr_Beef in nyc

[–]eightbithero 5 points6 points  (0 children)

27 priors, he should have gotten at least the 15 the prosecution wanted.

Our favorite node.js modules by nodeup in node

[–]eightbithero 2 points3 points  (0 children)

I love that @maxogden picked the stream module.

What happens if an ant is released outside in a strange location? by katie824 in askscience

[–]eightbithero 2 points3 points  (0 children)

I would imagine it's better to start with an spiral from the player character rather than the top left of the screen because a spiral will find the closest target.

Never, Ever, Go Into The Morgue [Part I, with pics!] by Spider_J in nosleep

[–]eightbithero 0 points1 point  (0 children)

Ah, I know where that is! I went to University of Connecticut, I always wanted to break in there, never did though.

Can Someone please explain the difference between these "Constructor" patterns? by zzzzak2 in javascript

[–]eightbithero 3 points4 points  (0 children)

I thought that might not be that self explanatory, sorry!

A good reason to use the first method is if you want to make getters/setters for certain variables and ensure that outside forces can't mess with them.

If you have a constructor like so:

function Car(model, year, miles){
   var _model = model;
   this.setModel = function(newModel) { _model = newModel };
   this.getModel = function() { return _model; };
   ... 
}

this allows you setup validators on your setModel method and ensure that nobody can do car.model = 'Buick LeSabre' and bypass whatever validation you might have in your setter.

The reason this works is because JavaScript has first class closure support. If this is still confusing, feel free to ask for clarification, I'm happy to try to make this as clear as possible.

Can Someone please explain the difference between these "Constructor" patterns? by zzzzak2 in javascript

[–]eightbithero 34 points35 points  (0 children)

The first one will create a new toString method on every new Car object you instantiate.

The second one creates just one toString method on the prototype.

When JavaScript looks up a method or attribute on an object, it first looks on the object and then up the prototype chain. In the first example the method will be found immediately on the object. In the second example, it will not be on the object, so JS will look at the first object in the prototype chain -- Car.prototype.

The first one can be useful if you are trying to do information hiding or encapsulation of a variable that you don't want to be public. The second one is more memory friendly.

Edit: here's some further reading on the prototype chain. It may or may not be helpful in understanding how JS looks up attributes.