7 ms·
Actually, the class you linked was an experimental class, and we ended up going with Python instead. (source: I was the head TA for that class)
by ksml 5y ago
Actually, the class you linked was an experimental class, and we ended up going with Python instead. (source: I was the head TA for that class)
- galangalalgol 5y agoWhy a dynamically typed language to learn with?
- ksml 5y agoI think there were two main reasons: choosing a popular language (JS and python happen to be among the most popular, accessible languages) and pedagogical simplicity (it's nice to avoid burdening beginners with extra syntax when they're already struggling to learn other things). Some unscientific evaluation showed that students picked up static types just fine in our second programming class (which is in C++) Personally, I think we should be teaching static types and I pushed for Typescript, but it didn't happen.
- bachmeier 5y ago> it's nice to avoid burdening beginners with extra syntax when they're already struggling to learn other things As someone that teaches college students to program (not in a CS department) that statement is correct but doesn't provide the full picture. It's good to get rid of the extra syntax if and only if you don't need it - and that means you're intentionally limiting what you're teaching them.
- extra88 5y ago> you're intentionally limiting what you're teaching them Yes, that’s the point. It’s an introductory class, choices have to be made about what to teach when.
- bachmeier 5y agoWell, of course, but the point is that avoiding syntax is not a great criterion for defining the fundamentals of programming. A couple orders of magnitude more important is to decide what concepts are useful for beginning programmers to know.
- afiori 5y agoI took it as "removing syntax left more space for other stuff"
- cogman10 5y agoAlways an option to push for something like mypy. That'd at least give students exposure to types (even if they don't have to write them)
- jefftk 5y ago> I think we should be teaching static types and I pushed for Typescript Another option would be to introduce Python types: def square(x: int) -> int: return x*x http://mypy-lang.org/examples.html http://mypy-lang.org/examples.html
- benrbray 5y agoIs there something like DefinitelyTyped for Python? TypeScript only became useful once the ecosystem reached a critical mass of type definitions available for popular libraries. At the moment the Python community seems pretty anti-static-types, and the core scientific libraries (numpy, matplotlib, pytorch) don't export type signatures. Language server / intellisense support for type inference also has a long way to go.
- vorticalbox 5y agoNot that I am aware of. You can create you own types like what has happened with boto3 [1] I would assume as types become used more a definitely typed type project will happen on pypi. [1] https://pypi.org/project/boto3-type-annotations/ https://pypi.org/project/boto3-type-annotations/
- kaba0 5y agoI am sure I’m absolutely nowhere near your knowledge and expertise, but please bear with me sharing my opinion :) I think Java fits better as an introductory language — it is similarly popular as JS and python, and while I’m sure static typing can be picked up easily, I think fighting the compiler for a likely-correct program in the end is a better alternative than understanding why the program failed with this given input and not with another — so my not-backed-up-by-teaching opinion is that dynamic languages are not necessarily a great fit. It also features the basic OOP concepts, and modern java can showcase plenty of FP ones as well. On the other hand, going lower level is similarly detrimental, I’ve taken a class where C was used, and that way you get cryptic runtime errors as well, while memory management is not that hard to pick up later on.
- bradlys 5y agoIntro classes don’t need to overburden the student. The biggest hurdle for students is thinking like a computer. You start introducing all these extra things to just get going and it becomes even more difficult. Explaining to students what public static void main means is pretty annoying and seeing cryptic syntax littered everywhere does not help students when they’re first learning. Dynamic languages make much more sense to beginners because the idea of what a variable represents is more abstract to them than tangible to you. To them, they don’t see the value of types because they’re not going to be building large programs where that is going to matter. They know what their functions return and take in, because they probably only have one or two. Performance and compiling is also not as much of a concern, etc...
- kaba0 5y agoI agree with you on the overburden part, but not on the dynamic lang part. My very minimal experience is that the hardest thing to get right as a beginner (or even as an experienced developer) is to be able to follow the flow of your code (Maybe introductory courses should employ the debugger?), and the exact state it has at a given point, eg. at an exception. Restricting the valid states imo helps understanding. As well as not having to debug at all at first, but the compiler notifying what is wrong immediately.
- bruce343434 5y agoI started programming in Lua which is dynamically typed. It allowed me to experience why a type system would be nice. I'm sure if I had started with a typed language, I would have written it off as antiquated and unnecessary.
- valtism 5y agoAs someone who began learning with a statically typed language then moved to a dynamically typed language, I can say that I found learning a lot simpler with a dynamic language. I see static typing as a nice tool to help stop you making errors; but when I was trying to wrap my head around how to program I found it easier to not have to fight a compiler and allow myself to make mistakes.
- flowerlad 5y agoPython is much more limited as an introductory language than JavaScript. JavaScript is very versatile. Need to write server-side logic? Use JavaScript and Node. Need to write a native iOS app? Use JavaScript and React Native. Need to write a command-line utility? Use JavaScript and Node again. Need to make your web page interactive? Use JavaScript in the browser. Python is versatile as well, but not to the extent of JavaScript. JavaScript, when type-checked using TypeScript also scales better to larger projects and development teams. The one area where Python shines is in machine learning, where Python is a de-facto standard. But here too, Python is facing stiff competition from Julia.
- nojito 5y agoNone of these are requirements for a intro class Python excels as a teaching language.
- flowerlad 5y agoThe introductory course is not taken by just CS students. In most colleges, introductory programming courses are open to all majors. For many students this will be the only programming course they will ever take. Why wouldn't you teach a language that is not only well designed, but also versatile, instead of just being a good "teaching language"?
- thrdbndndn 5y agoCan confirm. As someone who never formally learn programming, the moment I learned Python I never touched C# or Javascript again at will. The syntax of Python is just way, way more straightforward. I do agree it may be a disadvantage for serious software engineering, but as a hobby? I will pick Python over others all day every day.
- neonological 5y agoWhy did you guys switch to python instead of javascript?