Yes, I have taught people Java, and they got past this particular
issue. Python, Perl, JavaScript, Scala (ahem), and pretty much any
language with a REPL is better. Actually we can take Scala out of
that list, as I think worrying about types isn't useful for novice
programmers unless there is a strong mathematical background.
PHP, even with a REPL, would be crap; the error messages, when they
exist, are useless. Perl is a bit dubious because it doesn't default
to strict and warnings, but I suppose a little script would fix that.
I suppose Ruby would be ok if it can keep up with your keystrokes. ;)
> --
> You received this message because you are subscribed to the Google Groups
> "The Java Posse" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/javaposse/-/kynwmjakcrUJ.
> To post to this group, send email to java...@googlegroups.com.
> To unsubscribe from this group, send email to
> javaposse+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/javaposse?hl=en.
--
> --
> You received this message because you are subscribed to the Google Groups
> "The Java Posse" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/javaposse/-/E0MhSRQUvaIJ.
Python's only worse than JavaScript according to your criteria in that
you generally need to install it if you're on Windows. Is that why
it's a stupid choice?
--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
fabrizio...@tidalwave.it
http://tidalwave.it - http://fabriziogiudici.it
* REPLs are pointless in real life (go away, Kevin), the java IDEs have debuggers that can do everything a REPL does for serious work and more... EXCEPT for first steps programming language, for the same reason: It's perfectly feasible for me to tell some programming whinging about a lack of a REPL for java to go spend a week or two becoming an ace at the eclipse debugger and then reapply for the job, or whatnot. It's completely inappropriate to tell a first-steps student to try to make heads or tails of one.
Contrast this to javascript, which is more or less simple, and you get instant and immediate payoff. You get a fantastic REPL (load up a webpage, hit the 'patch jquery into this thing' bookmarklet, then open up the webkit console and go nuts), everybody has everything they need to just start out (a webbrowser)
Really - this, or logo. Any other choice, including python, is stupid, IMO.
Frankly I think that JavaScript as first taught language is a horrible choice, just as it would be Java. C is still the best option IMHO, but in the end any traditional language that gets compiled into native code is ok. Abstraction is good, but only after you've completely understood what's under the hood. If a language has got a "WOW" factor, it's a very bad choice as the first taught language.
> Total rubbish. We must start with a solid grounding in VLSI design and
> the
> core principles of modern processor architecture - paying particular
> attention to pipelining, branch prediction, virtual addressing and shared
> memory schemes in a multi-core design. Then progress onto raw machine
> code.
>
> Only after that should something as high-level as C be considered.
>
> Anything else is just a slippery slope, before you know it we'll have
> people expecting to be able to drive without having rebuilt so much as a
> single engine!
>
> </flippancy>
Misused flippancy, I'd say. :-) I'm not expected to be the guy who builds
the car, but as the guy who drives it I should know what happens when I
drive it pushing to the limits, for instance using a lower gear than the
manual says (americans please find another appropriate example). In fact,
what's happening now with cars stuffed with technology is that people are
fine in 90% of cases, but get helpless in unusual conditions. If you
answer by pointing out the fucking manual, that's academia, because
manuals won't explain how to behave in very unusual (and maybe unexpected)
conditions.
In fact, I'm constantly seeing new generations of engineers that have been
only taught with fun high level languages being totally unable not only to
understand a trivial cause of a performance hit, but even lacking the
mental tools to investigate it (which is truly a disaster). Just because
they are unable to go under the hood for the required amount (which is not
of course understanding VLSI, but the basics such as machine instructions,
memory, caches, hits and misses, stacks, heap, compiler optimisations,
etc...). This is blatantly demonstrated by the more and more frequent blog
posts where people present a surprising result of a micro-benchmark, just
to be debunked in a few minutes when somebody points out that they just
understand nothing about how the JIT works...
> I consider advanced low-level work in C to be "stunt programming".
> Amazing
> cool and powerful, but too focused and dangerous for most programming
> needs.
I didn't talk of advanced low-level work in C. We were talking of the
"first taught language", right?
I would suggest though that REPLs are far more useful to people who
already know a language for doing experiments, than it is for teaching
people. My experience is that teaching using a REPL rather than
file/execute leads to confusions that get in the way of learning. I
believe the GroovyConsole /IDLE model far superior to REPL for teaching
learning.
Sadly though it seems REPL use is assumed to be the way all books should
be presented for teaching people to use a language with a REPL. I
always prefer books that eschew the REPL, at least initially, for
teaching.
I am a fan of REPLs for quick experiments, but ignore them for teaching,
which seems to be the antithesis of the standard orthodoxy on teaching.
--
Russel.
=============================================================================
Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel...@ekiga.net
41 Buckmaster Road m: +44 7770 465 077 xmpp: rus...@russel.org.uk
London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
On Thu, 22 Dec 2011 10:07:32 +0100, Kevin Wright <kev.lee...@gmail.com> wrote:
Total rubbish. We must start with a solid grounding in VLSI design and the
core principles of modern processor architecture - paying particular
attention to pipelining, branch prediction, virtual addressing and shared
memory schemes in a multi-core design. Then progress onto raw machine code.
Only after that should something as high-level as C be considered.
Anything else is just a slippery slope, before you know it we'll have
people expecting to be able to drive without having rebuilt so much as a
single engine!
</flippancy>
Misused flippancy, I'd say. :-) I'm not expected to be the guy who builds the car, but as the guy who drives it I should know what happens when I drive it pushing to the limits, for instance using a lower gear than the manual says (americans please find another appropriate example). In fact, what's happening now with cars stuffed with technology is that people are fine in 90% of cases, but get helpless in unusual conditions. If you answer by pointing out the fucking manual, that's academia, because manuals won't explain how to behave in very unusual (and maybe unexpected) conditions.
In fact, I'm constantly seeing new generations of engineers that have been only taught with fun high level languages being totally unable not only to understand a trivial cause of a performance hit, but even lacking the mental tools to investigate it (which is truly a disaster). Just because they are unable to go under the hood for the required amount (which is not of course understanding VLSI, but the basics such as machine instructions, memory, caches, hits and misses, stacks, heap, compiler optimisations, etc...). This is blatantly demonstrated by the more and more frequent blog posts where people present a surprising result of a micro-benchmark, just to be debunked in a few minutes when somebody points out that they just understand nothing about how the JIT works...
--
You received this message because you are subscribed to the Google Groups "The Java Posse" group.
To view this discussion on the web visit https://groups.google.com/d/msg/javaposse/-/KNnGpvO8rE8J.
As is often the case Reinier - you seem to have got your enthusiasm making statements that are far to over general.Here is the history from my development machine (not one of the ones I use for Scala training) along with the number of times I have started the scala REPLdick@Apollo:~$ history | wc -l500dick@Apollo:~$ history | grep scala | wc -l31dick@Apollo:~$ history | grep "sbt console" | wc -l40
On Thursday, December 22, 2011 5:42:12 PM UTC+1, Dick Wall wrote:As is often the case Reinier - you seem to have got your enthusiasm making statements that are far to over general.Here is the history from my development machine (not one of the ones I use for Scala training) along with the number of times I have started the scala REPLdick@Apollo:~$ history | wc -l500dick@Apollo:~$ history | grep scala | wc -l31dick@Apollo:~$ history | grep "sbt console" | wc -l40Sure, that sounds about right. I open my scrapbook (which is the exact same thing as a REPL, just not called a REPL - you've apparently missed the point but I'll get into that next paragraph)
... about a tenth as often as you do, but then, java is easier to understand so there's less for me to try out.
--
You received this message because you are subscribed to the Google Groups "The Java Posse" group.
To view this discussion on the web visit https://groups.google.com/d/msg/javaposse/-/phiQVx2GWEcJ.
]Sure, that sounds about right. I open my scrapbook (which is the exact same thing as a REPL, just not called a REPL - you've apparently missed the point but I'll get into that next paragraph) about a tenth as often as you do, but then, java is easier to understand so there's less for me to try out.
Here's where you missed the point. Yes, what REPLs do is very handy. But I don't have to use a spoon to eat soup; I can use a spork as well.
java has no REPL. But eclipse has scrapbook pages. These do everything REPLs do and more. It's almost exactly like sbt console in that I get the project's classpath 'for free'.
Now, don't get me wrong, the eclipse scrapbook functionality has boatloads that needs to be done. Having to be a wizard at using command line foo to select expressions so I can evaluate them is frankly ridiculously (enter should just eval the expression I just typed, or at least give me a shortcut key to do it, exceptions shouldn't be pasted straight into the scrapbook but shown in the console view, etc, etc, etc), but learning an all new language just because the scrapbook functionality bothers you seems rather drastic. It would be easier to write an entirely new scrapbook plugin for eclipse!
I stand by my point that a REPL, as compared to java's advanced debuggers, is a pointless addition except as a teaching tool. I have _NEVER_ met any person that continued arguing in favour of scala / python / some other language with built in REPL that actually knew how to use the eclipse / netbeans / intellij debugger well. Then again I don't think I ever asked specifically on the javaposse groups, so maybe somebody's out there who can tell me what I'm missing.
--
You received this message because you are subscribed to the Google Groups "The Java Posse" group.
To view this discussion on the web visit https://groups.google.com/d/msg/javaposse/-/PeYU_KRIVSAJ.
REPLs are useless, but something not called a REPL built into eclipse is super-useful and you use it all the time despite being an experienced java developer.
Great, just like the REPL. As you mention below though, you still can't interact with the scrapbook as easily as with the REPL. It would be a bit like using a text editor for issuing shell commands at the command line, and having to select those lines to evaluate them one by one. Sure, you can do that, but why on earth would you want to?
I'm not saying that Python isn't a good first language, there may be good arguments for that, but I don't think that the REPL argument is one of them. It's easy enough in Java to get immediate results.
--Cédric
--
You received this message because you are subscribed to the Google Groups "The Java Posse" group.
> I think the point is to maximise the chances that the student enjoys and
> continues programming, rather than worrying that they might be missing
> low-level concepts, etc., at least in the first instance.
Excitement must be put in the proper perspective. Excited people about fun
languages who don't understand fundamentals have higher chances to become
useless and not making a great career (that's not exciting). I think that
there's a pedagogical value in properly focusing excitement: it's more
valuable to be excited because you are able to create something that
works, rather than the tool that you used.
Not to mention that at the university not all classes were exciting to me.
For instance, math-based ones were boring to me (to me maths is
fascinating, but not something I'd like to do, such as mountaneering).
Still I worked hard and got almost always the maximum marks. It's a good
thing that people is taught to apply also to boring parts, because they
can't be eliminated by the real life.
Plenty of perfectly capable people avoid programming because of dull
or overly difficult initial presentation, and Java is part of that
problem. One of my colleagues is perfectly capable with Perl and is
now learning Java because the client wants him to, so he wrote
something trivial and had to learn about exceptions and static before
he was going to be interested in them. He's not put off, but I
remember when I was teaching, that as soon as you had to involve
exceptions to load an image file, eyes started to glaze and it was a
battle to bring them back to full interest.
Compared to working in an IDE,
Imho everything depends on the goals.
Do you want to teach concepts? Stay away from IDEs until the concepts are understood.
Do you want to teach Eclipse? Sure, go on, but please be honest about it. I have seen to many "text processing courses" which more or less were instructions on how to find some menu entry in Microsoft Office 2003, while 95% of the participants lacked _any_ idea of concepts like "where to use headings/bold/italic/different fonts"/"how to use quotation marks"/"what's the purpose of footnotes"/"how to decide on consistent style guidelines"/...
Teaching with an IDE feels a bit like those office courses, because people are basically bound to spend most of their time fighting with IDE-related problems and issues.
In the end I think languages without a stand-alone REPL/interpreter/... lack some important tooling. Some languages are not that REPL-friendly, but even C# has one. So I think there aren't much excuses except laziness.
In the end I think JavaScript has some nice properties as a first language, but also suffers from the issues as PHP does: Most of the existing code out there is just horribly outdated, wrong, or often both and as a teacher you don't want your students to look at it. Teaching JavaScript without internet access though, sounds very weird.
Bye,
Simon
In the end I think languages without a stand-alone REPL/interpreter/... lack some important tooling.
Some languages are not that REPL-friendly, but even C# has one. So I think there aren't much excuses except laziness.
In the end I think JavaScript has some nice properties as a first language, but also suffers from the issues as PHP does: Most of the existing code out there is just horribly outdated, wrong, or often both and as a teacher you don't want your students to look at it. Teaching JavaScript without internet access though, sounds very weird.
In the end I think languages without a stand-alone REPL/interpreter/... lack some important tooling.
There are a few obvious counter examples: Java has great tooling but ships without a REPL (but it has several kinds available as third party, as discussed before) and Scala has mediocre tooling but ships with a REPL.
I don't think REPL has much to do with tooling.
Some languages are not that REPL-friendly, but even C# has one. So I think there aren't much excuses except laziness.
Or usefulness. I don't think a lot of Java developers feel a burning need for REPL, including people who actually know what a REPL is. It's just never been seen as important enough to ship as part of the distribution.
In the end I think JavaScript has some nice properties as a first language, but also suffers from the issues as PHP does: Most of the existing code out there is just horribly outdated, wrong, or often both and as a teacher you don't want your students to look at it. Teaching JavaScript without internet access though, sounds very weird.
Not sure why, it's very easy to teach a whole Javascript course without any connection to the Internet, as I showed in my teaching example earlier.
REPLs are useless, but something not called a REPL built into eclipse is super-useful and you use it all the time despite being an experienced java developer. The only difference seems to be the name. I would posit that I am not the one who missed the point here.
I use a spoon, always, to eat soup. Even camping. It's just a better tool for the job. I don't think I missed a point. You said REPLs were useless for anything except beginners. I said they were not. You seem to back up my position with scrapbooks.
(more on how eclipse's scrapbook feature has some gaping holes in it).
I would agree that learning a new language just because your current one doesn't have a REPL is nonsense, but that is not related to your original statement that a REPL is useless for anything but beginners. Using eclipse to clean freshly caught fish is equally nonsensical, but that doesn't have anything to do with the original point either.
So the REPL is still a pointless addition even though it provides a slicker more interactive experience to experimenting with APIs and the language than scrapbooks, and scrapbooks are awesome except when they're not. Got it. Clear as crystal.
As for never meeting any person who continued to argue in favor of scala/python/some other language with a built in REPL that actually knew how to use the eclipse/netbeans/intellij debugger well? I would say you know me.
To be even clearer, I use the REPL in addition to all of the other tools you mention here (apart from the scrapbook in eclipse, cos I don't use eclipse, but IDEA as you mention has similar features). I can even start the sbt console in IDEA, and try stuff out right from there, it's still the same REPL I always use, just with more colors. Tell you what, let's call it a scrapbook and we can all agree - it is Christmas after all.
Yes, they are a useless addition to a language provided there's already an advanced debugger, scrapbook tool, etc, available.
Note that advanced debuggers are _more_ useful than REPLs, which is why I said REPLs are useless. They are worse than the alternative and the alternative can do everything REPLs can do (except, more or less, to serve as a learning environment, an important omission).
I use a spoon, always, to eat soup. Even camping. It's just a better tool for the job. I don't think I missed a point. You said REPLs were useless for anything except beginners. I said they were not. You seem to back up my position with scrapbooks.Scrapbooks are the proverbial spoon here vs. repl's spork, if you want to stress this analogy to its breaking point. advanced debuggers do all REPLs do and more (they inherit project classpath by default, work with full colourization, auto-complete, etc, the same way my IDE does things so I don't have to learn two environments, and as I can just add a breakpoint in the middle of a live, running app and then jump into evaluating whatever I want to evaluate, it's just easier to try and figure out what my code is doing compared to trying to fire up a REPL, then loading my app and trying to manually reconstruct breakpoint features).
Making scala's REPL a full breakpoint-capable debugger is a dozen man years.
I don't want a REPL. I want an advanced debugger.
Yes, they are a useless addition to a language provided there's already an advanced debugger, scrapbook tool, etc, available.Doesn't that pretty much apply to Scala, too? Seems like pretty much everyone having experience with a REPL and a debugger disagree with you... :-)
Comparing debuggers with a REPL is like 99% missing the point.
Pretty much not having to start a whole IDE isn't a minor thing, imho.
If I want to communicate with a webservice I want to fire up my REPL and just do it. In seconds. Not waiting until Eclipse has started, creating a new project in Eclipse, configuring Maven, creating a new file or starting the scrapbook, setting breakpoints and running the debugger (which seems to be the essential tool for you) ...
Making scala's REPL a full breakpoint-capable debugger is a dozen man years.Thanks, but no. I like my less-than-1-second start-up time. If I need a "full breakpoint-capable debugger" I just use ... a full breakpoint-capable debugger.
Great, just use a debugger then. It is not like REPL and a debugger are even remotely used for the same thing.
I'm still not sure if this is advanced trolling or meant serious ... whatever, good job!
Nice holidays,
On Sunday, December 25, 2011 9:51:18 PM UTC+1, Simon Ochsenreither wrote:Yes, they are a useless addition to a language provided there's already an advanced debugger, scrapbook tool, etc, available.Doesn't that pretty much apply to Scala, too? Seems like pretty much everyone having experience with a REPL and a debugger disagree with you... :-)
I count Dick Wall so far. That's one. I'm not sure he's ready to be a proxy for 'pretty much everyone'. You could name 20 examples, even - I'll counter that with: Did you know Twilight grossed 300 million dollars?
Scala had a REPL many many many years before having an advanced debugger, scrapbook tool, etc. As far as I know (but the scala IDE integration has been moving at a lightning pace of late, so this might be outdated), it still doesn't actually have an advanced debugger, at least, it's nowhere near what you can do with java.Comparing debuggers with a REPL is like 99% missing the point.And your paragraph ends there? It feels 99% incomplete. When I say somebody is missing the point, I then proceed to explain the point I thought they missed. Seems rude to just leave it hanging like that.
Pretty much not having to start a whole IDE isn't a minor thing, imho.It is the most trivial of trivialities. Eclipse is always open. If it isn't, then I'm about to open it anyway, might as well start it now.
If I want to communicate with a webservice I want to fire up my REPL and just do it. In seconds. Not waiting until Eclipse has started, creating a new project in Eclipse, configuring Maven, creating a new file or starting the scrapbook, setting breakpoints and running the debugger (which seems to be the essential tool for you) ...
If you have to 'configure maven' in order to do this hypothetical 'communicate with a webservice' job, then you'd have to be doing the same thing if you were doing this in scala, python, or anywhere else. Unless this just turned into an argument for 'more stuff included in the standard libraries for platform X', which is an entirely different argument, quite irrelevant to the REPL discussion.
This happens almost always when I talk to scala fanboys. They make a bunch of non sequitur statements that my pile-of-manure detector picks up on, stuff where scala gets a free ride when java doesn't. In this case, your scala REPL magically has the libraries you need but your java scrapbook doesn't. Does not add up. If these are the arguments you come up with, I'm tempted to conclude there aren't any valid ones at all and you're just grasping at straws. It's of course a lot more complicated than this, but this is just personal advice to you: You're not convincing anyone with arguments that contain such obvious bias.
Do you even know what the scrapbook feature does? It's an alternative to setting breakpoints; it's a bit like starting a do-nothing app with a breakpoint right after 'main'. You obviously don't make a scrapbook AND fire up a debugger unless I actually want to debug an actual, live, existing app, and I want to eval some code snippets in the context of some frame or other. If I want to play around with some API we don't get to the breakpoint phase of things until after I eval a bunch of expressions in a scrapbook.
In fact, setting breakpoints then having REPL-like features (what's this thing? Eval this thing. Change this bit of code and rerun this frame, etc) is one of the many reasons why debuggers/scrapbooks are superior to REPLs, at least, in the context of 2011 java debuggers and 2011 python/scala REPLs.
Making scala's REPL a full breakpoint-capable debugger is a dozen man years.Thanks, but no. I like my less-than-1-second start-up time. If I need a "full breakpoint-capable debugger" I just use ... a full breakpoint-capable debugger.
That's it? That's your argument? Every 2 months I have to wait a fraction of a minute while eclipse boots? Colour me not at all convinced, if that's all you can come up with.You might have the most tenuous of points if you somehow have the bad fortune of being stuck on 5 year old hardware, but I'm not exactly on a racehorse here and I have zero issues with this. Heck, I'm on one of the slowest computers for sale when I bought it (early air 11"): 21 seconds to launch eclipse. Just enough time to pick out a playlist.
If you're running into trouble on this front, I suggest you just leave eclipse running. I do. Months on end.
Great, just use a debugger then. It is not like REPL and a debugger are even remotely used for the same thing.That's where you're wrong. I use a debugger to do REPL-like things all the time. The scrapbook feature of eclipse is an afterthought of the debugger's featureset (why don't we make some concept where the debugger will attach to a dummy JVM that does 1 NOP with a breakpoint on it and allow you to eval/execute stuff in that one 'blank' frame? - That's it. That's ALL the scrapbook thing does).I'm still not sure if this is advanced trolling or meant serious ... whatever, good job!
Nice holidays,Same to you buddy, on both accounts.
That Lisp has no syntax is more related to the directness between lisp
source code and an AST. LOOP is just a macro and isn't particularly
hard, but I was by no means a beginner when I met it, and I've never
watched a beginner programmer try to use it. It's so similar to LINQ
that I imagine the beginner experience to be similar, and from
watching the ##csharp IRC channel for a few months it seemed that
beginners didn't have great problems with LINQ.
My argument against Java is just as a first language. It's less
direct, more awkward and involves concepts before the novice is ready
to meet them.
Novices generally struggle with static, with having to switch syntax
entirely to go from arrays to Lists, with using 3rd party libraries,
with the difference between public X() and public void X(), with
checked exceptions, and probably a lot more if I rack my brains for
longer. What I dislike is that they generally have to meet these
before they're ready to unless they follow a very narrow path.
A language that doesn't force everything to go in classes is probably
easier to begin with, and Python doesn't even force everything into
procedures, nevermind classes. You can directly use everything in the
language without having to worry about those things until you need
them. It's much less likely than Java to force 'forward references',
i.e., learning about a concept you don't yet care about or aren't
ready for.
Does that help?
By the way, I didn't say I don't like Java. It's fine, it has some
features I miss elsewhere and lacks some features I'd like it to have.
It's a big improvement on the previous status quo, C/C++, especially
in terms of simplicity of compilation/linking.
--
You received this message because you are subscribed to the Google Groups "The Java Posse" group.
To post to this group, send email to java...@googlegroups.com.
To unsubscribe from this group, send email to javaposse+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
Come on people, why do we have to turn every single language thread into Java vs Scala????
My main worry in choosing JavaScript as a first language is that the
language is something of a mess, but it is a well understood and
widely used mess. (Were I the instructor, I'd lean heavily on "Java
Script: The Good Parts".)
A beginners language should make it easy to get immediate feedback for
incremental changes and not require too much scaffolding. I think
JavaScript could be presented this way. If a language provides a
REPL, it can also be leveraged for quick feedback. Even a more
traditional compiled language can be used in this way if the compiler
is fast and simple.
I started with Logo (though I was too young at the time to remember
any of it), BASIC, HyperTalk and Pascal. The first two were
interactive interpreters ("REPL"). Basic was unstructured, but didn't
do any permanent harm. HyperTalk gave quick feedback ("instant
gratification") despite not having a classical REPL. (It did have the
"message box", does that count?) Pascal worked fine too because the
compiler was very fast, which kept the edit-compile-run-debug cycle
short.
In the end, I'd have to conclude that more depends on the student and
the instructor than the choice of language. I see no reason why
JavaScript couldn't work well, given a good teacher.
// Ben
On Wed, Dec 21, 2011 at 20:45, Chris Koerner <ches...@gmail.com> wrote:
> John, y u no pick Java? ;)
>
> http://ejohn.org/blog/javascript-as-a-first-language/
>
> "At Khan Academy we've been investigating teaching Computer Science to
> students in some new and interesting ways. The most interesting aspect of
> which is that we're likely going to be teaching them JavaScript as their
> first language..."
>
> --
> You received this message because you are subscribed to the Google Groups
> "The Java Posse" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/javaposse/-/kynwmjakcrUJ.