Jump to content

Python vs C++ vs Java vs other

IMPERIUS

Hi!

 

I'm looking into learning to programme programmes and from what I've read people were suggesting Python, C++ and Java for programmes.

What are the main differences? I'm a complete beginner, I don't have any experience. I want to start with something simple like a currency converter and then maybe move on to somethig bigger, maybe something like a bussiness programme. Which one would you suggest for me?

 

Thanks

Longboarders/ skaters message me!

Link to comment
Share on other sites

Link to post
Share on other sites

I use Python a lot and some people make their living off writing python programs.. The differences I would assume is basic setup and strings, and how commands are set up... Ive only delved into it a little bit so I can only be a little helpful.

http://pcpartpicker.com/p/pzKFqs

 

Undecided on GPU

Link to comment
Share on other sites

Link to post
Share on other sites

They are all based off C.

Structure is very similar, but uses are different.

 

I feel like C++ is used when you need to control hardware more (so for example game engines are mostly written in C++ or C), but it is much harder.

Java.. I don't know a whole lot, but my brother uses it a lot. You can do a whole lot of things, like make games or write programs and whatever. 

Python seems very good for beginning. I would like to learn it too, so I don't know a whole lot about it too.

I suggest Python and slowly moving over to Java or C++ if you are really good :)

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to comment
Share on other sites

Link to post
Share on other sites

Different programming languages are referred to as being at different "levels", this describes how close they work to core logic of a computer and generally the lower you go, the less english-like and more code-like the programming language syntax becomes. The main advantage to programming in a low-level language is that they are fast, but it also means that you have more control over the resources which your program consumes, this makes low-level languages ideal for systems programming (operating systems for example).

 

Out of the three you posted, Python is the "highest level" and allows you to do a lot with little code, it will teach you programming logic and structures and therefore I'd recommend that.

 

Java uses C style syntax and so it may be a good idea to pick this up after, as a load of popular programming languages use this style of syntax and it would set you up for a variety of programming jobs if you managed to get decent at programming using this style of language, it also puts declaring types etc. in your hands.

 

I wouldn't start with C++ as there's a lot you would have to do straight away which you would have no idea about but would be much easier to pick up once you've worked with a language Java which requires you to do a little bit more yourself.

4670k | Gryphon Z87 | SS 840 EVO | Crucial M500

Link to comment
Share on other sites

Link to post
Share on other sites

Okay so this is it:

 

