[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 18 KB, 228x318, a0b.jpg [View same] [iqdb] [saucenao] [google]
5801206 No.5801206 [Reply] [Original]

I want to get into programming
But I can't decide whether to use java or C++
I mean, I am more familiar with C++ and java just seems way more difficult, so is it really?
I am considering java because I would like to make android apps as well...
Should I learn C++ and then consider java? or just jump right into java?

>> No.5801226

>>5801206
Python's the best beginner language, then transition from Python to C/C++ if you like. Java's very...nashty.
Also, there's an MIT OCW on Comp Sci for Python .

>> No.5801225

c++ is more difficult than java, java is easy but annoying. learn both though, they each have their uses.

>> No.5801253

java is a shit-ton easier than C++.

>> No.5801266

Just learn Java first. Don't get me wrong, I'm glad I learned C++ for the fundamentals and stuff, but I never use it any more. Java gives you portability and fast development and all sorts of nice GUI stuff... and since you want to make Android apps, that's even better. You'll get nearly as much learning out of Java (C++ has a few picky memory management things that you'll never have to deal with in any modern language), and you'll enjoy yourself more, so you'll be more likely to stick with it.

Python sucks.

>> No.5801272

Not only is the C++ language more complicated, but when you actually start wanting to use libraries and stuff, the c++ libraries themselves are more complicated.

Also, using libraries and stuff is especially problematic if you are on Windows, because Windows does not have any type of package/library management, and it has different file path rules, etc. I'd recommend using a proper unix system (mac,linux,cygwin,etc)

>> No.5801280

>>5801206

Obviously you should learn Haskell, the true master-race programming language.

But seriously, if you've never programmed before, I would recommend learning C first, then python. Learning C will teach you how the computer actually thinks, and also force you to learn to pay attention to low-level details and debugging. Then when you switch to python, the simple syntax/dynamic variable declarations/garbage collector will feel like taking a heavy weight off your shoulders and it will be trivial to write concise bug-free code, making a good environment to learn the concepts of OOP. Once you learn those two, stepping to Java or C++ (or most other languages in general) is a piece of cake. Perhaps then you should consider learning Haskell.

>> No.5801285

Learn Perl.

>> No.5801423
File: 210 KB, 1024x768, 1364158782401.jpg [View same] [iqdb] [saucenao] [google]
5801423

>"It is practically impossible to teach good programming to students that have had a prior exposure to JAVA: as potential programmers they are mentally mutilated beyond hope of regeneration."
>"The use of JAVA cripples the mind; its teaching should, therefore, be regarded as a criminal offense."

~Edsger W. Dijkstra

>> No.5801449

>>5801423
yea, he actually said BASIC but whatever

>> No.5801495

Learn C++11

>> No.5801499
File: 287 KB, 683x1024, 1293868064470.jpg [View same] [iqdb] [saucenao] [google]
5801499

>>5801206
>using the impostor image

>> No.5802942

>>5801280
I am actually acquainted with OOP, handling variables, arrays, nesting objects, loops, if, while..
I just used to use a C++ based program (kind of like VB) and I see java and think what the fuck is going on here. I also see there's a fuckton of xml ad that's new for me, I used to work wth a pre-arranged interaction window

>> No.5802955

>>5802942
btw I don't know if VB has anything to do with C++ what I meant was that I used a sub-language

>> No.5802963

http://learnyousomeerlang.com/introduction#about-this-tutorial

>> No.5802971

We should make a flowchart dictating which language you should learn.
Python is a great language to start with, but, ultimately, C and its derivatives are the most versatile.
You could always try MIT's structure and interpretation of computer languages course if you want to really learn what a computer language is and does, but it sounds like you want to get right to programming by doing.

>> No.5802976

>>5801206
>java seems way more difficult
That's like saying english is harder to learn than mandarin.
If you want to start with java, don't just scrounge for internet tutorials. Pick up a book like headsfirst, and you're good to go

>> No.5803004

>>5802971
>sounds like you want to get right to programming by doing.
kind of
>>5802976
>don't just scrounge for internet tutorials. Pick up a book like headsfirst, and you're good to go}noted. I was reading "java for dummies" but it is so.... well... it goes through pages to teach you what a variable is.

>> No.5803117

>>5802971
The flowchart is simple. It begins with lisp. Then it goes to C. then it switches between C and lisp forever.

>> No.5803124

>>5801206
If you want to be a professional programmer, C++ first, no questions.

This does not mean that C++ is a better language for commercial applications. It is my opinion that learning the painful but relevant details of C or C++ first better help you understanding how to program. Once you know how to program, then you can move to Java if you so wish.

If you're not aiming to be a professional programmer, than maybe Java is better for you. A much more expansive standard library will help you with your projects, along with stuff like garbage collection.

>> No.5803128

>>5803124
>If you want to be a professional programmer, C++ first, no questions.
Correction: C or C++. I don't much care between the two for this purpose. C++ has some features that IMHO don't obscure learning how to program but also make it easier on the programmer, unlike Java.

>> No.5803138
File: 31 KB, 400x189, image.jpg [View same] [iqdb] [saucenao] [google]
5803138

you guys are weird

>> No.5803165

if you cannot do both you are not a good programmer. I choose whatever language is the best then use it.

For research grade sci/math programs I use Fortran

For websites and networking with graphics and interaction i use java

for embedded systems I use assembly

for mickey mouse program that need to be done at the end of the week I use basic

c is something I rarely use because it has no niche. It could conceivably be used for alot, but doesn't have an edge in any area.

>> No.5803177

assembly x86

>> No.5803178

>>5803165
>c is something I rarely use because it has no niche. It could conceivably be used for alot, but doesn't have an edge in any area.
Except where it does, such as any system where performance is paramount, but portability is useful too.

Also for any project that's big enough that writing assembly for it all is borderline insane.

>> No.5803196

>>5803178

performance doing what? Not computation, or interrupt service routines, ... maybe graphics? I don't make many games, but I'd probably go with flash. In what application will c preform better? BTW java is better if you like portability.

>> No.5803208

>>5803196
>I don't make many games, but I'd probably go with flash.
>games
>flash
What the fuck am I reading? Are you telling me that you think you could write any modern graphics intensive program in flash? Just how retarded are you?

>In what application will c preform better? BTW java is better if you like portability.
Games are a classic example. So is Linux and operating systems in general. What language do you think your JVM is written in? Protip: C and/or C++.

>> No.5803238

>>5803208

Honestly, most games I play and the majority of games played by people are games like angry birds. I can spend hours playing games like "house of dead ninjas" on adult swim. If you don't believe flash is a major tool for making video games, I encourage you to re-think your opinion.

It's interesting that the JVM is programmed in c. You could have a point there. c may have an advantage in programming emulators.

O yea, I guess we are having a flame war ... cool

>> No.5803389

>>5803165
You should never be using java, ever. It's never the best language for anything.

>> No.5803416

>>5803196
>java is better if you like portability
Bullshit. If you want portability then code in FORTRAN90/95/2003/2008.

Java doesn't have any REAL portability. inb4:<span class="math">[/spoiler]>but mai bytecode that only can run on proprietary VMs by oracle that only really exist on their favorite os's when they give them bags of money.

>> No.5803423

http://www.amazon.com/Scientific-Computing-Undergraduate-Computer-Science/dp/1447127358/
http://www.amazon.com/Scientific-Programming-Computational-Science-Engineering/dp/3642302920/

>> No.5803429

>>5801423
Too bad most top universities teach their first course in Java...

>> No.5803465

>>5803459
>You have a very loose definition of portability if you consider this portability.
Not really. That's been covered by the word portability for quite a while. Hence terms like source code portable and portable binaries.

>> No.5803459

>>5803416
I am using FORTRAN at the moment to program a helmholtz solver. My program is not portable. In order to be run on different systems the source will have to be recompiled by a compiler written for that specific system. You have a very loose definition of portability if you consider this portability.

Why all the java hate? Is it too hard 4 u to lrn?

>> No.5803460

>>5803429
Indeed.

>> No.5803488

>>5803465

So when you say portable you mean you can copy the source code from one system to another? Then every language is portable.

>> No.5803497

>>5801206
What does being In Jail have to do with limes?

>> No.5803500

>>5803488
Except assembly.

And there are different degrees of ease of portability of source code, especially depending on how well written it is.

>> No.5803507

>>5803488
> Then every language is portable.
No. There are languages which only work on certain systems.

>> No.5803565

>>5803507
True in practice, but only because an implementation hasn't been made for that system. You know, assuming both the language and the system are Turing complete.

>> No.5803720

>>5803429
Only in there CS programs which you shouldn't be taking anyway.

In their EE/CompE programs they teach C++

>>5803459
>In order to be run on different systems the source will have to be recompiled by a compiler written for that specific system

But you don't have to fuck with the code aka it's PORTABLE. There are highly optimized FORTRAN compilers for everything under the sun.

The same can't be said of JVMs.

>> No.5803727

>>5803565
>Turing complete
People say this like it actually means something.

Stop it.

>> No.5803780

>>5803727
It does. Parsers and context free grammars aren't turing complete.

>> No.5803790

>>5801206

Learn Python.

Then learn C.

Then learn whatever the fuck you want. Each language has its uses. You need to choose one based on the situation.

>> No.5803817

>>5801423
>Edsger W. Dijkstra
>>5801449
Neither BASIC or JAVA, he said COBOL.
http://www.cs.utexas.edu/users/EWD/transcriptions/EWD04xx/EWD498.html

>> No.5803836

>>5803780
Stop pretending that your cs degree is worth anything. All computers have finite memory and finite inputs making them nothing more than DFAs. PDA/TM don't exist

>> No.5803837

>>5803817
First one was basic the second was cobol

either way the same it true of java.

>> No.5803843

>>5803836
Yes, and?

I'm sorry you're an asshole who doesn't see the utility of the model.