Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×

Comment Re:What's wrong with html and javascript? (Score 1) 466

Wow, you are incredibly confused. b = {}; doesn't modify b, it re-assigns b. Please learn how variables work. And if you think that "1" and true are different values, then you don't understand what a "value" is.

So you and I are obviously done here. You're either really old, used to bit-registers not complex objects, or you're really young reading text books, or you've navigated the industry by avoiding business-level programming. I've focussed on business-level programming. In this sub-industry, everything you've said simply isn't true. a==b, b==c, would never presume a==c. It's never true in real-world business, so I'd never want it to be true in business programming.

So I'll leave you with this, because it makes one angle very clear. Have you ever used perl? Perl does something interesting in this regard. Printing a reference to a variable (we'll call these objects conversationally here) never attempts to cast anything. It simply prints out the type and memory address. So a = {foo:1,bar:[123]} might be "HASH(32598763)". It actually is the memory address, but it's more than that. Because if you're numerically comparing it to another variable, it'll get cast as a number -- the memory address. In perl, using the value of a reference requires explicitly dereferencing it, making this particular issue quite straight-forward -- especially since casting is done on operators, not on values, which is awesome by the way.

Javascript does some of the same stuff, but conceals it all. Like most languages, lvalues are cast differently than rvalues. But because javascript is designed, primarily, for non-algothimic and non-scientific use, of course [] is 0. There are six versions of nothing, and whether you have nothing once or you have nothing multiple times, you still have nothing. But you've only gone half-way with your last example there. Add a numerical 0, as well as a null value, then the fun really happens. Try "0happy" too. Woah the fun you'll have!

Here's the skinny. I've been using javascript for professional profit for 17 years. I've needed to use === merely four times. Let's ignore, for the moment, how stupid javascript is in many ways, and especially in this crazy-casting way -- because it is crazy-cryptic to anyone who hasn't memorized it all, and there's always one thing that's forgotten. The real question is what would a programmer expect from string == object? Why would a programmer be comparing a string to an object in the first place?

If we're talking about a complete logic error, then I don't really care what a language does when I screw up my entire concept. If it's a convenience service, then as long as the language is consistent then I'm fine with whatever it's going to do.

Pop quiz. What do you think perl does with "5" + "information". The answer may surprise you. Here's a hint, it actually casts "information" to a number because the first three letters match a defined numerical value.

Comment Re:What's wrong with html and javascript? (Score 0) 466

Well, seeing as how I guarantee that my clients won't need stuff re-written, that I maintain their loyalty for years and sometimes decades at a time, and that I guarantee minor changes forever for free, if that were me I'd have gone bankrupt long ago.

But I certainly agree that my previous reply is consistent with what you describe. Alas, it was one of many replies, each incomplete as a character description of my business.

Comment Re:What's wrong with html and javascript? (Score 0) 466

Dude, I'm not 40. I said well over. I own a house, a sprotscar, travel 40 days per year, and am semi-retired at 35. Learn to do business math. You dropped the "well over", you averaged linearly, and you took two decades to mean 20 years. In business, 2 decades can mean as little as 2 years, but usually means at least 12 years. Most people make more money as they grow their business from the age of 14.

At the height of my full-timeness, I was making $150'000. Today, semi-retired, I choose to stop at $100'000 because I'd rather spend the time enjoying my hobbies than making more money to spend on them.

Enjoy your life. I sure won't.

Comment Re:What's wrong with html and javascript? (Score 1) 466

The bow wasn't an analogy. It was real.

You might have noticed that the two decades began at a very young age, includes a large house, a sportscar, and semi-retirement at age 35.

Why would I choose to write weird branched code that can't be debugged atomically when I can instead write atomic code that branches? I don't use a debugger. I use something called "truth statements". Truth statements don't need to get debugged as a whole; they get debugged individually -- atomically.

Comment Re:What's wrong with html and javascript? (Score -1, Troll) 466

no make files of any kind. just file-save, ctrl-s will do just fine.

But like I said before, you count your millions of dollars, and I'll count mine. I have no interest in listening to you re-iterate what others have taught you. I roll my own. The day that you build your own IDE, that's the day that you can tell me how good it is. Until then, mine is better than yours purely because mine fits me while yours fits somebody else.

Enjoy your one-size-fits-all tools. I'm far too flexible and powerful to benefit from your tools. Alternatively, enjoy building your house with your swiss army knife. It truly is an amazing tool -- as evidenced by the number of people who have one.

Comment Re:What's wrong with html and javascript? (Score -1, Troll) 466

or, you know, you can be responsible for your own code organization, actually make that a priority, and get the native x10 speed boost, instead of chaining yourself to your IDE.

But again, I've professional made well over a million dollars my way. You do what you want, and I hope that you do. When you do, it often works out very well for me.

Comment Re:What's wrong with html and javascript? (Score 1) 466

use strict; ...27 lines of code
var temp = null; ...87 lines of code
var tmep = null; ...912 lines of code
temp = temp * 3; ...153 lines of code

use strict doesn't help at all. it does absolutely nothing but enforce style conventions. I don't want use strict. I want use smart. Where's the warning: "you have two variables conspicuously similarly named", or "you've named a variable something that you've never used before in thirty years of programming life".

Comment Re:What's wrong with html and javascript? (Score 1) 466

That page makes it sound like you'd want to use the triple sign. You almost never do. That page doesn't actually explain the difference between double and triple. I'll help you. Double compares the values of the variables. Triple compared the references to the variables. Double tests to see if two variables have the same value. Triple tests to see if two variables point to the same place in memory -- are actually the same variables. In most contexts, the triple actually tells you that changing one variable's value will change the second one automatically.

Stop reading random documentation. Use it. Then make up your own mind based on results, not based on efforts. With javascript, you'll spend a week playing, and you'll produce real-world usable tools. Sure you'll encounter problems, sure javascript is riddled with bugs. But you'll produce working results and sellable product. That just ain't true of most languages.

Comment Re:What's wrong with html and javascript? (Score 1) 466

Perl has things that no other (typical) language has. That's what makes it ridiculously difficult for programmers coming from C: hidden variables, context-sensitive variables, native regular expressions, and lists -- no C-style language has lists; there's no concept of a function that returns multiple objects in C; and there certainly isn't any concept of a function that knows how its return will be cast by the caller.

Comment Re:What's wrong with html and javascript? (Score -1) 466

Glad your way passifies you. I've been profitting for two decades now. I'm telling you that I've made over a million dollars doing it this way. You can go about it any way you choose. I'm saying no IDE, no debugger, no delays, no learning, no time wasted means no complexity. It's just me and the code and the output. I'm saying that works best.

I'm saying that works best six months later when the client wants a new feature. I'm saying that works best a year later when I'm with a client, in a field, with a compound bow in my left hand and an arrow tail in my right and she asks me how much a new feature will cost and how long it'll take to deliver and I can give her an answer before my arrow hits the ground nowhere near the target.

Again, you can do things any way you like -- or have been taught. I've never listened to anyone who's attempted to teach me anything in this industry. You and I are very different.

Slashdot Top Deals

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...