Python: slower, easier to code (more forgiving and less code), somewhat portable (I mean sure basic .py files can easily be ran in terminal on OS X and Linux but apparently on Windows it's a pain to setup).

 

Java: Much less productive language (much more coding for simple things such as "Hello World!"). From my understanding everything is done in classes. Java is apparently extremely portable (e.g. Minecraft was mostly written in java which enabled it to easily be ported from Windows to Mac etc.)

 

C++: Think of this as one bad ass mofo language. Extremely powerful and not forgiving. If you want performance and power, then chose this language but if you don't check yourself, you will get wrecked. 


PART II:

 

When to use what.

 

Python: Mostly a scripting language. Best used for shorter programs or programs that don't rely on complex computations (always chose algorithm with fastest run-time)..

 

Java: If you want to easily develop a program for multiple platforms at once. 

 

C++: If you know what platform that you want to develop for and plan to develop for that platform. Just to give you an idea. Most performance based games are written in C++. Obviously 100% of the code will not be C++ but a lot of it will be. 

 

 

PART III:

 

Language difficulty (I don't know Java but from what I've seen)

 

C++ > Java > Python.

 

Recommended to learn first? If you can manage it, I'd recommend jumping straight into C++ (http://www.learncpp.com/)

 

Otherwise go straight into Python. The reason why I recommend C++ is because if you can learn C++ then you can learn other languages easily. You'll have to learn about memory management, scope, syntax, how to deal with pointers etc.

Link to comment
Share on other sites

Link to post
Share on other sites

There are quite a few. I won't list them all, but I will say the following.

 

Python is all interpreted, so you can write code in runtime and will execute it on the spot. I recommend Python if you want to start with simple programs.

 

Java is compiled and then interpreted by its own virtual machine. This means the code must be written before runtime and has to be checked for syntax correctness. I DON'T recommend Java for beginners because it's not very fast like Python and there is a steep learning curve to make even the simplest programs. Complex programs are more suited for Java and it is great for cross-platform compatibility because of the virtual machine.

 

C++ is all compiled. The code that is written can run on the OS directly or can be used to program firmware(this part is more C than C++ though). The syntax of C++ can be extremely confusing, but extremely powerful, which produces extremely high-performance software.

 

Programming itself is difficult and every language has its own nuances, so it is the concept of programming that you should understand first before considering a language. It is really up to you to decide which language you want to learn, as some people prefer to be eased into things and some people prefer getting thrown in the deep end. I know this isn't an answer for a suggestion because it is hard to suggest the "right" language for someone, if there is even one.

 

 

 

TL;DR  Concept of programming should come first, then the language. Choosing one is really up to you.

Link to comment
Share on other sites

Link to post
Share on other sites

Really it won't matter which language you pick since programming is programming. All skills are transferable between languages, the only thing that changes is syntax. As for languages Python is a great language; its easy to use and is great for beginners. C++ is another great language but the learning curve is steep at the very beginning but once you get going its fairly trivial. C++ is an extremely powerful language allowing for very high complexity high performance programs. C# is another great language and my personal recommendation for a beginner. It has very similar syntax to C++ but is simpler to use (and learn) by the programmer. You can easily create small programs with user interfaces while still being able to create large complex software projects such as games or business programs. Its not super simple but its not super crazy either, C# strikes a good balance between power and complexity. I haven't really used java at all so I can't say anything positive or negative about it.

CPU: Intel i7 - 5820k @ 4.5GHz, Cooler: Corsair H80i, Motherboard: MSI X99S Gaming 7, RAM: Corsair Vengeance LPX 32GB DDR4 2666MHz CL16,

GPU: ASUS GTX 980 Strix, Case: Corsair 900D, PSU: Corsair AX860i 860W, Keyboard: Logitech G19, Mouse: Corsair M95, Storage: Intel 730 Series 480GB SSD, WD 1.5TB Black

Display: BenQ XL2730Z 2560x1440 144Hz

Link to comment
Share on other sites

Link to post
Share on other sites

Basically, the main differences are that in Python and Java, you have to rely on code libraries to do a lot of the work, while in C++/C you can do most of it yourself. This does mean, however that you can run into more problems potentially.

 

The actual performance difference between Java and C++ isn't that significant, if you're not doing a real time programming (if you don't know what that means, you're definitely not doing real time programming). Interpreted languages like Python, Ruby, Powershell tend to be very slow compared to Java or C.

 

If you're a complete beginner, any of them would probably be fine. I would recommend C (not C++) because it's pretty simple to figure out what's going on when you're starting, and when you get into more complex things, it forces you to learn what's going on low level. Also, Python syntax is awful.

 

 

 

They are all based off C.

Structure is very similar, but uses are different.

They're not really based off C. C is a native compiled language, Java is JIT compiled and Python is interpreted, which are all completely different.

Link to comment
Share on other sites

Link to post
Share on other sites

Learn C++. Just write anything, and write more. Learn the fundamentals of programming. After you feel like you understand the basics of programming, you can decide what you want to do with it and then decide which language. 

Link to comment
Share on other sites

Link to post
Share on other sites

Start with C++ is probably not the best idea (not saying it can't be done, plenty of people learn using C++, but the learning curve is quite steep). It's been a while, but I remember those days where you forgot a ; and you had a fuckton of errors, none saying "Dude, you misse one ;"

 

Python is a great example, and you can do nice things with little work, which helps people stay motivated

Link to comment
Share on other sites

Link to post
Share on other sites

Start with C++ is probably not the best idea (not saying it can't be done, plenty of people learn using C++, but the learning curve is quite steep). It's been a while, but I remember those days where you forgot a ; and you had a fuckton of errors, none saying "Dude, you misse one ;"

 

Python is a great example, and you can do nice things with little work, which helps people stay motivated

Yeah, that's kind of the idea. If you learn something difficult, everything else will come to you very easily. And I'm pretty sure some compilers will tell you exactly what line and character it initially fails on.

Link to comment
Share on other sites

Link to post
Share on other sites

Yeah, that's kind of the idea. If you learn something difficult, everything else will come to you very easily. And I'm pretty sure some compilers will tell you exactly what line and character it initially fails on.

I learned with C (Java was just starting), and yes, learning C first allowed me to consider all other languages "easy". But yet... maybe if you first learn the basics with something like Python you can go later to C/C++ and learn the memory management and other stuff

Link to comment
Share on other sites

Link to post
Share on other sites

Basically, the main differences are that in Python and Java, you have to rely on code libraries to do a lot of the work, while in C++/C you can do most of it yourself. This does mean, however that you can run into more problems potentially.

 

The actual performance difference between Java and C++ isn't that significant, if you're not doing a real time programming (if you don't know what that means, you're definitely not doing real time programming). Interpreted languages like Python, Ruby, Powershell tend to be very slow compared to Java or C.

 

If you're a complete beginner, any of them would probably be fine. I would recommend C (not C++) because it's pretty simple to figure out what's going on when you're starting, and when you get into more complex things, it forces you to learn what's going on low level. Also, Python syntax is awful.

 

 

 

They're not really based off C. C is a native compiled language, Java is JIT compiled and Python is interpreted, which are all completely different.

I meant they would all look very similar. As in if statements would look very similar and stuff, meaning it would be easier to move over from one to another.

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to comment
Share on other sites

Link to post
Share on other sites

Start with C++ is probably not the best idea (not saying it can't be done, plenty of people learn using C++, but the learning curve is quite steep). It's been a while, but I remember those days where you forgot a ; and you had a fuckton of errors, none saying "Dude, you misse one ;"

 

Python is a great example, and you can do nice things with little work, which helps people stay motivated

I completely agree with this for C++. Very slight errors can generate pages and pages of errors. I had one typo once that gave me 4 pages of errors on g++.

I've had a lot more experience with C, though, and that kind of thing doesn't happen unless you missed a } or something like that. It's usually really easy to trace in C though; just go to the first error and fix it.

Link to comment
Share on other sites

Link to post
Share on other sites

As a final year computer games student.. C++ is like learning a new language, and programming is like an exam with small cheating tools, but no mistakes are allowed.

It can be annoying, especially when stackoverflow or cplusplus don't provide straight answers, but god is it satisfying when you finally finish something complex (currently working on procedural heightmap generation and flyweight based modular game object managers :D)

Link to comment
Share on other sites

Link to post
Share on other sites

As a final year computer games student.. C++ is like learning a new language, and programming is like an exam with small cheating tools, but no mistakes are allowed.

It can be annoying, especially when stackoverflow or cplusplus don't provide straight answers, but god is it satisfying when you finally finish something complex (currently working on procedural heightmap generation and flyweight based modular game object managers :D)

 

What the heck are " procedural heightmap generation and flyweight based modular game object managers" lol

Longboarders/ skaters message me!

Link to comment
Share on other sites

Link to post
Share on other sites

What the heck are " procedural heightmap generation and flyweight based modular game object managers" lol

Algorithm that creates random  greyscale maps, sorta like this

And that modular stuff are just dynamically created game objects with customizable settings, like health or special functionality which can be linked to other libraries like OGRE or SFML.

Link to comment
Share on other sites

Link to post
Share on other sites

Algorithm that creates random  greyscale maps, sorta like this

And that modular stuff are just dynamically created game objects with customizable settings, like health or special functionality which can be linked to other libraries like OGRE or SFML.

 

mindblow

Longboarders/ skaters message me!

Link to comment
Share on other sites

Link to post
Share on other sites

mindblow

More like boring once you are forced to research a metric butt-ton to write 50 lines of generic code.

Link to comment
Share on other sites

Link to post
Share on other sites

Hi!

 

I'm looking into learning to programme programmes and from what I've read people were suggesting Python, C++ and Java for programmes.

What are the main differences? I'm a complete beginner, I don't have any experience. I want to start with something simple like a currency converter and then maybe move on to somethig bigger, maybe something like a bussiness programme. Which one would you suggest for me?

 

Thanks

Since you're a complete beginner I would recommend Python. Remember, that regardless of what language you do choose, the most important part is getting started. Don't get too hung up on what language you're starting with as you will be able to learn languages fairly easily once you master one language.

CPU: AMD FX-6300 4GHz @ 1.3 volts | CPU Cooler: Cooler Master Hyper 212 EVO | RAM: 8GB DDR3

Motherboard: Gigabyte 970A-DS3P | GPU: EVGA GTX 960 SSC | SSD: 250GB Samsung 850 EVO

HDD: 1TB WD Caviar Green | Case: Fractal Design Core 2500 | OS: Windows 10 Home

Link to comment
Share on other sites

Link to post
Share on other sites

Hi!

 

I'm looking into learning to programme programmes and from what I've read people were suggesting Python, C++ and Java for programmes.

What are the main differences? I'm a complete beginner, I don't have any experience. I want to start with something simple like a currency converter and then maybe move on to somethig bigger, maybe something like a bussiness programme. Which one would you suggest for me?

 

Thanks

Don't learn a language, learn to program. You're going about at this completely wrong, what do you want to do? Script games? Make useful tools? Do game development? What language you learn won't matter, the better you can program and make algorythms and pattern your program and structure it the more useful your program will be.

 

You know what, don't listen to what anyone tells you is important to learn, learn Lua, learn Python, learn VBS6 if you really want to (programmers will kill you for doing that though).

 

Do you play minecraft? If so learn Lua, install the mod computercraft and just interact with minecraft with Lua.

Do you play Garry's Mod? Learn GLua, make some simple scripts to calculate stuff or give you helpful things ingame.

Do you like mucking around with Linux? Make some command line tools for Linux in C++ then, no matter what people say if you want to learn you will learn, command line tools are always helpful in the future as well.

Do you like stories? Practice making an ai in a text game using whatever language you can pick out of a hat.

 

Don't go out learning to code in a language, go out wanting to program something.

 

Lastly, Google is your friend, use Google to find your answers, ask at stackoverflow, just ask in forums or just find people like me who want to help, there are heaps of them.

 

http://steamcommunity.com/id/jubjub727

If anyone ever wants help just add me on steam and just ask for help. (Make sure your profile isn't private or I will not accept you due to the bots out there currently)

Link to comment
Share on other sites

Link to post
Share on other sites

Don't learn a language, learn to program. You're going about at this completely wrong, what do you want to do? Script games? Make useful tools? Do game development? What language you learn won't matter, the better you can program and make algorythms and pattern your program and structure it the more useful your program will be.

This ^

 

Pick what you would like to do and focus on it.

 

Once you learn the general principles, it comes to syntax and adapting. The better you are at understanding on how programing works, the easier it is to swtich.

 

I have major experience with JAVA / C# / JS/HTML and good experience with C++, PHP, RUBY.

 

At the end of the day, it comes down to deciding what you want to persue before picking up the language.

 

Do you want to make Android apps? JAVA / ANDRORID SDK

iOS apps? onjective C and SWIFT now.

 

Games?! Pick an engine ... learn the engine and its language. UNITY? C#, JS (or Unity Script as people call it).  or maybe UDK? then its the undreal script or something ... or LUA (dont quote me on this, I havent touched UDK in years .... )

 

Do you want to make some web app or some kick ass website? In this case, front end will be HTML / CSS / JS (and all those JS libs ... JQUERY, ANGULAR ... ) and then for backend PHP or maybe RUBY on RAILS?

 

Do you want to make a new engine? Or some really fast algorithm? C / C++ is your solution.

 

Do you want to write a compiler for a particular low level hardare, or some actual hardware implementation end possibly end up in a mental hospital?? Then learn assembly ...

 

The whole point is, a langauge is a mean to an end. You have to get used to the idea of programing, adaprt to the differnt enviroments and their quirks and just LEARN and LEARN and LEARN.

 

In general, make sure in your learnig process of whatever lang you pick up, that you learn programming pattenrs and proper architecture. This you can apply everywhere and it will make your life much easier to understand things once you need to jump from language to language.

 

Many business programs are written in JAVA or C# - ".net" if you are aiming only for windows... For a complete beginner, those could be good starting points since there are TONS of online tutorials and you don't have to worry about memory manegment as much as in C++. This is a web interaction, which is farly more complicated to set up and run ... many begginers get intimidated by te server / client idea of the CLOUD when they start.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×