Author Topic: java or python or php?  (Read 11704 times)

0 Members and 1 Guest are viewing this topic.

Offline ansonbaoTopic starter

  • Regular Contributor
  • *
  • Posts: 139
  • Country: cn
  • Never stop learning
    • pcbway
java or python or php?
« on: November 04, 2016, 08:32:46 am »
I have the basic knowledge of C language,but now it is internet era,so i learn java by myself these weeks.But a few days ago,my friend suggest me to learn python or php,now i am a little confused.Java is still very powerful,should i also need to learn python or php?
I am PCBWay manager and you can ask me any questions about PCB.
 

Offline StuUK

  • Frequent Contributor
  • **
  • Posts: 390
  • Country: gb
Re: java or python or php?
« Reply #1 on: November 04, 2016, 08:59:43 am »
All depends on the use case or if you're looking to make your skills marketable. If it's the latter then I'd pick Java as there are more jobs available than the other two. C# is also a good option skills wise.

But if it's just for knocking up a quick low volume website then Java is a major overhead so just stick with PHP.
 

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 2176
  • Country: fi
  • Embedded SW/HW.
Re: java or python or php?
« Reply #2 on: November 04, 2016, 09:24:14 am »
Python is very handy scripting language with a huge number of available libraries. I have used Python for digital signal processing, data plotting, real-time video analysis, test automation, text processing, simple databases etc. and it complements Java pretty well. The PHP is more suitable for the web development.
 

Offline ansonbaoTopic starter

  • Regular Contributor
  • *
  • Posts: 139
  • Country: cn
  • Never stop learning
    • pcbway
Re: java or python or php?
« Reply #3 on: November 04, 2016, 09:52:12 am »
It's war! Programming languages are just like religions, and there are defenders for each language.
I'm hard core C user, I can write a compiler in C, but I know much less about other languages.

I would say, if you are into Android UI programming or enterprise server backend programming, try Java.
If you want to construct small website (<10k PV per day per server), then the low efficiency of PHP won't be a real issue, hence the easy to use PHP is a good idea.
Python is a scripting language, and is not used much in serving web content. Python is more used to automate jobs, such as automatically grabbing data from internet.

Again, I'm mot familiar with modern languages. All I know are C, C#, VB and PHP.




*Since your personal text indicates that you work for PCBWay, PCBWay's website seems to be written in ASP.NET, so C# may also be a good idea.

thanks,you are in US?I am pcbway manager,but not for the website code,i know our page is written by C#.But in china the java,php is more popular.Now i want to build a blog by myself,need background language,so i think may learn java first.
I am PCBWay manager and you can ask me any questions about PCB.
 

Offline ansonbaoTopic starter

  • Regular Contributor
  • *
  • Posts: 139
  • Country: cn
  • Never stop learning
    • pcbway
Re: java or python or php?
« Reply #4 on: November 04, 2016, 09:53:52 am »
All depends on the use case or if you're looking to make your skills marketable. If it's the latter then I'd pick Java as there are more jobs available than the other two. C# is also a good option skills wise.

But if it's just for knocking up a quick low volume website then Java is a major overhead so just stick with PHP.
but my friend said to me that java is easy to learn,i want to build a blog by myself,include background.
I am PCBWay manager and you can ask me any questions about PCB.
 

Offline StuUK

  • Frequent Contributor
  • **
  • Posts: 390
  • Country: gb
Re: java or python or php?
« Reply #5 on: November 04, 2016, 09:54:17 am »
It's war! Programming languages are just like religions, and there are defenders for each language.
I'm hard core C user, I can write a compiler in C, but I know much less about other languages.

I would say, if you are into Android UI programming or enterprise server backend programming, try Java.
If you want to construct small website (<10k PV per day per server), then the low efficiency of PHP won't be a real issue, hence the easy to use PHP is a good idea.
Python is a scripting language, and is not used much in serving web content. Python is more used to automate jobs, such as automatically grabbing data from internet.

