I contend that within reason, it really doesn't matter exactly which language happens to be one's very first programming language. Programming is ideally motivated by passion, and in that case, a person is certainly not going to give up and change career just because their intro language was a bit inconsistent or rocky. Anyone who gives up programming before at least being fluent in three languages, is giving up prem…
Assembler is arguably a better intro language than most. It makes it explicitly clear what each step of the programming does and how it executes. Once students have done a few projects the they'll be ready to appreciate a higher level language like C. Throwing objects and lambdas and type inference at kids without giving them any grounding in what a computer actually is and does is unfair, and leaves them building ca…
Why MIT uses Python instead of Scheme for its undergraduate CS program (2009)
51–60 of 141 posts
Re: Why MIT uses Python instead of Scheme for its undergraduate CS program (2009)
#52I regularly see others write Python code that I have to fix to add robustness. I also run "pylint" or equivalent tools before committing major changes to scripts because it is quite easy to make mistakes that won’t otherwise be found right away.
Some of my least favorite pitfalls:
- If you call a function that happens to refer to a variable that only exists in the calling code, it will work (and yes, since the same function can be called from more than one place, “caller” is not always the same so the effect is not always the same). Bonus points if it only matches the caller because of a typo. Any convenience afforded by this behavior is not worth the potential for head-scratching and painful debugging.
- Python has things that “seem” like the obvious/right thing to do when they are not. One great example is "except:", which to this day I have to keep correcting in various scripts to prevent important errors from being completely lost. Another one is expecting to write the entire script at column 0, when people are supposed to know 'if __name__ == "__main__"'. Also, a type’s apparent shared/unique status is not always clear so novices can get a long way with sort-of working code until they are completely confused by the broken cases (e.g. you can simply list and “initialize” class fields with trivial string and number values until one day you add something like a "dict()" and everything breaks for that one field because all your class instances are mysteriously sharing it; suddenly you need to define a whole new "__init__()" to fix things when it wasn’t apparently needed previously).
- It is not always obvious to maintainers of functions that keyword arguments are extremely fragile and that they can overlap with other arguments. If an argument is renamed or relocated for example, stuff elsewhere can break in stupid ways. Tiny code changes can create big headaches.
Re: Why MIT uses Python instead of Scheme for its undergraduate CS program (2009)
#53I contend that within reason, it really doesn't matter exactly which language happens to be one's very first programming language. Programming is ideally motivated by passion, and in that case, a person is certainly not going to give up and change career just because their intro language was a bit inconsistent or rocky. Anyone who gives up programming before at least being fluent in three languages, is giving up prem…
(1) Learning Java before you learn a procedural language, to me, makes no sense, and turns a programmer’s formative foundation of programming into an object-only one.
(2) The difficulty in getting over the ‘hump’ (usually about 5-6 weeks in to learning one’s first language) is what turned me off programming when I was 13, but given a great intro course I was able to get over it and I’ve developed a deep passion for it and I couldn’t imagine life without it. So to put the bar at 3 languages, to me, is insane.
(3) Many (most?) people don’t start off saying ‘Programming is or will be my career’. Instead, you try it out and see if you can do it and if you enjoy it. To me, this is a fundamental misunderstanding in how people view programming when they are learning their first language.
Re: Why MIT uses Python instead of Scheme for its undergraduate CS program (2009)
#54A bit of extras: in today world we can't produce really anything new due to managerial-driven society and beside that it's better people do NOT really understand how things work to avoid not only embarrassments but also potential idea to radically wipe out certain kind of business models. So better saying: you can't understand the big picture! Keep play with thing Bigs&powerful give you, they came directly from the nature do not worry about it.
Sorry to have made few "potential-flamey comments" in a row but reasons written in the article have really no other meaning to my eyes. That's not intended to be political or flamebait, it's simply what I see. I do NOT start with scheme, I discovered it years after and I even do not love it too much due to it's n-th implementation incompatibilities, srfi and "sparse" documentation... But when I discover lisp-like languages in general I see a completely different world and really change my mind. Guile scheme, even with the lacks of libraries etc it's now one of my preferred way to express concepts.
Also as per explanation I can't accept as engineer and even as a citizen to make thing, under my responsibility, with my signature etc that I do not really understand. This kind of idea is simply the exact opposite of engineering.
Re: Why MIT uses Python instead of Scheme for its undergraduate CS program (2009)
#55Python makes sense for engineering, like building robots, where practicality is the most important goal. However, Python is a lousy choice for computer science, where clarity and correctness are much more important. It saddens me that an elite institution like MIT apparently can't see the difference.
To be fair, I think many people expect that a BS degree in either computer science or engineering would make them employable.
FWIW, I have a CS degree, and my job is mostly engineering, but using a sound theoretical approach to problems has saved me many times. On the other hand, I've worked with several good programmers over the years who didn't have a college degree at all.
Re: Why MIT uses Python instead of Scheme for its undergraduate CS program (2009)
#56Earlier quoted context omitted.
Same here. When I learned programming at UC Berkeley in the 90s, Scheme was the intro language. It was perfect precisely because it was so far from being the kind of language you'd use to engineer large projects. The first day, the professor spent less than half of the period introducing the entire syntax of the language...it's so damn simple. Beyond that, all learning was abstraction, problem solving and CS concepts…
> There will be so many students that will struggle to learn python-specific topics that are irrelevant to learning the act of coding Correct me if I'm wrong - I just went to an unrespected state school - but I would think that the MIT admissions filter selects for students who wouldn't particularly struggle with something as small as language idiosyncracies, especially in an introductory course.
Re: Why MIT uses Python instead of Scheme for its undergraduate CS program (2009)
#57Earlier quoted context omitted.
Assembler is arguably a better intro language than most. It makes it explicitly clear what each step of the programming does and how it executes. Once students have done a few projects the they'll be ready to appreciate a higher level language like C. Throwing objects and lambdas and type inference at kids without giving them any grounding in what a computer actually is and does is unfair, and leaves them building ca…
I can't tell if this was meant to be serious of facetious, but I took this route. I learned 8088 assembly to make an ancient robot platform move, and then learned C a few months later. Assembly had a few weird architecturey things that you had to understand before things made any sense (e.g. registers, segment:offset addressing, stack pointers, calling conventions), but beyond that, all of the tasks were simple and s…
Agreed with the caveat that C pointers aren't just memory addresses they just behave like that 99% of the time which makes it especially confusing for the 1% where the optimiser can "play tricks"..
Re: Why MIT uses Python instead of Scheme for its undergraduate CS program (2009)
#58Bullshit translator: mean intelligence of newcomers becomes so low that we have to lower our programs or only veeeeery few can attend them. And we need more students so more money. Disagree? Say thanks to all school reforms in the past 30-40-50 years. A bit of extras: in today world we can't produce really anything new due to managerial-driven society and beside that it's better people do NOT really understand how th…
uh, you know this is about MIT right? A school that has seen its acceptance rate dwindle to nearly 7%?
Re: Why MIT uses Python instead of Scheme for its undergraduate CS program (2009)
#59Earlier quoted context omitted.
I learned Python as my first TRUE(explain later) language and I will be forever grateful for it. Now I am a polyglot, jumping through multiple languages all the time, be it Python/Java/Javascript, or occasionally flirtation with some languages that are foreign to my daily routine but necessary to get my job done. I am not quite on board with you claim that Python is chosen for monetary benefits. To be a qualified pro…
Compared to C, Python is the better choice. However, it seems like you haven't learned a Lisp dialect. I would love to know if you would still prefer Python once you know Scheme.
People often talk about how simple Python is, but many of them have either no experience with or no appreciation for Scheme. When they do have exposure to Scheme, it tends to be some ancient, primitive dialect like MIT Scheme rather than modern, full-featured scheme like Chicken, or Racket, or Guile -- so they look at Scheme as a toy language. I don't know how often I've heard comments along the lines of Scheme being a fine academic language but impractical for real work.
Python does have a little nice lispyness to it, but it's deliberately limited by the language designers, the syntax is lacking and it has many frustrating inconsistencies and gotchas. Programming in Scheme is just so much easier.
Re: Why MIT uses Python instead of Scheme for its undergraduate CS program (2009)
#60Earlier quoted context omitted.
To be fair, I think many people expect that a BS degree in either computer science or engineering would make them employable.
Sure, but the emphasis is different. Someone with a CS degree should understand both theory and practice. Someone with an engineering degree doesn't need much theory. FWIW, I have a CS degree, and my job is mostly engineering, but using a sound theoretical approach to problems has saved me many times. On the other hand, I've worked with several good programmers over the years who didn't have a college degree at all.