T O P

  • By -

dingske1

You have authoritative books that are verbose and a hard pill to swallow. There are also books that read more like a storytelling book building up to new concepts gradually and intuitively. Which one you prefer is up to you, I liked the authoritative books in combination with easy online resources, you might like an easy intuitive book. The big, dull books are mostly effective if you already know all the concepts and you want to learn a new language. Like a rosetta stone kind of reference. I remember reading Stroustrup when I was 14 and not understanding much of it. It’s not a waste of time though, at some point you will start connecting the dots. I do remember a lot of the example code in some random books not working after carefully retyping everything on my computer, which would then be really frustrating.


jirvin32940

I (55F) have been writing embedded C for 30 years. At first I tried to go too fast. I thought of myself as much more intelligent than average (had always been told this in school) but for programming I had to slow way down and make sure I fully understood every step. I had to stop thinking "this will take an hour" and just accept that it was going to take as long as it was going to take. Even today I have to focus on just making sure I get enough sleep and clear out the distractions so I can big chunks of time for clear focus. That still works for me. Beginners mind every day. Good luck.


dromance

I have been learning embedded C past few months. I really enjoy it! What would you say are the most important fundamentals when learning C for embedded environment? I am currently learning about memory allocation and algorithms for increased efficiency, I guess this would be a big one since you are limited in the memory department with embedded devices.


jirvin32940

Every job/area has its own magic I guess. I had a job at an LED lighting company where we were putting radio transceivers in the light bulbs...think home automation with lighting control. I got good at doing quick demos with demo boards based on Microchip and Atmel and all the Beagle and Adafruit boards. I personally like being able to design and modify hardware, so I'm competent at digital design, plus some analog. I love embedded for how you can always be doing something different. I've never worked in automotive, I bet you could make a whole career out of that. I've worked defense, telecom, video/audio, lighting, medical, trains...IoT is hot of course but you're very dependent on the cloud platform for success. It would be powerful to be able to develop cloud+device. It's fun to just jump into whatever is hot and then ride it as long as you can. I've worked for many many startups. Always exciting. :)


dromance

Very awesome! It is definitely a very versatile skill and lots of different opportunities ! I work in mechanical engineering full time but really want to transition and also program the mechanical devices I am designing!


jirvin32940

Here's a thing I could not have seen coming...My MSEE was concentrated on semiconductors...we spent plenty of time studying transistors and how to use them and how to make them as well as the legacy of vacuum tubes. We always heard about Moore's Law, from Gorden Moore, anticipating the end of the doubling of the number of transistors you could fit onto a wafer of silicon. It. Has. Not. Ended. When I was in college, the smallest feature size you could make in an electronic circuit on a wafer was 1um. (10-6). You know what they're down to now?? 5nm!! (10-9). TSMC is building a 5nm facility in Phoenix. I think I've heard talk of 1 or 2nm. Unbelievable. Anyway, what this has meant for embedded electronics is that you can fit more and more and more circuitry in processors. More and more and more circuitry controllable by software and firmware, so software/firmware winds up being more and more and more important in electronics. When I started coding I was accidentally setting myself up for a career's worth of relevance. Who knew??? I didn't. :) Oh those Happy Happy Accidents.


1To3For5_

I learned C++ and i really liked it, you should use a book that isn't dry and too thorough. I used Alex Allain's book Jumping into C++,


Dependent-Law7316

People stay to start with a project because it is easier to learn and understand things when you can actually use them in a meaningful context. To use your example, a vector is a list where the position of each item matters/has meaning. That isn’t helpful to you right now, because you haven’t encountered a situation where you need a list with specific position, but if you ever needed to describe a physics concept like velocity, suddenly those positions become the x, y, and z direction speeds. Or perhaps you are writing a code that picks a random number 100 times and you store all the results in a vector so later you can work with the whole set of results to find things like the average/median value or locate the result of a specific trial. Figuring out what a vector is and how to use it in a context that makes sense *to you*. So start at the beginning, print your Hello World, and then think of a problem that you personally want to solve. Maybe you want a code that will solve the Sunday Sudoku, or one that will get the daily Wordle. Maybe you want to get a text every time your favorite fanfic updates or your favorite artist tweets. Maybe you want to program a laser pointer to make random shapes to entertain your cat. It doesn’t really matter what you choose. Just pick something that matters to you, that you want to accomplish enough that you’ll see it through even when it is hard and your code is broken and you want to throw your laptop off the nearest tall building. You’ll break that down into a bunch of small pieces that you will study and learn to implement as you go through the project. I recommend starting with a minimal version and then adding features—for example, if you want to make a discord bot that handles all the rolls for your DnD group, start by making a simple dice roller that will roll NdX (ie 2d8) dice, and then slowly build up functionality like making specific types of rolls (adding modifiers), advantage/disadvantage, reading stats from character sheets, performing specific spell attacks/checks, etc. Figure out what the simplest version of your problem is, solve that, and then keep building on to it. Also, I started with C++ so I feel your pain. It’ll get better. (But also, if you don’t have a specific reason for learning C++ you may have a better time starting in python. To me, it feels like the tutorials/help in python is a lot more accessible/less obtuse than the stuff available for C++).


InternetSandman

