www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - D course material

reply Dmitry Olshansky <dmitry.olsh gmail.com> writes:
Hi, folks!

I’m testing waters for a D course at one University for first 
time it’ll be an optional thing. It’s still discussed but may 
very well become a reality.

Before you ask - no, I’m not lecturing and in fact, I didn’t 
suggest D in the first place! Academics are finally seeing light 
in the gloom of 1 year OOP in C++ course having underwhelming 
results.

Now to the point, I remeber Chuck Allison (pardon if I 
misspelled) doing D lectures at Utah Valley University, here:
https://dconf.org/2014/talks/allison.html

There is also Ali’s book. But anything else easily adoptable as 
course material?

—
Dmitry Olshansky
Mar 13 2018
next sibling parent psychoticRabbit <meagain meagain.com> writes:
On Tuesday, 13 March 2018 at 12:39:24 UTC, Dmitry Olshansky wrote:
 Hi, folks!

 I’m testing waters for a D course at one University for first 
 time it’ll be an optional thing. It’s still discussed but may 
 very well become a reality.

 Before you ask - no, I’m not lecturing and in fact, I didn’t 
 suggest D in the first place! Academics are finally seeing 
 light in the gloom of 1 year OOP in C++ course having 
 underwhelming results.

 Now to the point, I remeber Chuck Allison (pardon if I 
 misspelled) doing D lectures at Utah Valley University, here:
 https://dconf.org/2014/talks/allison.html

 There is also Ali’s book. But anything else easily adoptable as 
 course material?

 —
 Dmitry Olshansky
Just make sure it involves problem solving because that is why we have brains. We don't have brains so we can sit through long boring presentations and seminars. Students who program, want to solve problems. Not boring silly problems, and not overly complex problems that will take up too much of their time - one of the biggest concerns expressed by students at my uni, is workload - which never seems to stop increasing. And students are really distracted these days too, so the problem is compounded. Our new is concerned about the increasing rop out rate too, which I suspect is related. And don't make them all solve the same problem. Give a range of problems so they can select something that might interest them. There's plenty of material out there, that deals with motivating students to learn.
Mar 13 2018
prev sibling next sibling parent bachmeier <no spam.net> writes:
On Tuesday, 13 March 2018 at 12:39:24 UTC, Dmitry Olshansky wrote:
 Hi, folks!

 I’m testing waters for a D course at one University for first 
 time it’ll be an optional thing. It’s still discussed but may 
 very well become a reality.

 Before you ask - no, I’m not lecturing and in fact, I didn’t 
 suggest D in the first place! Academics are finally seeing 
 light in the gloom of 1 year OOP in C++ course having 
 underwhelming results.

 Now to the point, I remeber Chuck Allison (pardon if I 
 misspelled) doing D lectures at Utah Valley University, here:
 https://dconf.org/2014/talks/allison.html

 There is also Ali’s book. But anything else easily adoptable as 
 course material?

 —
 Dmitry Olshansky
Carl Sturtivant taught a course using D at the U of Minnesota: https://forum.dlang.org/thread/km96ho$2grm$1 digitalmars.com Maybe he can give you some information. Adam's book would work well for teaching, because the examples are short yet practical, and the only overhead is putting a file or two inside the directory and compiling. If you want to teach about templates, this is an excellent resource: https://github.com/PhilippeSigaud/D-templates-tutorial
Mar 13 2018
prev sibling next sibling parent Seb <seb wilzba.ch> writes:
On Tuesday, 13 March 2018 at 12:39:24 UTC, Dmitry Olshansky wrote:
 Hi, folks!

 I’m testing waters for a D course at one University for first 
 time it’ll be an optional thing. It’s still discussed but may 
 very well become a reality.

 Before you ask - no, I’m not lecturing and in fact, I didn’t 
 suggest D in the first place! Academics are finally seeing 
 light in the gloom of 1 year OOP in C++ course having 
 underwhelming results.

 Now to the point, I remeber Chuck Allison (pardon if I 
 misspelled) doing D lectures at Utah Valley University, here:
 https://dconf.org/2014/talks/allison.html

 There is also Ali’s book. But anything else easily adoptable as 
 course material?

 —
 Dmitry Olshansky