Again, I'm mot familiar with modern languages. All I know are C, C#, VB and PHP.




*Since your personal text indicates that you work for PCBWay, PCBWay's website seems to be written in ASP.NET, so C# may also be a good idea.

thanks,you are in US?I am pcbway manager,but not for the website code,i know our page is written by C#.But in china the java,php is more popular.Now i want to build a blog by myself,need background language,so i think may learn java first.

If a blog is your objective stick with PHP, you're going to give yourself more work using Java for this.... hence my comment on use cases
 

Offline ansonbaoTopic starter

  • Regular Contributor
  • *
  • Posts: 139
  • Country: cn
  • Never stop learning
    • pcbway
Re: java or python or php?
« Reply #6 on: November 04, 2016, 09:55:19 am »
Python is very handy scripting language with a huge number of available libraries. I have used Python for digital signal processing, data plotting, real-time video analysis, test automation, text processing, simple databases etc. and it complements Java pretty well. The PHP is more suitable for the web development.

in my circle,none of my friends use python.most of them use java,php also not so much.
I am PCBWay manager and you can ask me any questions about PCB.
 

Offline StuUK

  • Frequent Contributor
  • **
  • Posts: 390
  • Country: gb
Re: java or python or php?
« Reply #7 on: November 04, 2016, 09:55:57 am »
All depends on the use case or if you're looking to make your skills marketable. If it's the latter then I'd pick Java as there are more jobs available than the other two. C# is also a good option skills wise.

But if it's just for knocking up a quick low volume website then Java is a major overhead so just stick with PHP.
but my friend said to me that java is easy to learn,i want to build a blog by myself,include background.

It's not that Java is necessarily hard but you'll soon run into the inevitable dependency/compile/test/edit cycle which will slow you down...
 

Offline ansonbaoTopic starter

  • Regular Contributor
  • *
  • Posts: 139
  • Country: cn
  • Never stop learning
    • pcbway
Re: java or python or php?
« Reply #8 on: November 04, 2016, 09:58:20 am »
It's war! Programming languages are just like religions, and there are defenders for each language.
I'm hard core C user, I can write a compiler in C, but I know much less about other languages.

I would say, if you are into Android UI programming or enterprise server backend programming, try Java.
If you want to construct small website (<10k PV per day per server), then the low efficiency of PHP won't be a real issue, hence the easy to use PHP is a good idea.
Python is a scripting language, and is not used much in serving web content. Python is more used to automate jobs, such as automatically grabbing data from internet.

Again, I'm mot familiar with modern languages. All I know are C, C#, VB and PHP.




*Since your personal text indicates that you work for PCBWay, PCBWay's website seems to be written in ASP.NET, so C# may also be a good idea.

thanks,you are in US?I am pcbway manager,but not for the website code,i know our page is written by C#.But in china the java,php is more popular.Now i want to build a blog by myself,need background language,so i think may learn java first.

If a blog is your objective stick with PHP, you're going to give yourself more work using Java for this.... hence my comment on use cases
i want to build a website with background,with java more complicated?but according to my friend,he also use java build his company background.

I am PCBWay manager and you can ask me any questions about PCB.
 

Offline ansonbaoTopic starter

  • Regular Contributor
  • *
  • Posts: 139
  • Country: cn
  • Never stop learning
    • pcbway
Re: java or python or php?
« Reply #9 on: November 04, 2016, 10:03:32 am »
All depends on the use case or if you're looking to make your skills marketable. If it's the latter then I'd pick Java as there are more jobs available than the other two. C# is also a good option skills wise.

But if it's just for knocking up a quick low volume website then Java is a major overhead so just stick with PHP.
but my friend said to me that java is easy to learn,i want to build a blog by myself,include background.

It's not that Java is necessarily hard but you'll soon run into the inevitable dependency/compile/test/edit cycle which will slow you down...
thanks for the information,i ever be a hardware engineer,NDT,hope you ever heard about it.Now want to learn some new tech.code is an interesting thing.if i also want to build an easy software,java is more convenient?

