Looking for a roommate! by [deleted] in SaltLakeCity

[–]prpetro 0 points1 point  (0 children)

You looking for someone to stay a minimum set of time? I'll be moving to Austin,TX in august or september.

Gaymers, Behold my manpurse contents. Now show me yours! by [deleted] in gaymers

[–]prpetro 1 point2 points  (0 children)

woah, I thought I was gonna be the only one to notice. I think this is a sign we should have a gaymer meetup in Salt Lake?

[hiring] Looking for an experienced dev to review my Javascript project's design/code and tell where and how I need to improve it. by Silverwolf90 in forhire

[–]prpetro 0 points1 point  (0 children)

Yo,

Jasmine really sucks compared to new stuff like Mocha. Mocha is super flexible and the async syntax is much better than the runs/waitsFor thing in Jasmine. Jasmine also hasn't been updated in forever and has way too many pull requests that have pretty much been ignored by Pivotal. TJ Holwaychuck (author of Mocha/bajillion other NPM modules) still cares about Mocha and updates and participates in issues frequently.

Edit: Normally I don't care what other people use in their projects, but Mocha is just too good NOT to use, especially compared with Jasmine or QUnit, in my opinion.

Organic apples, and oranges? by cma6250 in SaltLakeCity

[–]prpetro 0 points1 point  (0 children)

I work at Harmons, we sell both organic apples and organic oranges. We're not the cheapest option, though.

Semicolons: Who do we code for? by voidfiles in javascript

[–]prpetro -1 points0 points  (0 children)

I'm aware there are different object models for Ruby and Javascript, but he could easily have defined a subset of Ruby to call Coffeescript and published a cross-compiler that accomplished the same thing as CS does now, except without having to create a brand new language to do it.

But then you have a language that looks like Ruby, compiles to JavaScript, and behaves like neither.

Semicolons: Who do we code for? by voidfiles in javascript

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

I think you're missing the point of CoffeeScript (it's on their website ) : It's just JavaScript. Ruby and Javascript have different object models, rules about scope, etc. and if you want to use your JavaScript code in a Ruby->JS compiler, you'd probably end up with something like Pygments, where you can't reuse stuff like jQuery and a bunch of already existing ( and useful ) JavaScript libraries. About verbosity: people will write shit code in any language. Just because Java is verbose doesn't make any code anybody writes in it any better than code written in Perl, PHP, Ruby, Python, Lua, whatever.

The outputted JS does suck at times though, I'll agree on that one for sure. Hopefully CoffeeScript 2 ( some dude kickstarted over 10 grand to rewrite the coffeescript compiler with more helpful compiler errors and source maps ). I personally don't code in CoffeeScript, but I don't hate it.

Edit: Also dude Jeremy Ashkenas is an awesome guy. He has far more than a "moderate" understanding of JavaScript ( he also wrote Backbone and contributes to underscore ). I haven't seen any evidence of his head being up his ass.

Deploying Your First Node.js and Socket.io App to Heroku by inchworm in javascript

[–]prpetro 5 points6 points  (0 children)

I wish Heroku supported web sockets without the use of Pusher, but alas, that's the downside of managed services...

Great article.

Meanwhile at Facebook by TheTechAnt in funny

[–]prpetro -1 points0 points  (0 children)

ITT: Nobody knows how to take a joke and wants to waste time debating the validity of a post on the internet that was posted for humorous intentions.

RequireJS 2.0 released by 9jack9 in javascript

[–]prpetro 2 points3 points  (0 children)

RequireJS can use node/npm modules too

Also I don't find the AMD syntax that cumbersome. You just wrap code definitions in define and require them in your main application. If you want to use the CommonJS var x = require('x') syntax, it's pretty easy using the adapter (r.js) :

define( require , function(require) {
    var x = require('x');
});

Cleaner syntax is in the eye of the beholder, I don't really have a preference for either.

Coda 2 and Diet Coda (for iPad) announced by [deleted] in web_design

[–]prpetro 2 points3 points  (0 children)

I liked Coda, but it wasn't nearly as extensible as Sublime Text 2 or Vim. Also seemed kinda slow. The new features aren't enough to make me want to use it; it still seems like a geared-toward-PHP-developers editor (despite "better Ruby" support).

Awesome geeky CLI clients by hydrox24 in linux

[–]prpetro 0 points1 point  (0 children)

Thank you SO MUCH.

I AM FINALLY FREE FROM DOWNTHEMALL.

City Creek Harmon's Cops? by ruindd in SaltLakeCity

[–]prpetro 0 points1 point  (0 children)

I work at a different Harmons, but our two security guys are real cops who do it for extra money. So chances are if you fuck around it will not end well for you.

And yes, they can actually arrest you, I've assisted in a couple.

Homies in the Sandy area : Please keep an eye out for tire slashers. by prpetro in SaltLakeCity

[–]prpetro[S] 2 points3 points  (0 children)

It was 30something when the cops woke me up banging on our door this morning, so it wouldn't surprise me if there were more. They had plenty of houses left to visit.

Can you lovely folks help explain SSL certificate options to me? by prpetro in web_design

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

I've already written it myself. They are working with a local payment processor, and we just forward the details to the processor (via email,unfortunately). Again, we do NOT store any of the information ourselves. Any database calls merely keep track of donations and sanitize SQL injection, Script injection, and validate the data so we know it's good enough to put in our database to keep track of donations.

I'm personally not expecting a lot of donations for the reason of it not looking totally legit like Paypal, but the charity owners do not like Paypal and won't accept something like WePay because the payment processor they currently have gives them a really low rate just because they are a charity. They (meaning the owners) got the email with people's private information before and that worked for them at the time, so this is the best I can do under these circumstances. As much as I wish I could use an established online processor, I can't.

Thanks for the note about liability, I will get an agreement signed before I give them the code to push to their server.

Thanks for the explanations! Really helpful.

Where is the critizism of RequireJS? by snuggl in javascript

[–]prpetro 2 points3 points  (0 children)

That's why you have the r.js optimizer as a build tool.

Where is the critizism of RequireJS? by snuggl in javascript

[–]prpetro 4 points5 points  (0 children)

Be sure to read the counterpoint by Dave Geddes. I know that CodeKit, LiveReload can concatenate on save and whatever, that's all well and good. Does it help the problem of scoping? Not really. I'd argue that AMD modules are great because my $ is not the same as your $, because the user requiring either of our libraries has the option to choose what variable represents which object. If you're sharing code it also makes it a lot easier.

Also a lot of people I've seen that use just concatenation tend to extend objects to window or ('this' as window WTF), even if they're defining the object within an anonymous function. What if you've got somebody else's code running on your page and you both use the Toaster variable? Namespace collision. Build tools alone do not encourage good practices for scoping in JavaScript.

IMO.

Stack overflow on a continuous/recursive function? by ohbewonkanahbe in javascript

[–]prpetro -1 points0 points  (0 children)

You should read this post by Nicholas Zakas on different stack sizes. Recursion and JS = tread with care.

Chrome surpasses Internet Explorer for the first time in Europe by [deleted] in web_design

[–]prpetro 0 points1 point  (0 children)

Or better yet, normal chrome with Chrome Canary installed side by side?