While it's probably not too helpful for actual teaching, https://tour.dlang.org is getting better almost every day. For example, since a few weeks there's a small special mir Tour (the tour allows to inject arbitrary markdown for such sub tours). https://tour.dlang.org/tour/mir https://github.com/dlang-tour/mir
Mar 13 2018
prev sibling next sibling parent reply Meta <jared771 gmail.com> writes:
On Tuesday, 13 March 2018 at 12:39:24 UTC, Dmitry Olshansky wrote:
 Hi, folks!

 I’m testing waters for a D course at one University for first 
 time it’ll be an optional thing. It’s still discussed but may 
 very well become a reality.

 Before you ask - no, I’m not lecturing and in fact, I didn’t 
 suggest D in the first place! Academics are finally seeing 
 light in the gloom of 1 year OOP in C++ course having 
 underwhelming results.

 Now to the point, I remeber Chuck Allison (pardon if I 
 misspelled) doing D lectures at Utah Valley University, here:
 https://dconf.org/2014/talks/allison.html

 There is also Ali’s book. But anything else easily adoptable as 
 course material?

 —
 Dmitry Olshansky
Honestly I'd recommend TDPL. It's got a lot of good real-world examples, including some OOP ones, but more importantly examples that demonstrate concurrent programming, generic programming, procedural, and I think a few functional examples as well. Basically, it covers a very broad area in one book while also teaching you D.
Mar 13 2018
parent reply aberba <karabutaworld gmail.com> writes:
On Tuesday, 13 March 2018 at 17:20:57 UTC, Meta wrote:
 On Tuesday, 13 March 2018 at 12:39:24 UTC, Dmitry Olshansky 
 wrote:
 [...]
Honestly I'd recommend TDPL. It's got a lot of good real-world examples, including some OOP ones, but more importantly examples that demonstrate concurrent programming, generic programming, procedural, and I think a few functional examples as well. Basically, it covers a very broad area in one book while also teaching you D.
Boring stuff IMO.
Mar 13 2018
parent reply David Gileadi <gileadisNOSPM gmail.com> writes:
On 3/13/18 2:08 PM, aberba wrote:
 On Tuesday, 13 March 2018 at 17:20:57 UTC, Meta wrote:
 On Tuesday, 13 March 2018 at 12:39:24 UTC, Dmitry Olshansky wrote:
 [...]
Honestly I'd recommend TDPL. It's got a lot of good real-world examples, including some OOP ones, but more importantly examples that demonstrate concurrent programming, generic programming, procedural, and I think a few functional examples as well. Basically, it covers a very broad area in one book while also teaching you D.
Boring stuff IMO.
Interesting that you found it boring--I found it to be the opposite. It is one of the few programming books that I can read for enjoyment.
Mar 13 2018
next sibling parent reply aberba <karabutaworld gmail.com> writes:
On Tuesday, 13 March 2018 at 21:12:16 UTC, David Gileadi wrote:
 On 3/13/18 2:08 PM, aberba wrote:
 On Tuesday, 13 March 2018 at 17:20:57 UTC, Meta wrote:
 On Tuesday, 13 March 2018 at 12:39:24 UTC, Dmitry Olshansky 
 wrote:
 [...]
Honestly I'd recommend TDPL. It's got a lot of good real-world examples, including some OOP ones, but more importantly examples that demonstrate concurrent programming, generic programming, procedural, and I think a few functional examples as well. Basically, it covers a very broad area in one book while also teaching you D.
Boring stuff IMO.
Interesting that you found it boring--I found it to be the opposite. It is one of the few programming books that I can read for enjoyment.
The D Programming Language (TDPL) is a big book so it will be boring. I used it whilst learning about the complete features of D (mostly just reading like story book though). So we all read just like you said:
 It is one of the few programming books that I can read for 
 enjoyment.
But its not one you would want to use for courses (short time). Its different however, when you're using them to solve real-world problems that are actually real-world i.e. you justify why such feature needs to be used. Then its not boring. Quite often than not, such courses mostly bombard you with the theories.
Mar 13 2018
parent reply Jonathan M Davis <newsgroup.d jmdavisprog.com> writes:
On Tuesday, March 13, 2018 21:30:13 aberba via Digitalmars-d wrote:
 The D Programming Language (TDPL) is a big book so it will be
 boring. I used it whilst learning about the complete features of
 D (mostly just reading like story book though).
LOL. TDPL big? It's only 463 pages including the index. I have plenty of books that are double that size, if not larger. Regardless, TDPL is an excellent introduction to D. Personally, what I liked most about it was the fact that it actually assumes that you know what stuff like variables and for loops are. It doesn't try to teach you how to program. It just tries to teach you how to program in D. As such, it's probably terrible for an introductory programming course, but for anyone who knows how to program but is looking to learn D, it's a great book. - Jonathan M Davis
Mar 13 2018
parent reply M.M. <matus email.cz> writes:
On Tuesday, 13 March 2018 at 23:05:24 UTC, Jonathan M Davis wrote:
 On Tuesday, March 13, 2018 21:30:13 aberba via Digitalmars-d 
 wrote:
 [...]
