Forget stuff when learning a new programming language.

Started by
9 comments, last by Tutorial Doctor 8 years, 5 months ago

Hello.

Around a year ago I started learning the C++ programming language.

Then, some time ago I finished my book and I'm confident that I understand quiete

a bit of the language. Maybe it sounds a bit vague, but I learned from the beginning

untill the usage of streams and exception handling (including things like templates, polyformism and the use of Dynamic Memory).

I always wanted to make a game, but for some time the in past and for some time in the future, it seems like I won't

have enough time yet to start learning how to make simple games and move up like that untill I can make my "dream" game.

But I wouldn't like to stop with programming for some time as it is my main hobby and I will probably forget stuff and get out of the "programmers mindset" if I don't do it for a longer period.

So my plan was to start making some small mobile Android applications and desktop GUI's, as that seems, after some research, easier and more reachable in my position.

And again, after some research I discovered that C++ wouldn't be a good choice for that and I read that Java is better for both.

Now I want to start with learning Java, but I doubted if I wouldn't forget the things I learned in C++, because I spent a year learning what I know and because I still want to use C++ for making games after this busy period is over.

So my question is: Do you think (maybe from your own experience) that I will forget the things I learned in C++ if I start learning Java now (keep in mind that I haven't made any "real/big" projects yet, only console, and that I maybe not have that much experience.

I hope everything is clear now and I would like to hear it if you don't understand

something or just want to know something.

Many thanks, your answer is appreciated

Advertisement

You will likely forget some aspects of C++ if you don't use the language for a long time, but a lot of what you've learned will be useful in programming regardless of the language. You won't have to start learning C++ from scratch, if that's what you're concerned about, and you will be a better programmer overall with any amount of extra practice in any language.

That said, how set are you on making apps for Android devices? You can get plenty of practice making PC programs in C++ while building on the skills you've already developed, and it makes more sense to follow through on C++ if you intend to use it in the future. If you haven't done much independent programming (by that I mean without following a tutorial or exercise in a book), then you've barely gotten started. Starting over completely with Java isn't likely to save you much time compared with making non-Android programs in C++.

-------R.I.P.-------

Selective Quote

~Too Late - Too Soon~

Besides games, what can I make using C++ (with this I mean not that complex projects, due to the time issue)?

90% of programming c++ is the same in other langauges. The memory management stuff is not in java but it's not a big deal if you can remember about pointers and allocation/deallocation. I wouldn't worry about it much.

I programmed c++ for 3-4 years then took a year programming only c#. When I went back to c++ for a project at first it was a little weird but it all came flooding back in as I started working within an hour it felt like home again.

If this post or signature was helpful and/or constructive please give rep.

// C++ Video tutorials

http://www.youtube.com/watch?v=Wo60USYV9Ik

// Easy to learn 2D Game Library c++

SFML2.2 Download http://www.sfml-dev.org/download.php

SFML2.2 Tutorials http://www.sfml-dev.org/tutorials/2.2/

// Excellent 2d physics library Box2D

http://box2d.org/about/

// SFML 2 book

http://www.amazon.com/gp/product/1849696845/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=1849696845&linkCode=as2&tag=gamer2creator-20

Besides games, what can I make using C++ (with this I mean not that complex projects, due to the time issue)?

Anything-- it's that wide open. They won't be glamorous projects, but neither will your first few games. I recommend things like calculators, notepad-like programs, simple console-interface simulators, guess-the-number, hangman, text scramblers, even just standalone demos of language features you already know or are learning.

The first "real" program I ever wrote entirely by myself simulated the Monty Hall problem any number of times the user entered and then logged the results. It wasn't much, but I learned a lot doing it. The next one generated teams of knights and then had them fight (with crummy AI) on a random battlefield with varying terrain. Both ran in the console and printed messages to indicate statuses and results.

On substance they were toys, and only barely that, but they were excellent practice.

-------R.I.P.-------

Selective Quote

~Too Late - Too Soon~

Thanks,

Could you tell me how (for example with what api) it is a good practice in C++
to make GUI's like the notepad example you gave?

Thanks,

Could you tell me how (for example with what api) it is a good practice in C++
to make GUI's like the notepad example you gave?

I don't use C++ so I'm sure there are a lot more APIs than I know about. I've used SFML's C# bindings and found it easy to use, and it's a good tool for getting things on the screen.

-------R.I.P.-------

Selective Quote

~Too Late - Too Soon~


Could you tell me how (for example with what api) it is a good practice in C++
to make GUI's like the notepad example you gave?

Wxwidgets

edit -


So my question is: Do you think (maybe from your own experience) that I will forget the things I learned in C++ if I start learning Java now (keep in mind that I haven't made any "real/big" projects yet, only console, and that I maybe not have that much experience.

It depends on how good your memory is and how much experience you have in C++. But I would suggest you learn C++ and either Java or C# and if you have time take a look at a language like lisp for educational purposes. Why don't you pursue some smaller projects in both C++ and Java?

-potential energy is easily made kinetic-

Could you tell me how (for example with what api) it is a good practice in C++
to make GUI's like the notepad example you gave?
Qt is awesome in how it works and (most importantly) in documentation / tutorials.

As for forgetting about parts of a language, yes you will forget details when you don't work with it. That is however not important. The only thing you need to remember is what things exist in a language, eg "streams" or "templates" etc. You also need to know when to use what. Luckily, the latter is pretty much the same with all (imperative) languages. In other words, streams exist in some form in many languages, templates exist in some form in many languages, but templates always solve the same kind of problem, so you use them always for the same purpose, in all languages.

The details are all a little different between languages, but if you know what you are looking for (say "creating a stream") it's easy enough to look the details up in a book or the Internets.

Thanks,

Could you tell me how (for example with what api) it is a good practice in C++
to make GUI's like the notepad example you gave?

Well, if your working with windows, The Forger's Win32 is a good starting point. It will give you the bare bones behind the win API. You end up with a nice MDI text editor at the end. After that Reliable Software's tutorial series will reiterate basics in an OOP way. With those 2, some time, and a few trips to MSDN to clear up some fuzzy spots, you can come up with all kinds of basic gui programs. Once you have a grasp of what working with the windows API is like, you will likely want to try some of the other recommendations here, like QT and wxWidgets. I've not tried either so can't give any recommendations, but have heard great things about both.

Don't fret forgetting. I've forgotten so much already that it seems I shouldn't have anything left to forget, but my knowledge continues to grow. Ditto for switching to a new language. I started with basic, moved to pascal, then Javascript/PHP and am happy to live in the world of c++ now. Each language produced a set of hurdles for me, and with time, each hurdle became a stepping stone to better things.

Start something(anything), keep at it, and grow your skills. The journey of a million miles begins with a single step.

This topic is closed to new replies.

Advertisement