Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror

Comment Re:Non-master (Score 1) 345 345

He's asking the question because the pattern occurs a few times, and he fears that it may look bad with long variable names.

Given that, I think the current top answer (by user coredump) is a good suggestion, since it prevents duplicate code by using a function. So it basically says his code is good enough, just encapsulate it in a function (although the function name was a poor choice in my opinion).

Also, I think the answer you refer to (I believe it's the one by user Doc Brown) is a good suggestion, although it may not be the best in that particular case. But what if all of a sudden the pattern is repeated but with more possibilities (like 4, 5 and 6 variables)? You'd need a more generic function, and this particular answer provides a step in that direction (although again I think the function and variables names were poor choices - probably because it was just an example). And he even says at the end of the answer: if you don't need a generic approach for more variables, your code is fine, and maybe you can use coredump's approach.

Of course, my opinions reflect my thoughts about coding, mainly these: avoid duplicate code like the plague, and make some (or a lot of) effort creating the best function names possible (even though "best" is highly subjective in this case).

Comment Re:Technology section seems... odd (Score 1) 428 428

AngularJS is not an alternative or competitor of jQuery.

AngularJS is a complete framework that largely dictates how you will structure all of your UI code. jQuery is a set of very handy utilities that can be used by anyone that writes javascript for the browser (including those writing a AngularJS application, although I'm not sure that really makes sense given everything that AngularJS provides). So basically anyone can use jQuery to help make things easier.

I'm not an expert in any of them, but given my limited knowledge, I think that summarizes it well.

Comment Re:This is not really big news. (Score 1) 126 126

Tor provides anonymity. It does not provide authenticity or secrecy, and doesn't pretend to.

Not only it doesn't provide these things, it potentially cripples then by adding a random computer as a Man In The Middle! What did you guys expect?

Also, seeing that people who usually perform activities of this type (spreading malware) should be the ones most interested in TOR, I see some signs as to the kind of organizations who would attempt to do this...

Comment Re:Wonder what brand is best now... Intel? (Score 1) 101 101

If you want to follow someone - pick Apple. Given the way news coverage is, if there's a problem with someone somewhere and their SSD in their Apple product, the whole world would know in a nanosecond. Someone as heavily scrutitinized as Apple (where even one failure in millions of computers sold would probably bring about SSD-gate) means if there is a real problem, you'd already know.

Don't be so sure about that. I and many others have had problems with the GPU soldering on 2011 Macbook Pros. This has been affecting lots of users since last year, and although there was some media coverage, I don't think it's gathering enough attention as you seem to imply it would.

Some references:

http://www.mbp2011.com/
https://twitter.com/hashtag/mb...
http://www.reddit.com/r/mbp201...

1000 pains = 1 Megahertz

Working...