Jump to content

Java or Python for first language?

OkLoL

Java or Python for first language? and why?

Link to comment
Share on other sites

Link to post
Share on other sites

Python was my first. I went to a University workshop program about two years ago and that is what they taught the session in. So from there I just went and learnt the rest from trial and error, reading books etc.

Community Standards || Tech News Posting Guidelines

---======================================================================---

CPU: R5 3600 || GPU: RTX 3070|| Memory: 32GB @ 3200 || Cooler: Scythe Big Shuriken || PSU: 650W EVGA GM || Case: NR200P

Link to comment
Share on other sites

Link to post
Share on other sites

python for sure

because java is a complete mess of code that absolutely does not help learning at all

 

with python you can focus on learning how to actually code and not memorizing what weird word and symbo you need to use in 12 special cases and 8 exceptions

python is also more translatable to other languages which will make learning other stuff easier than if you started with java

NEW PC build: Blank Heaven   minimalist white and black PC     Old S340 build log "White Heaven"        The "LIGHTCANON" flashlight build log        Project AntiRoll (prototype)        Custom speaker project

Spoiler

Ryzen 3950X | AMD Vega Frontier Edition | ASUS X570 Pro WS | Corsair Vengeance LPX 64GB | NZXT H500 | Seasonic Prime Fanless TX-700 | Custom loop | Coolermaster SK630 White | Logitech MX Master 2S | Samsung 980 Pro 1TB + 970 Pro 512GB | Samsung 58" 4k TV | Scarlett 2i4 | 2x AT2020

 

Link to comment
Share on other sites

Link to post
Share on other sites

If you want to learn basic programming the Python.

But Java may be better for object orientated programming as its very similar in synttax to C# and C++.

Desktop: Intel i9-10850K (R9 3900X died 😢 )| MSI Z490 Tomahawk | RTX 2080 (borrowed from work) - MSI GTX 1080 | 64GB 3600MHz CL16 memory | Corsair H100i (NF-F12 fans) | Samsung 970 EVO 512GB | Intel 665p 2TB | Samsung 830 256GB| 3TB HDD | Corsair 450D | Corsair RM550x | MG279Q

Laptop: Surface Pro 7 (i5, 16GB RAM, 256GB SSD)

Console: PlayStation 4 Pro

Link to comment
Share on other sites

Link to post
Share on other sites

Python for learning definitely. Java is great to know how to code if you're going to make a bit more complex systems, it is more aimed towards for enterprise stuff historically  (and Android apps these days), it's what I would use if I were to make a web api or some backend application in general. Not that Python can't do that, but I'd trust Java better. You would also be hurting yourself if you would not use a proper IDE with Java, I most likely avoid touching it without one, while you easily use any text editor of your choice with Python, also better for learning experience.

 

If I were you I'd avoid people talking you out of high level or interpreted languages. The thing is, not everything is worth the time of being written in C/C++/whatever-the-fetish. That's not to say that those languages are not worth learning, do learn at least one if you're willing.

Link to comment
Share on other sites

Link to post
Share on other sites

I actually learnt Java first. It has so hard to code without IDE, seriously, it is nightmare, even for professional coder.

 

I only learned Python just because Raspberry Pi. It is so much easier. You can use PyCharm IDE to help to make it easier.

 

I do recommend learning Python as the first language, and play with Raspberry Pi!

Link to comment
Share on other sites

Link to post
Share on other sites

Generally speaking, I think Python is the better choice if you have no prior programming experience.  It's quicker to pick up than almost any other language, it's got a huge amount of free support and reference materials and tons of open source code, it's got a huge and very friendly community, and can be used for a huge range of applications.  Plus, the syntax is compact, easy to read, and very nice to work with.

 

If you're trying to get into programming in a more industry-oriented way or you want to do software development, Java might be a better starting point, since it's more widely used for software development, has been around longer, and is very entrenched in a lot of commercial uses.  But the language is painfully verbose at times (go look at a simple Hello World program in Java compared to other languages), harder to read, and slower to pick up than Python.

 

