Learning JAVA, any advice?

Status
Not open for further replies.
levine":10xytquc said:
You're advocating for software professionals to be dumber, less well-read and less dedicated. What on earth is the point? :confused:

No I'm advocating that there are positions in software development such as doing business CRUD applications that are legitimate forms of software development and that there are other skills not just raw coding itself that contribute to how good a engineer someone is.
 

ShuggyCoUk

Ars Legatus Legionis
10,387
Subscriptor++
if you only know java you must be incompetent

No. You simply cap your capabilities to at best be competent but slower[1]. If you would never have got the chance to be faster then fine (if sad) if you are incapable of understanding the more powerful constructs then not so fine (because I'd bet pounds to potatoes they write at best horribly verbose fragile java).

Why let someone new who has a real chance to be good (they asked for help' in a pretty reasonable way, from a forum generally aimed at the quality end of the spectrum) settle for mediocrity.

As others have said, if you want to advocate mediocrity pray tell why would you do it on a forum called "Programmer's Symposium"... It's not like we are Lambda the Ultimate or anything, but we *care*

1. less productive, more effort to change what you produce.
 
ShuggyCoUk":3hzhdzh4 said:
if you only know java you must be incompetent

No. You simply cap your capabilities to at best be competent but slower[1]. If you would never have got the chance to be faster then fine (if sad) if you are incapable of understanding the more powerful constructs then not so fine (because I'd bet pounds to potatoes they write at best horribly verbose fragile java).

Why let someone new who has a real chance to be good (they asked for help' in a pretty reasonable way, from a forum generally aimed at the quality end of the spectrum) settle for mediocrity.

As others have said, if you want to advocate mediocrity pray tell why would you do it on a forum called "Programmer's Symposium"... It's not like we are Lambda the Ultimate or anything, but we *care*

1. less productive, more effort to change what you produce.

Right, but learning java first doesnt mean you will never make that progression.
 

Blacken00100

Ars Legatus Legionis
10,130
Subscriptor
I am fairly certain that beginning with Java makes it vastly more likely that you will not progress to something more expressive, more productive, and in general superior.

Since around as Shuggy noted, we care, it's unsurprising that mediocrity is not cheered for here.



And for the love of god, please stop quoting screenfuls of text and posting a one-liner that has something to do with something in the middle.
 
Blacken00100":3o136r0l said:
I am fairly certain that beginning with Java makes it vastly more likely that you will not progress to something more expressive, more productive, and in general superior.

Since around as Shuggy noted, we care, it's unsurprising that mediocrity is not cheered for here.



And for the love of god, please stop quoting screenfuls of text and posting a one-liner that has something to do with something in the middle.

I'm sorry that you are "butt hurt" about my quoting, guess you will have to "deal".

Why would java make it vastly more likely that you will not progress than python for example? Why do you think that introducing someone to programming using a language that is dynamically typed, is a superior method?
 

Blacken00100

Ars Legatus Legionis
10,130
Subscriptor
MistaMagoo":1gk4ch66 said:
I'm sorry that you are "butt hurt" about my quoting, guess you will have to "deal".
So you can't be bothered to communicate effectively. I am unsurprised.


Why would java make it vastly more likely that you will not progress than python for example? Why do you think that introducing someone to programming using a language that is dynamically typed, is a superior method?
If you actually read the Graham essay, instead of burbling about how elitist we all are, you would know.
 
Blacken00100":1qxglxqx said:
MistaMagoo":1qxglxqx said:
I'm sorry that you are "butt hurt" about my quoting, guess you will have to "deal".
So you can't be bothered to communicate effectively. I am unsurprised.


Why would java make it vastly more likely that you will not progress than python for example? Why do you think that introducing someone to programming using a language that is dynamically typed, is a superior method?
If you actually read the Graham essay, instead of burbling about how elitist we all are, you would know.

heh, I specifically wrote that in your style, quoting you, so you would understand it :p

I actually read the essay last night when you posted it, and it certainly didnt address the specific questions I just asked you. Not only that,it mentions another writer as saying C and Java are the best languages to start with, LOL. :D
 

Faramir

Ars Legatus Legionis
36,356
Subscriptor
Richard Berg":29lgwntx said:
Its not a joke at all, its completely serious. If someone wishes to learn java, learns java and has a successfull career writing java and never learns of first class functions, what exactly is the problem? (your kinda close minded so I'll let you in on something, there isint one).
You end up with a generation of people who *think* they are well educated, when in reality all they've learned is how to paint-by-number.

They are far more dangerous than people who know their own ignorance. I won't hire them, but there's still a nonzero chance of maintaining their code at some point.

More broadly, consider what happened when we allowed mediocrity and old-school fanboyism hijack the maths curriculum. Its graduates can (and do) vote, serve on school boards, rise to managerial / executive ranks, or be appointed as judges. They inevitably listen to the same propaganda that floats throughout society, as you & I do, but lack the tools to perceive it the same way. All because the previous generation of half-educated ignoramuses decided that students should spend their formative years drilling long division instead of, say, developing an intuition for conditional probability.
There was never a golden age of mathematics education. It was rote memorization as far as the eye can see, for the vast majority of history enforced by corporal punishment.

Will the flaws in today's CS curriculum have unintended consequences of comparable magnitude? I don't know, but given the increasingly pervasive role of computers, I wouldn't want to wager against it. In the 90s, teaching students to churn out StrategyFactoryProxyFactorys -- inevitably taking time away from, say, relational algebra -- was inefficient, but at least somewhat defensible (given the prevailing zeitgeist and alternatives). Allowing that trend to persist into 2011 would be a tragic mistake.

I'm not sure I get the argument here, made with more profanity by Blacken00100, if first class functions are so important from a pedagogical standpoint then what is the justification for not teaching Scheme first for the last 30 years?
 

JustinS

Ars Legatus Legionis
10,123
MistaMagoo":1inyqsio said:
I'm sorry that you are "butt hurt" about my quoting, guess you will have to "deal".
If it would help convince you to hear it from someone without blacken's PeterB-without-the-humor posting style: please stop quoting massive amounts of text while making a small point (or a big point). It serves no end other than to take up space on the screen which the reader would prefer to have taken up by the posts adjacent to yours.
 

Blacken00100

Ars Legatus Legionis
10,130
Subscriptor
MistaMagoo":nrqrg3yi said:
heh, I specifically wrote that in your style, quoting you, so you would understand it :p
You may have attempted to do so, but between your infirm grasp of English and general levels of Blub, I would submit that you failed. HAND.

I actually read the essay last night when you posted it, and it certainly didnt address the specific questions I just asked you.
Fine, I will repeat it, again: because it constrains one's universe of capabilities. When you think that all that exists is what is available in Java, you will write Java in Python instead of writing Python in Python. Some may adjust and start writing Python in Python, but from experience both professionally and academically this is not common.

On the other hand, when you move down the continuum defined by PG, you will write Java in Java (and swear at it for sucking) and Python in Python and--this is the important part--it becomes instinctive. It doesn't require additional thought or effort. It just happens, because it is natural.

Not only that,it mentions another writer as saying C and Java are the best languages to start with, LOL. :D
No, he does not in any way do so. His reference to ESR specifically notes "Python, then Java."

However, since it's 2011, here's the revised ESR quote from his essay, where he's changed his mind:

If you don't know any computer languages, I recommend starting with Python. It is cleanly designed, well documented, and relatively kind to beginners. Despite being a good first language, it is not just a toy; it is very powerful and flexible and well suited for large projects. I have written a more detailed evaluation of Python. Good tutorials are available at the Python web site.

I used to recommend Java as a good language to learn early, but this critique has changed my mind (search for
The Pitfalls of Java as a First Programming Language within it). A hacker cannot, as they devastatingly put it, approach problem-solving like a plumber in a hardware store; you have to know what the components actually do. Now I think it is probably best to learn C and Lisp first, then Java.



Faramir":nrqrg3yi said:
I'm not sure I get the argument here, made with more profanity by Blacken00100, if first class functions are so important from a pedagogical standpoint then what is the justification for not teaching Scheme first for the last 30 years?
There are a number of not-really-satisfying reasons why this has been the case, and it gives me indigestion to go through it.

However, Scheme and Python in particular. are standard pedagogical languages today. My university used Scheme and has transitioned to Python (not that I'd use UMaine as an example of what to do in most cases, but this isn't bad. MIT's CS department has generally settled on Python; Berkeley uses Scheme.

My own preference for such instruction is Python--while Scheme is fairly inarguably more powerful and, given sufficient knowledge, more expressive, it is less approachable: Scheme's syntax tends to be a challenge and its library support is somewhat lacking so it becomes harder to hook learners by "look, you can do cool stuff with this!".

(Python is more expressive than Java, and more approachable. Funny, that.)
 
Blacken00100":1kklgjxz said:
On the other hand, when you move down the continuum defined by PG, you will write Java in Java (and swear at it for sucking) and Python in Python and--this is the important part--it becomes instinctive. It doesn't require additional thought or effort. It just happens, because it is natural.

So you agree with PG, java is a good learning language? :p
 

Blacken00100

Ars Legatus Legionis
10,130
Subscriptor
MistaMagoo":2v9tqrim said:
Blacken00100":2v9tqrim said:
On the other hand, when you move down the continuum defined by PG, you will write Java in Java (and swear at it for sucking) and Python in Python and--this is the important part--it becomes instinctive. It doesn't require additional thought or effort. It just happens, because it is natural.

So you agree with PG, java is a good learning language? :p
Clearly you didn't actually understand the essay, if you actually read it at all. PG doesn't say that. PG emphatically doesn't say that. He's saying, if you actually read and understood the essay, to learn Lisp! (I don't agree with his assertion to learn Lisp first due to some practical considerations, but it's not an unreasonable one.)

--

The only references to Java in that essay are as follows:

Eric Raymond has written an essay called "How to Become a Hacker," and in it, among other things, he tells would-be hackers what languages they should learn. He suggests starting with Python and Java, because they are easy to learn.

Note: as I mentioned previously, ESR has revised this opinion: I recommend starting with Python. ... I used to recommend Java as a good language to learn early, but this critique has changed my mind ... A hacker cannot, as they devastatingly put it "approach problem-solving like a plumber in a hardware store"; you have to know what the components actually do. Now I think it is probably best to learn C and Lisp first, then Java.

The more of an IT flavor the job descriptions had, the less dangerous the company was. The safest kind were the ones that wanted Oracle experience. You never had to worry about those. You were also safe if they said they wanted C++ or Java developers. f they wanted Perl or Python programmers, that would be a bit frightening-- that's starting to sound like a company where the technical side, at least, is run by real hackers. If I had ever seen a job posting looking for Lisp hackers, I would have been really worried.

Note: this passage refers to their use of Lisp as a competitive advantage, and its depiction of Java is in no way favorable.
 
Blacken00100":2svo5j8g said:
Note: as I mentioned previously, ESR has revised this opinion: I recommend starting with Python. ... I used to recommend Java as a good language to learn early, but this critique has changed my mind ... A hacker cannot, as they devastatingly put it "approach problem-solving like a plumber in a hardware store"; you have to know what the components actually do. Now I think it is probably best to learn C and Lisp first, then Java.

Note: this passage refers to their use of Lisp as a competitive advantage, and its depiction of Java is in no way favorable.

Hardly the damning evidence for your claims that its the worst language to start out in. The edit was also made in 2008 so for a long time he held the feeling that java was the best. Now since thats changed, fair enough, but if it was his first choice up to 2008 doesnt really support the concept thats its a terrible language to start in does it?

Its extremely amusing to be using a document you linked to, to support your argument, against you, cheers :D
 

Blacken00100

Ars Legatus Legionis
10,130
Subscriptor
MistaMagoo":3gkgao22 said:
Hardly the damning evidence for your claims that its the worst language to start out in. The edit was also made in 2008 so for a long time he held the feeling that java was the best. Now since thats changed, fair enough, but if it was his first choice up to 2008 doesnt really support the concept thats its a terrible language to start in does it?


Given that ESR's advice was consistently not to start with Java? Yes, it certainly is damning. The argument towards learning Java early is not the same as the argument for learning Java first.

I have said, repeatedly, that in 2011 it's a miserable choice of a pedagogical language. You, on the other hand, have just herped some Palinesque "anti-elitist" nonsense and been thoroughly proof to obvious problems and good sense.


And stop intentionally mischaracterizing what I've said in an attempt to ascribe to me positions I do not hold. I never said Java was the worst possible pedagogical language. I have said it is miserable and terrible and bad, and all of these are true. But there are worse.


Its extremely amusing to be using a document you linked to, to support your argument, against you, cheers :D

That might be true, except that you're not. For an almost-30-year-old, you're shockingly unable to process this sort of thing. I compared you earlier to Soap Box posters, and I'm not sure that's inaccurate.
 
Blacken00100":3tabgwa9 said:
Are you really that unable to differentiate between learning something early and learning something first?

Learning Java early can put a practical tool in your toolbox. Learning Java first can blind you to more powerful idioms and practices simply by virtue of them not existing in your perceptual universe.

And if anyone is motivated enough they will learn other languages that have additional features and thus be aware of them....

Java doesn't hinder this.
 
Blacken00100":2h69e71j said:
You are desperate to circle back to the same rhetorical trapdoors, and I won't have it.

I'm done with you.

Yeah you have said that before, and didn't stay away, lets hope you can hold your resolve this time eh?

Just for a giggle I wondered if my university was unique in teaching java first, from the looks of things it certainly isn't, in fact it appears to be the standard.
 

Faramir

Ars Legatus Legionis
36,356
Subscriptor
Blacken00100":319i02s3 said:
On the other hand, when you move down the continuum defined by PG, you will write Java in Java (and swear at it for sucking) and Python in Python and--this is the important part--it becomes instinctive. It doesn't require additional thought or effort. It just happens, because it is natural.

Not directly contradicting your point, but there is also a problem with writing python in java. I once worked on a project that for various reasons was written in c, and we had this one programmer who kept on trying to block out time to implement c++ as a part of our program.

From the article you linked:
"Greenspun's Tenth Rule of Programming: any sufficiently complicated C or Fortran program contains an ad hoc informally-specified bug-ridden slow implementation of half of Common Lisp."
 

Blacken00100

Ars Legatus Legionis
10,130
Subscriptor
I dunno about that, Faramir--IME, things that are "easy" in more expressive languages tend to decompose into a fairly predictable set of patterns. Which is fine, as a way to get around the limitations of a non-expressive language--the pedagogical problem is just that being the starting point.

Not sure what Python has to do with somebody trying to re-implement C++ in Java, though. C++ is marginally more expressive than Java when used by wizards (and C++0x is considerably more expressive for more normal programmers too), but for most programmers they're about on par. What were they re-implementing?
 
Kalila":2nbn5diu said:
Why is there such a dogpile on Java?

What is wrong with it as a learning language, compared to the myriad of options given in this thread?

-- That is, anything beyond the personal commercial interests that may be associated with promoting one language or other.

Lack of first class functions apparently means its a "fucking wrong" programming language.
 
I don't think it's quite as bad as Blacken is making out, although I've no love for it myself.

But as a learning language I think it's just not good enough. There's too much pointless initial complexity for a new user, and some important concepts that just don't exist in the language. In the one direction you've got pointers/memory management/etc, which are important for some careers/industries but not others, and in the other direction you've got meaningful functional programming with first-class functions etc; again, useful for some careers but not others.

You certainly can have a long and prosperous career never learning anything but Java, but for me I think introducing new CS students to a broad swath of concepts is a good idea (among other things, so they can make an informed decision about what kind of languages/jobs they want to pursue later), and Java just doesn't promote that due to its limitations and complexities. I wouldn't advise C# or VB as a first language for similar reasons; something like Scala or Python or Ruby make much better choices IMO.
 
MistaMagoo":17e7xjff said:
Kalila":17e7xjff said:
Why is there such a dogpile on Java?

What is wrong with it as a learning language, compared to the myriad of options given in this thread?

-- That is, anything beyond the personal commercial interests that may be associated with promoting one language or other.

Lack of first class functions apparently means its a "fucking wrong" programming language.
Huh, learn Java, then you can easily move to Scala if that is what you need.
 
technophile":3ai7f7lm said:
I don't think it's quite as bad as Blacken is making out, although I've no love for it myself.

But as a learning language I think it's just not good enough. There's too much pointless initial complexity for a new user, and some important concepts that just don't exist in the language. In the one direction you've got pointers/memory management/etc, which are important for some careers/industries but not others, and in the other direction you've got meaningful functional programming with first-class functions etc; again, useful for some careers but not others.

You certainly can have a long and prosperous career never learning anything but Java, but for me I think introducing new CS students to a broad swath of concepts is a good idea (among other things, so they can make an informed decision about what kind of languages/jobs they want to pursue later), and Java just doesn't promote that due to its limitations and complexities. I wouldn't advise C# or VB as a first language for similar reasons; something like Scala or Python or Ruby make much better choices IMO.
At my uni within the first year we were introduced first to Java and OOP, then had exposure to a RISC architecture, a course on C that included memory management, and a course on functional programming in SML.

I liked this approach and would recommend it to anyone - it encourages learning concepts using languages that are good for their purpose and does not try to advocate "language fundamentalism" or fanboyism or what have you. Learn the concepts - the language to be used later becomes mere syntax.
 

Blacken00100

Ars Legatus Legionis
10,130
Subscriptor
Kalila":ppvzdcwu said:
Why is there such a dogpile on Java?

What is wrong with it as a learning language, compared to the myriad of options given in this thread?

-- That is, anything beyond the personal commercial interests that may be associated with promoting one language or other.
Put simply: as a formative learning experience, Java is insufficiently expressive. See the previous posts: if you teach somebody Python (or Scheme, or Scala, or C#) they can move downward (and it is a downward move, from a complexity, flexibility, and expressiveness standpoint) to Java. Starting with Java, then moving upward, increases the likelihood that a programmer does not avail themselves of the benefits of better expressivity and thus writes Java in X, rather than X in X.

"Learn Java, then move to Scala when you need it" misses the point: a Java programmer is unlikely to realize they can benefit what Scala provides. Which is certainly their prerogative, but people here have a vested interest (having waded through reams of shit code) in not recommending that people start off using a tool that is essentially, via its lack of expressiveness, a vector toward creating shit code when you don't know any better.

Unfortunately, "it's just syntax" is not actually reflective of real programming. The lack of Java expressiveness lends itself to writing bad code filled with patterns devised to overcome Java's limited expressiveness. Starting at a high level (SML would, too, be fine) allows a novice to understand implicitly--that is, without needing someone to tell them--that pattern-puke in Java exists to overcome the inherent shortcomings in a non-expressive language, rather than that they are something to be desired.

Example: a functor object (using Callable or equivalent) exists to duck Java's inability to create delegates. They exist due to a Java wart. Then why, pray tell, have I seen them in Python code here at work? Because they were written by someone writing Java in Python. They did not know any better, because their universe of understanding was "what Java is capable of." The automatic assumption was "gee, I need a function object here." Did it make sense? Not really. But that's what a heavy reliance on patterns that evolve to counter limited expressiveness engenders: it is tacit encouragement of cargo-cult programming, where you don't understand why, you just sort-of-understand what.



Java is an adequate professional tool; it is a bad pedagogical one, when better alternatives exist. And so many better alternatives exist that it's not a good recommendation. Which, as it happens, is exactly what happened in this thread.
 
Blacken00100":2let8mna said:
Kalila":2let8mna said:
Why is there such a dogpile on Java?

What is wrong with it as a learning language, compared to the myriad of options given in this thread?

-- That is, anything beyond the personal commercial interests that may be associated with promoting one language or other.
Put simply: as a formative learning experience, Java is insufficiently expressive. See the previous posts: if you teach somebody Python (or Scheme, or Scala, or C#) they can move downward (and it is a downward move, from a complexity, flexibility, and expressiveness standpoint) to Java. Starting with Java, then moving upward, increases the likelihood that a programmer does not avail themselves of the benefits of better expressivity and thus writes Java in X, rather than X in X.

"Learn Java, then move to Scala when you need it" misses the point: a Java programmer is unlikely to realize they can benefit what Scala provides. Which is certainly their prerogative, but people here have a vested interest (having waded through reams of shit code) in not recommending that people start off using a tool that is essentially, via its lack of expressiveness, a vector toward creating shit code when you don't know any better.

Unfortunately, "it's just syntax" is not actually reflective of real programming. The lack of Java expressiveness lends itself to writing bad code filled with patterns devised to overcome Java's limited expressiveness. Starting at a high level (SML would, too, be fine) allows a novice to understand implicitly--that is, without needing someone to tell them--that pattern-puke in Java exists to overcome the inherent shortcomings in a non-expressive language, rather than that they are something to be desired.

Java is an adequate professional tool; it is a bad pedagogical one, when better alternatives exist.
On the contrary. IMO, forcing the kitchen sink of paradigms on new learners of languages proved to be quite difficult in many courses I was TA'ing for at uni. As a first language, we tried C, Java, SML and Lisp. C was just cruel. SML and Lisp just boggled students (who often knew some Pascal beforehand) with too many syntactical nuances to move quickly to understanding concepts.

Java was procedural enough when it was needed, and allowed teaching things like recursion and data structures very easily sometimes using OOP. A full on undertaking of functional programming - including the mathematical underpinnings is IMO a must before throwing problems that can be solved efficiently in FP languages.
 
Example: a functor object (using Callable or equivalent) exists to duck Java's inability to create delegates. They exist due to a Java wart. Then why, pray tell, have I seen them in Python code here at work? Because they were written by someone writing Java in Python. They did not know any better, because their universe of understanding was "what Java is capable of." The automatic assumption was "gee, I need a function object here." Did it make sense? Not really. But that's what a heavy reliance on patterns that evolve to counter limited expressiveness engenders: it is tacit encouragement of cargo-cult programming, where you don't understand why, you just sort-of-understand what.
Looks like your colleague needs to learn functional programming.

Notice how my emphasis here is on the subject, not the language. Think about why.
 

Blacken00100

Ars Legatus Legionis
10,130
Subscriptor
One informs the other. In a perfect world, that wouldn't be the case--but we live in an imperfect one.



Again: when better alternatives exist, and no compelling reason exists to pick Java over the others, it makes sense to recommend the alternatives, as was done here. Nobody recommended SML or Lisp--they recommended Python and C#. The difference, and the reasons behind the recommendations, should be obvious. You're arguing at straw men.
 

Blacken00100

Ars Legatus Legionis
10,130
Subscriptor
Kalila":2ibyfw9s said:
Java was procedural enough when it was needed, and allowed teaching things like recursion and data structures very easily sometimes using OOP. A full on undertaking of functional programming - including the mathematical underpinnings is IMO a must before throwing problems that can be solved efficiently in FP languages.
Again: when better alternatives exist, and no compelling reason exists to pick Java over the others, it makes sense to recommend the alternatives, as was done here. Nobody recommended SML or Lisp--they recommended Python and C#. The difference, and the reasons behind the recommendations, should be obvious. You're arguing at straw men.


Kalila":2ibyfw9s said:
[Looks like your colleague needs to learn functional programming.

Notice how my emphasis here is on the subject, not the language. Think about why.
One informs the other. A bad choice in the latter creates a constrained view of the former.
 

Faramir

Ars Legatus Legionis
36,356
Subscriptor
Blacken00100":1moou96l said:
I dunno about that, Faramir--IME, things that are "easy" in more expressive languages tend to decompose into a fairly predictable set of patterns. Which is fine, as a way to get around the limitations of a non-expressive language--the pedagogical problem is just that being the starting point.
I suppose it depends on the pattern, but some of that can be very non-idiomatic in the daughter language, which makes it difficult for later programmers to follow. And no you can't always fire said later programmer and hire someone else.

Not sure what Python has to do with somebody trying to re-implement C++ in Java, though. C++ is marginally more expressive than Java when used by wizards (and C++0x is considerably more expressive for more normal programmers too), but for most programmers they're about on par. What were they re-implementing?
It was C++ in C.
 
Kalila":47as6xdi said:
A full on undertaking of functional programming - including the mathematical underpinnings is IMO a must before throwing problems that can be solved efficiently in FP languages.

This may be an adequate defense for Java as a learning language, but it is a piss-poor one for the use of Java in place of FP languages in a computer science curriculum.
I'm with technophile - I'm a C# head, but when people randomly ask me what language they should learn, it's way down on the list because of the amount of domain knowledge that I take for granted in order to get up and running with it. Python's strictures corral you towards good coding practices and, for a beginner, I think that's a good thing.
 

Blacken00100

Ars Legatus Legionis
10,130
Subscriptor
Faramir":vt7457qc said:
Blacken00100":vt7457qc said:
I dunno about that, Faramir--IME, things that are "easy" in more expressive languages tend to decompose into a fairly predictable set of patterns. Which is fine, as a way to get around the limitations of a non-expressive language--the pedagogical problem is just that being the starting point.
I suppose it depends on the pattern, but some of that can be very non-idiomatic in the daughter language, which makes it difficult for later programmers to follow.
Examples? I can't think of any that are not fairly logically obvious, but I may be skewed by virtue of knowing both higher-level languages and the patterns for Java-alikes fairly intuitively.

There is an argument, and I think a reasonable one, that if the idiomatic version of the pattern does not match the pattern that is the logical decomposition of the problem as viewed from a higher-level set of tools, the idiomatic version is wrong. But this is a case where practicality often reigns.

Not sure what Python has to do with somebody trying to re-implement C++ in Java, though. C++ is marginally more expressive than Java when used by wizards (and C++0x is considerably more expressive for more normal programmers too), but for most programmers they're about on par. What were they re-implementing?
It was C++ in C.
Well, I thought we were talking about higher level languages... :p

More seriously, I've definitely seen this as well, in C++ v. C--but my intuition suggests to me that this is a little bit of a different situation. Related, but not quite the same. Where I've seen this, and if it's different in your case maybe you can elaborate, it was an attempt to develop things normally somewhat foundationally lacking in C, i.e. type safety that actually means something. I can see where you're going, though, and I don't entirely disagree. Bad programmers will be bad programmers no matter what, but I am a big proponent of forcing them to at least have the knowledge of what is available, instead of constraining "what exists" because of early pedagogical choices.
 
Blacken00100":1kp08uku said:
Kalila":1kp08uku said:
Java was procedural enough when it was needed, and allowed teaching things like recursion and data structures very easily sometimes using OOP. A full on undertaking of functional programming - including the mathematical underpinnings is IMO a must before throwing problems that can be solved efficiently in FP languages.
Again: when better alternatives exist, and no compelling reason exists to pick Java over the others, it makes sense to recommend the alternatives, as was done here. Nobody recommended SML or Lisp--they recommended Python and C#. The difference, and the reasons behind the recommendations, should be obvious. You're arguing at straw men.


Kalila":1kp08uku said:
[Looks like your colleague needs to learn functional programming.

Notice how my emphasis here is on the subject, not the language. Think about why.
One informs the other. A bad choice in the latter creates a constrained view of the former.
The problem that creates is that you get programmers who are far too attached to their particular language or ecosystem then they should be, to the point where they fail to adeptly switch languages when it needs to happen.

Dreadful scenario:

Manager: Here is a problem, our code base is written in A. Can you solve it?
Programmer: ew, A does not have X and Y syntactical sugars and Z paradigm. I'm SOL.
 

Blacken00100

Ars Legatus Legionis
10,130
Subscriptor
I'm not sure what you're arguing. Nobody here has said "learn Python and never learn anything else." Learning Java, or whatever else, as a non-formative language is more than fine. What I in particular have been saying is that it's a poor idea to constrain a learner's knowledge of what is possible when it isn't necessary or beneficial to do so. There's a clear usability and resource benefit from "stepping down" from a Lisp to Python; there's no clear usability or resource benefit from stepping down again from Python to Java.

I mean no disrespect, but you seem to be inventing things that nobody's saying.



(And classifying stuff like first-class functions or closures as "syntactical sugar" is...interesting.)
 
jxl":15j6ag7h said:
Kalila":15j6ag7h said:
A full on undertaking of functional programming - including the mathematical underpinnings is IMO a must before throwing problems that can be solved efficiently in FP languages.

This may be an adequate defense for Java as a learning language, but it is a piss-poor one for the use of Java in place of FP languages in a computer science curriculum.
I'm with technophile - I'm a C# head, but when people randomly ask me what language they should learn, it's way down on the list because of the amount of domain knowledge that I take for granted in order to get up and running with it. Python's strictures corral you towards good coding practices and, for a beginner, I think that's a good thing.

Who said anything about Java being in place of FP languages?

You are far better off learning FP using something like Haskell or one of the implementations of SML that does lazy evaluations etc very well than the half assed implementations of languages such as C#.
 
Java is an awesomely, incredibly average language. It doesn't have exciting, unusual, or powerful features; just your bog-standard imperative syntax, inheritance-based OO, loops, conditionals, etc. with a little plain sugar sprinkled on top, like anonymous classes, synchronized blocks, etc. You can do most things with it without much trouble, albeit with a few more braces and a bit more typing than in more streamlined languages. It's generally easy to read and easy to reason about.

The Java platform is where Java really shines. It performs very well compared to other VM-based languages, is cross-platform, has a high quality standard library with great concurrency tools and collections, has tons of enterprise libraries, and is well-supported.

I'd recommend learning Java or C# (after which Java is easy to learn) if you're going into a career in enterprise software. They're ubiquitous and get the job done. Currently I think there are more jobs in Java than any other language but that will likely change over the next 10 years.

However, as others have mentioned, it isn't an especially good language to teach the fundamentals of programming. I think Scheme is the boss in that regard - SICP starts from basically nothing and allows the student to solve interesting problems fairly quickly without making the student think much about syntax, compilation, deployment, and all those nitty-gritties that get in the way of learning. Other languages have console environments too but I don't know of any as simple as Scheme. It doesn't even feel like you're programming - you're just writing computations. And that's really what programming is at its core.
 
Status
Not open for further replies.