Both - my interviewing skills got better mostly from doing mock interviews and exposure to the questions that would be asked during an interview, but I'd say my programming skills got better from learning more about algorithm and data structure design, as well as carefully thinking about edge cases so as to beat the battery of test cases that each LeetCode problem has.
C. I read K&R and did every exercise in it this year, and it really changed how I thought about programming, even in higher level languages. Specifically, I feel like it's made me a lot more considerate about algorithm design and detecting edge cases. More justification: https://blog.bradfieldcs.com/the-cost-of-forsaking-c-1139864...
Interviewing. I spent about 3-4 months this year working on my interviewing and competitive programming skills via LeetCode, reading The Algorithm Design Manual, and taking classes at Bradfield School of CS in San Francisco. I feel like it's made a world of difference. I know Hacker News tends to hate on programming interviews, but it really pays to be good at them (and trust me, it's a learnable skill). I do agree that the algorithms-and-whiteboard method can be highly problematic, but I've come to firmly believe that the time for criticism is when you're designing the interview for a candidate, not being interviewed.
I watched part of Udacity's "C++ for Programmers" course and was surprisingly unimpressed - their content is typically great (in my experience, like with their 3D graphics course). Udemy looks like they have some good courses - haven't tried them myself.
Honestly, I have had success with reading Stroustrup's book and doing the exercises. YMMV.
> I've been fired from my last two positions without any warning or prior notice
This feels more like the exception than the rule - especially if they are willing to spend a whole day denigrating you. Obviously, I don't have the same context as you on this, but I have never seen someone get let go suddenly for poor technical performance.
This is definitely true. However, as a sort of tangent, I think there are some types of problems in our industry that are systemic (like sexism) that can perpetually inhibit someone's success. I don't want to derail this conversation into a political one, but I also don't want to unfairly tell someone "the reason you aren't successful is because you blame others for your problems" when it may in fact be the case that the person has the odds unfairly stacked against them.
My major insight in 2016 was realizing that literally everyone has impostor syndrome. After talking to a few people about it, I've started asking pretty much everyone I meet who works in tech and found this to be universally the case (even John Carmack, according to Wikiquote - https://en.wikiquote.org/wiki/John_D._Carmack, the "Seriously? I'm good?" quote and the one at the bottom about not being Richard Garriot).
What this has allowed me to do is 1) recognize that I'm really not a failure because I can't do X, just that I haven't yet gotten experience with X, so I need to read and play/experiment with X more (and therefore there's pretty much nothing that I or anyone else _can't_ do with enough experience), and 2) learn how to better talk to my coworkers and technical friends so as not to say things that might make them feel impostor-y (because there are definitely things other say that will set off that anxiety in my brain, even unintentionally). I feel like both of these things have allowed me to be more effective and productive at work.
I've been reading _The Practice of Programming_ (Pike, Kernighan) lately; it's mainly geared towards Java and C/C++ programmers, but even as a DevOps engineer I'm finding a lot of it useful.