But all other things being equal, start with Python.  It's a much gentler introduction to programming and computer science.

Link to comment
Share on other sites

Link to post
Share on other sites

12 minutes ago, Azgoth 2 said:

If you're trying to get into programming in a more industry-oriented way or you want to do software development, Java might be a better starting point, since it's more widely used for software development, has been around longer, and is very entrenched in a lot of commercial uses. 

Python is actually older than Java and both are extremely popular for commercial use so I wouldn't really give Java the point for that.

1474412270.2748842

Link to comment
Share on other sites

Link to post
Share on other sites

Python was stated in like 89 or 90 and Java was like 96. Also with Django, Json, Jython and a whole host of others it's becoming quite popular. It's the number one language being taught to new programmers now.

Link to comment
Share on other sites

Link to post
Share on other sites

Perl or C, to be honest. If your only choice is between Python and Java, I'd go with Python too, although I wonder why you focus on those two. 

 

Try to avoid Java as much as possible. The language is frustrating. 

 

(Seriously though, moderators, we need a "Which language should I learn first?" sticky topic here.) 

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

On 6/24/2016 at 11:36 PM, Ronda said:

Interpreted languages are an abomination upon nature to be honest.

Care to elaborate?

Personal Rig:

[UPGRADE]

CPU: AMD Ryzen 5900X    Mb: Gigabyte X570 Gaming X    RAM: 2x16GB DDR4 Corsair Vengeance Pro    GPU: Gigabyte NVIDIA RTX 3070    Case: Corsair 400D    Storage: INTEL SSDSCKJW120H6 M.2 120GB    PSU: Antec 850W 80+ Gold    Display(s): GAOO, 现代e窗, Samsung 4K TV

Cooling: Noctua NH-D15    Operating System(s): Windows 10 / Arch Linux / Garuda

 

[OLD]

CPU: Intel(R) Core(TM) i5-6500 @ 3.2 GHz    Mb: Gigabyte Z170X-Gaming 3    RAM: 2x4GB DDR4 GSKILL RIPJAWS 4    GPU: NVIDIA GeForce GTX 960    Case: Aerocool PSG V2X Advance    Storage: INTEL SSDSCKJW120H6 M.2 120GB    PSU: EVGA 500W 80+ Bronce    Display(s): Samsung LS19B150

Cooling: Aerocool Shark White    Operating System(s): Windows 10 / Arch Linux / OpenSUSE

Link to comment
Share on other sites

Link to post
Share on other sites

37 minutes ago, VicBar said:

Care to elaborate?

Well, interpreted languages are SLOW compared to compiled languages. The difference between C++ and Python are horrendous at times. I have a program that hunts for vampire numbers, which are numbers who have factors made up of all the same digits in the number itself (1260 is the lowest with 21 * 60 being the fangs) and I can find all the ones too 1,000,000 in about 3 seconds in C++. In Python I can do it in 5 or 6. It's not a big difference in something like that, but if it's a large program you can see the problem. Note though the C++ program is 400-500 lines and I think the Python one is about 150.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, jimistephen said:

Well, interpreted languages are SLOW compared to compiled languages. The difference between C++ and Python are horrendous at times. I have a program that hunts for vampire numbers, which are numbers who have factors made up of all the same digits in the number itself (1260 is the lowest with 21 * 60 being the fangs) and I can find all the ones too 1,000,000 in about 3 seconds in C++. In Python I can do it in 5 or 6. It's not a big difference in something like that, but if it's a large program you can see the problem. Note though the C++ program is 400-500 lines and I think the Python one is about 150.

I think that comes down to a larger discussion about use case. Personally, while I do appreciate the concept, dynamic typing just leaves a bad taste in my mouth.

Link to comment
Share on other sites

Link to post
Share on other sites

5 hours ago, jimistephen said:

Well, interpreted languages are SLOW compared to compiled languages. The difference between C++ and Python are horrendous at times. I have a program that hunts for vampire numbers, which are numbers who have factors made up of all the same digits in the number itself (1260 is the lowest with 21 * 60 being the fangs) and I can find all the ones too 1,000,000 in about 3 seconds in C++. In Python I can do it in 5 or 6. It's not a big difference in something like that, but if it's a large program you can see the problem. Note though the C++ program is 400-500 lines and I think the Python one is about 150.

Because every program needs to hunt for vampire numbers right? Yes, on some workloads you can easily kill the JVM for example. But i dare you to write huge business software with C and then write it with Java, C# or whatever, you'll notice how much of a win those languages are for these kind of things. The time you save is ridiculous. The difference in performance is basically at micro-optimization level for software like that (JVM and .NET do micro-optimization in runtime btw, programs get more optimal as they run, as long as you didn't screw up something major, like your whole algorithm or something), not to mention you can definitely write great performing software with those languages. And if the gap in performance is bigger and you need more heavy metal - business will buy some. Hardware is cheap, good engineers are not.

 

EDIT: Not that I actually meant to call you out. But people should know this. There are objective reasons why kernels are written in C and most of other software is not.

Link to comment
Share on other sites

Link to post
Share on other sites

4 hours ago, DevBlox said:

Because every program needs to hunt for vampire numbers right? Yes, on some workloads you can easily kill the JVM for example. But i dare you to write huge business software with C and then write it with Java, C# or whatever, you'll notice how much of a win those languages are for these kind of things. The time you save is ridiculous. The difference in performance is basically at micro-optimization level for software like that (JVM and .NET do micro-optimization in runtime btw, programs get more optimal as they run, as long as you didn't screw up something major, like your whole algorithm or something), not to mention you can definitely write great performing software with those languages. And if the gap in performance is bigger and you need more heavy metal - business will buy some. Hardware is cheap, good engineers are not.

 

EDIT: Not that I actually meant to call you out. But people should know this. There are objective reasons why kernels are written in C and most of other software is not.

I understand that. One of the reasons why kernels are written is C, C++ is because it's so closer to the hardware and allows you to memory allocation/deallocation by yourself where a lot of the higher languages, i.e. Java, C#, Objective-C, Python etc don't let you do that. I even said It's not a big problem for something like finding vampire numbers, but for bigger programs it can be a huge problem. 

Link to comment
Share on other sites

Link to post
Share on other sites

22 hours ago, jimistephen said:

I understand that. One of the reasons why kernels are written is C, C++ is because it's so closer to the hardware and allows you to memory allocation/deallocation by yourself where a lot of the higher languages, i.e. Java, C#, Objective-C, Python etc don't let you do that. I even said It's not a big problem for something like finding vampire numbers, but for bigger programs it can be a huge problem. 

 

Can we define "bigger program," please?

 

[opinion]I think it could be easily argued that, given most programmers lack of knowledge about proper memory management, for bigger programs it can be be a huge problem NOT running managed code.[\opinion]

 

Memory leaks are much less an issue these days than they used to be since only a few really skilled (in that regard) programmers are effectively (through runtimes) able to take care of the lower level details for many programs.  Building layers of abstraction isn't at all a bad thing, in fact you mention kernels which are largely about doing just that.  That's why we use libraries... Abstractions are why we do a great many things, so that people who are more specialized in on area can both do a better job at it and simultaneously keep us form re-inventing the wheel.

 

The web would most certainly be a much different place today without managed code.

But for every rule there are exceptions.  There is also the option of running managed and unmanaged code in the same application.  Running the performance critical, large memory, or direct hardware access components in a lower language and having managed UI and business logic components (or more generally your views and controllers) is by no means an uncommon design.

Memory management is definitely something every programmer should be aware of, but unless you are targeting a specific environment (usually meaning embedded) or doing something where environmental limitations may be a concern (and I mean actual concern...not an OCD "i can save 20MB" concern), it should not really be a factor in choosing a language.  Even then typically former case the decision will be based on hardware access and in the latter case the decision will be about performance; neither of them being about memory management.

