Where to start programming

Associate
OP
Joined
16 Nov 2011
Posts
1,526
Location
Nottingham
I need to find a way of exporting to exe too so i'll be playing around over the next month trying to find a way :) I'll let you know if I do.


As for the array, in python it would be called a dictionary. I'm pretty new to Python myself, working through codeacademy and a few books but it'd be something like this:

Code:
weight = "user input"
weight_dic = { 'Jupiter': 2.54, 'Saturn': 1.08, 'Uranus': 0.91, 'Neptune': 1.19, 'Pluto' : 0.06, 'the Moon': 0.17, 'Venus': 0.91, 'Mercury': 0.38, 'Mars': 0.38}

for key, value in weight_dic.items():
    print ("On " + key + ", you'd weigh " + str(weight * value) + "pounds.")

for Python 3


The for loop just cycles through the dictionary (weight_dic) line by line and prints out the set string + the 2 bits of info (the key and value).

Might be an even better way of doing it, not sure but I'm sure a more experienced programmer can help :)

Edit: I'd be much better at this if I could put as much effort into learn as I do into solving/looking in to things like this :p lol
I see. So I'm basically creating my own dictionary within the program, that's pretty epic, I'm sure I'll learn it at some point in the book; I don't want to get writing loads of lines of codes that I have no idea what their function is, but I do get that. I'll probably look at creating a proper trivia questionnaire at some point, the next chapter in the book deals with the 'while' function so I could use that to loop people back to the question to try again if they get it wrong, say if I'm doing a multiple option question.
I'll also keep my eyes peeled for an exe compiler, it certainly would be very helpful :D
 
Associate
OP
Joined
16 Nov 2011
Posts
1,526
Location
Nottingham
I would do the opposite. Get a solid understand of C++, especially WRT to memory management. I would also only lightly use the standard library initially and instead learn to program your own containers, iterators and algorithms. Once you are proficient and have a deep understanding on the the underlying data structures and processes within contains like queues, heaps and hash maps then you can progress to using higher level languages as time saving when appropriate.


Anyone I have worked with who started in a language like python and then tried to move to c++ really struggled, people who learned c++ and the fundamentals of data structures and algorithms had a much richer understanding, developed better architectures and had no difficulty in learning higher level languages whenever suitable for a project.