LOL. TDPL big? It's only 463 pages including the index. I have plenty of books that are double that size, if not larger. Regardless, TDPL is an excellent introduction to D. Personally, what I liked most about it was the fact that it actually assumes that you know what stuff like variables and for loops are. It doesn't try to teach you how to program. It just tries to teach you how to program in D. As such, it's probably terrible for an introductory programming course, but for anyone who knows how to program but is looking to learn D, it's a great book. - Jonathan M Davis
Does anyone knows, whether a new edition of the book is planned?
Mar 14 2018
parent Jonathan M Davis <newsgroup.d jmdavisprog.com> writes:
On Wednesday, March 14, 2018 08:31:17 M.M. via Digitalmars-d wrote:
 On Tuesday, 13 March 2018 at 23:05:24 UTC, Jonathan M Davis wrote:
 On Tuesday, March 13, 2018 21:30:13 aberba via Digitalmars-d

 wrote:
 [...]
LOL. TDPL big? It's only 463 pages including the index. I have plenty of books that are double that size, if not larger. Regardless, TDPL is an excellent introduction to D. Personally, what I liked most about it was the fact that it actually assumes that you know what stuff like variables and for loops are. It doesn't try to teach you how to program. It just tries to teach you how to program in D. As such, it's probably terrible for an introductory programming course, but for anyone who knows how to program but is looking to learn D, it's a great book.
Does anyone knows, whether a new edition of the book is planned?
AFAIK, Andrei has never said that he's planning to do a new edition, but while there are a few things in the book which are dated (e.g. it talks about pure the way it was before "weak" purity was introduced), and a few things have never been implemented the way they're described in the book (in particular, it talks about barriers with shared, multiple alias this-es, and synchronized classes), most of the material in the book is still solid. Some folks do periodically bring up a new edition like it's obvious that it's necessary, but AFAIK, Andrei has never agreed with that assessment. Regardless, I expect that even going back through the book to make sure that stuff didn't need to be tweaked would be a fair bit of work, and he's a busy guy. So, even if he agreed that a new edition was due, I don't know how high it would be on his priority list. So, we may get a new version at some point, or we may not. - Jonathan M Davis
Mar 14 2018
prev sibling parent Abdulhaq <alynch4047 gmail.com> writes:
On Tuesday, 13 March 2018 at 21:12:16 UTC, David Gileadi wrote:
 On 3/13/18 2:08 PM, aberba wrote:
 On Tuesday, 13 March 2018 at 17:20:57 UTC, Meta wrote:
 On Tuesday, 13 March 2018 at 12:39:24 UTC, Dmitry Olshansky 
 wrote:
 [...]
Honestly I'd recommend TDPL. It's got a lot of good real-world examples, including some OOP ones, but more importantly examples that demonstrate concurrent programming, generic programming, procedural, and I think a few functional examples as well. Basically, it covers a very broad area in one book while also teaching you D.
Boring stuff IMO.
Interesting that you found it boring--I found it to be the opposite. It is one of the few programming books that I can read for enjoyment.
The book is excellent but I did find the examples boring.
Mar 13 2018
prev sibling next sibling parent aberba <karabutaworld gmail.com> writes:
On Tuesday, 13 March 2018 at 12:39:24 UTC, Dmitry Olshansky wrote:
 Hi, folks!

 I’m testing waters for a D course at one University for first 
 time it’ll be an optional thing. It’s still discussed but may 
 very well become a reality.

 Before you ask - no, I’m not lecturing and in fact, I didn’t 
 suggest D in the first place! Academics are finally seeing 
 light in the gloom of 1 year OOP in C++ course having 
 underwhelming results.

 Now to the point, I remeber Chuck Allison (pardon if I 
 misspelled) doing D lectures at Utah Valley University, here:
 https://dconf.org/2014/talks/allison.html

 There is also Ali’s book. But anything else easily adoptable as 
 course material?

 —
 Dmitry Olshansky
