Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Comments

top

Ask Slashdot: What Are the Strangest Features of Various Programming Languages?

TheDarkMaster Re:+ operator for string concat? (724 comments)

*clap clap clap* What a big moderation system failure we have here... "The Dumb Guy" (a freak from another topic, nothing with the "shutdown now") seens to have friends with infinite mod points. Well done ./ well done. (sarcasm)

4 days ago
top

Ask Slashdot: What Are the Strangest Features of Various Programming Languages?

TheDarkMaster Re:+ operator for string concat? (724 comments)

I understand, but part of the problem is not knowing for sure what kind of type Javascript will set for your variable. As example, the first time I saw this was one occasion where I had to get input from a user where it should be an integer, but the interpreter assumed it was a string and then the "+" operator made a concatenation instead of an addition (the other variable in the operation was an integer). That's why I consider the operation as non-deterministic, because you know that the "+" operator will do a concatenation for strings, but the interpreter may decide that your variables are integers (or vice versa).

about a week ago
top

Ask Slashdot: What Are the Strangest Features of Various Programming Languages?

TheDarkMaster Re: + operator for string concat? (724 comments)

Nice change? Uh... Dumb guy, you are the very first one that I have to give a full explanation and you still could not understand what I mean. You can stop swinging your virtual d*** and pay attention please? You claim to have knowledge of "super-genius" to come here for gratuitous offends a person that you do not have a clue who he is, and yet you're showing me the knowledge of a script kiddie :-(

Last time: I see is only you that do not know what is "deterministic". When you can't say what will be the result of an operation using the "+" because it is not possible to determine which will be the type of the variables involved (or values if you prefer which gives the same), then the result of the operation is non-deterministic. You simply have no way to tell for sure if the result will be a concatenation or addition without being sure if the variables involved are strings, integers, etc. This happens because Javascript can guess wrong the type used (or change it because of previous operations), after all it do not have strong-typed variables (or values if you like, but is the same in pratice).

The "ugly hack" is something simple as this:

var test = (unknow type input) + "";

to be sure the "test" will be recognized as a string. I call it "ugly" because in my humble opinion the correct way to do this would be:

String test = (unknow type input);

or better:

String test = function_to_convert_to_string((unknow type input));

but this will only works on a strong-typed language.

Footnote: I'm not going to answer any more because I have more important things to do than try to explain to you something you do not want to understand, Dumb guy... Think what you want about me, since the only thing that matters to me is that my several clients are very happy with my supposed "terrible job" and their systems work perfectly, even in situations they should not be able to function ;-)

about a week ago
top

Ask Slashdot: What Are the Strangest Features of Various Programming Languages?

TheDarkMaster Re: + operator for string concat? (724 comments)

This is not funny, dumb guy. Learn how to read, or I need to use pictures? Well, I try again: I said the behavior of the "+" operator in Javascript is non-deterministic because you have no way to guarantee the type of the variables involved (string, integer, double, etc). The parser sometimes assumes the type correctly but sometimes not, and that is the problem when you use the operator, it needs to know the type of the variables involved in order to decide whether it will be a sum or a concatenation. And the best part is that what you thought set as a string can be transformed into integer and vice versa depending on the interpreter operations that you may have done previously or user inputs, so that depending on the user input your variable may turn in some type different from the expected and thereby generates an unexpected result when using the "+" operator (and therefore the hack to ensure that what should be a string remains a string so that the operation using the "+" return the expected result for a string).

In short, my problem with this is not "nonsense". Is simply the result of having a "+" operator for both concatenation and sum in a language without strong-typed variables. As an example Java does not have this problem because a string variable would always be a string, and so the operation with the "+" becomes deterministic. The problem is two-fold and you blindly read only half of it, super-genius... ;-)

about two weeks ago
top

Ask Slashdot: What Are the Strangest Features of Various Programming Languages?

TheDarkMaster Re: + operator for string concat? (724 comments)

Wow... You are just like "The Clueless One" (another Slashdot "super-genius"). Sorry dumb guy, but I know how the "+" operator works, and I also knows that it is not a very good idea on a weak-typed language for reasons I already explained before and I will not repeat again. The ugly hack I mentioned earlier just makes sure that a given string variable will be interpreted as a string when I need it to be a string, just that. Something it would be completely unnecessary if the Javascript was strong-typed.

about two weeks ago
top

Ask Slashdot: What Are the Strangest Features of Various Programming Languages?

TheDarkMaster Re: + operator for string concat? (724 comments)

There IS a "way to say with certainty what the interpreter will do". You just haven't taken the few minutes required to find out how!

And I figured, dumb guy. But the fact that I have determined how to overcome this defect of the language does not make this anomalous behavior becomes "acceptable" as you seem to think. Fixable or not is still a behavior that the Javascript should not have.

about two weeks ago
top

Ask Slashdot: What Are the Strangest Features of Various Programming Languages?

TheDarkMaster Re: + operator for string concat? (724 comments)

You're dumber than I thought. If you were better at interpreting text and had dealt more with the case described, you would have understood what I mean by random is that there is no way to say with certainty what the interpreter will do since there's no telling for sure if he will treat the "+" operator as a sum of integers or a concatenation of strings. It's happened to me more than once, I thought I made it clear to the interpreter that a variable would be a string (for example: var some_variable = "1") and later I found out he decided to treat the variable as a integer anyway, and the only solution was to force the variable as string immediately before the desired operation using a ugly hack. while in Java if you use the "+" operator between a string and an integer you will always have a string as a result, regardless of the variables positions or operations that have been made with them previously.

