--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
seasoned programmers have hard time actually explaining how it
comes they possess the skills they have, and this makes their world
view biased
My personal experience is as somebody comming from almost 3 decades of oop with c++ and java, while there are a lot of tutorials etc for folks starting out with go as a first or second language. I find there is a lack of support for people moving from other languages and other methodologies.
I learn things bottom up, I need to understand "why" before I can start using the "how". Lots of people don't learn that way and there is nothing wrong with that.There are languages that are more suited to writing basic games and GUI for newbies (Flash was actually great at that). I actually don't think Go is the perfect fit for all new programmers. I do think however that if you want to learn the basics and you're willing to pay a certain price upfront, that's the right approach.
I would agree that a end to end tutorial on how to build a complete project, say something simple like a blog site, using sqlite, would be great, i could even be shipped with the distribution as a starter app. Also the complexities of workspace layout, projecs standalone libraries, embedded libraries and using 3rd party libraries. However the tutorial would need to evolve as the laguage and environment did.
Having something that is a living and evolving example of best practices will creat a Resource that would get folks like myself with extensive development experience, just little go experience with a great starting point, and would also make a good boilerplate starter project.
I taught C to second year undergraduates back in the 1990s. By this time, they had done some COBOL (those were the days), Pascal and assembler. Two things they had great difficulty with were pointers and multithreading. Multithreading is not such an issue because you can avoid it while they are learning the basics, but you couldn't avoid pointers for long. Go is, if anything, even worse, because pretty much as soon as you introduce functions you have to get involved in pointers, because without pointers you can't write a function that sets data. Other languages such as Java manage to hide pointers sufficiently well that you don't have to get to grips with them until you have the rest of the language under your belt. Actually, I'm guessing that there are lots of successful Java programmers out there who have never really understood those things that Java calls references.
To be honest, I'm not entirely sure why pointers are such a big issue for students who had done a bit of assembler, but trust me, for some they are. I think one reason may be that they are one of a set of related concepts, and you have to understand them all before any one of them makes sense.
Multithreading is a different matter. I just found that many people have great difficulty visualising several threads working at the same time.
My favorite introductory C/C++/Basic/Pascal books are those by Donald Alcock—a master of progressive revelation and visual facilitation. If you don’t know these books, you might follow the link and have a preview.
The other key thing for new students —beyond creating a visual model of concepts—is mutable examples. The Go Playground makes this very easy. It allows the “false” introduction of simple statements that work generally, then later, example input that causes problems, and then based on that motivation, code refinement to solve those problems (list size = 0, negative surd in a cubic equation, whatever…). If you know TeX and Donald Knuth’s TeX Book, then this is like the “Dangerous Bend” signs that he uses. Very valuable didactic approach.
--
I'm brand new to go (started on Saturday, haven't made my mind up yet) and have come over from python. I also teach kids to code (python) so thought I'd give my two cents.
Firstly, compared to languages like C, go is easy to learn, compared to languages like JavaScript and python, it isn't.
In my opinion a person's first language should be an easy one. As Egon said, the early struggles are almost entirely based on problem solving and bug fixing. If you can't focus on these because the languages complexities gets in the way, the learner gets put off.
In my experience kids can learn control flow in about 30 minutes. They can learn some paradigms like OO and why it's useful on maybe an hour. But they take much much longer to be able to come up with a solution to a problem by themselves. The easier it is to put the solution down in code the better.
So while I think go is a relatively easy language to learn and has some place in teaching, I'm not convinced it's the best starter language - which should be as easy as possible. There are a few added complexities and a bit more inertia which more seasoned programmers won't think about (setting up specific folder structures and compilation as an example).
That said I think it's a perfect second language. Personally I learn things at a high level first, and then as I dig in I find things which interest me and start slowly going more low level. Go isn't my first foray into the lower level. But I wish it was. It's easier to write and read then most. But it still teaches basic concepts like pointers, compilation and whatever else you can think of which are abstracted away in higher level languages.
In short, teach something higher level first to understand basic coding concepts and to start designing solutions. Teach go next to learn more about how languages work and get closer to the hardware.
As an aside: for those discussing the ability to teach a topic using your students level of understanding instead of your own more specialised perspective. The term for this is decentering.
- Nick.
If go run is the primary starting point you wouldn't need the GOPATH configured.What I think would be interesting is the ability that most scripting languages provide which is to just start coding. No functions requiring definition and perhaps an auto-import of fmt, strings, io, etc. So you could write something like this:
''' hello.gos
fmt.Println("hello world")
'''
And then type 'go runscript hello.gos'. I know this is horrible for all sorts of reasons but I'm reminded of what a friend said about writing: "get it writ, then right"
For some one completely new to programming there's a reduced burden of the concepts to understand in the above. Thoughts?
- from my thumbs to yours