Advice on learning programming

Hi, so I am in my second year of uni, learning programming, and i feel like I am not getting anywhere, seems to be a waste of money. I am in my second year and so far have only learned the basics of c++, basically all I am somewhat familiar with is the topics covered here http://www.cplusplus.com/doc/tutorial/

So I feel stuck,only knowing the basics and not being taught anything new. What should I be looking at next to learn, what is the next step?

Also while I am here, does anyone know any sites or books that have, questions and answers, in which it asks you to make a certain program, then provides an answer.

you should be able to sign up for advanced courses after the first 3 or 4 basic classes. Go ahead an get into them early and take extra of them.

Not sure on answers.... most good problems need a human reviewer, as answers and approaches quickly diverge. Lets take a simple problem... write code to sort a vector. There are at least 15 algorithms, almost half of them are quite good, and the good half include approaches that are radically different from each other. And its really not a complicated question.
The way my uni works are the classes are already set, so i cannot pick different ones. The course is mostly focused on programming games, so the first year was basic c++ then other pointless classes, and now second is recapping what we done in c++ and some game engine stuff. I just need to get onto the next level, and by looks of it, i will need to learn it on my own.

I have only recently done anything with vectors, and have done no sorting of them, so maybe thats what I should tackle next. Wish there was just a set list for what to work on next
you will have to learn on your own, yes. All good degrees (high paying careers) are going to require you to do this; the unsaid fact of life is that 10 - 15 classes, each an hour a day for just a couple of months, is not sufficient to master anything at all. It gives you the basics, and you have to master it by doing on the job or on your own. Absolutely.

I don't see how you can master a game engine or game programming without having had a basic algorithms class. Maybe start there, buy a big fat algorithms book or dig in online. Data structures are largely done FOR you in c++, but news flash, there are other languages out there that don't have them. Can you make a linked list if you have to work in your next job using some language that does not have a <list> built in? You never know where you may end up having to work... my current job, I 'program' by dragging icons around on a canvas and then filling in some details inside each icon. But my background still gives me insights... just this week I cut 85% run time off a 'subroutine' because I understood what it was probably doing in the black box and how I could make it not do it that way anymore. And by background, I don't mean anything I learned in school. In school, I learned 15 ways to sort an array … half of them a waste of time :P
Last edited on
Get a good text book, and work through the exercises in it diligently.

An attractive option is Stroustrup's 'Programming: Principles and Practice Using C++ (2nd Edition)'
https://www.amazon.com/Programming-Principles-Practice-Using-2nd/dp/0321992784

It has a fair amount of exercises and there is a google group that discusses solutions to exercises.
https://groups.google.com/forum/#!forum/ppp-public
Could you solve a beginner challenge like this?
https://www.codechef.com/problems/CODERLIF
It requires only reading input with cin and a simple string operation and some output with cout.

Apart from learning the language you need to learn problem solving skills and to learn to think like a programmer.
These might be helpful
https://www.youtube.com/watch?v=YgzpqlF54lo&list=PLKQ5LYb497AZIZe9dBWy8GwLluVaMQVj0

https://www.amazon.com/Think-Like-Programmer-Introduction-Creative/dp/1593274246/ref=sr_1_3?ie=UTF8&qid=1541496357&sr=8-3&keywords=think+like+a+programmer

About algoritms:
..there are other languages out there that don't have them..

I beg to differ from jonnin. Since you have decided to learn C++ it's better to learn to use what is there.
A good book to learn about the STL is:
https://www.amazon.com/Standard-Library-Tutorial-Reference-2Nd/dp/8131791459/ref=sr_1_3?ie=UTF8&qid=1541496539&sr=8-3&keywords=nicolai+josuttis
so the first year was basic c++ then other pointless classes

You might want to describe the pointless classes here. It's possible that they are worthwhile for reasons that you don't yet understand.
Absolutely use them in C++. I was just saying that knowing the basic algorithms and structures is useful background knowledge, not that writing your own is productive when you have one already in hand.

Dhayden has a good point too. I felt the first 2 classes were useless as well, but I had already had 2 years of programming (both on the side and formal classes) in high school. I was ahead of the game, so the classes had only a few snippets to add to what I already knew. If you are not ahead of the class, you could be missing the point. If you are ahead, that is just how it works sometimes. Some schools let you take a test to bypass a class you don't need, but as often as not its just as well to take it and get your 100 average & pick up any new stuff you may have missed.
Last edited on
Go to the admin office, ask for a list of the advanced courses and ask if you can sit in one of them as a visitor/evaluator.

When I took basic classes I knew more than the teachers in some cases. Right now your just learning what's possible. The more advanced classes should give you lots of programming homework.
Thanks for all the answers everyone.

Data structures are largely done FOR you in c++, but news flash, there are other languages out there that don't have them. Can you make a linked list if you have to work in your next job using some language that does not have a <list> built in?


I believe I have a c# class one year, and it has an assignment with a linked list, which I have absolutely no idea about, so I would like to learn that too.

1
2
3
Could you solve a beginner challenge like this?
https://www.codechef.com/problems/CODERLIF
It requires only reading input with cin and a simple string operation and some output with cout.


Initially I felt confident with this, until I realised I wasn't sure how I would keep track of the amount of days of not coding in a row, after a while though I was able to figure it out. I think one of my main issues is problem solving.

join the club :) Problem solving is really the key to being good at programming. You WILL get better with it as you learn more and practice more. Almost everyone struggles with this early on. There is no magic formula... practice and experience. This is really why I recommend algorithms to people... for me at least, seeing what someone else did often immediately spawns 5 or 10 ideas on how to take what they did and use it for something slightly different.
..I wasn't sure how I would keep track of the amount of days of not coding in a row

After I solved it I had a look at other peoples solution and all the ones I saw used an array of int, a flag and a count variable iterating through the whole array.

I just read the days into a string and searched for "111111"
Topic archived. No new replies allowed.