|
MALE SHOEGAZE posted:I don't see why you cant teach a low level and high level language simultaneously. Because understanding programming concepts is difficult enough without throwing two entirely different mental models at them.
|
# ? Dec 6, 2014 03:58 |
|
|
# ? Jun 7, 2024 18:07 |
|
Suspicious Dish posted:Because understanding programming concepts is difficult enough without throwing two entirely different mental models at them. i've seen intro programming courses taught in c++, java, python, and netlogo c++: way too much focus on the intricacies of c++. professor treated it as c with classes and made the students do c-string handling java: too verbose, and the everything is a class made some people go even more verbose. not too bad, though. python: people had a lot of issues with variable declarations and scope. seemed a little too loosey goosey for the students netlogo: the syntax and documentation really got to me. a lot of students were copying and pasting huge swathes of code. we should teach intro programming in scratch btw
|
# ? Dec 6, 2014 07:51 |
|
If you think C is simple then your mental model of modern processors is probably too naive.
|
# ? Dec 6, 2014 08:00 |
|
It has to be in order to remain sane. The minute you realize how badly your processor cheats to beat slow memory fetches is the day you quit smoking.
|
# ? Dec 6, 2014 08:29 |
|
FamDav posted:python: people had a lot of issues with variable declarations and scope Variable declaration and scope are way simpler in Python than in any of those other languages, so this is just
|
# ? Dec 6, 2014 09:18 |
|
ratbert90 posted:C is simple, and contains pretty much the fundamentals of almost every single programming language out there. None of those is a reason to start with C in an intro to programming class. Those are implementation details.
|
# ? Dec 6, 2014 09:40 |
|
Subjunctive posted:If you think C is simple then your mental model of modern processors is probably too naive. Suspicious Dish posted:It has to be in order to remain sane. The minute you realize how badly your processor cheats to beat slow memory fetches is the day you quit smoking.
|
# ? Dec 6, 2014 10:15 |
|
I've watched through this year's CS50 (Introduction to Programming) course from Harvard. I personally wouldn't have chosen C as a starting language, but it seemed to me like they made it work just fine.
|
# ? Dec 6, 2014 10:49 |
|
C is not simple.
|
# ? Dec 6, 2014 11:39 |
|
QuarkJets posted:Variable declaration and scope are way simpler in Python than in any of those other languages, so this is just Probably the problem is the whole "global" mess where you can read from something but trying to write to it without saying please will break everything.
|
# ? Dec 6, 2014 12:07 |
|
Don't teach them globals until they know how to properly use them (which is almost never) problem solved.
|
# ? Dec 6, 2014 12:18 |
|
Jewel posted:Don't teach them globals until they know how to properly use them (which is almost never) problem solved. Python requires extra boilerplate to not make globals so now you need to explain globals anyway because they want to know why you're having them make a main function instead of just writing code at file scope.
|
# ? Dec 6, 2014 12:33 |
|
QuarkJets posted:Variable declaration and scope are way
|
# ? Dec 6, 2014 14:16 |
|
seiken posted:Variable declaration and scope are way more loving broken in Python than in any of those other languages, so this is just just make everything a global
|
# ? Dec 6, 2014 14:51 |
|
I was formally taught Pascal, C and Java in that order, and I think I came out OK.
|
# ? Dec 6, 2014 15:02 |
|
Thermopyle posted:This is weird and not the average experience. However, it's not really possible to always know the contents of all objects all the time. Maybe because most of my classes were sqlalchemy mixins/models, and pycharm really didn't know how to handle that.
|
# ? Dec 6, 2014 15:10 |
|
HardDisk posted:I was formally taught Pascal, C and Java in that order, and I think I came out OK. Yes, despite the teaching methods, new programmers are made every year, just like despite rejecting all possible best practices, patterns, frameworks and methods software still gets done. "I've never used version control in my life and my software works fine" does not mean "everybody should be like me and not use version control" I made my first programs in C64 basic, then probably AMOS and ARexx, then C and I don't think everybody else should follow the same path, even though I have a pretty high opinion of myself as a programmer.
|
# ? Dec 6, 2014 15:49 |
|
Open with a few weeks on binary then start everyone on MIPS and go up from there
|
# ? Dec 6, 2014 15:56 |
|
MALE SHOEGAZE posted:Ruby Mine has tons of nice features that I will never learn anything about because using it is incredibly painful. I'm sure it's great once you know what everything does it absolutely chokes on my companies 10,000+ line ruby files so I can't really use it.
|
# ? Dec 6, 2014 16:29 |
|
How else do developers get paid?
|
# ? Dec 6, 2014 17:24 |
|
Someone I would be fired for naming posted:We don't need source control anymore now that we've switched to Python.
|
# ? Dec 6, 2014 17:35 |
|
GrumpyDoctor posted:Common Lisp can do this The worst thing about this code is that it uses a double for something in a particular unit and that the user has to be reminded with a little comment what unit they are supposed to use. Good until at some point in the future someone has a brain fart and forgets about units, and assigns a value which is actually in calories per half-hour per acre. It should use instead an object representing the value, from a class that is aware of units and unit conversions.
|
# ? Dec 6, 2014 18:28 |
|
From simplicity comes complexity
|
# ? Dec 6, 2014 18:39 |
|
im glad everyone already justified why python scopes get weird and why you have to impose arbitrary rules to not let first time programmers shoot their foot off.
|
# ? Dec 6, 2014 18:46 |
|
Hammerite posted:The worst thing about this code is that it uses a double for something in a particular unit and that the user has to be reminded with a little comment what unit they are supposed to use. Good until at some point in the future someone has a brain fart and forgets about units, and assigns a value which is actually in calories per half-hour per acre. It should use instead an object representing the value, from a class that is aware of units and unit conversions. That would be a great idea if Java had operator overloading.
|
# ? Dec 6, 2014 18:54 |
|
Soricidus posted:That would be a great idea if Java had operator overloading. And value types.
|
# ? Dec 6, 2014 19:03 |
|
Hammerite posted:The worst thing about this code is that it uses a double for something in a particular unit and that the user has to be reminded with a little comment what unit they are supposed to use. Good until at some point in the future someone has a brain fart and forgets about units, and assigns a value which is actually in calories per half-hour per acre. It should use instead an object representing the value, from a class that is aware of units and unit conversions. I am porting it to .NET and I chose F# over C# because of the language's first-class support for units of measure I already found both a bug and a place where the original annotations were inconsistent.
|
# ? Dec 6, 2014 19:54 |
|
seiken posted:
Maybe you can explain the problems a little more, because I have absolutely no idea what you mean. I've been using Python for a decade and never ran into any weird variable declaration or scope issues, but I also don't try to treat all variables as global
|
# ? Dec 6, 2014 20:09 |
|
My first "real" language was Object Ada and while I cursed it at the time, am the opinion it was worthwhile to learn - the pedantry of the compiler, I think, gave me the insight to think what will happen if the user won't act nicely and input the "correct" data (this approach - to treat every user either as an idiot, or that will act maliciously was overall strongly suggested everywhere either way). Still, I don't know if I'd recommend this language as a starting point for everyone - it certainly wasn't fun - instead of focusing on solving problems, I was forced to wrestle with compiler, if that makes sense. I definitely liked C/C++ much better and to this day I find it useful, even though I don't program in C anymore - applying concepts like OO in JS for example. Still, I guess, teaching about O times of algorithms, data structures and why data types matter would be something I'd recommend.
|
# ? Dec 6, 2014 20:47 |
|
Forgall posted:Why do you have 10,000+ line code files though? Because they were here when I got here, and they'll still be here when I leave. The fun part is many of our most common classes include these 10,000 line modules.
|
# ? Dec 6, 2014 22:00 |
|
oh hey i see we work for the same company
|
# ? Dec 6, 2014 22:02 |
|
QuarkJets posted:Maybe you can explain the problems a little more, because I have absolutely no idea what you mean. I've been using Python for a decade and never ran into any weird variable declaration or scope issues, but I also don't try to treat all variables as global Python code:
|
# ? Dec 7, 2014 00:16 |
|
EAT THE EGGS RICOLA posted:oh hey i see we work for the same company Why would anyone think that?
|
# ? Dec 7, 2014 00:20 |
|
seiken posted:
Maybe Python has stockholmed me, but that seems perfectly reasonable to me.
|
# ? Dec 7, 2014 00:41 |
eithedog posted:Still, I guess, teaching about O times of algorithms, data structures and why data types matter would be something I'd recommend. Isn't this more within the scope of an Algorithms and Data Structures course and less within the scope of an introductory programming course? I think if it's the first course and you have no prior programming experience, being tasked with implementing and analysing the running time of algorithms and understand how, say, a hashmap or a queue works might be a bit much to swallow. The entire purpose of an introductory programming course is to get acquainted with how you write code, syntax, tools at your disposal from the standard libraries, good customs and maybe a bit of hardware understanding depending on the language. Joda fucked around with this message at 00:44 on Dec 7, 2014 |
|
# ? Dec 7, 2014 00:42 |
|
seiken posted:
The global behavior you demonstrated at the end is counter-intuitive and confusing, although convention is not to use them except for a few uses like constants and settings. I remember stumbling into a similar case when learning and being thoroughly confused. Speaking of which: What's the proper way to handle this? Dominoes fucked around with this message at 01:07 on Dec 7, 2014 |
# ? Dec 7, 2014 00:45 |
|
Joda posted:Isn't this more within the scope of an Algorithms and Data Structures course and less within the scope of an introductory programming course? I think if it's the first course and you have no prior programming experience, being tasked with implementing and analysing the running time of algorithms and understand how, say, a hashmap or a queue works might be a bit much to swallow. The entire purpose of an introductory programming course is to get acquainted with how you write code, syntax, tools at your disposal from the standard libraries, good customs and maybe a bit of hardware understanding depending on the language. You're right - as, if you don't know how to write code at all, how can you know which approach is best to tackle the given problem, how to write adaptable code and how will the code scale accordingly depending upon the circumstances. However, if you're only taught of a language, without touching these things, you're hardly to blame if you produce, well... examples from this thread. Doing things "properly", I guess, doesn't matter at that point.
|
# ? Dec 7, 2014 01:49 |
|
Dominoes posted:
Assuming java script: code:
|
# ? Dec 7, 2014 01:51 |
eithedog posted:You're right - as, if you don't know how to write code at all, how can you know which approach is best to tackle the given problem, how to write adaptable code and how will the code scale accordingly depending upon the circumstances. However, if you're only taught of a language, without touching these things, you're hardly to blame if you produce, well... examples from this thread. Doing things "properly", I guess, doesn't matter at that point. But if you're gonna be a developer I assume you're not just gonna take a single programming course? Don't all CS, software engineering or software development B.Sc./M.Sc. programmes have algorithms and data structures (or some equivalent thereof) as a core course? I know that understanding how a CPU is wired (at least in terms of a basic integer unit) and how it interprets instructions is only consistently core for software engineering, but I thought everyone doing some variation of an academic degree had to take algorithms/datastructures at some point?
|
|
# ? Dec 7, 2014 02:07 |
|
|
# ? Jun 7, 2024 18:07 |
|
Dominoes posted:It would be nice to have comprehension/genexp/lambda scope in Python. The variables they use feel like boilerplate, so no need to have them interfere with things outside the compr. Well, the proper way is: code:
|
# ? Dec 7, 2014 02:55 |