• 1 Post
  • 12 Comments
Joined 10 months ago
cake
Cake day: December 5th, 2023

help-circle






  • Piggybacking on this:

    I’ve been wanting to learn C++ as well. I am very experienced with JavaScript, and also am very fluent with Arduino. I’ve messed around with actual C++ before but I get lost with all the pointers, header files, and memory allocation stuff.

    Are there any resources y’all would recommend to someone who has all of the programming fundamentals, but wants to learn the specifics of C++?




  • The only time I’ve ever really needed recursion is when I’m doing something that needs to map out some sort of tree or heavily nested object.

    One example that comes to mind is when I needed a function that acts like querySelector, but also searches through shadowroots. Since querySelector does not natively search within shadowroots, I had to write a recursive function that basically starts at the root and recursively searches each node for a shadowdom, goes inside, and runs itself again.

    It’s definitely not the most performant solution, but it is sometimes necessary.



  • I have been programming for years, and although I did minor in math, I can only think of 2 times that I have ever needed any math beyond that of highschool algebra. And those were very niche one-off situations. As others have stated, logic is much much more important, and a good understanding of Boolean logic will take you MUCH farther than any other math related discipline. But even still, logic is, well… logical if you just think about it. You really don’t need to take any courses on it.

    I think the main barrier for entry is that there are simply too many options and different paths to go down when beginning to learn. Also, there just aren’t too many really cool things you can do as a beginner that are truly interesting and will keep your attention. The typical “hello world” exercises are boring as hell and of course people aren’t going to keep being engaged when they’re bored.

    That’s why I usually recommend beginners who want to learn to start with an Arduino, regardless of what their final goal language is. Generally speaking, once you learn one language it’s pretty easy to learn others, as the foundational knowledge is mostly the same i.e. variables, loops, functions, etc.

    What I think is great about the Arduino is that your code produces a physical, tactile response. Usually one of the very first programs you write (which can be completed in probably 10 minutes by a beginner) is making an led flash something like “SOS”. This is leaps and bounds more interesting than something like “hello world” and will usually keep you interested and engaged much longer while learning the basics.

    I started on an Arduino many years back after stumbling upon a Paul McWhorter lesson randomly on Reddit. After becoming pretty proficient with an Arduino, I transitioned over to JavaScript and started learning web development, and I’m now a full time engineer.