Link to comment
Share on other sites

Link to post
Share on other sites

I use Java for two years, and try to learn PHP and Python.

But I think that if I have a choice, I choose PHP for my first language.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, StolenPotoDX said:

I use Java for two years, and try to learn PHP and Python.

But I think that if I have a choice, I choose PHP for my first language.

I learn PHP then when i went to college visual basic and then on to c#. I have learnt python on my own and i do like it as a language. java, php, c# and the like are actualy rather close in syntax.

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
Share on other sites

Link to post
Share on other sites

Python will be much easier to learn from scratch than Java will be. Once you know how to code in Python, learning Java shouldn't be as difficult as learning it from scratch.

Link to comment
Share on other sites

Link to post
Share on other sites

I will go so far as to say that Python is a better language than Java period. Not perfect, but better. You can argue about performance, but the unholy union of C-style syntax and procedural paradigms combined with kludgy OO shit makes Java sub-optimal for either programming style.

 

On 6/28/2016 at 11:50 AM, Bigfootmandude said:

A lot of people say python because of its simplicity and how easy it is to write, and they are correct. Its a very clear language to understand and work with.

However, I strongly vote in favour of learning java, or CPP, or C# first.

My thoughts:

 

Python hides a lot of core CPSC concepts from you in order to make it easier. This may cause new programmers to not understand what is actually going on, and makes learning another language much harder. There are not that many languages that compare to Python, whereas Java, C#, or CPP all share similarities. Java is a lot more common than python, from my experience. I also feel that understanding OOP is crucial, due to how many different applications and languages take this approach. 

 

Java, CPP, and C# are a lot more complex, and are by no means easy to learn as a first language, but I think that the pay offs of fighting through it and learning one them are very beneficial. The core concepts learned there can be applied to a wider degree. You need a strong foundation if you are going to be doing any sort of programming long term. 

 

 

On the other hand, if you are looking to just do a bit of coding here and there as a light hobby, then yeah go ahead and learn python. 

 

For a novice programmer, low-level shit will just be confusing. As a FIRST language, simplicity and clarity is key. Once someone has mastered the basics, I think C is an essential SECOND language to learn, precisely in order to teach low-level concepts like pointers, memory allocation, the stack, blah blah.

 

Even Java is too abstracted to give an adequate picture of these concepts. It doesn't even have pass by reference.

Link to comment
Share on other sites

Link to post
Share on other sites

17 hours ago, SSL said:

I will go so far as to say that Python is a better language than Java period. Not perfect, but better. You can argue about performance, but the unholy union of C-style syntax and procedural paradigms combined with kludgy OO shit makes Java sub-optimal for either programming style.

What? Java had strong OO design paradigms, even a program as basic as HelloWorld requires the creation of a class. 

 

OP: I would suggest Python to start as it will allow you to easily learn programming concepts (logic structures, loops, etc), whereas most other languages will require you to spend more time focusing on syntax. 

15" MBP TB

AMD 5800X | Gigabyte Aorus Master | EVGA 2060 KO Ultra | Define 7 || Blade Server: Intel 3570k | GD65 | Corsair C70 | 13TB

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Blade of Grass said:

What? Java had strong OO design paradigms, even a program as basic as HelloWorld requires the creation of a class.

 

Forcing everything into a class does not make something object oriented. I'd go so far as to say that this stipulation weakens the OO nature of Java e.g., utility classes. Classes are essential to OO, but are not an inherently OO "design paradigm".

Link to comment
Share on other sites

Link to post
Share on other sites

  • 2 weeks later...
On 6/25/2016 at 6:33 AM, neonfirefox said:

Java or Python for first language? and why?

Python, the fu**rs at my college decided to go full on Java in the first year, right after procedural programming (C). So I'm still recovering from that and no I did not pass either. Talking to some professors that were against teaching Java to complete beginners said that Python was the way to go.

 

My personal opinion is that you try both, whichever one you like more you should go with that one.

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

×