What language would you use to teach new programmers?
>C/++
Introducing memory management and pointer manipulation is a lot to throw at people already struggling to deal with type casting and arrays
>Python
Hey lets spend all day debugging this dynamically typed shit, and the students will never understand why
>Java/C#
Too much scoped bullshit going on, students get lost in the weeds too fast to focus on learning the logic
>Go
Too many idiosyncrasies, and too much implicit project structuring
>Rust
lmao
>Javascript
We're trying to foster learning not hinder it
What language would you use to teach new programmers?
Pascal
>Introducing memory management and pointer manipulation is a lot to throw at people already struggling to deal with type casting and arrays
No and beginner have no business type casting anything.
>No
Youve clearly never tried to teach.
brainfugg: only 8 symbols, and there aint much you won't learn when you build your first calculator with infinite input
but unironically:
I would teach them javascript. get them engaged by haxxing html5 games, do animations, whatever.
this or "C".
Unironically a ML, then probably C as it's the lingua franca.
there is no perfect language and choice of language is irrelevant to learning to program
>Introducing memory management and pointer manipulation is a lot to throw at people already struggling to deal with type casting and arrays
If people are struggling with pointers, allocation, typecasting, and arrays, maybe you're teaching them stuff in the wrong order.
>C++
C++ has all sorts of classes that make memory management trivial with RAII. Ever hear of smart pointers? You don't even need to worry about deleting what's pointed to if a smart pointer goes out of scope; it's handled for you automatically.
It annoys me that many classes claim to teach C++ but they're really just using C++ to teach C. So beginners get to deal with raw pointers and built-in arrays rather than safer stuff from the standard library.
>beginners will never have a reason to typecast
BS
Python.
Yes, dynamic typing is annoying for professionals, but I think a noob is better off with dynamically typed languages.
I think it's educational to be able to run a buggy program and see it crash, rather than have the compiler whine about a number not being a different kind of number.
C or C++, everything feels easy after any of those
for software programmers:
teach them python for control flow and functions, don't introduce oop, don't have them work on big projects (only things that they can still easily debug by hand when running the program,
C++ is good enough to teach a beginner. If they have any questions regarding how and why arrays function the way they do you can always show them how it's represented in memory.
Only undergraduates and recently graduated shit CS kiddies think C/C++ is a good or a hard language.
>If people are struggling with pointers, allocation, typecasting, and arrays, maybe you're teaching them stuff in the wrong order.
In an ideal world they wouldnt but otherwise competent people get hung up on trivial fundamentals. Most of the first CS class people take it just learning how to deal with that shit.
>sepples has all this extra shit that does these things
And in Java you dont have those problems either, but as a consequence theres a bunch of shit to get lost trying to understand and students get overly confused.
Individually sure, try going over that to 60 people at once without spending 3 hours.
>Introducing memory management and pointer manipulation is a lot to throw at people already struggling to deal with type casting and arrays
You don't need to use memory management at all when teaching the basics of declaration, assignment, control flow, and functions.
I'd recommend C and Haskell. Through segfaults and purity they will achieve satori.
Well, I doubt we'd get much farther than explaining how variables work and how to print stuff to the console, maybe going over a few libc functions. It depends entirely on how much time's allotted and how shallow the course is supposed to be. You could also just go full meme and tell them to use STL functions like cout without explaining why, which I assume is how one would teach rudimentary Python.
But then they're learning about the C++ standard library and the smart pointers in it, not any directly useful concepts. If they learned memory management in C, they would have gotten knowledge about how the computer works. In C++, way too much is implicit.
Personally, i think Go and Elm are probably the best choices. Both are very simple languages and are statically typed with type systems that newbies can easily wrap their head around.
Go has explicit pointers (but no pointer arithmetic), fixed-size arrays, and slices. It's garbage collected so you don't have to deal with use after free bugs, and sort of has a stack/heap distinction. The GC simplifies learning, but without a Java or Python like runtime that completely insulates you from how the computer works and from how the data is implemented. Also, it's very good for teaching students to program to an interface, which is probably the single most important thing to teach.
Elm is nice because it is simple, has some of the best error messages that I've ever seen, is good for teaching basic functional programming without excessive abstraction, and gives instant gratification by having the easiest-to-use GUI framework in existance. The type system is a bit weak compared to Haskell's, but it's arguably the best compromise you could come up with for teaching newbies.
No. As long as the compiler error message is useful, getting an error message is much more useful than not getting one.
Also, newbies trained with dynamic types end up not knowing what types are at all. With static typing, this is made explicit.
C is bad and easy.
C++ is somewhat better and more useful, and its ease depends entirely on the subset that is being used. The easy parts are easy, the outer reaches are even more bullshit than what the stories tell you.
That's a very evil way to turn them into FP fanatics.
Unironically Matlab is the best for teaching important scientific programming. Unless you're a code monkey writing a solitaire clone or whatever useless bullshit you're doing, then stick to java like the pajeet you are.
x86/x64 assembly
I suppose if you took care of the obnoxious environment set up and started off doing var declarations instead of := Go would be pretty solid
>competent people get hung up on fundamentals
That's a fair point, but we are talking about beginners who are in the process of becoming competent.
My point is is that these fundamentals build on other fundamentals. OP implies when you're teaching a beginner that you have to dive straight into these things almost immediately which the absolutely wrong thing to do. Beginners don't have to deal with pointers, allocation, typecasting, or arrays straight off the bat. I know I didn't. Teach them that stuff later.
>C++ has these problems but Java doesn't
Sure, that might matter for somebody who's not a beginner, but as far as a beginner is concerned (if they're using smart pointers), the problem isn't there. The object and the pointer they created are taken care of for them and they don't need to worry about it.
Definitely true IMO. C++ is much easier to get down with one-on-one effort. The first person I replied to said in an ideal world people wouldn't get hung up on fundamentals; well, in an ideal world, people have somebody to go to until they understand those fundamentals they're hung up.
C and asm x86_64 for clarity. If they can't comprehend it they should not be programmers.
Matlab is also a pajeet language sorry to tell you.
It has a ridiculous amount of data structures each with a stupid amount of rules applied to them.
Terrible language
6502 assembly language.
>It has a ridiculous amount of data structures
the absolute state of Sup Forums
>But then they're learning about the C++ standard library and the smart pointers in it
Part of which isn't necessarily a bad thing, although you bring up a fair point—not everything in the standard library is universal in programming.
I only brought up smart pointers because I feel that a beginner can grasp pointers easier if you start out with something that doesn't get into the specifics.
>If they learned memory management in C, they would have gotten knowledge about how the computer works.
Once they start getting it down, then, if you really feel they need to learn memory management, you start introducing them to those specifics (how a smart pointer works), and you can also then teach them how to use raw pointers correctly.
Of course, many people will learn better if you just started out with raw pointers in the first place, not going to deny that whatsoever.
I'm only using smart pointers as an example of what you can do to simplify concepts while teaching beginners using C++.
Ruby. It's clean, it's beautiful, it's easy.
The issue is that once you start doing any projects of even mild complexity for a beginner pointers become almost unavoidable. That and strings are a giant headache in C, and getting input requires knowing that strings are really char* and when to use addresses in scanf vs when not. Its not that crazy a hurdle but its in your face immediately, and that turns into another lost-in-the-weeds issue. New students love making everything harder than it needs to be.
Ruby suffers from Perls MTOWTDI. Want to concat a string? Use
Matlab is deprecated. Use Julia instead.
It's better to give them a GCed language to start with imho. GC doesn't increase the incidental complexity since it is an invisible and non-leaky abstraction, while smart pointers definitely do.
I think Go is better for teaching in that sense, with explicit pointers so that they get exposed to the concept instead of dealing with value/reference types in higher level languages, but with GC and no pointer arithmetic.
>C++
The only memory management you need to teach a beginner is no initialising in loops. Stuff like points etc are unnecessary for use of C++ effectively. Then once they've got the hang of the basics they have an incredible language to expand their skills with.
Powershell. The syntax is easy and most importantly it's easy to get to the point where you can do useful stuff with it which keeps people interested.
But I'm not talking about C, am I?
I'm talking about C++, and about objects that the standard provides that abstract away some of the details so that you can learn the details one at-a-time instead of throwing everything in the beginner's face at once.
In C++, if you use features from the standard library, you don't really need to know about stuff like char* or scanf. For example, taking input can be as simple as:
std::cin >> someVar;
All I have to tell whoever I'm teaching is that this'll get everything up to the next white-space, and try to put it in someVar.
And I don't think teaching people the C++ standard library -has- to result in them not learning the details. I think it can make learning the details easier. We can learn about a concept without getting into the weeds, and later on get into the details as needed.
If you're right and I'm interpreting you correctly, Java doesn't have the problem of having to worry about some of the pitfalls related to pointers.
C++ may have the issue, but you can abstract away the pitfalls until you need to focus on them.
You can always switch to the work-in-progress language named crystal. It's like ruby but statically typed. I learn if it as my 3rd language after Java and C++ and really love it
>It's better to give them a GCed language to start with imho. GC doesn't increase the incidental complexity.
Oh, I see why you bring up that Java doesn't have the problem at all. That actually is a good point, because then you're not worrying about using specific things to abstract away specific details.
It appears that Sup Forums is full of retards that don't actually do anything important. Big surprise.
>Matlab has too many data structures
>Julia is a replacement for Matlab
lmfao. Like I said, stick to writing your text based RPGs and your Discord chatbots or whatever other useless shit you do.
The first post is indeed retarded. The second isn't.
Matlab-the-language is absolutely terrible. As an engineer I've seen what learning it first can do to a mind. Mathematica and Julia are both far better options.
Beginners should not be trained to use a language where every public function has to be defined in its own file.
That pic is comedy gold, unironically
Actually I was taught programming with this, it's actually pretty good
Real talk incoming.
1. Racket and HTDP.
2. SQL
3. m68k assembly
If your students can't understand the concept of a pointer, or even basic memory management, they will not be good programmers. They might at some point even become successful "web developers", but they'll never know what actually goes on in a computer, and if they ever have to transition to a strictly-typed language they are fucked.
It is your job as a teacher to teach your students to be the best programmers they can be. Contrary to recent political pushes, not everyone is born to be a programmer.
how about haskal
say you have two integers and you want to compute the quotient of them and store the quotient in a floating-point number, without truncating the fractional part of the quotient. you can to cast the two integers to floating-point when dividing them to achieve this.
int a = 3;
int b = 4;
float wrong = a/b; // results in 0; the .75 is truncated
float right = static_cast(a)/static_cast(b); // gives 0.75 as expected
>Introducing memory management and pointer manipulation is a lot to throw at people already struggling to deal with type casting and arrays
Actually I would think the opposite should be true here. Memory management goes hand-in-hand with understanding different types and how arrays work.
When teaching C, you can just tell your students that a variable is a portion of memory which can have any binary value that fits in that space. A variable's type is what determines whether "01000001" means "65" or "the letter A".
Pointers also help to understand how array indexes work. An array is just a position in memory, and the index is just an offset that is added to that position to reach the desired array value.
can someone explain why i would ever need to manually manipulate pointers or why I'd need to reinvent the wheel creating a garbage collector
Even if you never need to actually do it, there may come a point where you need to understand how it works in order to understand why some of your code may not be working very well.
you don't need to reinvent GC
just delete shit when you're done using it
can you elaborate on what manipulations of pointers you're referring to?
I started with VB6 at school. Would have no concerns starting someone with VB.NET or C#. You can completely ignore all the managed stuff at first when doing simple Hello World stuff (if statements, for loops, functions, blah blah).
Is there a site similar to Dot Net Perls for C++? It provided easy to understand examples of how everything in Go/Java/etc works.
I want to pick up C++ purely to understand how things work on a lower level, but I just never had any cases where I needed to yet. I'm never going to do any programming related to hardware or drivers. I'm never going to do any programming related to compilers or OS's.
I actually like assembly and use it on 8bit microcontrollers over C. It helped me understand hardware really well, so it has educational value.
Seen some pretty fucked instruction sets though, stuff of nightmares.
What kind of context do you use matlab in?
I've more or less completely replaced it with Python/Julia/Mathematica by now, but I was forced to learn it in college and used it for a bunch of stuff from image processing to machine learning.
Matlab as in the library of functions and IDE is okay. The language itself is terrible.
Yeah the language is super annoying at times, but matlab is so versatile I end up using it for loads of stuff.
>julia
Never heard of that before, cool.
I don't get it
DrRacket
C > assembly > C++ > Java > JavaScript
They'll have a fundamental understanding of pretty much everything and it's done in a reasonable order
couldn't agree more
I'll be starting my kids with Ruby or Python, they're easy to pick up the basics in and then remain useful for scripting bullshit
Then maybe something like Rust if they want to get serious. If they can get their heads around that, everything else will be easy.
never forget to add +C to all integrals you ever solve
>Rust
>serious
At least put some effort into it.
Hey guys I know this is a bad question but honestly should I keep working on C++ or do more in C#? I'm doing simple code things now but I want to know if I should switch before going onto more advanced projects (like some gay hand-made vidja).
kek i wasn't even shitposting (for once)
Teaching script faggots about memory and types is about all Rust is good for
>>C/++
obsolete language(s), there is no good reason to learn this other than the fact that its so common that youre should know what a joke unbounded arrays and null delimited pointers in strings are
>>Python
not a hater, Python is ok, in fact I would say its the best for people with only a casual/passing interest in programming and so is the best choice in a non-tech environment
>>Java/C#
still the best languages for enterprise, when you have huge code bases the classical class based languages means you can always make sense of the code no matter how bad the programmers are
>>Go
best compiled language for a beginner, this language forces best practices, this language will take over backend web programming
>>Rust
best first language in a systems level IT environment for people who are willing to take the time to learn cutting edge programming
>>Javascript
no standard library disqualifies this (and Node is NOT a standard library). also ES6 sucks and carries too much baggage from ES5
>>Ruby
I love Ruby but using blocks on array iterator methods is really clunky and so I would only recommend this for someone who is experienced and tired of Python's haphazard shittiness
>>Julia
Best first scripting language for a science/engineering environment
you can introduce someone on c without throwing pointers and memory management at them
also, if you want good programmers, they have to know how all that stuff works. it is better to teach somebody to drive a manual transmission first before teaching them to drive an automatic. it's the same for programming. if you teach the easy way first, the easy way is all they will know. you will end up with pajeets.
when i learned to program, my instructor made us manually write out how something works before we could use it in our program. if we wanted to add two numbers, we had to know and demontrate how a processor performs addition.
i wouldnt go that far because i really fucking hated doing that but it made me a fuckload better than my friends who learned programming the easy way at another school
C is hardly all-manual, it abstracts a lot. You're better off teaching a class on assembly if you want to fully illustrate how things work below the hood, and stuff like pointer arithmetic. It's easier to explain pointers coming up from assembly when people have been exposed to raw memory addresses.
yeah, i would agree, but like i said that approach is a little too hardcore for beginners. i suspect that the only reason my instructor didnt start out teaching assembly is because the school would fire him for causing too many students to quit. c was the lowest level he could get away with for beginner classes.
instead we learned assembly in our second semester
pointers may be a bit hard to get a grasp on at the very beginning, but i feel like memory management is a pretty simple concept, just have to teach what functions to use for it. after that its like remembering to turn the stove off after you finish cooking.
Teach a kid Scala for a first language and they'll conquer the world
I second this.
I first learned to program in BASIC on a TI 99/4a.
I ain't conquered shit.
Teach C. you needa understand how the computer works before you can program it.
ES6 maybe. If not that then modern Java, GUI stuff excluded. I use Perl almost exclusively, but I don't think there are many good resources to teach it to new programmers. Its a language you fall in love with later in your career
I don't think that's a bad thing. And in the Perl world, there are ways to do things that are considered better than others. I don't find myself doing things in strange, non standard ways when using Perl. The strangest thing about most of my Perl code is that I use its native OO instead of something like Moose
C provides so much comfort and abstraction over x86 ASM. You don't learn much about how a computer works with C besides terminating strings and very basic memory management
okay pajeet nigger
Javascript ES6/ Typescript
>it is better to teach somebody to drive a manual transmission first before teaching them to drive an automatic
What bullshit. Good job making me completely disregard everything you wrote.
The Lynda learning path from intro to programming starts with Javascript
From the myriad of things that Ruby is, it's not clean nor easy.
>get them engaged
this.
the important part is keeping them engaging in using the language
C for computer scientists, software/electronic/computer etc engineers, developers, anyone who will be doing a lot of programming
Python for people that just need to learn a bit of coding and scripting to do their jobs like scientists or people learning it on the side
Computer Programming with GNU Smalltalk
If you struggle with type casting and arrays then maybe programming isn't for you.
>Python
Debugging is a necessary skill and best taught alongside learning how to program. You're also mistaken in that people will learn more when they make mistakes, not less.
Shoo dumb sepples nigger. You're the reason so many code monkeys claim to know C++ without knowing C, and reveal that they really don't know either.