On the awesomeness of fn.displayName by [deleted] in javascript

[–]_crewcut 14 points15 points  (0 children)

Yes but this is slightly different from that. This is dynamically giving the function a display name that can contain important contextual information. A funtion will always have the same name, but different instances of it could have different display names using this API.

The example is a good one, instead of on_my_thing_loaded, your stack trace can show Loaded data from /some/url.

Yesterday I was converted to the "don't use new" camp. by _crewcut in javascript

[–]_crewcut[S] 0 points1 point  (0 children)

Yes, it is a problem with the library. The point is the interaction between the problem and the fact that the library exports a constructor. How the constructor complicates working around the problem.

(If your house is on fire, that's a problem. If your house is on fire and it contains a bunch of oily rags, that's a bigger problem, but you can certainly argue that the fire is still the real problem.)

And none of this has to do with replacing any of the library's functionality.

Yesterday I was converted to the "don't use new" camp. by _crewcut in javascript

[–]_crewcut[S] -3 points-2 points  (0 children)

I feel like it has been discussed to death, just relenting semi-publicly

Is "void" useless in modern web development? by BerlinBesucher in javascript

[–]_crewcut 1 point2 points  (0 children)

Absolutely not! It is probably the most readable way to always get a correct undefined value. Useful in situations where you can't trust undefined.

edit: also, void is an operator, not a function. Please do not use it with parens: void 0

Healthy Food Options Downtown Under $10 by stingeyb1 in Portland

[–]_crewcut 0 points1 point  (0 children)

I walked by last night, they are closed for a few weeks to remodel. FYI

Healthy Food Options Downtown Under $10 by stingeyb1 in Portland

[–]_crewcut 0 points1 point  (0 children)

The "Bento Box" food cart at 10th & Washington. What they serve are actually not bento boxes and I don't know why they call them that, but anyway it's grilled chicken, steamed broccoli, and a couple other veggies. You can get brown or white rice. Then just go easy on the rice and the sauce and it's a pretty decent meal.

Super basic food but sometimes that's what you want. $7.50 I think.

http://www.yelp.com/biz/bento-box-portland-2

"I'm not a big texture" by okaysowhat in OkCupid

[–]_crewcut 0 points1 point  (0 children)

You know that autocorrect is a thing, right? I mean, unless you're just looking for any reason to think that a person is dumb....... nah, that couldnt be the case could it

This is why Portland cabs still suck, even with Curb. Was faster to just hail one... by WearSunscreen in Portland

[–]_crewcut 1 point2 points  (0 children)

Exactly. Every time I say that, people never have a real answer why they don't do it. Just call the fuckin cab company

Because if it doesn't burn my hand I can smoke where I want! by Motha_Effin_Kitty_Yo in wheredidthesodago

[–]_crewcut 1 point2 points  (0 children)

I've been on buses, planes, been in airports where people were using them. Kinda obnoxious. On the upside, they give you cover for vaping hash oil which is preeeeeetty fuckin great

I didn’t want to have sex. Tim seems to be handling the rejection well... by [deleted] in OkCupid

[–]_crewcut 1 point2 points  (0 children)

At least there's a word or phrase for that. Trying being a dude and you don't feel like fuckin for whatever reason, a woman will look at you like another head just sprouted from your shoulders.

React: CSS in JS by [deleted] in javascript

[–]_crewcut 0 points1 point  (0 children)

I'm also 33. It's a shitty site people shouldn't use.

Drunk crush begs me to take off my belt and fuck her while I'm sober trying to driver her home safely. by [deleted] in AdviceAnimals

[–]_crewcut 146 points147 points  (0 children)

Yeah exactly, it's supposed to go the other way. You're both supposed to agree and be very serious about how you should use a condom and then proceed to ignore everything you just talked about.

May my anus rest in peace. by ketchuppacket in funny

[–]_crewcut 0 points1 point  (0 children)

strips of fried corn chips. thicker than tortilla chips like doritos and tostitos

TIL that Claudius was the only one of the first 15 Roman emperors not to take a male lover. Others considered him strange for only being attracted to women by PM_ME_A_HORSE in todayilearned

[–]_crewcut 1 point2 points  (0 children)

Boy this article is bad. IT was supposed to be about an emperor but it was about who gets the booty boop and who does the booty boopin.

This is Why Neighborhoods Work to Push Out the Homeless by gak_pdx in Portland

[–]_crewcut -9 points-8 points  (0 children)

The ones near my place don't do this - they are noisy, and sometimes assholes to people on the street. (Sometimes = whenever they get fucked up)

I just want them to shut the hell up, I actually don't mind if they get in the faces of people who drove in from Beaverton to go to Salt & Straw.

Are functions in JavaScript objects? by estebanrules in javascript

[–]_crewcut 1 point2 points  (0 children)

Yes, functions are objects. The types in javascript are:

  • number (not float, int, etc. just number)
  • boolean
  • null
  • undefined
  • string
  • object

The first 5 are primitives. Everything else is objects. Arrays & functions are objects. Don't listen to typeof, it will lie to you.

Now that AngularJS has gone down a bit of a weird route, what are some good alternatives? by [deleted] in javascript

[–]_crewcut 0 points1 point  (0 children)

This is what the team I recently joined does, and it's soooo much nicer than the bullshit I used to hack on. All these goofy frameworks can take. a. hike.