about two weeks ago
top

Ask Slashdot: What Are the Strangest Features of Various Programming Languages?

TheDarkMaster Re: + operator for string concat? (724 comments)

Oh, sorry? The language behaves in a non-deterministic way and this is my fault? From what basement you are, clueless guy?

about two weeks ago
top

Ask Slashdot: What Are the Strangest Features of Various Programming Languages?

TheDarkMaster Re:+ operator for string concat? (724 comments)

Is because JavaScript seems to randomly decide whether it will return a "11" or "2", while in a strong-typed language the result is deterministic. On Java you knows that "A" is a string and "B" is a integer, so A + B will always returns a string "11". Whereas Javascript are not sure about the types used in A and B, so therefore is no way to be sure about what he is going to return.

about two weeks ago
top

Ask Slashdot: What Are the Strangest Features of Various Programming Languages?

TheDarkMaster Re:+ operator for string concat? (724 comments)

I usually have a worse problem, which is when Javascript arbitrarily decides that my string variable is an integer or vice-versa. You create a string, but then you discovers - when trying to use a string function like split() - that Javascript decided to treat your string as a integer, making the split() fails without error messages.

about two weeks ago
top

Ask Slashdot: What Are the Strangest Features of Various Programming Languages?

TheDarkMaster Re:+ operator for string concat? (724 comments)

The difference is that the "+" operator in a strong-typed language works without causing nasty surprises for you.

about two weeks ago
top

Ask Slashdot: What Are the Strangest Features of Various Programming Languages?

TheDarkMaster Re:The idea of variant (var) (724 comments)

Because variants are useful when you want to (or most common, you need to) make a generic function to handle some information where you have no way of knowing if the input parameter will be a string, integer, long, etc. Of course it is slower than dealing with a defined type, but is usually more convenient than trying to create a separate function for each possible entry type.

about two weeks ago
top

Buenos Aires Issues a 'Netflix Tax' For All Digital Entertainment

TheDarkMaster Re:To the slashdotters of the world (165 comments)

Is the same shit here in Brazil. 60% tax in all international purchases made by individuals under the guise of "protecting" a nonexistent national industry (nobody makes Intel i7 in Brazil as far as I know).

about two weeks ago
top

New Usage-Based Insurance Software Can Track Drivers Using Smartphones

TheDarkMaster Interesting, if optional (137 comments)

As long as is optional, is interesting to have it considering that the driver will not always be able to call for help in an emergency (And from the standpoint of first responders is also interesting that a car can automatically call for help when involved in an accident).

about two weeks ago
top

Oregon Suing Oracle Over Obamacare Site, But Still Needs Oracle's Help

TheDarkMaster Re:Mistake #1 (116 comments)

Here we use PostgreSQL in most applications of the government, and it works pretty well.

about two weeks ago
top

Firefox 32 Arrives With New HTTP Cache, Public Key Pinning Support

TheDarkMaster Re:First impressions (220 comments)

Try to visit the recent XKCD here, as example: http://xkcd.com/1416/

On Chrome is usable, on Firefox the entire system almost freeze (using Linux Mint on a AMD Athlon II X2 250).

about two weeks ago
top

Firefox 32 Arrives With New HTTP Cache, Public Key Pinning Support

TheDarkMaster Re:First impressions (220 comments)

Sorry, only your impression. When I use Firefox on a weaker computer, the speed difference compared to Chrome is obvious. The detail is that a current machine is usually fast enough to hide this difference (but it still exists).

about two weeks ago
top

SpaceX Challenges Blue Origin Patents Over Sea-Landing Rocket Tech

TheDarkMaster Re:Would it really be worse without patents? (75 comments)

You completely ignored the crux of the problem: For the small inventor file lawsuits against patent infringement, he must pay. And need to pay a lot, probably more than he will see in life being a small inventor.

about two weeks ago
top

SpaceX Challenges Blue Origin Patents Over Sea-Landing Rocket Tech

TheDarkMaster Re:Learn from History, Please (75 comments)

Is the "american way". Stealing ideas, patent them and then force everyone to pay to use their "innovations".

about two weeks ago
top

SpaceX Challenges Blue Origin Patents Over Sea-Landing Rocket Tech

TheDarkMaster Re:Would it really be worse without patents? (75 comments)

This. The north-american justice system is so fucked up that in practice there is no justice at all. North-americans are in practice at your own risk in the market with no protection of justice, where whoever has the most money is who wins per more wrong he is.

(The legal system is as broken as google translator, the damn thing is crap)

about two weeks ago

Submissions

top

How secure is Windows XP limited user account?

TheDarkMaster TheDarkMaster writes  |  about 6 years ago

TheDarkMaster writes "I need to grant user access to my pc for parents. Of course I can't say what a hell my little sister (or others) can download from net, and I need to use a limited user account for her. But, how secure is this account? They can survive a "OMG, CLICK HERE NOW!!!!" "insuspect" file or something else?"

Journals

TheDarkMaster has no journal entries.

Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>