|
While I would agree with modern C++, templates weren't even present in the original version of C++ or its predecessor "C with classes".
I did like the original goals of C++, but must admit I've moved over to Rust now (I do this kind of dev on my own time), as I've lost track of C++ and cannot be bothered to refresh anymore - the language is daunting to keep up to date on, let alone for new programmers.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
That's true but if you agree that the STL is part of C++ then you probably understand why I say it's template oriented. Basically your runtimes are all oriented around generic programming, not OOP
Real programmers use butterflies
|
|
|
|
|
No doubt, in modern C++ templates are far more important than traditional OOP. Classes are still a bedrock of programming though, but inheritance and dynamic polymorphism much less so. Of course, templates give static polymorphism which is much more useful in a systems language.
What I like about Rust is that it makes this the default approach - so generic programming is more natural, and traits play the role of concepts, but again with much more natural syntax. Further, the libraries allow programming at a fairly high-level, but without sacrificing efficiency or safety.
Finally, the error messages are clear and readable, which after years of torture with C++ error messages is a breath of fresh air.
Even with all that, I still wouldn't recommend either as a first language.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
I really want to pick up rust, but there's not the toolchain i want for it yet. I want something that can backend with LLVM, and cross compile to things like an Arm Cortex-M or an ESP32. Then I will happily use rust all day long..
but for now, C++ is what's for dinner.
Real programmers use butterflies
|
|
|
|
|
Both my programming courses (high school and university) started from flow charts and manual simulation of flow charts. I firmly believe they are fundamental - I learnt to write functioning code way before those courses but they improved dramatically my problem solving skills.
In the end, every algorithm can be implemented with sequence, condition and iteration.
GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
den2k88 wrote: Both my programming courses (high school and university) started from flow charts and manual simulation of flow charts. I started with C, then Borland C++ Builder and then Petri Nets for automation
I would have done it just the opposite way. First Petri Nets... then the rest.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
I agree overall. I think some languages, like BASIC and Perl teach bad habits though.
Real programmers use butterflies
|
|
|
|
|
Yeah, but you need to, sooner or later, get them onto an actual language (or pseudo language).
Maybe they could simply use English as their programming language?
cheers
Chris Maunder
|
|
|
|
|
Basic & 6502 assembler got me started but turbo pascal got me fully hooked
|
|
|
|
|
Pretty sure just by your comment alone they'll spend another 50 billion in fees to learn what that even means... 🤔😆😆😉
They just need to learn what ever programming language they need to so they can make what they need and/or want to do. Who cares about the language. Let's teach 'brainf##k' in college, why the heck not??? Good times! Hahaha
Fundamental issue is language choice because no one ever gives them any real direction. They need to learn to learn the language that solves the problems they're looking to solve and run with it. 'Learn how to learn' so to speak.
College's are horrible at teaching programming. They need to teach the concepts and let the student's choose how to move fwd and actually guide them. Who cares about the language - just prove you can program and start there, right?
|
|
|
|
|
|
I voted JS, but Python is a very good choice too. JS has a few more oddities but also runs in more locations (specifically, web, which is great for learning & getting into making things). However, both:
- run on just about any machine / os
- have large, vibrant communities
- have lots of free tooling
- have lots of available packages & decent package managers
- skip the compilation part of programming which can be one of the more frustrating things for a new dev
C# isn't a particularly bad choice - I see that it's winning the competition here - but requires a lot more bootstrapping & understanding to get going. You need a compiler, so you need, eg Visual Studio Community (which is good, and free) or MonoDevelop. You can work in VSCode, but you'll still need build tools. If a new person is going to go this route, they really should select dotnet core / 5.0 and figure out what tooling is best for them - if they're on Windows, then VS Community is the go-to (free and good), though I way prefer Rider, and if they're on another machine, well, MonoDevelop is "ok" and VSCode can be convinced to work, but my experience of VSCode is that one has to understand the running tasks and so forth before one can simply make things.
Also, seeing something built is a major motivating factor to keep going - JavaScript, especially in the web, gives this feedback very quickly. Both Py and C# will require delving deeply into UI toolkits (unless someone does drag-n-drop winforms). CLI is nice to make things, but may not motivate everyone to keep going.
------------------------------------------------
If you say that getting the money
is the most important thing
You will spend your life
completely wasting your time
You will be doing things
you don't like doing
In order to go on living
That is, to go on doing things
you don't like doing
Which is stupid.
|
|
|
|
|
Any language (probably interpreted) that supports REPL[^] - a read, evaluate, print loop. The experience is somewhat immersive and feedback is immediate, unlike the edit-build-debug cycle. BASIC is the archetypal example, but a number of other languages have been designed for teaching programming concepts; Logo and Scratch are examples.
Software Zen: delete this;
|
|
|
|
|
I think Logo[^] is a good introduction to programming. It supports recursion, and its graphics are easily accessible and could tie into mathematics courses. Once the student is comfortable with it, I'd move on to C and then C++.
|
|
|
|
|
If you're starting out I would use Basic (where I started initially) or Python, and then move onto C#/Java/C/C++ as your interests move on. My journey was Basic, then 6502 assembly, C and then the rest.
I would NEVER start with C/C++ - ugh. That should be a crime against humanity.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music."
-- Marcus Brigstocke, British Comedian
|
|
|
|
|
1 in 8 responders here voted for C++.
WTAF????
|
|
|
|
|
C ain't bad as it can allow for programming based mostly on logic and if the course merges computer architecture well with programming it's doable.
The problems are:
1) It's not appealing. The only easy way to use it as a beginner is through command line interface, which is no longer the way to interact with software.
2) Even that has a terrible syntax, even if I prefer scanf to many input functions I do because I have a lot of experience both with scanf and with many other input methods (c++, bash, java, visualbasic, assembly). I remember scanf as being particularly obscure in the beginning.
Honestly a modern VB6 would be top notch in my opinion, VB.Net still holds a bit more complications than what I deem appropriate for a beginner's language.
GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
i would not hesitate to introduce c to an electrical engineer at the very beginning, but "for a high school student who's never coded before?"
probably basic, but to make things more industry oriented from start: python or javascript.
very few languages from the popular top 20 are problematic for first introduction. the most important thing is how the material is written. will they love it or hate it?
"How to Think Like a Computer Scientist, Learning with Python" is good for starters.
|
|
|
|
|
OK you don't like C/C++, what's your choice then?
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
I started in those languages (C++ then C) and ended up back home after my tour of the other languages. Scripting languages hadn't been a thing until I already made a couple videogames via the holy trinity (asm/C/C++)
It builds character (and oneness with the hardware)
|
|
|
|
|
That was the first language I learnt, in 1987.
Variable names not more than 6 letters long; Integers starting with IJKLMN and Floats starting with any other letter. Program statements between the 7th and 80th columns. Many more such rules, and the (in)famous GOTO statement.
|
|
|
|
|
Hi.
I learned it a school in 81 and I use it on PDP/11 . I add to write a fortran program to renumber the label use by Goto because labels were in numerical order at it was too diifcult to understand the Logic.
At that time computer has very few ressources. computers were stupid and programmers had to be clever , even with a 64kb limit for the size of the program. now , it is a bit the opposite. Today, i use c#.
Regards to all programmers in the world.
|
|
|
|
|
perhaps Fortran 77 would be a better idea -where the GOTO may be completely eliminated .
|
|
|
|
|
In some cases, you may need to stil use goto to avoid to have too many if conditions imbricated you can not use directly a return or an exit. We always need to do the best with the limited tools that we have.
I have some difficulties to maintain an application without gotos but there are more than 218 source files that contains very few rows. Goto are evil but Russin doll coding is an evil ( one you find a file , you llok inside and you discover that thelogic is in an other file and in that file , the same thing happens...)
|
|
|
|
|
I think it should be erased from memory by a superior being. I see many programmers still using idjt vrbl nms that make code unmaintainablem for no reason at all.
GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|