Suitable for a complete beginner?

Is Rust a suitable language for someone who hasn’t programmed before?

I have always loved FOSS, but as a general IT/Cyber Security sales and support person, I’ve always sold and supported proprietary software. I’m not a scripter either. I want to dig much deeper into technical things and embrace FOSS, software development, etc.

I’m not afraid of a challenge, but it’s a risk/benefit analysis for me. If I go for an RHCA, LPIC, or MCSA/E I will realize benefits from those certifications because they have an established career track, but getting into C++ and competing in the job market would probably require BS CompSci.

Would Rust be a long shot for someone like me?

2 Likes

Rust would be better to learn than C++ in my opinion, but it's probably not the best option for a 100% beginner.

You see, rust is both low level and high level, meaning you can write beautiful code which does wonders and dances around and you'll be so happy, but if you lack an understanding of what happens underneath the scenes (On the low level end) you might be confused as to the reasoning behind the high level stuff and its limitations.

Then again, rust could be just the language for you, if that is the case then giving the Book a read should prove no foreign task.

But as a piece of advice for someone who's just starting to program, don't sweat what you learn first, because if you're a good developer you won't care about the language and will simply use the right language for the right job (Which rust just so happens to fill rather well, so do not take this as a deterrent).

4 Likes

I can agree with @OptimisticPeach here. I learnt a little Delphi Pascal at school, but not really enough to speak of. Then I learnt C++ because it is the language an open-source program I used was written in. Then I came to Rust, because programming became interesting to me. Rust is definitely a better option to begin with than C++. If you want to dig into technical things, I'd say it is perfect. It is safer than C and simpler than C++ while being just as low-level. But it all depends on how much you want to dig into the nitty-gritty of exactly how your computer works and what exactly your code makes it do.

2 Likes

Allow me to reply to something other than the question (slightly off).

That's a definitive "no", however. IT is one of the fields today that makes it possible to learn yourself as many technologies as you want, simultaneously allowing you to easily get a job without any sort of a degree (not anywhere, but if you don't immediately aim for a Google R & D position, you should be good to go after, say, 1-2 years of hard-working autodidactic studying).

2 Likes

I am very much a noob that dabbles in Rust just on the weekends for the past three or four months. In that time, I have learned quite a bit (but have a long way to go before I consider myself to have any competency in Rust), I am not a software professional nor will I ever be (looking forward to retiring soon!) but I do really enjoy programming.

Prior to Rust, I played around with C for a half year or so. Prior to that, I took some programming courses in school decades ago. Previous programming experience, even a little, made learning Rust a lot easier for me. That being said, one language has to be the first one that is learned.

What really helped me was the Rust book. I would read the printed copy for about an hour or so every night and on the weekends read the online version and do the code samples on my computer. I have read the book probably 3 to 4 times now (online and paper form) and a lot that was not clear initially is clear now.

I can now write programs of a few hundred lines that actually work! I still have a lot to learn and still get jammed up with error handling, working with result/option, lifetimes, etc but that is all slowly coming to me.

I have found the online help with Rust to be outstanding. There are a lot of great people on this forum and stack overflow that have answered my noobish questions without snark (and I really appreciate that!). The online documentation is very good for just about everything I have done with Rust.

TL;DR There is a learning curve with Rust but it is definitely doable. I would say go for it!

2 Likes

If you have never really coded before I would say learn coding techniques and philosophy using Ruby first. It's much simpler and easier to use (dynamic and interactive vs compiled), and there's loads of tutorials, videos, blogs, documentation, forums, examples, etc. You can try stuff and get instant feedback (right or wrong).

Ruby allows you to think about solving your problem without stressing over the mechanics of writing code. Rust forces you to stress over the mechanics of writing code (ownership, borrowing, etc). Once you have a comfortable understanding of programming techniques, and a good philosophical understanding of abstract coding mechanics (loops, conditionals, arrays, hashes, etc) you can take that knowledge to any language and be able to pick up different syntax (how to do x in language y using technique z).

I think it would be brutal to your brain to start out from scratch trying to learn Rust with no fundamental and philosophical understanding of basic programming.

1 Like

I think Rust's difficulty for beginners is greatly exaggerated.

Most of us community members came from other languages first and we had to re-learn things. Every week there's at least one thread on how to do X in Rust, where X is something that's easy in a GC'd language, or something that's trivial but unsafe in C(++). How many times do you see something along the lines of "That idiom doesn't translate into Rust; look for another way to solve your problem"?

It's easy to think "Because this was hard for me, a skilled professional/enthusiast, it must be even harder for someone with no prior experience." But it's not necessarily true.

When you're first learning, everything is hard. People with no prior experience struggle with ideas like:

  • Variables have scopes.
  • Each function call gets its own local variables.
  • Statements are executed sequentially.
  • There is a difference between compile time and runtime.
  • There is a difference between ; and : and between [] and ().
  • Comments don't influence the behavior of your program.
  • Indentation doesn't matter. (Depending on the language)

When you're struggling with things like the above, the difference between Rust and PopularLanguage is so far beyond you that the "hard" stuff isn't even on your radar. The "basics" of programming are the same in every language.

When you do start to get into the tricky bits, you don't need to embrace it all at once. Ownership is a pretty simple concept, no more complicated than the object/primitive distinction in any of a half dozen other popular first languages. Cloning fixes 90% of the problems you would encounter early on. And when you do get into references, you can usually do without explicit lifetimes entirely! Most languages don't have references at all. C++ outright forbids putting references in structs which eliminates most cases in Rust where lifetime annotations are needed. Not true, I was thinking of arrays.

To make a long story short: Learning to program is different from learning a new language. Rust has a lot of potential to be a good language for people learning to program. Especially so, in my opinion, since the compiler can head off a lot of mistakes that inexperienced programmers make. People think Rust is harder than it is, because they try to write things in Rust that they wouldn't try in other languages.

The problem with Rust as a first language is, I think, entirely lack of resources. In my opinion, the best book I've found for learning to program is Learning Perl. It doesn't get into references or complicated stuff at all. If you think Rust is too complicated for new programmers, you should check out a somewhat recent edition of Learning Perl and see how simply the book explains programming using this language that has such a reputation for being needlessly complex and unreadable. I see no reason why someone couldn't make a book of that quality, aimed at non-programmers, but using Rust as a language instead.

Unfortunately, that book doesn't exist for Rust yet. (Apologies if I'm missing one; all the books I know of are written for programmers.) But I hope some day it will!

In the mean time, I agree broadly with the other advice given here: it'll be hard to learn Rust as a complete beginner. There just aren't a lot of resources available to you. But don't let your takeaway be "Rust is too hard for beginners," but "Rust-oriented resources are not aimed at beginners."

11 Likes

The only way to know if it's suitable for beginners is for enough beginners to try. We're all just as interested in the answer as you are.

That said, intuitively I believe The Rust Programming Language is the best programming language book I've ever read. I do have experience with several other languages, so I can't speak from the point of view of a total beginner. It probably could spend some more time explaining certain ideas that it assumes familiarity with.

But this is as good a place as any to ask for help. And if you think the book does not explain a topic in enough detail, perhaps that can be fixed.

4 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.