They do more than just strip out the whitespace. JavaScript minifiers will also rename function scoped variables into shorter versions (i.e. a, b, c, etc). The Google Closure Compiler will even do some code rewriting optimizations:
The Closure Compiler compiles JavaScript into compact, high-performance code. The compiler removes dead code and rewrites and minimizes what's left so that it downloads and runs quickly. It also also checks syntax, variable references, and types, and warns about common JavaScript pitfalls. These checks and optimizations help you write apps that are less buggy and easier to maintain. You can use the compiler with Closure Inspector, a Firebug extension that makes debugging the obfuscated code almost as easy as debugging the human-readable source.
As someone has already said, all JavaScript libraries are usually distributed with the original unminified source, so not being able to debug it is your fault alone.
I don't know about these kinds of tactics. If you make a big deal about this, then you'll likely end up burning bridges. You need these people as a reference later in life. Since most new graduates are having a hell of a time finding work right now, you can't afford to be dicking around. You might win in the short term, but you'll lose in the end.
Exactly. Reasons like those explained the GP and the subsequent replies are the reason we end up with bloated code with hundreds or even thousands of unused methods/functions/classes/etc.
"What is this function used for?"
"Oh, because I know that the next feature we add here will need this."
This is not a valid excuse. Anybody who has spent a month working in the industry will know that product managers change their minds on a minute-by-minute basis. Don't waste my time by putting in code that I will end up reading, deciphering, and eventually find is not even used.
That's quite a leap. The browser having multi-process capabilities has nothing to do with Flash being able to render multiple movies in the same process. This might get Adobe to start thinking in those terms though; which would be nice.
Exactly. I'm a professional UI developer and I used to contribute to open source software quite a bit back in the day. I don't contribute much these days mostly because of lack of free time to do so, but this was a major point of contention for me.
The biggest problem is that the programmers have trouble accepting advice for changes to the product they've poured their blood, sweat, and tears into. I've found for the most part that many open source projects are over complicated. One of the best ways to improve the usability of a product is to simplify it. You need to remove or conceal the features that are rarely used. Unfortunately, those features tend to be the hardest to implement, so the person who implemented it wants to make sure people know about it. It's not unexpected that they wouldn't be happy if you suggest that it be removed.
But not too much since you have the 6GB data plan? Are you saying you actually get anywhere near 6GB in a month? I've had my 3GS for almost a year now and I'm only now coming up on 1GB (for the whole year).
Backup, servers, and bandwidth are *cheap* compared to manpower. I take it you don't work in the software industry. It's almost always much cheaper to throw more hardware at a problem than it is to redesign an application to increase performance.
I have yet to meet a non-graduate with who I can discuss a performance problem in terms of time and space complexity. Big O notation? What's that? Some kind of cheerio?
That's not to say that there aren't some very intelligent people without University degrees and some very stupid people with them. I've just found that most people with a passion for their profession are those with degrees. They did have the drive to spend 4 extra years of their lives going to school after all.
You should consider giving it another shot. NetBeans, in my opinion, is by far the best free Java IDE out there right now. As everyone has already pointed out, Eclipse is a plugin nightmare. The NetBeans UI is incredibly polished and while it might be slower at doing some things (e.g. autocompletion), it has a few features that I can't live without.
Check out the "Find Next/Previous Matching Word" keyboard shortcuts. I think it's bound to Ctrl+K and Ctrl+Shift+K by default. I never have to type more than 2 or 3 characters per word in my code. It's almost a complete replacement for the slower Ctrl+Space autocompletion. I really only use Ctrl+Space for reading Javadocs these days.
No, not Bethesda. They're owned by ZeniMax, who also owns Bethesda. It's ZeniMax that has to sign off on it.
id Tech 5 is impressive right now, but so was Quake 3 back in the day. I wouldn't rule out id Tech 5 being open sourced when their next big game is about to be released on id Tech 7.
And what happens when some bartender/server/bar owner has a grudge against someone and throws them on the banned list out of spite? Now somebody who is perfectly innocent can't get into any of the bars in Victoria.
I think you missed the point. The API is not the language. The language is the language. To put it in words that you will understand: The API is shit, the language is not.
Yes, the DOM is not great and it's implementation in IE is worse. But jQuery and other libraries do make it much nicer to work with, which is what the original guy was trying to say.
Mod this guy up. I'm really sick of people bashing JavaScript when they really mean to bash the DOM and its inadequacies and cross browser woes.
Please, if you want to sound intelligent when talking about the problems with JavaScript, make sure you're talking about the language, not the APIs available in the browser. That part is called the DOM.
I was ready to jump on you when I read the title of your post, but you're right, mostly. JavaScript is actually a really nice language to develop in (for small projects). With features such as lambdas, closures, and functions as first class objects, you can write some very elegant solutions with very little code.
Even with those features it's still stuck in the dark ages when compared to other modern languages. Prototypal inheritance, while cool, doesn't really offer the power that classical inheritance gives you when you're creating large systems. There's no such thing as super in prototypal inheritance, which gets annoying after a while.
Lately I've been looking into Flex and ActionScript 3. AS3 is basically what EcmaScript 4 was going to be before Microsoft derailed it. It's basically Java with a different syntax, a few extra features (lambdas, closures, namespaces), and no equivalent to abstract. It's really nice.
While I'm all for HTML5 and open standards, I highly doubt that it will ever be able to keep up with proprietary solutions like Flex. There's always going to be that big asshole in the corner who refuses to keep his browser up to date with everyone else. I've written large programs in JavaScript and its just far too stressful trying to keep IE-compliance. Until Microsoft or IE are dead and buried, I'm going to have more fun writing Flex apps that run on all browsers and all platforms without any platform specific code.
Well at least you'll be getting some exercise to help combat the onslaught of Cheetos-related heart disease.
They do more than just strip out the whitespace. JavaScript minifiers will also rename function scoped variables into shorter versions (i.e. a, b, c, etc). The Google Closure Compiler will even do some code rewriting optimizations:
As someone has already said, all JavaScript libraries are usually distributed with the original unminified source, so not being able to debug it is your fault alone.
I don't know about these kinds of tactics. If you make a big deal about this, then you'll likely end up burning bridges. You need these people as a reference later in life. Since most new graduates are having a hell of a time finding work right now, you can't afford to be dicking around. You might win in the short term, but you'll lose in the end.
When you're converting PowerPoint to HTML, it's not exactly trivial to generate semantic code.
IE9 will support addEventListener.
Exactly. Reasons like those explained the GP and the subsequent replies are the reason we end up with bloated code with hundreds or even thousands of unused methods/functions/classes/etc.
"What is this function used for?"
"Oh, because I know that the next feature we add here will need this."
This is not a valid excuse. Anybody who has spent a month working in the industry will know that product managers change their minds on a minute-by-minute basis. Don't waste my time by putting in code that I will end up reading, deciphering, and eventually find is not even used.
I really hope you're being sarcastic.
Actually no, Firefox lost marketshare last month. So technically it's not as popular as it was before. Pedantic, I know.
Bulk purchases? It's a percentage. You could make a hundred $1 purchases or one $100 purchase and at 3% you'll still end up paying $3.
That's quite a leap. The browser having multi-process capabilities has nothing to do with Flash being able to render multiple movies in the same process. This might get Adobe to start thinking in those terms though; which would be nice.
HFCS isn't everywhere. It's just in all the crappy food that you have in your pantry.
Did you think about what you were posting before you posted it?
Hey Farva.. what's the name of that restaurant you like with all the crazy stuff on the walls?
Exactly. I'm a professional UI developer and I used to contribute to open source software quite a bit back in the day. I don't contribute much these days mostly because of lack of free time to do so, but this was a major point of contention for me.
The biggest problem is that the programmers have trouble accepting advice for changes to the product they've poured their blood, sweat, and tears into. I've found for the most part that many open source projects are over complicated. One of the best ways to improve the usability of a product is to simplify it. You need to remove or conceal the features that are rarely used. Unfortunately, those features tend to be the hardest to implement, so the person who implemented it wants to make sure people know about it. It's not unexpected that they wouldn't be happy if you suggest that it be removed.
But not too much since you have the 6GB data plan? Are you saying you actually get anywhere near 6GB in a month? I've had my 3GS for almost a year now and I'm only now coming up on 1GB (for the whole year).
Oh that wins on so many levels. Bravo.
Backup, servers, and bandwidth are *cheap* compared to manpower. I take it you don't work in the software industry. It's almost always much cheaper to throw more hardware at a problem than it is to redesign an application to increase performance.
Time is money after all.
Indistinguishable? Really?
I have yet to meet a non-graduate with who I can discuss a performance problem in terms of time and space complexity. Big O notation? What's that? Some kind of cheerio?
That's not to say that there aren't some very intelligent people without University degrees and some very stupid people with them. I've just found that most people with a passion for their profession are those with degrees. They did have the drive to spend 4 extra years of their lives going to school after all.
You should consider giving it another shot. NetBeans, in my opinion, is by far the best free Java IDE out there right now. As everyone has already pointed out, Eclipse is a plugin nightmare. The NetBeans UI is incredibly polished and while it might be slower at doing some things (e.g. autocompletion), it has a few features that I can't live without.
Check out the "Find Next/Previous Matching Word" keyboard shortcuts. I think it's bound to Ctrl+K and Ctrl+Shift+K by default. I never have to type more than 2 or 3 characters per word in my code. It's almost a complete replacement for the slower Ctrl+Space autocompletion. I really only use Ctrl+Space for reading Javadocs these days.
Mod parent up. Different words.
No, not Bethesda. They're owned by ZeniMax, who also owns Bethesda. It's ZeniMax that has to sign off on it.
id Tech 5 is impressive right now, but so was Quake 3 back in the day. I wouldn't rule out id Tech 5 being open sourced when their next big game is about to be released on id Tech 7.
And what happens when some bartender/server/bar owner has a grudge against someone and throws them on the banned list out of spite? Now somebody who is perfectly innocent can't get into any of the bars in Victoria.
I think you missed the point. The API is not the language. The language is the language. To put it in words that you will understand: The API is shit, the language is not.
Yes, the DOM is not great and it's implementation in IE is worse. But jQuery and other libraries do make it much nicer to work with, which is what the original guy was trying to say.
Mod this guy up. I'm really sick of people bashing JavaScript when they really mean to bash the DOM and its inadequacies and cross browser woes.
Please, if you want to sound intelligent when talking about the problems with JavaScript, make sure you're talking about the language, not the APIs available in the browser. That part is called the DOM.
I was ready to jump on you when I read the title of your post, but you're right, mostly. JavaScript is actually a really nice language to develop in (for small projects). With features such as lambdas, closures, and functions as first class objects, you can write some very elegant solutions with very little code.
Even with those features it's still stuck in the dark ages when compared to other modern languages. Prototypal inheritance, while cool, doesn't really offer the power that classical inheritance gives you when you're creating large systems. There's no such thing as super in prototypal inheritance, which gets annoying after a while.
Lately I've been looking into Flex and ActionScript 3. AS3 is basically what EcmaScript 4 was going to be before Microsoft derailed it. It's basically Java with a different syntax, a few extra features (lambdas, closures, namespaces), and no equivalent to abstract. It's really nice.
While I'm all for HTML5 and open standards, I highly doubt that it will ever be able to keep up with proprietary solutions like Flex. There's always going to be that big asshole in the corner who refuses to keep his browser up to date with everyone else. I've written large programs in JavaScript and its just far too stressful trying to keep IE-compliance. Until Microsoft or IE are dead and buried, I'm going to have more fun writing Flex apps that run on all browsers and all platforms without any platform specific code.
It was a bug, and it was reported in the beta, but they never fixed it because it was so popular. See Here.