We had the discussion a few times in the last years -- if Nim is really a good start for kids and other people with absolutely no knowledge about CS.
Nim is fine for bright kids, sure.
But I hesitated generally to really recommend Nim for beginners, knowing that starting with the popular languages may be easier.
On the other hand -- generally Nim would be a fine beginner languages, with fine teaching materials and always an experienced Nim dev sitting beside you.
And when languages like C or Python are taught at school it seems to occur that that is sometimes done in a really bad and stupid fashion, and both of that languages are not perfect for teaching beginners.
The Nim situation has indeed improved in the last years, Nim community has grown a bit, and the number of tutorials has grown a lot.
Well, now there is one more. At least the first draft. Basically the result of maybe 10 days of work only. All was streamed directly from my head to the keyboard, so there may be some errors, due to the fine weather I have not done proofreading yet. But generally I am really satisfied with that start. Have no idea if I will work on it over the summer -- at least it is a start.
This looks awesome.
I found a small issue while skiming the book: The example here don't need import streams, as readLine for File is in io and that one is imported by default.
That's a very nice draft!
It starts basic and soft but then it jumps to high-level notions. I don't know if average children will understand. For instance, in the What is a Programming Language section, you could explain what a compiler is compared with other way to run code, and what is the compilation process. Or before starting with syntax in Part II: The basics, perhaps introduce what is the general structure of a Nim program, single or multiple sources. Last example, is explaining pointers in References and Pointers a notion that must be introduced to child-programmers? I would wait until Part V: Advanced topics section to write about pointers...
A way to reach for children and beginners is to become quickly practical with examples or projects that they can try and extend on their computers. An example from Canada: https://kidscodejeunesse.org/resources-for-educators. There must be other resources in other countries.
Is there a way to report more precise critics directly in the text and help you?
What is your definition of a "kid"? I don't think 99.9% of kids will want to read it. Back in the 80s I tried to learn BASIC using the TRS-80 Color Computer manuals, which were considered very high quality at the time. I didn't succeed, in part because I couldn't be bothered to read the text. There was too much of it. This text has even more.
Last summer I had my older daughter (13) learn some Ada using a free online text I'd found. It was based on introducing ideas via a sequence of games. She did pretty well at it, but again, she didn't want to read it very much. She'd done some programming already with CSFirst, I think it's called, and that's a visual-oriented programming where you connect blocks. It did what she wanted: let her make animation with songs. Ada demanded too much of her just to get a simple text-based game.
On the other hand, there seems to be disagreement between title and text. In your text you seem to walk back the title, and suggest that this is only an introduction to programming using Nim, a book for beginners. That's another matter, I guess, but the headline is a bit misleading then.
juancarlospaco
PDF Download would be cool.
Why. I generated a PDF of my PhD thesis long time ago, it was written in LaTeX. But that times are over, we do not want to print documents these days, we do not want to kill trees. And PDF with its fixed format is bad for screens with different sizes. Note that the HTML is self -contained, at least the CSS is included, so that I would strongly assume you can download the HTML on your local computer to read it. I am not absolutely sure for the fonts, have to check that. Do not know really much about Asciidoctor yet. I may consider making an EPub when the book is complete -- well maybe a PDF too.
leorize
Thanks for that hint.
spip
know if average children will understand
That is always the PROBLEM! I have recently heard about kids that had to do low level bit operations in C, without having a minimal understanding. As the kids could not understand, they had to ask in forum for solutions, copied that, of course without a basic understanding, teacher seems to be happy. And other kids learn how to play videos from inside python: Teacher: I have taught the kids video processing, I must be a great teacher, and my kids must be very intelligent, they manage Python so good that they can play even videos.
what a compiler is Oh yes, i missed that, but would have found out myself for first proof reading I guess.
References and Pointers a notion that must be introduced to child-programmers?
Maybe that is the reason why I started the book. Kids starting with Pascal had to learn, Kids using Nim have to learn it. Its hard to teach. I started gently, and explain it really well.
and help you?
Yes, when the book is ready I would of course be grateful for smart proofreaders, with good Nim and english language skills. But it may take long to finish the book, indeed I have the impression that the two firsts parts was what really was missing, the other topics are more or less available. With the exception of the advanced stuff part, macros, async, threading, parallel processing. But that is more for Araq and mratsim to write.
cantanima
headline is a bit misleading
I think the subtitle is fine: A gentle introduction. And the introduction of the book is fine also: "people who missed basic CS in school for some reason". "And in a way that even children should be able..."
Of course it is hard for children when there is no support by friends, parents, teacher. And one more problem with children is: When they do not start with 12 being interested in CS, they generally never will.
a book for beginners.
We have discussed that term really long enough. Is your beginner someone with absolutely no CS skills or someone having programmed in C++ and Haskell for 15 years and is now comming to Nim?
I would like to see a chinese version of the book, but please do no start translation before at least Part I and Part II are completed. I will tell you when.
But is translation not more work then writing from scratch? For me translating something from German to English takes generally very long, so I now write most text only in English, with the small set of word I have available in my head :-) But maybe translation engines can help you to get a first chinese draft.
Funny to hear that from someone who wrote a Nim book. Wisdom of the ages or more a result of dissapointment by tiny selling rates :-) ?
This isn't about my experience with writing the book, it's about my experience as a kid learning how to program. For what it's worth, I consider Nim in Action to have sold very well, but I myself don't know what success here looks like (no idea how many books other programming language books sell) :)
The way you wrote it makes it relatively easy to understand, but I wouldn't necessarily call it child-friendly. Long texts tends to bore children in no time, so some pictures and humor here and there wouldn't hurt. But perhaps that wasn't your goal.
Either way - it's a very welcome contribution.
Books are good. Videos are bood. Twitter one-liner Nim wisdom is good.
Anything is better than no info about Nim. But I must say the new programmer generation likes videos -- me to even if I'm ancient.
I don't like videos, but I agree with @Omnomnim. It just takes to long for something to happen. If I think back to when I started learning programming when I was about 12 years old what kept me going was seeing how the computer did what I programmed it to do (and it still amazes me sometimes today).
I learned most of the basics from taken apart and putting together snippets of code. You develope an "intuition" for code from the start and you're much more motivated to understand the concepts behind that all, because you already harnessed them somewhat which made you curious.
Though of course other people might prefer other kinds of learning. It's also hard to make a book out of this. I hopped through dozens of resources and programming languages, trying things here and there switching every time I lost interest because my english wasn't good enough to understand something or some math I didn't understand was a prequisite.
Yes, we intend indeed a Chinese translation.
The problem with translations is always, that after the initial translation it is difficult to update or extend a book. So general I recommend today writing and reading all in English only. But for such a book for beginners a translation may make sense , as young Chinese people may not know English that well already. Theoretically I could do a German version myself of course, but for 2 or 3 Germans that would not really make sense :-)
This thread shows the large gap that exists between Youtube Certified Engineers and Old School Engineers... ;-)
@Stefan_Salewski, perhaps is it interesting in your book to present not only Nim syntax and philosophy, but also elements of algorithms and data structures. The foundational bricks of computer science. For instance basis of O(n) notation to select algorithms. Or explain why Nim has 3 distinct string types (string, cstring and ropes). What's behind the table[] data structure? What optimize mean... etc.
I do both video and written books in other contexts (in fact I own a small book publishing company called Purple Squirrel Productions.)
I would simply say that different people learn things differently.
But I agree that YouTube videos can be boring for me. That is especially true of "do this exactly" instruction videos. I'd rather a online doc that I can cut&paste from. For that reason, I try to infuse my videos with the philosophy of why things are the way they are. I want to give things a sense of context or history that helps explain things.
I remember in one of my Python db driver videos going on a small rant about the horrible and misleading the naming of sequences in JS and JSON and how that propagated into BSON and MongoDb. Oddly, people seemed to appreciate that rant.