I am PCBWay manager and you can ask me any questions about PCB.
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 9824
  • Country: nl
  • Current job: ATEX product design
Re: java or python or php?
« Reply #10 on: November 04, 2016, 10:12:07 am »
If you want to program an awful mobile app or an awful desktop program, learn java. If you want a website, learn php or maybe HTML5. If you want back-end application, automation, IoT stuff, learn Python.
But in any case, you can learn python in a week.
 

Offline hans

  • Super Contributor
  • ***
  • Posts: 1971
  • Country: 00
Re: java or python or php?
« Reply #11 on: November 04, 2016, 10:29:45 am »
PHP is my definition of kindergarten programming languages. It's get the job done, but that's all that can be said about it. However it wouldn't be my language of choice for a backend.

Nonetheless still very popular though. If you want to build your own blog I would recommended not programming from scratch. Just install Wordpress and be done with it. You don't have to touch a single line of code.

Python is a very productive scripting language. You can build and distribute applications with it, but I don't think many companies besides Dropbox have bothered. OTOH it's nice for writing your own tools and stuff though. For Python there is also a fantastic set of libraries available. If you want to write a back-end you probably need some of those to set up a webserver.

Java could probably do that all is well, but IMO it's a bloated language. I personally don't use it.
 

Offline StuUK

  • Frequent Contributor
  • **
  • Posts: 390
  • Country: gb
Re: java or python or php?
« Reply #12 on: November 04, 2016, 10:35:14 am »
PHP is my definition of kindergarten programming languages. It's get the job done, but that's all that can be said about it. However it wouldn't be my language of choice for a backend.


Java could probably do that all is well, but IMO it's a bloated language. I personally don't use it.

Agree with both those points with caveats, don't use PHP for medium/high volume backend. Java is better for backend but be prepared for challenges. Frankly, if you're new to programming websites with front/backend separation i.e. the traditional MVC approach then avoid JAVA to start as you'll struggle.
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 9197
  • Country: de
  • A qualified hobbyist ;)
Re: java or python or php?
« Reply #13 on: November 04, 2016, 10:57:20 am »
Are you talking about Java or JavaScript? From a security point of view Java and PHP are nightmares. For managing some older network stuff with Java based UIs I need dedicated web browsers with old insecure Java versions. :palm:
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3171
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: java or python or php?
« Reply #14 on: November 04, 2016, 12:55:59 pm »
Are you talking about Java or JavaScript? From a security point of view Java and PHP are nightmares.

In terms of PHP, no, that's not true.  It is perfectly possible to write gopd secure maintaimable well structured systems in PHP.  It's also possible to copypasta hack and slash your way to having a horrible ball of insecure unmaintainable spaghetti code.  Programmers make security bugs in php systems, not the fact it is php.
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Online nfmax

  • Super Contributor
  • ***
  • Posts: 1688
  • Country: gb
Re: java or python or php?
« Reply #15 on: November 04, 2016, 01:09:00 pm »
If we are all, in fact, living inside a simulation - it's written in PHP!
 

Offline linux-works

  • Super Contributor
  • ***
  • Posts: 2076
  • Country: us
    • netstuff
Re: java or python or php?
« Reply #16 on: November 04, 2016, 02:56:50 pm »
php is crap.  no one I know respects it.

java is overly verbose and very formal.  folks from india seem to favor java for some reason.  I'm seeing a lot more python in the US and my current job is almost all python.

I don't agree that you can learn python quickly.  simple loops that you write like you'd write in java or c, sure.  but REAL python that follows the concept and style of python, that's hard.  I'm struggling to learn it as well as my peers at work - and I've been writing software for over 40 years.  its not that python is hard but it has a lot of new concepts and the syntax can be confusing until you are used to it.

