CodingTrain / Suggestion-Box

A repo to track ideas for topics
571 stars 86 forks source link

Prototype video series: Polymorphism #566

Open kfrajer opened 7 years ago

kfrajer commented 7 years ago

This is related to this video: 9.16: Prototypes in Javascript - p5.js Tutorial

I am very interested to keep learning about Prototype functions. One of the biggest challenges I have is that I am coming from a Java and C++ programming mindset. Your videos do a great job in explaining the concepts. It would be a super awesome idea to have a video where you recommend how much of the java/other languages we need to forget/undo in our minds when submerging into JS. I think this boils down to striking the differences between OOP and Higher Order functions (Functional programming).

In the same way as you have a processing to p5.js programming transition, it will be great to have a Java to JS transition although I am not sure if it can be explained clearly (specially for beginners) under 20 min.

Thank you for all your work!

kfrajer

RedHenDev commented 7 years ago

Fantastic topic/issue.

These programming paradigms are interesting (and beautiful) in and of themselves! (E.g. check out this video from about 10mins in: Coding Paradigms)

I would love to see a tutorial in which Dan coded a simple game/animation using OOP, and then in the same short video doing exactly the same thing but through Functional programming. Perhaps, then, it might also work for doing something in Java, for instance, and then javaScript. The choice of game/animation to code would be really important; it would have to be something simple enough to get done quickly, but also something that had enough features to elicit a significant change in design/approach due to the difference in language/paradigm.

This immediate comparison would be really illuminating in terms of how/why you might design a project in terms of one paradigm as opposed to another, as well as doing the same key procedures (e.g. iterating over arrays and organising objects) in each language's/paradigm's terms.

In fact, your suggestion here is particularly apt: I believe Dan is thinking about conforming his JS style to ES6 this summer, which would bring ideas like asynchronous code, inheritance, and polymorphism to the fore.

jonbarrow commented 7 years ago

I see one major flaw in this suggestion: your comparison of a "processing to p5" transition to that of a "java/C(++) to JavaScript" transition. The reason the "processing to p5" transition makes so much sense as a video concept on the channel is because p5 and processing directly relate to each other (p5 being based on processing). JavaScript is not based on Java or C++ or vise-versa, so a video(series) about a transition like that wouldn't make much sense, when you compare it to the "processing to p5" transition video as you did.

This is not to say that your suggestion is bad (because I would very much like to see a series like this as well!), but formatted and worded a bit incorrect. I think a better suggestion, which builds off yours, would be a series that aims to introduce developers of all or many lower level programming languages to scripting languages like JavaScript (not just specifically Java -> JavaScript or C++ -> JavaScript).