Thanks! A great write-up. On Friday, 27 March 2020 16:32:51 UTC, Owen Waller wrote: > > Hi Dave, > > As the original author of the post that Dan has referenced, I can say that > Go does indeed make IMHO a good first programming language. It all comes > down to how you explain things. Thanks Dan for the reference :) > > I'm not going to repeat what the original discussion said, but let me try > to pick out a few things. > > I was teaching the very young - 10 & 11 year olds. So I had to simplify > things down quite a bit. So I didn't cover things like: > > * functions - arguments vs parameters I thought this was just too to big a > step. Yes they used functions, but they didn't write them, including > functions with no parameters and no return values. > > * structs - again its just to big a jump. You can do a lot with just > numbers and strings > > * Local vs global variables - again too big a jump and doesn't make sense > without functions. > > * Anything you might think of as advanced - so concurrency, testing, > packages and modules, file and network IO, even errors etc I left out. > > With an older group I'd put all of those back in except concurrency, > starting with functions, then packages, then IO. > > But that still leaves the key things that all programming languages have > in common namely variables, instruction sequencing, selection and > repetition. In the UK this is what they have to cover at this age group. > This is also the order I introduce these in, and over about 15 hours. So I > let them work slowly. At least at this age group typing is still an issue, > so they need time just for that. > > Static typing I did not find to be a problem at all. The way I approached > it was simple. Kids already have a good grasp of numbers (whole and > fractions and decimals fractions) and words at this age. So they know that > writing "hello+world" in English makes no sense. The "+" symbol is only > used with numbers. So "1+1" does make sense in a different context. > > All I had to do was ask the kids did they think they needed a number or a > word for a variable type? If they where reading a variable from the > keyboard that they had to use in a sum, they can work out they need a > number not a word. If all they wanted to do was echo the variable back - > say their name - then they work out it's a word. It takes a few hours, but > within 3-4 hours most of the kids have worked it out. After that its just a > syntax and typing problem. > > You'll find that having the types helps the kids reason about the > programs. This is something I personally find very difficult with python > and other typeless languages. It's very hard to reason about an old bit of > code because you don't know what the valid operations or data range is of a > type, which especially if it a named well helps you reason about the logic. > So with kids I would say you want to be as explicit as possible. Static > typing helps with this. > > The way I introduced numbers was subtle, but matches what they typically > see in maths at that age. So a number is an int type initially. Only when > we need fractions did I introduce float64, and I only talked about those > two numeric types (so no int8 or float32). And I talk about numbers not int > or float64, unless I have to be specific. > > Words are simply strings, that's just a new name they have to learn and > associate with a sequence of characters/letters. They get this really > quickly. > > The other approach I took was that I gave them partially completed Go > programs, where the level of completion tails off each session. So I did > this for two reasons. Firstly to cover a bit of boiler plate, things like > the import statements and the main() function header. I do talk about these > and the partial programs also explain these in the comments but I don't > expect the kids to type these lines. Secondly I want them to focus on > whatever was key to that session. > > The programs are heavily commented to both explain what is there already > and what and where I want them to fill in the blanks. > > And since the programs are incomplete they won't compile and run to begin > with. So they kids have to get he correct syntax from the get go. That's > just the same as in English, you have to have the correct spelling and > grammar, so the kids have a similar concept at that age. > > If you do this they'll absorb things like main() and import just because > they will be familiar. So they'll spot it if you leave it out after a few > weeks. Or be able to complete an import statement (if you tell them the > package name) just by coping a previous example. > > My last trick was as I kept things to keyboard IO, I had a little wrapper > package that hid the complexity of the text scanner class and converting > form strings to ints etc that the programs used. > > So to give you an idea of what I had them doing, they where printing > "Hello <you name>" after inputting their name, working out how fast the ISS > goes in orbit and the orbital period and comparing that to geostationary > satellites, doing ROT13 encryption (so A becomes N) (in the UK they have to > learn about Caesar ciphers at this age), getting them to print hello world > in non-Latin languages (again works well with a divers group) and shows how > you can count characters in a string. > > Hopefully that helps. I've a pile of material, slightly out of date over > the past 18 months as I have been busy on other projects. I'm happy to > share that more widely and bring it up to date if that's any help to you or > anyone else. > > Good luck > > Owen > > > On Wed, 2020-03-25 at 21:08 +0000, Dan Kortschak wrote: > > I don't agree that Go is intrinsically harder than python as a beginner > programming language. There are things that are subtle, but these can > largely be avoided in the beginner setting. > > Note that there have been discussions here about using Go as a language > for teaching beginners, notably this one > https://groups.google.com/d/topic/golang-nuts/FIRSDBehb3g/discussion > > Dan > > On Wed, 2020-03-25 at 13:34 -0400, David Riley wrote: > > > If you are already a programmer in another language, the Tour of Go > (tour.golang.org) is absolutely the best. > > If you are not already a programmer in another language, I personally > don't recommend Go as a first language; it's an excellent language, > but I feel that people will do better with it once they already grasp > the fundamentals of programming and are ready for something with > slightly more arcana. Python makes a pretty good first language. > > > - Dave > > > > > On Mar 25, 2020, at 6:07 AM, Renato Marcandier <renato.m...@gmail.com > <javascript:>> wrote: > > Hello guys, > > What's the best course to start with Go? > > > > Regards > RG > > -- > 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 golan...@googlegroups.com <javascript:>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/b2aa0e9a-921f-49de-a0be-729a6ca35f5f%40googlegroups.com > . > > > > -- > 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 golan...@googlegroups.com <javascript:>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/18B2AF64-4888-4730-B282-FCB4C00AB697%40gmail.com > . > > > >
-- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/cbe2ba97-cd52-44f9-86cd-677a1fe2643e%40googlegroups.com.