50+ and learning to code...?

I started learning rust, instead of C++. Why? Rust has a decent package manager and standardized build system, so that takes out half the worries.

However, the language is hard. I’m learning via rustlings and I’m quite happy studying that way. I already needed to consult the internet for some help, because it had me stumped at several occasions, but I’m learning and quite excited about the language.

Good riddance they’ve got a decent language and api reference.

3 Likes

That is a significant simplification., and it is probably more relevant, given that Linux is moving in that direction.
I tried rust once… just to compile some stuff off github. I did not like cargo… it seemed to overcontrol things to me. Maybe you like that.

2 Likes

I like cargo very much. A nice, clean, clear, controlled environment.

I especially like it gets the needed stuff automatically, no fuss, builds it, and then you’ve got a nice result in a predictable location.

The Cargo.toml file is also quite useful. It is child’s play compared to cmake.

The language, however, is quite unforgiving of mistakes. I had the compiler yell at me several times already.

3 Likes

Agree with that . Cmake is torture. Plain make is OK
I am just happy that you have found something that you can get a start with.

Rust is supposed to do that… find all mistakes at compile time. C lets you make undetected mistakes that slip through and lead to run time errors.

2 Likes

Regarding cmake: there are no good tutorials out there, so everybody is running in the dark… no wonder it’s so difficult. I guess kitware (cmake’s maintainer) wants people to buy their stuff (courses, documentation, books, consulting, etc.). I don’t blame them, they need to make money off something.

Rustlings definitely assumes you have a brain, as it sends you digging in the documentation for that one function or keyword you need. Of course there’s the hint function, but that only provides the bare necessities. Good stuff.

2 Likes

I wish Julia had something like that.
I am going to look at it… I missed that in my brief visit.

ItsFOSS does have Rust tutorial

2 Likes

Dan

I’ve seen you mention “R” quite a few time here - I didn’t realise that Rust and R were the same thing…

+1

Neville

That is a significant simplification., and it is probably more relevant, given that Linux is moving in that direction.
I tried rust once… just to compile some stuff off github. I did not like cargo… it seemed to overcontrol things to me. Maybe you like that.

I watched on YouTube that some developers (even the founder) left a Linux distribution due that exists the high consideration to change all the kernel from C to R

1 Like

Rust and R are two different languages.

4 Likes

Xander

Rust and R are two different languages.

Thanks for the correction

Therefore:

I watched on YouTube that some developers (even the founder) left a Linux distribution due that exists the high consideration to change all the kernel from C to R

Must be from C to Rust

3 Likes

Agree.
I have a fixed time slot each day where I do programming or maintenance. Only a max of 2 hours.
When I go away from it for 22hours, then restart, my thinking is always clearer… more creative as you say.
The same applies to non computing tasks

The other thing about creativity is that it is not analytic. You cant find a new approach using logic. You find it by figuratively walking around looking for a new door to open.
That is where your ‘playing’ bit comes in.

2 Likes

The way I get into coding something I don’t know how to do is to start by finding example projects. I’ll see how someone else wrote their project. I’ll go in and start making small modifications and customizations to their code. When I get the hang of that, I’ll start writing my own small applications. One can build up to larger applications from there. FLTK is a good choice for a simple GUI that still provides a lot of functionality. Another option that may be worth checking out is Raylib which is specifically designed for students who want to learn programming. I also like SDL. Curses (pdcurses, ncurses, BSDcurses) is a great option if you’re creating console or command line programs and can be easier to work with in some cases. There’s a project called nbsdgames that uses curses and offers some good examples of programming with it. I believe they were looking for more programs to add the project if you want to try to create some games. Personally, I use CDetect and make or just GNU make. I find it much simpler to work with than cmake. Seems like every time I use cmake, it’s always looking for libraries in the wrong places. I use SciTE as my programming editor of choice but mainly because it’s highly customizable and I need to be able to customize my shortcut keys to be productive. CodeLite is nice if you need a debugger with a GUI interface. Version control isn’t a must when someone is just getting started with programming. It’s also one more thing you have to learn or memorize. So, you may want to wait until later to add version control to your project. If you’re looking into github, you could also check out codeberg. I personally found it easier to set up repositories with codeberg than with github. If you enjoyed programming or had no problem with assembly, I believe you can get your amazing FLOSS project created. If you’re struggling, you may not have found the right manuals and tutorials for you or you may just need more time to develop a familiarity with what you’re working with. If I can help, let me know.

5 Likes