This is a mini-tutorial I am doing during my free time!
Lets get into it!
Programming is a complex world of algorithms and patterns.
And this is where my first tip comes in.
Lets say the concept is staring at a image of a syntax tree for a programming language.
DO NOT take that image literally and attempt to code the exact tree in code. I promise you, it won't work. Lol. I learned the hard way(smh :/).
Taking things way too literally in the world of programming is just not the thing to do. In the end, you will end up causing more stress on yourself rather than actually getting any progress on what it is you're wanting to build.
A few tips: Think of the logic behind what it is you're looking at(or thinking of). Thinking of the logic behind it instead of the straightforward image it might look like(or that you may see) is better than attempting to code something strictly off of something you're thinking of or seeing.
Logic is a huge part of programming. If you cannot apply logic to your code, I don't know what you're doing coding.
Do not rush at learning new things. It will never end well.
I wish I would've known this when first learning C. I instantly dived into some heavy features of the language and instantly got confused and gave up. This is not a good mindset to have when learning a new language(or learning something new in a language you already know).
Now, usually when it's a language you already know, it's no problem. But, it's normally a problem with new languages.
Learning that new fundamental knowledge of a language is, boring. Believe me we've all been there and we're going to continuously find ourselves back at that point sometime in our lifetime.
But, don't rush. It will be boring. But stick through it. Learning a language doesn't come easy. Not only do you have to learn it, but you have to learn how to apply the logic of the language afterwards. Which is a timely thing.
Do NOT stress over new concepts
New concepts are like new math problems.
You won't understand all of them ASAP. So, if you don't understand a concept, don't stress. Maybe move onto something else, and, if you don't feel comfortable doing that, walk away for 15 minutes, take a drink of water, and come back to it.
Not everything will come easy when learning a programming language. And I can almost guarantee you, some of the things you will struggle the most to learn you might never even use. And if you do, it's rare for you to use.
Stay away from high-level languages(FIRST)
You saw this coming, lets be honest :)
But, let me tell you why. High-level languages tend to come "easier" unlike mid-level/low-level languages such as Rust and C#.
Higher-level languages will bind a programmers mindset to built-ins where languages like C# and Rust you can't depend so much on built-ins.
But starting off high-level will never increase your chances in becoming a flexible developer. If you start high with a language like Python and you work for a job that tells you that you need to learn Rust in 3 weeks. You're gonna struggle.
No matter how hard it gets, don't give up.
When I first started with C, I struggled with primarily everything coming at me. I struggled with the basic hello world program. And I am now writing security applications in the language.
Regardless of the fact I've been writing the language for well over a year. That just supports my reasoning to not give up. If I would've given up, I would've been stuck with higher-level languages because I would've never wanted to touch a lower-level language again because I would've set my mindset to "quit, it's too hard".
Which is not good. So, I don't give two flying DUCKS(yes, ducks) how hard it gets. You chose to learn the language. Don't walk away :)
Don't rush to learn new things. Go at a even pace as you learn each new concept and learn in the order the tutorial/documentaion is teaching you.
Some things will come easier than others, as I described above. But when things get hard, don't get up. Take your time. Like I said:
New concepts are like new math problems.
Enjoy the time learning the language. You'll look back someday and think, "wow, I really made it!"
i think it would be pretty fun trying to read a PNG image file format in rust and working with its pixels. it will be hard, yes. but hard is fun and if you’re working in a fun language like Rust or C, time flies!
We’re about to make a whole library to read a images pixels.
perhaps working with jpeg files or png?
@MocaCDeveloper I've got a couple of ideas:
- Stenography with PNGs (It's super easy with BMPs, but the PNG encoding should add some challenge)
- Reduce the size of an image (perhaps by splitting an image into 2x2 'chunks' of pixels, and then converting each 'chunk' to a single pixel on the output image by averaging their RGB values)
@MocaCDeveloper I was originally diagnosed with ADD, but a lot of doctors nowdays say that it's pretty much the same thing
Rust is a fun language to do bigger projects in. As much as I love C++, it can get a bit frustrating sometimes (I can write basic assembly but I can't quite manage the lowest-level aspects of C :/)
@MocaCDeveloper I get that. My main problems with Rust are pretty simple:
- Variables are stored on the heap rather than the stack, so you have to deal with cloning and copying even for basic operations, as well as making the language slightly slower than C, which utilizes the stack
- Rust's object orientation really isn't that good, and that makes it a smidge annoying to use for larger projects
Other than those 2 issues, I absolutely love Rust
i completely agree on that. the most annoying thing to me is the having to copy and clone things to avoid errors and borrowing of the value
Yeah, these tips are good, but you know what? Nobody will make this post recognized as it should be. Why? because people are going to go and upvote the 1,459,903th Python tutorial out there on replit, that only teaches you about variables and printing. I feel sad
the 1,459,903th Python tutorial out there on replit, that only teaches you about variables and printing
And a lot of these tutorials get basic stuff wrong. It makes me sad to see people get misinformed because the person making the tutorial didn't put in the effort to fact-check.