prpetro

- friends
889 link karma
1,136 comment karma
send messageredditor for
what's this?

TROPHY CASE

reddit is a source for what's new and popular online. vote on links that you like or dislike and help decide what's popular, or submit your own!

Awesome geeky CLI clients by hydrox24in linux

[–]prpetro 0 points1 point ago

Thank you SO MUCH.

I AM FINALLY FREE FROM DOWNTHEMALL.

To store key:value data in an object or in a two dimensional array? by ciemborin javascript

[–]prpetro 1 point2 points ago

ಠ_ಠ micro-optimizations.

City Creek Harmon's Cops? by ruinddin SaltLakeCity

[–]prpetro 0 points1 point ago

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 prpetroin SaltLakeCity

[–]prpetro[S] 3 points4 points ago

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 prpetroin web_design

[–]prpetro[S] 0 points1 point ago*

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 snugglin javascript

[–]prpetro 2 points3 points ago

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

Where is the critizism of RequireJS? by snugglin javascript

[–]prpetro 4 points5 points ago

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 ohbewonkanahbein javascript

[–]prpetro -1 points0 points ago

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 linucsin web_design

[–]prpetro 0 points1 point ago

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

common.css... why do I have the instinct to hate this? by DesignUtensilin web_design

[–]prpetro 7 points8 points ago

Oh man, those class names...

It's really important to have semantic HTML so somebody else looking at your source can make an educated guess at what you're trying to do.

I'm not just talking about HTML5 tags. Can't support them because of client needs (legacy browsers?). Totally fine! Using something like

<div class="article"></div>

is absolutely acceptable. .box582 and .box298 are horrible names, not to mention their behavior is not analogous to each other (one floats left, one floats right, wtf?)

YOU ARE ABSOLUTELY RIGHT TO ROLL EYES / BE CONCERNED FOR THE NEWBIE

I don't know if you've heard about LESS, SASS, or Stylus, but they're basically CSS + some really nice features CSS should have had. You can declare variables (super useful), functions/mixins (apply some commonly used style like a gradient without writing all the css / vendor prefixes out), and my favorite, nested css. Basically looks like this (Stylus, you can leave off some things like brackets, colons, and semi-colons):

body
    h1
        color black
    #yourID
        font-weight bold

It's really useful for organizing your CSS. I like Stylus the most but all 3 of those css "languages" are really amazing and have great community support and code sharing.

Here's a video about multiprocessor programming in Java. Source included in link. by arcticmailmanin programming

[–]prpetro 0 points1 point ago*

I don't think typing 10 lines is "that much bullshit", especially since most of the commands are copy and paste. You only need to apply the below since you already have code in that directory.

# The first two lines only need to be applied ONE time and will work for the rest of your repos.
git config --global user.name "Your Name"
git config --global user.email "your.email@foo.com"
git init #creates a repository in the current directory
git add . # adds all files (recursively) to your repository
git commit -m "Your commit message like first commit"
#Below line only needs to be applied once in your repo
git remote add origin #Add github as a server for your repo
git push origin master # send your code to the server.

"Node.js is a tumor on the programming community, in that not only is it completely braindead, but the people who use it go on to infect other people who can't think for themselves, until eventually, every asshole I run into wants to tell me the gospel of event loops." by atomicspacein programming

[–]prpetro 3 points4 points ago

So node.js is failing much more monumentally than simply having the wrong threading model. It's failing on many levels, and it's doing so out of stubborn insistence to not heed to what has been done and understood by the "neckbeards".

*Citation needed.

Musicians in SLC, we're looking to add to our family. Listen! by deft1134in SaltLakeCity

[–]prpetro 1 point2 points ago

Love, love, love the guitar work. I'm not much of a musician but I'm definitely interested in anything else you guys make.

I just resigned from my soul sucking job so that I can get my life back on track. I feel like a huge weight just got lifted and am finally excited about my future. How's your Friday coming along Reddit? by sherriffin AskReddit

[–]prpetro 0 points1 point ago

This is precisely the reason I turned down a soul sucking job. Now to go to school and then my current soul sucking job.

Banned by myalt22in gaming

[–]prpetro 0 points1 point ago

I had an acquaintance on Xbox Live with the name of "NWordJim38", he of course was asked by Microsoft to change it. So, he changes it to RaptorJew which was acceptable to Microsoft for the time I kept in contact with him. Just tried to look him up and I guess they made him change it again / banned him.

Question regarding screen scraping(i think) by OmgNaroin javascript

[–]prpetro 0 points1 point ago

This is true, here's a fiddle to show the example.

http://jsfiddle.net/4Suxa/5/

view more: next