Java-me-do

From: Peter (BOUGHTONP)25 Mar 2011 01:13
To: koswix 23 of 49
You know those silly legal documents where every little detail must be explicitly spelt out and every term precisely defined.

That's what I find Java like. Far too rigid and ceremonial.

It's a bit like the difference between HTML and XHTML...

HTML code:
<!doctype html><html lang="en">
 
<TITLE>Hello!</TITLE>
 
<p>Wooohoo!!!
<p>I <3 lemons.

XML code:
<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> 
<head>
	<title>Hello!</title>
</head>
<body>
	<p>Wooohoo!!!</p>
	<p>I &lt;3 lemons.</p>
</body>
</html>



Those result in the same thing.

If you think the second one over the top, you'll find Java a nightmare. :P
From: Peter (BOUGHTONP)25 Mar 2011 01:24
To: steve 24 of 49
http://stackoverflow.com/tags

It's the second most popular language on a heavily .NET-oriented website.

And working out unanswered against total questions, he's more likely to get a Java question answered than a PHP or Javascript one. (87.0 vs 86.9 vs 85.1)
From: steve25 Mar 2011 01:32
To: Peter (BOUGHTONP) 25 of 49
You are exhausting! It's an opinion! :D

I shall give you numbers back, Google-numbers !!:

"Java programming forum": 4,550,000 results
"C# programming forum": 9,780,000 results
"PHP programming forum": 12,800,000 results

There isn't going to be a concise final answer on this, it is just my view on things, but I do feel that PHP and C#.etc are going to be more common as "hobby languages" whilst Java is something one tends to do as a career thing, therefore there's going to be a much more approachable and usable type of support out there online.
From: koswix25 Mar 2011 01:42
To: Peter (BOUGHTONP) 26 of 49

Your first one doesn't validate at w3C :C

 


and also, surely that there that you've posted - browsers interpreting HTML any old way they want - is the reason web drawers spend so long having to make sites work in different browsers?

From: Peter (BOUGHTONP)25 Mar 2011 02:29
To: koswix 27 of 49
You checked! :D

(Ok, so the <3 bit is actually invalid, but it'll still work fine in all browsers.)

And no - parsing textual tags to a logical DOM is straightforward and pretty easy, and is only a small part of how HTML is interpreted. It's the rest of it that causes the problems.

But anyway, at that point the analogy breaks down - whichever language you choose, you're going to have a single compiler, and you only need to work with that compiler. (Well, or two compilers, if you want to do regular Java and Android Java (Dalvik), but anyway, it's not like the multitude of browsers.)
From: Peter (BOUGHTONP)25 Mar 2011 02:38
To: steve 28 of 49
I don't understand what you're opinioning. :P


If he picks any language listed on that tags page, for any question he has at this point (i.e. beginner level), he can post it on StackOverflow, and there's a >95% chance of it being answered and solved within 24 hours, if not within 30 minutes.


If he wants to do Android, he has a choice:
1. Java (or Java-based) and XML and Android APIs.
2. HTML+CSS+JavaScript (optionally with PhoneGap/equiv to compile).


Is that concise enough? :P
From: 99% of gargoyles look like (MR_BASTARD)25 Mar 2011 08:51
To: koswix 29 of 49

If you buy a Mac you get the Apple developer toolkit which allows you to make apps for approximately 1% of the world's computing population. It's a minority, but one that cares and will love you for your efforts.

 

(the last part of that second sentence may be a lie)

From: af (CAER)25 Mar 2011 10:55
To: 99% of gargoyles look like (MR_BASTARD) 30 of 49
The downside being that Xcode is a horribly confusing mess of a (pair of) applications, unless he pays £5 for Xcode 4.
From: af (CAER)25 Mar 2011 10:57
To: Peter (BOUGHTONP) 31 of 49
Possibly the reason the job market for Java is so large is because it's used so much in enterprise software ( :& ).

KOS: learn COBOL :{)
From: af (CAER)25 Mar 2011 10:58
To: Peter (BOUGHTONP) 32 of 49
Also, wtf is with that uppercase TITLE tag? It looks ugleh.
From: Matt25 Mar 2011 12:22
To: af (CAER) 33 of 49
This.

Plus Java is such a pain to use they have to hire two Java developers for every one developer of every other programming language.
From: steve25 Mar 2011 12:25
To: af (CAER) 34 of 49
That is the sentence I was trying to create, but I could not find the words :(
From: af (CAER)25 Mar 2011 12:33
To: ALL35 of 49
Also, time to bring out my favourite enterprise software images: dependency diagrams...

This one is not so bad:
http://img.thedailywtf.com/images/201101/DependencyGraph.png

This one is a bit more complex:
http://img.thedailywtf.com/images/201103/tes0001.jpg

This one... is no moon...
http://img.thedailywtf.com/images/201103/big_ball_of_yarn.jpg
From: 99% of gargoyles look like (MR_BASTARD)25 Mar 2011 14:59
To: Peter (BOUGHTONP) 36 of 49
Ummm, it's a bit more than that. Even HTML 5 requires the HEAD/BODY to be defined and tags to be properly closed. No?
EDITED: 25 Mar 2011 15:00 by MR_BASTARD
From: 99% of gargoyles look like (MR_BASTARD)25 Mar 2011 15:02
To: Matt 37 of 49
Plus, from a purely aesthetics POV Java apps all have one thing in common...bloody ugly.
From: Peter (BOUGHTONP)25 Mar 2011 15:18
To: 99% of gargoyles look like (MR_BASTARD) 38 of 49
Nope.

The head element ends (and the body starts) as soon as the first non-head element is used. It doesn't need the explicit tags to work.

(I think there's a margin bug with IE6 if you don't specify html and body, but IE9 is out now, so I'm not going to care about IE6 layout issues now.)
From: 99% of gargoyles look like (MR_BASTARD)25 Mar 2011 16:25
To: Peter (BOUGHTONP) 39 of 49

Indeed, it appears that you are correct!

 

That's just bloody messed up!

From: Peter (BOUGHTONP)25 Mar 2011 16:47
To: 99% of gargoyles look like (MR_BASTARD) 40 of 49
Why messed up?

So long as it's obvious to a human and unambiguous to the compiler, there's no point adding extra tags for the sake of it.

Probably don't even need the HTML tag, if you specify language via the Content-Language header...

code:
<!doctype html>
 
    HEAD STUFF
 
<body>
 
    BODY STUFF
 

Simple, obvious, and readable. :)
EDITED: 25 Mar 2011 16:48 by BOUGHTONP
From: 99% of gargoyles look like (MR_BASTARD)25 Mar 2011 22:13
To: Peter (BOUGHTONP) 41 of 49

The 'compiler' presumably being the browser? The same browsers that have been the bane of our lives for how many years because of inconsistent adherence to even vaguely consistent standards? And now that many developers have got around to properly formatted HTML code what do W3C and their friends do? Throw it out the window.

 

Hurrah for progress.

From: af (CAER)25 Mar 2011 22:17
To: 99% of gargoyles look like (MR_BASTARD) 42 of 49

Well it's more a case of the browsers understood the HTML structure perfectly well, they just displayed it differently.

 

Most of the problems I have with IE are related to CSS anyway.

EDITED: 25 Mar 2011 22:18 by CAER