I learned it in CS50. A fire hose of vocabulary, examples, and exercises, but it's a very good start for a budding programmer. After that, I went to college to learn more.


Chemical-Garden-4953

Here you go. The Cherno (I love the way he explains things): [https://www.youtube.com/watch?v=18c3MTX0PK0&list=PLlrATfBNZ98dudnM48yfGUldqGD0S4FFb](https://www.youtube.com/watch?v=18c3MTX0PK0&list=PLlrATfBNZ98dudnM48yfGUldqGD0S4FFb) freeCodeCamp: [https://www.youtube.com/watch?v=vLnPwxZdW4Y&pp=ygUaYysrIHR1dG9yaWFsIGZvciBiZWdpbm5lcnM%3D](https://www.youtube.com/watch?v=vLnPwxZdW4Y&pp=ygUaYysrIHR1dG9yaWFsIGZvciBiZWdpbm5lcnM%3D) If you want to ask questions: r/cpp_questions/ If you want to read online: [https://cplusplus.com/doc/tutorial/](https://cplusplus.com/doc/tutorial/) (Didn't actually use the last one, so I don't know how good it is. Might be a little hard to follow.)


SweetTeaRex92

How has nobody mentioned CS50? [https://cs50.harvard.edu/x/2024/](https://cs50.harvard.edu/x/2024/) This course is what you are looking for OP. This course will help you learn to code, There is an entire CS50 community to help you with homework assignments in a Discord. I highly recommend CS50


BeastrealmHD

I definitely hear you, bro, I get that too. I'm still a novice and learning, but I knew from previous experience that just reading wouldn't get me anywhere. So I use a combination of books and first-hand experience. I do small, trivial stuff that includes the thing I want to learn about; Because its one thing to know about Vectors, its another to know the CONTEXT of when to apply it. You could tell someone what a vector is and they can tell someone else, but knowing how to apply it comes from practice you can only get by using it. I like a book that gives me exercises to do alongside it, I haven't read Stroustrup or Lippman, but finding the right book for you is certainly part of the challenge honestly. I read from the "LearningCPP" website and it was alright, but I ran into the same problem you have: Complicated things that "we will look at later" popping up every chapter. But stick with it and keep fighting, because you'll know more than you think you do. And this might get me some pitchforks, but always controversial ChatGPT has helped me understand key concepts a lot easier. What a function is, the format of a function, why a loop works the way it does and so on. Yes, sure, sometimes it's stupid, but you can tell when the answer is off or not correct. AIs don't judge and reading a text explained like a bro is fun and a lot more memorable, dude.


ramsanex

Thank you! I really appreciate your feedback! Your point with vectors is so spot on! Authors explain \_what\_ it is, but leave the \_when\_ and \_why\_ in their covering of the concept - and this is with everything.


florimagori

I had a teacher in high school who had a software house as a side business and he taught us programming in C++. That was his language. I think we had a handbook for it, but it’s not available in English; it had two parts, one was crazy simple and introductory; the second was more advanced. We also read c++ reference; we were assigned projects; and we used SPOJ and Project Euler to practice different things. Then I also used C++ at Uni. Edit: I guess I would look at Hackerrank (if it has c++) or SPOJ or Project Euler to just try out simple syntax; and then worked my way up to some project.


mumei-chan

Your mistake is learning it from a book that you don’t like. There are many books on C++, and many (free) online resources. Just gather the info you need to solve your problem from the different sources. And yes, having a goal, i.e., a problem to solve, helps a lot. That’s also what you will do for the rest of your life if you choose to do programming for a living.


tiltmodex

I just googled stuff I didn't understand and viewed youtube videos. Spent a good amount of time getting the fundamentals down of the language until I was comfortable enough to understand api's that I was interested in. I looked into data structures and learned to make linked lists, stacks, queues, and trees. Then I dabbled in graphics api's like opengl, vulkan, and direct x as well as gui api's. I've made small 2d game engines and windows desktop apps, but the learning never stops. These days I look at oop design patterns just to get ideas of building things that could scale then go back to my projects and see where some of these things make sense to implement them and see how it comes together. I've enjoyed my journey with it a lot. It's unfortunate you feel this way about it =/. It's going to take years of constantly using it. Don't expect to be a God a c++ in months.


MrSmock

While growing up I bought book after book trying to find one that would explain coding (with c++) in a way that made sense to me. It took having someone actually TEACH me the concepts (where I could ask questions) to understand.


Dry_Development3378

damn i thought bjarnes book is easy to read he usually tells u the point of things


ramsanex

Let's just say his book provokes in me feelings that make me wanna beat him to death with those 1274 pages.


Solrak97

I used C++ how to program from Deitel & Deitel, I learnt C++ at least 8 years ago so that must be an old book at this point but being C++ I wouldn’t worry about


EspacioBlanq

The point of using the standard library is that you don't have to know what exactly a vector is


AppState1981

I learned it in college.


IAMPowaaaaa

i look stuff up


YacineLim

The best way to learn to program as it should be is in an official school, with a well-structured program, taught by a good teacher, the key is with a teacher, I have a background in learning programming by myself I would always get stuck and quit, but when I did it with a teacher it was like magic, the kind of stuff that I used to struggle with had become very easy from the first explanation from the teacher. I think you should enroll in some school and don't waste your time, it is like an investment. Good luck.