Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 Internet speed test! ×

Comment Re:Non-master (Score 1) 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 Stable? (Score 1) 442

Wait, you're telling me systemd is stable? Like, debian-stable level (or should I say debian-level stable)?

A super important core system software that had its initial release 5 years ago?

Is Debian still Debian?

Comment Re:Technology section seems... odd (Score 1) 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

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...

Slashdot Top Deals

"All we are given is possibilities -- to make ourselves one thing or another." -- Ortega y Gasset