For complete newbies.... I have a mini book for learning computer prgramming in D (complete newbies)...still in writing. I recommend the style of explaining and revealing new concepts step by step. https://github.com/aberba/learn-coding
Mar 13 2018
prev sibling next sibling parent reply Andre Pany <andre s-e-a-p.de> writes:
On Tuesday, 13 March 2018 at 12:39:24 UTC, Dmitry Olshansky wrote:
 Hi, folks!

 I’m testing waters for a D course at one University for first 
 time it’ll be an optional thing. It’s still discussed but may 
 very well become a reality.

 Before you ask - no, I’m not lecturing and in fact, I didn’t 
 suggest D in the first place! Academics are finally seeing 
 light in the gloom of 1 year OOP in C++ course having 
 underwhelming results.

 Now to the point, I remeber Chuck Allison (pardon if I 
 misspelled) doing D lectures at Utah Valley University, here:
 https://dconf.org/2014/talks/allison.html

 There is also Ali’s book. But anything else easily adoptable as 
 course material?

 —
 Dmitry Olshansky
Hi Dmitry, for presenting D to my team I used following example. It highlights some features of D: Meta programming, templates, CTFE, UFCS, OOP in D, Functional programming in D and ... It is a compile time i18n library in ~50 lines. import std.experimental.scripting; const devBundle = import("messagebundle.properties"); const identifiers = getIdentifiers(devBundle); const languages = ["en", "de"]; void main() { auto t = new TextBundle("en"); writeln( t.text!"task.isNotARegisteredCommand"("lala")); } string[] getIdentifiers(string s) { return s.split("\n").filter!(l => l.canFind(" = ")).map!(l => l.split(" = ")[0]).array; } class TextBundle { private string _language; alias TextKeyValue = string[string]; private static const TextKeyValue[string] _languageTextKeyValue; this(string language) { assert(language in _languageTextKeyValue); _language = language; } string text(string s)(string[] params...) { static assert(identifiers.canFind(s)); string content = _languageTextKeyValue[_language][s]; foreach(i, param; params) content = content.replace("{"~i.to!string~"}", param); return content; } static this() { static foreach(language; languages) { static if( __traits(compiles, import("messagebundle_"~language~".properties"))) { string s = import("messagebundle_"~language~".properties"); foreach(a; s.split("\n").filter!(l => l.canFind(" = ")).map!(l => l.split(" = "))) { _languageTextKeyValue[language][a[0]] = a[1]; } } } } } The property files: -messagebundle.properties- task.isNotARegisteredCommand = `{0}` is not a registered command. -messagebundle_en.properties- task.isNotARegisteredCommand = `{0}` is not a registered command. The property file for DE does not exist for showing __traits(compiles,...) functionality. I does fit in a 60 minute lecture. Kind regards André
Mar 14 2018
parent Martin Tschierschke <mt smartdolphin.de> writes:
On Wednesday, 14 March 2018 at 08:53:17 UTC, Andre Pany wrote:
 On Tuesday, 13 March 2018 at 12:39:24 UTC, Dmitry Olshansky 
 wrote:
 [...]
Hi Dmitry, for presenting D to my team I used following example. It highlights some features of D: Meta programming, templates, CTFE, UFCS, OOP in D, Functional programming in D and ... It is a compile time i18n library in ~50 lines. import std.experimental.scripting;
[...] Just came across this: It has been changed to: std.experimental.all https://dlang.org/changelog/2.079.0.html#std-experimental-all Regards mt.
Mar 14 2018
prev sibling parent reply Dmitry Olshansky <dmitry.olsh gmail.com> writes:
On Tuesday, 13 March 2018 at 12:39:24 UTC, Dmitry Olshansky wrote:
 Hi, folks!

 I’m testing waters for a D course at one University for first 
 time it’ll be an optional thing. It’s still discussed but may 
 very well become a reality.
Thanks for the answers! Answering some ideas: - yes, TDPL might go as recommended reading but is a bit dated now + not free - tour.dlang.org is actually great idea, will see how it fits the course - learning by doing projects turned out to be mostly failure, as very few concepts get used per single practical system + a lot of pointless leg work. Usually there is one big project selected by student in the course anyway. Lastly I’m still looking for expertise in teaching D. Will likely contact Chuck and Stewart directly.
 —
 Dmitry Olshansky
Mar 14 2018
parent reply =?UTF-8?Q?Ali_=c3=87ehreli?= <acehreli yahoo.com> writes:
On 03/14/2018 03:51 AM, Dmitry Olshansky wrote:

 contact [...] Stewart directly.
I think you mean Carl Sturtivant. Ali
Mar 14 2018
parent Dmitry Olshansky <dmitry.olsh gmail.com> writes:
On Wednesday, 14 March 2018 at 20:27:26 UTC, Ali Çehreli wrote:
 On 03/14/2018 03:51 AM, Dmitry Olshansky wrote:

 contact [...] Stewart directly.
I think you mean Carl Sturtivant.
Oh.. yes, I’m sorry for such a gross misspelling.
 Ali
Mar 14 2018