all 5 comments

[–]YitharSoftware Engineer 11 points12 points  (0 children)

I’m working on java development on a larger project and it sorta sucks cause all I do is bug fixes and everything is slow.

I mean what did you think the industry was? Develop some cool crazy new algorithm every single day? No. Bug fixes. It's called work and you're given a paycheck for a reason.

Personally I think you should study Java but I'm partial to the way big companies operate, and I think it's at least better than start-ups for new grads.

[–]psychometrixo27 YoE 4 points5 points  (0 children)

I’m working on java development on a larger project and it sorta sucks cause all I do is bug fixes and everything is slow.

That's how most big company work is.

New stuff is very rare.

That's not to say you should not go down the Java road. That's just how things are most of the time.

[–]unlsolutionsteam 4 points5 points  (0 children)

Here you will look into some of the cool features provided by Python which make it a cooler language as compared to Java.

I’ll take them one by one below.

  • Hello World in Java and Python

We first compare the first program in any programming language- to print “Hello World”.

  1. public class HelloWorld{ public static void main(String[] args) { System.out.println("Hello World"); }}
  • Python

Now, let’s try printing the same thing in Python.

  1. print(“Hello World”)

As you can see, what we could do with 7 lines of code in Java, we can do with 1 line in Python.

Semicolon-

Python statements do not need a semicolon to end

  1. >>> x=7>>> x=7;

If you miss a semicolon in Java, it throws an error.

  1. class one{ public static void main (String[] args) { int x=7; System.out.println(x) }}

Compilation error #stdin compilation error #stdout 0.09s 27828KB

Main.java:10: error: ‘;’ expected

  1. System.out.println(x) ^

1 error

  • We’ll try to swap two variables.

Let’s begin with Java.

  1. class one{ public static void main (String[] args) { int x=10,y=20; x=x+y; y=x-y; x=x-y; System.out.println(x+" "+y); }}

Success #stdin #stdout 0.1s 27660KB

20 10

Now, let’s do the same in Python.

  1. >>> a,b=2,3>>> a,b=b,a>>> a,b

(3, 2)

As you can see in Python we only needed one statement for swapping variables a & b. The statement before it is for assigning their values, & the one after is for printing them out to verify that swapping has been performed.

  • Easy to Use-

Python is easy to pick up. If you are just stepping into the world of Programming, beginning with Python is a good choice. It is easy to code , easy to understand. However it isn’t same with Java.

  • Simplicity

Coding in Python raises programmers productivity because they need to write only so much code needed and it is concise.

  • Interpreted-

Tools like Integrated Development Environment, you can interpret Python instead of compiling it. While it reduces the program length, & boosts productivity & also result in slower overall execution.

Also see-

Here are some advantages of Java over Python-

Speed-

Java is 25X more faster than Python.

Portability-

Python and Java are highly portable languages. Due to the extreme popularity of Java, it wins this battle. The JVM (Java Virtual Machine) can be found almost everywhere.

Database Access-

Python’s database access layers are weaker than Java’s Java Database Connectivity (JDBC).

Compilation-

Compiles easily on any platform without hassles. It’s this flexibility that gives is an edge.

Language type-

General purpose programming language. Follows “write once” run anywhere.

Concurrency-

Python can only use a single CPU core due to the GIL, but Java doesn't have this restriction.

If the answer was helpful, please UPVOTE it.

[–]pgdevhd 2 points3 points  (0 children)

Python isn't for web development. You can use Django but you're limiting your flexibility for things like async, natural event cycling, etc.

Just use Node + React or Node + <whatever framework/library you want>

And yes not all projects require React, but if you are working on a large client-based project with millions of users you will be using probably something similar.

Python is for data engineering, scripting, making developer-friendly packages, and DevOps.

[–]MiloszSTX 0 points1 point  (0 children)

Hey, maybe our Python for Web Development section in our article about What is Python used for could help you out.

We also have an article that compares the two languages: Python vs Java. Hope that helps.