I can see the obvious advantage of starting is something like python but in the long term it is likely not beneficial.
I have no idea what you just said :(

But anyway, see here's the debate that's obviously quite popular; determining whether to start off with the 'harder' language such as C++ and then work backwards/on other languages, or to start with something like Python and then work up. I'm honestly still unsure which would be more beneficial for me, but the thing with C++ is there seemed to be a lack of books/resources for beginners which put me off. I do have the C++ primer book, however I don't think it's particularly aimed at beginners.
Are there any outstanding resources which go through the learning phase step-by-step? I feel I learn a lot better this way than watching a multitude of videos.
 
Associate
OP
Joined
16 Nov 2011
Posts
1,526
Location
Nottingham
If you want the absolute simplest programming language (IMO) which is very low level etc, then have a look at fortran. Its the language I used to write rather large quantum mechanical simulations to run on thousands of processors, and the language I used to calculate 3+3 when I couldn't be bothered to use a calculator!

The thing is, I don't want to start at the lowest level. I want a challenge, something heavily engaging. Like I said, I think the only reason I didn't start out with C++ was the lack of resources, but if I did find something I'd definitely give it a bash.
 
Associate
OP
Joined
16 Nov 2011
Posts
1,526
Location
Nottingham
A for loop is just as easy in C++ as python really, especially with c++11.


The real issue is people might go some way in python and then never be able to make the change to c++ for a variety of reasons. If they start in c++ then learning Python at a future date is required is easy, and moreover they have a very direct path into Java and C#.

How did you go about learning C++? Any recommendations for websites etc?
I have the C++ Primer book but also thinking about getting C++ for beginners 2nd ed. (3rd ed doesn't come out until June), and maybe 'Beginning C++ through Game Programming'
 
Associate
OP
Joined
16 Nov 2011
Posts
1,526
Location
Nottingham
Is OP still here?
You say your Doing a games design course(at the beginning) now this seems to be a general learning to program thread :p

Is your course actually about games design or games development? If dev then your C++ route is great.
If it's more design then I've seen too many games designers get lost it the code of things and would warn against delving too deep as the nitty gritty is un-needed in the design side

Yes I'm still here. It's a game dev course, which by the end of it we will have a proper, functional, playable game. I've already spoke to one of the tutors of the course and they've told me it's more visual perspective rather than on an actual code base, so I presume we won't be delving deep into any programming languages. He also said that the majority (if any) of it would be done in C and Java. Sorry, must've been confusing.

Not sure if I've highlighted it before, but working in the games industry would be my ideal, dream job; but not entirely necessary, at least not to start out with anyway. If that means working for a company doing software dev or something along the lines of that it doesn't really matter.
I want to be able to make games, and I want to be able to make programs.
I think I'm going to learn both through the use of a combination of internet tutorials, and then making my own (similar, but not replica of course) versions of programs/mini games, and then two books (C++ Primer, and Beginning C++ through Game Programming).
 
Last edited:
Associate
OP
Joined
16 Nov 2011
Posts
1,526
Location
Nottingham
Cool,
I would commend you on the approach, I have a degree to games programming and right now I only do games part time.
'Real' programming jobs have much better pay, and games industry jobs favour veteran programmers.
But I keep in touch regularly with friends who went to games companies, a couple who started some. I plan to go back full time once I've got some money in the bank.

After that ramble I was just going to suggest in my opinion there's no better rapid prototyping system than Unity3D you can throw a fully working, intricate multi-platform game in a month easy. A word of caution though, It has a habit of building bad coding practices, as it's very flexible.

I'd highly suggest taking a look, it's got plenty of tutorials, simple pre-written code you can look through etc
If you don't mind me asking; what do you currently do as a full-time job?
I've been told by tutors to use UDK > Unity, although I am unsure. I am aware of the no royalties with both programs, and I think it's Unity that allows $100k p/annum before you have to give any money to them, whereas with UDK it's after the first flat $50k
I think working in the games industry, as I previously said before, it's always been a dream and I'll still always apply for jobs in gaming companies (or maybe even make my own if I get a bunch of dedicated people) but I am completely aware that it's quite over-ambitious as this point in time. If I never get a job working in the industry, then I'll sure as hell still be making stuff in my own spare time still.
 
Associate
OP
Joined
16 Nov 2011
Posts
1,526
Location
Nottingham
I feel your pain (and yes, I did read the end of the thread, or rather, the newer posts).

I'm 19, and I am a University student.

I took Computing at A-Level, without having my Computing O-Level (GCSE). Pretty much all my class mates had their Computing O-Level, so starting it from scratch put me in a disadvantage.

They learned pascal, and in A-Level, we were thought Java. I was told by pretty much all my friends that there is no comparison between pascal and Java, and their background didn't really help them.

Java was easy at the beginning, when using simple loops, prints etc. but when it came to the object oriented part, it got tougher. Teachers were useless, so got my friend to pretty much walk me through it. For my A-Level, I had to do a project, and only then did I really understand how to use Java, and all its OO (object oriented) functionality. Still makes little sense in my mind, but I accept it and work with it.

Fast forward 6 months, I'm in University, and learning to program in C. First few months are simple. You pretty much just do the same things you did in Java (loops, print etc.). You get to the memory allocation part, and things get tougher. Once again, learnt nothing at all, and I had to do my project. This time, very little friends to help, so I went for it myself. Mashed it all in 4 days, and my project is done. If I had to do it, I could easily do it now.

You might ask, yes, so how is this relevant?

As a student, I used 2 languages. I have noticed that the base is the same in all languages. That loops are always used. Print/inputs are always used.

Before you swap language, become fluent in that language. Don't jump to a different language before knowing what you are doing. Finish the book, and make up projects for yourself. Some people in my A-Level course did a fully fetched chess game, including GUI, save/load functionality, undo last move, leaderboard etc. They didn't have to do something that complicated, but they did, and they learnt 100 times more than me. Only when you have really experienced a language, do I advise you to start a new language.

Good luck.
Thanks for the advice bud.
What are you doing at uni?
 
Back
Top Bottom