Dolphin, the GameCube and Wii emulator - Forums

Full Version: Should I learn java or C++ first?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10
So you're saying C++ can lay a good foundation for learning other languages right? the difficulty isn't my main concern cause naturally in this sort of things the 1st step is always the hardest Wink
(12-13-2011, 05:12 AM)Runo Wrote: [ -> ]
(12-06-2011, 01:50 PM)NaturalViolence Wrote: [ -> ]C++ can be pretty fun to use once you get past the first few months of wanting to throw your computer out the nearest window every time something goes wrong.

Omg that is so familiar ^^

@ExtremeDude2

I wouldn't recommend C/C++ for a first language when people ask because I tried learning it first when everybody around me told me to go with visual basic. I don't know visual basic, but C++ was like a continuous kick in the face until I got the grip of it (which took months). Obscure error messages that make no f*cking sense made me waste hours trying to get some simple console application to compile, just to discover after a long search that the mistake was so obvious and simple to solve that I'd rather throw myself and not the PC through the window.

After learning C++, which I'm still not very good at, every other language turned so simple and easy to learn that I can actually get good at them and do much more than what I do in C++ in less than a month.

But then if getting your ass raped hard when you are learning C++ is normal like NV says (I always thought it was me) I'd say start with it, it's much better than any other thing imho.
Still there are other things you might want to try, like right now I'm into JAVA, because I want to develop for Android, which seems moderately easy and gets you making apps sooner than Windows (which might have been another reason for me to find it so hard, even after I got the language going I found the Windows environment very difficult, there is always some minimal detail here or there, and don't even talk to me about DirectX, I still can't do shit with that, while OpenGL just beautifully teaches itself to my brain.)

Android just added support for C++, so you can write in that for Android and iOS.
(12-13-2011, 06:16 AM)HawaiianPunch Wrote: [ -> ]Android just added support for C++, so you can write in that for Android and iOS.

¬¬

God, how could I have not seen that anywhere? I just found out that I've wasted the last month of my life but that's ok, this information makes up for that, I guess ^^
Now, back to C++...
Java or C++ as first language?

I would say neither.

I think you should try learning an easier language at first rather than going directly into Java or C++.

Depending on your skills I could suggest you what you should take:

If you are a very good mathematician I would suggest you to start with functional programming languages like Scheme or Haskell: Haskell Wikibook or Haskell Book. Normaly the MIT teaches Scheme as the first language for an student in a CS course.

However, if you aren't very good with maths, then it's better to start with imperative languages (like C++ or Java) in these case I would suggest to you Ruby: Ruby Tutorial. Ruby is an easy to understand, easy to use, multipurpose language. I think it's better to learn Ruby first since it does emphasis on basic algorithm structures and leaves aside more machine like stuffs such as types, memory space and performance. After learning ruby, you could learn Java. Also ruby is quite useful for making web applications (most likely twitter was made with Ruby On Rails)
This is a bit unrelated, but I have a quick C++ question. I'm writing a program to calculate a sine value and I copied the printf line below from a website. However, I want to use cout, so I converted it. The conversion works fine, but I was wondering if there's a more effecient way to convert it because the cout implementation uses quite a few more lines.
[Image: 6501775467_24fc260b72_d.jpg]
(12-13-2011, 08:40 AM)HawaiianPunch Wrote: [ -> ]This is a bit unrelated, but I have a quick C++ question. I'm writing a program to calculate a sine value and I copied the printf line below from a website. However, I want to use cout, so I converted it. The conversion works fine, but I was wondering if there's a more effecient way to convert it because the cout implementation uses quite a few more lines.
[Image: 6501775467_24fc260b72_d.jpg]
Code:
cout    << "the sine of " << param
        << " degrees is " << result << endl;
(12-13-2011, 08:27 AM)BlinkHawk Wrote: [ -> ]Java or C++ as first language?

I would say neither.

I think you should try learning an easier language at first rather than going directly into Java or C++.

