It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
So I finally bought a book to learn coding (C++ Primer Plus). A good start, maybe, but a book isn't a teacher.

Are there experienced coders here I can ask for help? I should mention that I have Asperger's.
Post edited October 25, 2023 by Tigersong
This question / problem has been solved by rtcvb32image
avatar
Tigersong: So I finally bought a book to learn coding (C++ Primer Plus).
Are you familiar with other programming and/or scripting languages?

I am willfully-ignorant of C++ (its bloat and complexity are two main aspects that I take issue with), but, at the very least, its syntax is rooted in C.
This is a good site with classes to learn many things. Some of the courses are free to take. I know there is a programming class on Python that is free.
https://www.coursera.org/
avatar
Tigersong: So I finally bought a book to learn coding (C++ Primer Plus).
avatar
Palestine: Are you familiar with other programming and/or scripting languages?
Not especially. I've dabbled in several, but don't consider myself familiar with them. Hence the book.
avatar
Tigersong: So I finally bought a book to learn coding (C++ Primer Plus). A good start, maybe, but a book isn't a teacher.

Are there experienced coders here I can ask for help? I should mention that I have Asperger's.
That was the book I had at Uni to Learn C++

Unfortunately we were being taught C++ by old C programmers that never got their heads around object orientation,

Also unfortunately for this thread, I've not coded for over 10 years.

I did pick up the latest version of Primer Plus a few years back in the hope to get back into coding, but my brain's all frazzled now

That said, feel free to message me if you have issues, and I'll see what I can remember
Post edited October 25, 2023 by mechmouse
I understand C++ sufficiently; Although i'd never use it myself. It has quirks that make bugless code have bugs, and impossible to follow the path of what's going on. I also utterly hate the ugly syntax of :: global. And the default of class non-virtual throws a lot of people off, vs Java's defaulting to virtual and specifying final when you don't intend to give it polymorphism.

C++ also doesn't come 'loaded', meaning while the tools are there you usually have to build it all the boilerplate yourself.

Lastly, the STL (Standard Template Library) and all that with their iterators is a total mess in my mind.

Personally? Don't use C++ if you don't have to. If you have to for something like Unreal Engine, they use Preprocessors #ifdef blocks to separate and minimize code compiled, while not getting into OOP at all. Use the classes and OOP as little as possible. the streams while an example of how you could use the classes, in my mind was ill conceived as it completely redefines uses of common operators and obfuscates what's going on.

C++ also has a lot of baggage from the C days, when you had very limited memory, so pre and post processing involved, along with separation of definitions from the source code making you have to update multiple locations and get lost very easily with what's going on, as well as having to define something before you use it, making you either define things in an odd order, or define everything up top as a prototype and then including it below, or defining it all in the .hpp headers.
Post edited October 25, 2023 by rtcvb32
I mean. I don't have to use anything, but I want to choose something and stick with it. So if not C++, what do you recommend?
avatar
Tigersong: I mean. I don't have to use anything, but I want to choose something and stick with it. So if not C++, what do you recommend?
I started learning C a while ago and I quite like it, albeit I've never used it in any kind of project, so I cannot say its problems. (I know C and C++ are quite different, but Im using this as an step argument for the recommendation below.)

https://www.educative.io/blog/rust-vs-cpp

Rust is a good "modern alternative" by what I've read.
Of course anyone with more experience here can guide you with answers about this language too.
While i want to say DLang, D's compiler and adoption aren't quite mature enough even if the language brought forth a lot of good things which other languages have picked off and started using elements of it.

Java, C#, and Rust may all be contending options. If you don't mind interpreted, Python is fairly popular.

Either way you go, you should write some code and see how it looks and feels. Personally i did a sorting algorithm, QuickSort in C++, before ultimately dropping it. Maybe write a little text processor to find specific tokens and replace them, like when it finds {} to put 99 and decrement to 1, and repeat until you hit 0. (99 bottles of beer or something).

Make your own templated something, anything. Making a BigInt library (only using strings) isn't that difficult, and can do it probably in under 50 lines of code.

Incorporate unittests suite of some sort so you can do tests on your code to ensure it works correctly or 'as intended', and you can see how easy or difficult incorporating one for a small or large project would be.

Use another's library, be it zlib to compress a file and then uncompress it, or a image or png library and draw some circles and save files.

Get a feel of the language, and don't start going full hog into it unless you feel it's what you want to do, or you need it for a complex project or a project already using the language.
avatar
.Keys: I started learning C a while ago and I quite like it, albeit I've never used it in any kind of project
C is quite nice by itself, though it really fails at a handful of things, like memory management, error handling, and string manipulation. But larger projects are.... annoying in C. Better to use C for low level work on specific functions/utilities.
avatar
.Keys: Rust is a good "modern alternative" by what I've read.
To my understanding Rust originally was DLang, but at some point the build got a fork and deviated in it's own direction for specific features and his methodology of solving certain key problems, giving you Rust.
Post edited October 26, 2023 by rtcvb32
I grabbed this free course as a refresher since I've never really used C++ for anything real. I liked it.

https://www.udemy.com/course/free-learn-c-tutorial-beginners
avatar
Tigersong: So I finally bought a book to learn coding (C++ Primer Plus). A good start, maybe, but a book isn't a teacher.
You have a pretty good book. I read an old edition of it many years ago. Steven Prata I believe.

But after using C++, Java, and C# professionally for years. I've come to the conclusion that C is best, at least for me. It's way simpler and gives you full control. There's no better language IMO.

I'm rusty these days, but if I can help I would be glad to try.
Post edited October 26, 2023 by EverNightX
avatar
.Keys: I started learning C a while ago and I quite like it, albeit I've never used it in any kind of project
avatar
rtcvb32: C is quite nice by itself, though it really fails at a handful of things, like memory management, error handling, and string manipulation. But larger projects are.... annoying in C. Better to use C for low level work on specific functions/utilities.
avatar
.Keys: Rust is a good "modern alternative" by what I've read.
avatar
rtcvb32: To my understanding Rust originally was DLang, but at some point the build got a fork and deviated in it's own direction for specific features and his methodology of solving certain key problems, giving you Rust.
I actually have no idea where Rust came from, only by that article that I posted that It came from Mozilla when they were developing their products.
And agreed. C feels nice to learn and use, but then again, no experience with big projects in C.
Heard exactly that about it on memory management.

avatar
EverNightX: I'm rusty these days ...
So you're also using "Rust" ? :D
*pum intended*
Post edited October 26, 2023 by .Keys
avatar
EverNightX: I'm rusty these days ...
avatar
.Keys: So you're also using "Rust" ? :D
*pum intended*
No :)
Thanks, all. I should mention I want to do gamedev eventually and have seen the folly of following tutorials. I.e. you don't learn how to come up with new ideas, just how to follow tutorials.

I picked up a little engine called DragonRuby after realizing that the big graphical engines make my head spin.
avatar
Tigersong: Thanks, all. I should mention I want to do gamedev eventually and have seen the folly of following tutorials. I.e. you don't learn how to come up with new ideas, just how to follow tutorials.

I picked up a little engine called DragonRuby after realizing that the big graphical engines make my head spin.
I was going to ask if it was going to go into development or not for games.

DragonRuby, then maybe you should read up and learn Ruby and the Gem library systems. RPGMaker VM and those games use Ruby too.

Otherwise, C# in Unity and others you can learn minimally, C knowledge is enough since you're just making certain logical decisions and calling other functions.

As mentioned Unreal uses C++, but actual usage of C++ you are unlikely to see unless you're tinkering with your own filters or effects, materials and lighting.

Not sure on some of the other engines, as i haven't looked closely at them.