java seems to be for those who can't manage memory (lol).  it has been said that business programming is done a lot in java since it can be farmed out to overseas folks and they do tend to write code in java more than anything else.  they can allocate memory all they want and 'forget' to free it and java takes care of them.  java programmers rarely make good c programmers because of this laziness.

python has taken over where perl used to own.  now, all sysadmin and other utility/tools code seems to be written in either C (still) or python.

there is even a micropython for embedded (arduino).  no such thing (never will be) for java and microcontrollers.  a jvm simply won't work on such small systems.

learn python.  its far more of a future than most other languages.  personally, I hate java and am glad I don't have to write it for a living.  I don't mind doing python, though.  I know that its where the future is, for scripting and even whole (large) projects.

Offline StuUK

  • Frequent Contributor
  • **
  • Posts: 390
  • Country: gb
Re: java or python or php?
« Reply #17 on: November 04, 2016, 03:16:41 pm »
php is crap.  no one I know respects it.

java is overly verbose and very formal.  folks from india seem to favor java for some reason.  I'm seeing a lot more python in the US and my current job is almost all python.

I don't agree that you can learn python quickly.  simple loops that you write like you'd write in java or c, sure.  but REAL python that follows the concept and style of python, that's hard.  I'm struggling to learn it as well as my peers at work - and I've been writing software for over 40 years.  its not that python is hard but it has a lot of new concepts and the syntax can be confusing until you are used to it.

java seems to be for those who can't manage memory (lol).  it has been said that business programming is done a lot in java since it can be farmed out to overseas folks and they do tend to write code in java more than anything else.  they can allocate memory all they want and 'forget' to free it and java takes care of them.  java programmers rarely make good c programmers because of this laziness.

python has taken over where perl used to own.  now, all sysadmin and other utility/tools code seems to be written in either C (still) or python.

there is even a micropython for embedded (arduino).  no such thing (never will be) for java and microcontrollers.  a jvm simply won't work on such small systems.

learn python.  its far more of a future than most other languages.  personally, I hate java and am glad I don't have to write it for a living.  I don't mind doing python, though.  I know that its where the future is, for scripting and even whole (large) projects.

oh dear  :palm:
 

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 2176
  • Country: fi
  • Embedded SW/HW.
Re: java or python or php?
« Reply #18 on: November 04, 2016, 03:25:14 pm »
java is overly verbose and very formal.  folks from india seem to favor java for some reason.  I'm seeing a lot more python in the US and my current job is almost all python.

You should try APL. You would love it as it is not too verbose.

I haven not heard that any programmer's productivity would be limited because of they cannot type fast enough due to the verbose language syntax. You may be the first one.

Java has a decent type system and helps catching typical programming errors. Python has a very poor type system, almost non-existent.
 

Offline StuUK

  • Frequent Contributor
  • **
  • Posts: 390
  • Country: gb
Re: java or python or php?
« Reply #19 on: November 04, 2016, 03:34:57 pm »
It's war! Programming languages are just like religions, and there are defenders for each language.

Yep, I guess it was a predictable outcome....

As someone who has direct real commercial experience of every single language mentioned so far in this thread I can honestly state there are always arguments for and against every language in existence....

Nevertheless, the important questions are, what are you trying to achieve, how much time do you have? i.e. the use case... it's not about which one is best "because that's what I know" but about the fundamental use case. Ever language has it's benefits and drawbacks and it's evangelists and it's detractors but that is NOT important.

The OP asked a specific question about Java, Python and PHP, his elaboration on further posts pointed towards a specific use case, in which case there are obvious choices to get him there quickly....

 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 10088
  • Country: us
Re: java or python or php?
« Reply #20 on: November 04, 2016, 04:13:26 pm »
Anybody still using JavaScript for web pages?  I used it for an internal web page where I worked but that was 15 years ago.  It's probably a dead issue...
As I recall, I used Microsoft Front Page for the theme and structure.