Depending on your skills I could suggest you what you should take:

If you are a very good mathematician I would suggest you to start with functional programming languages like Scheme or Haskell: Haskell Wikibook or Haskell Book. Normaly the MIT teaches Scheme as the first language for an student in a CS course.

However, if you aren't very good with maths, then it's better to start with imperative languages (like C++ or Java) in these case I would suggest to you Ruby: Ruby Tutorial. Ruby is an easy to understand, easy to use, multipurpose language. I think it's better to learn Ruby first since it does emphasis on basic algorithm structures and leaves aside more machine like stuffs such as types, memory space and performance. After learning ruby, you could learn Java. Also ruby is quite useful for making web applications (most likely twitter was made with Ruby On Rails)


These languages you suggested aren't really useful... If he want to learn alone it must be something that gets you doing stuff fast, otherwise he'll end up bored... That's why people who learn for themselves normally start with a powerful language, academic methods sucks. A lot of people don't like eletronics because in school the little shit we learn is totally theoric and full of unecessary details. Details I observed for myself when I saw my first circuit functioning, which was much more fun than reading on a book. Of course a programming language will be a lot of theory, but I wouldn't base myself on any school/college methods to teach myself anything, these are old and out of date, and it was meant to teach a lot of people at once.
(12-13-2011, 10:45 AM)Runo Wrote: [ -> ]These languages you suggested aren't really useful... If he want to learn alone it must be something that gets you doing stuff fast, otherwise he'll end up bored... That's why people who learn for themselves normally start with a powerful language, academic methods sucks. A lot of people don't like eletronics because in school the little shit we learn is totally theoric and full of unecessary details. Details I observed for myself when I saw my first circuit functioning, which was much more fun than reading on a book. Of course a programming language will be a lot of theory, but I wouldn't base myself on any school/college methods to teach myself anything, these are old and out of date, and it was meant to teach a lot of people at once.
Excuse me man, these languages may not be the most common, but they are definetly USEFUL. (You are also wrong by calling them OLD when they are even younger than Java)

For instance, Ruby with the framework Ruby on Rails which extends the language for web applications. You wouldn't imagine how fast things are built with it. I was able to program a complete internet forum in less than 300 lines of code within Ruby on Rails, I not even had to make the database and it's mapping because the framework did it in it's own. All i did was transform the UML diagrams into classes, fill them up and set the configuration and controllers and the rest was automatic.

Haskell in the other hand is a purely functional programming language made up for developers. It's quite useful for making simple applications in very little time. In haskell things that would take like 50 lines of code in Java, they can take up to 5 lines of code or less. Let's take for example quicksort:
Code:
quicksort [] = []  
quicksort (x:xs) =  
    let smallerSorted = quicksort [a | a <- xs, a <= x]  
        biggerSorted = quicksort [a | a <- xs, a > x]  
    in  smallerSorted ++ [x] ++ biggerSorted
That's it, how many lines would you need in C or java for a generalised quicksort ? I think you get the idea. Another great advantage is paralellism. Since Haskell is purely function and lazy to hell, it benefits automatically from paralelism without the programmer having to worry about synchronization.
saving code lines...
whats that?
an argument?

refactoring... gl hf

sorting algo as examples...
iam feeling like in the first term

oh man did you see that...
i sorted my stack of cards with bubblesort
never used again
(12-13-2011, 12:15 PM)dannzen Wrote: [ -> ]saving code lines...
whats that?
an argument?

refactoring... gl hf

sorting algo as examples...
iam feeling like in the first term

oh man did you see that...
i sorted my stack of cards with bubblesort
never used again

that means a project which would take you 1000 lines in an imperative language, you could do it in 100 in Haskell, SAVING a good amount of TIME. In Software Engineering time is a high priority.

I just gave a common example, I could bring up something more useful like a file compressor or something alike.
Pages: 1 2 3 4 5 6 7 8 9 10