Modern web """"programming""""

>Modern web """"programming""""

Other urls found in this thread:

htmlcompressor.com/
twitter.com/SFWRedditImages

The code is minified and inline to reduce HTTP requests and page load time.

I see nothing wrong with this.

I'm seeing a lot of Google there.

Is that hand written or generated code?

protip: spacing it out and indention are only useful to us. to a computer, it really doesn't matter.

generated or handwritten and then used a program to go over and get rid of the stuff to make it human readable to decrease load time and strain.

Obviously compiled for efficiency. Most places use some kind of tool to do this.

what program do I use for this?

There are lots. You can even use a diferent language, like CoffeeScript or TypeScript and then use that to generate JavaScript.

“When I use a word,” the web programmer said, in rather a scornful tone, “it means just what I choose it to mean—neither more nor less

Would doing this for Java make a difference or benefit my compile time in any way? Isn't each blank space a bit that the compiler has to read over?

Hardly. Java's compiler is pretty good. You'll only see a usable benefit if you compile on a macro scale (say, if you compile on many machines, or if you intend to compile 1,000,000 times or whatever). Otherwise, you can save 0.01 seconds because it didn't have to throw aways some spaces.

Code readability is infinitely more important. It's the real timesaver. That's why you should name your variables verbosely. Even things like characterIndex for iterating a character array is better than just "i" because even though it's widely known that 'i' stands for index, it tells you what the index is good for.

If I were to do it I would simply save two versions, the compressed version and the version for editing. Any time I made an edit I would have to recompress it. But if it makes no difference in compile time, like say for a mobile app, then I'm wasting my time.

It would take more time to compress your code than to compile it.

Holy shit, how new are you to this? Seriously
htmlcompressor.com/

I don't mean compress it every time I run it dude. And I don't mean compress it to a zip or some shit. I mean just compress it once for the official app release, as in - get rid of excess spaces and lines similar to OP's picture.

Do you have a source showing that this is a futile effort?

Common sense/experience writing interpreters. I really don't know the amount of timesave you're expecting, but you will lose more time than you save.

No. Compiling java generates binary byte code which is pretty much as small as it gets. The js minification just removed whitespace, newlines and comments. It's still very easy to reformat it.
I use grunt to do minification and beautification it's kinda like make for javascript, it runs tasks that you define in a grunt file like minifying, linting, combining files and whatnot. There's a lot of plugins available and you basically just type grunt on the command line in your project folder and it'll do all you tasks in one go.
Very useful. I suggest you all check it out if your not familiar with it.

'i' stands for iteration you dumbfuck

i stands for "i stands for", retards

Im sure having a program remove whitespaces before compiling is going to make it much faster. I don't see a single Problem with this idea.

>>Modern web """"programming""""
Isn't programming, but certainly is decent based off the image you linked. That's pretty smart.

>even though it's widely known that 'i' stands for index, it tells you what the index is good for

People should only be allowed in web-development after writing a html-parser.

Fuckin kek.

"i" stands for "thing", but in the olden days, when code was printed out on paper for people to read, a printer didn't reproduce the "t" exactly and it missed the bar, so it resulted in "i" being written out.

I concur. Bitches be crazy these days.

Web development is programming, because Javascript is a programming language.

People should only be allowed to write JavaScript libraries after writing a JavaScript JIT.

That's called minifying and is done to minimize load times.
As far as my experience goes it doesn't really have a big impact on anything but I think its mostly done for SEO.

(Also, that code is mostly js and CSS.)

Yes, but not significantly.

The reason you do it with Javascript is because the 'compiling' is done every time someone loads the page. So to increase page load time by fractions of a second pays off.

>I'm a massive faggot, please rape my face