As discussed above, Java is a fairly simple language when you are doing fairly simple things; loops and conditionals.  It is a very BIG language and truly learning it will take a long time.  I doubt that 10k lines of code writing will be enough to explore the edges.

Just about any language can throw out HTML and image files.  I'll bet I could write a web page in FORTRAN and I know I can do it in C.

If I were a system administrator, I would learn Python.  I have also played with it for writing an assembler; it's a fun language!  If I wanted to write a 'code once, run anywhere' application (web or not), I would probably use Java.

In any event, it is worth playing with all of the languages even if only at a superficial level.  You never know when you'll run across some legacy code.


 

Online nfmax

  • Super Contributor
  • ***
  • Posts: 1688
  • Country: gb
Re: java or python or php?
« Reply #21 on: November 04, 2016, 04:24:22 pm »
Anybody still using JavaScript for web pages?  I used it for an internal web page where I worked but that was 15 years ago.  It's probably a dead issue...
Far from it! Server-side JavaScript, using the NodeJS environment https://nodejs.org/en/ is thriving: there are hundreds of thousands of packages on npm https://www.npmjs.com/ to use. Client-side JavaScript is also very much alive, again with many thousands of libraries available (though I don't use it as much).

The language itself has changed quite a bit in the last 15 years, too. Cleaner syntax, useful extensions (and better standardisation). And the bad parts are now better known and more easily avoided. There are also languages like Coffee Script which compile to JS, though again I haven't used any.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 10088
  • Country: us
Re: java or python or php?
« Reply #22 on: November 04, 2016, 04:50:25 pm »
Anybody still using JavaScript for web pages?  I used it for an internal web page where I worked but that was 15 years ago.  It's probably a dead issue...
Far from it! Server-side JavaScript, using the NodeJS environment https://nodejs.org/en/ is thriving: there are hundreds of thousands of packages on npm https://www.npmjs.com/ to use. Client-side JavaScript is also very much alive, again with many thousands of libraries available (though I don't use it as much).

The language itself has changed quite a bit in the last 15 years, too. Cleaner syntax, useful extensions (and better standardisation). And the bad parts are now better known and more easily avoided. There are also languages like Coffee Script which compile to JS, though again I haven't used any.

See?  That's what happens when you retire!  The world moves on and leaves you in the dust.

I guess if I were doing a web page, I would be looking at Node.js and JavaScript (server side, I suppose).

There is even a COBOL bridge to Node.js - how cool is that?
 

Offline ez24

  • Super Contributor
  • ***
  • Posts: 3082
  • Country: us
  • L.D.A.
Re: java or python or php?
« Reply #23 on: November 04, 2016, 05:18:31 pm »
Nonetheless still very popular though. If you want to build your own blog I would recommended not programming from scratch. Just install Wordpress and be done with it. You don't have to touch a single line of code.

I wasn't going to say it but since WP has been mentioned, another suggestion (if getting a website up is the goal) is Joomla.   Once step up the ladder and many down from the top like everyone is talking about.  Then you can learn some PHP to tweak things around if you want.  At least you would get a site (blog) up faster.
YouTube and Website Electronic Resources ------>  https://www.eevblog.com/forum/other-blog-specific/a/msg1341166/#msg1341166
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 30230
  • Country: nl
    • NCT Developments
Re: java or python or php?
« Reply #24 on: November 04, 2016, 05:22:07 pm »
I have the basic knowledge of C language,but now it is internet era,so i learn java by myself these weeks.But a few days ago,my friend suggest me to learn python or php,now i am a little confused.Java is still very powerful,should i also need to learn python or php?
If you are into webdesign then knowing PHP, Javascript ( and the use of JQuery) and SQL will be an asset.
For application programming I'm not sure what would be a good choice. C++ and C# seem to be the major ones because it is easy to deploy a binary package which can include the required runtime libraries. Java, Python, etc all need third party runtime environments which may not be compatible with the ones already installed or released in the future.
« Last Edit: November 04, 2016, 05:33:54 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->