Python vs PHP vs Java

Which is the most difficult to learn, Python, PHP or Java?

  • Python

    Votes: 10 15.4%
  • PHP

    Votes: 7 10.8%
  • Java

    Votes: 48 73.8%

  • Total voters
    65

හෙනයා

Well-known member
  • May 23, 2014
    16,729
    16,832
    113
    Kottawa
    කොකත් ඉගෙන ගන්න එක වටිනවා. ඒ උනාට අපි ඉගෙන ගන්න ඕනි අපි දන්න ටිකෙන් වැඩ තොග පිටින් දාන්න පුලුවන් එකක්.

    දන්න එකෙන් වැඩ තොග පිටින් දාගන්න නම් JS / TS තමයි.. desktop, web, mobile, back end 😏
     

    lakziro

    Well-known member
  • Mar 19, 2018
    390
    580
    93
    Don't fight over languages...:lol: the people who fight over them are kids or probably the people who just "know" that language...:yes: they don't know anything beyond the "language".

    That's one way to differentiate between a software engineer and a coder..language is just a tool we use to solve a certain task.

    Coming back to your question, out of the three, java is the most difficult one to learn if you don't have any programming background.

    Java:
    Has a fixed oop style. (You need to oop well)
    Statically typed (which means you cannot just type in anything and expect it to work)
    Has a very cumbersome syntax..its a bit heavy and you need to pay a bit more attention to your coding (rather than logic)
    Lots of language features (which means it takes a long time to master)


    Java has a clear difference from the other two...its a static language, where as php and python are dynamic..(which means the code is more forgiving, yet it tends to be buggy)

    Imo, the second difficult language is PHP.

    It is dynamically typed
    Supports structural or oop paradigms
    Beginner friendly (easier if you come from a c background)
    Has a huge standard library (lots of features out of the box, so you have lot to learn)
    Very incosistent (a beginner may not catch this, but it has incosistent naming etc). This doesn't make it difficult to learn though.
    Used for web mostly..has lots of oop features..latest versions like 7 and up coming 8 are going well.
    Better stick to some programming guide lines like psr and you will be good.
    Has lots of frameworks (good ones indeed, like laravel)

    Python:
    Has a simple syntax, and very easy to learn.
    It encourages simplicity
    Supports structural and oop (a bit weird oop syntax, personally i don't like it). But it doesn't matter for a beginner.
    Has lots of features out of the box.
    Many similat methods exist in the standard library to the same thing..for ex.for iterables. They do have different purposes, but look alike...so a beginner may get confused. (You won't be worried about them as a beginner)
    Can be used for web and general purpose scripring
    Doesn't support web like php does. But has beautiful frameworks like django.
    Has coding guidelines like PEP, try to adhere to them from the beginning..
    ...oh...and don't forget to read the zen of python ;)

    Final thoughts..
    Php and python both are good choices for a beginner. If you start with php, you will find it a lot easier to move to other languages because it inherits certain features from C..including the syntax. Both are dynamic, which means you won't be forced to declare variables, or worried about their type..this ia good for beginners (but they lead to buggy codes, hard to maintain)

    Php 7 has strict typing...but as a beginner you shouldn't worry about that. Get the basics and learn the stuff..

    Python can be learned in a week. But its not easy to master. And its an art of its own :) unlike coding in php, python makes you feel different (but trust me, it makes it difficult to learn languages like javascript)..

    All of the above are my personal experiences and my personal views.

    I have used php since 2008 :) that's about 12 years now.

    I have used python since 2014, thats about six years :)

    So i have spent quite a long time with both the languages and seen their faults and beauties...php and python are both good languages..and have a good market..but python is used in machine learning related stuff because lots of libraries are written with python, and its good at crunching the numbers. So if you have plans to move to data science, python is a good start. But if you plan to become a real programmer, focus on writing elegent logics..

    Once you reach that level, you will stop fighting over languages like kids :lol: learn more than one language..good luck..ask me if you have any questions.
    After I read this .I feel my whole programming life is emptiness. Anyway I hope so much to developed myself with those advice. You had put good stuff I so lucky to add something important to my life.

    This push me to learn me more things. Actually I didn't want to larn java. Becourse I feel It's like my grand pa. Out of fashion and very serious ha haaaaa.....
    Otherwise I learn what I like. I dont know am I right .but i dont focus on job market. I want to build new things seriously in engineering field so I hope java is not belongs to my path.


    I did small brainstorm and choose to learn python and js. So now i am on the way ha haaa...
    But to fullfill my degree its important to learn java. But I dont feel any important of that. but now I know it's difficult to cut the tree ee using sword rather than axe.
     
    Last edited:
    • Like
    Reactions: OrangeHat

    හෙනයා

    Well-known member
  • May 23, 2014
    16,729
    16,832
    113
    Kottawa
    After I read this .I feel my whole programming life is emptiness. Anyway I hope so much to developed myself with those advice. You had put good stuff I so lucky to add something important to my life.

    This push me to learn me more things. Actually I didn't want to larn java. Becourse I feel It's like my grand pa. Out of fashion and very serious ha haaaaa.....
    Otherwise I learn what I like. I dont know am I right .but i dont focus on job market. I want to build new things seriously in engineering field so I hope java is not belongs to my path.


    I did small brainstorm and choose to learn python and js. So now i am on the way ha haaa...
    But to fullfill my degree its important to learn java. But I dont feel any important of that. but now I know it's difficult to cut the tree ee using sword rather than axe.

    if you don't like it, don't want to learn it or it's not in your path no problem at all. but if you are going to compare it with others without actually knowing it you become a joker ha haaaaa... :rofl:
     
    Last edited:

    lakziro

    Well-known member
  • Mar 19, 2018
    390
    580
    93
    if you don't like it, don't want to learn it or it's not in your path no problem at all. but if you are going to compare it with others without actually knowing it you become a joker ha haaaaa... :rofl:
    I am always joker ha haaaaa... that's the title I most like. When madness is came top my behevior like that. Ha haaaa.... know and learn is 2 type of things.bty I like to be joker
     
    • Like
    Reactions: OrangeHat

    හෙනයා

    Well-known member
  • May 23, 2014
    16,729
    16,832
    113
    Kottawa
    I am always joker ha haaaaa... that's the title I most like. When madness is came top my behevior like that. Ha haaaa.... know and learn is 2 type of things.bty I like to be joker

    giphy.gif
     
    • Like
    Reactions: OrangeHat

    හෙළයෙක්

    Well-known member
  • Apr 26, 2014
    48,464
    98,395
    113
    පයිතන් තමා බ්‍රදර්. අපි ඉන්නේ 2020 සේ. නැතුව බිෆො 2015 නෙවේ. මෙව්වා දැන් ML AI Data science deep learning wage දේවල් එක්ක දුවන්නේ . අනිත් එව්වා ඉගෙන ගෙන උබලා ෆාමසි මැනගෙමන්ට් සිස්ටම් ගහ ගහ ඉන්නද ජීවිතකාලෙම. අවුලක් නෑ ඒත් බන් උබලා දන්නේ උබලාගෙ ඩ්ගී එක ගන්න කොස් එකේ කරන ටික විතරනේ. එතනින් එහා මොනාද තියෙන්නේ කියලා බලන් නෑනේ. පව් ඕයි.


    Stact ගනින් ඔක්කොම දුවන්නේ පයිතන්. පයිතන් කියන්නේ කඩුවක් වගේ තමා ඕනි පැත්තකට කෙටුවෑකී.

    දැන් ඉතින් ලෙජන්ඩ්ලා ටික රෙද්ද උත්සන් එන්න එපා ඈ. ඔයාලත් ස්ටේබල් නේ පොඩ්ඩක් move වෙලා එහෙම අනිත් language ගැන එහෙම බලන්න පොඩ්ඩක් වත් කැමති නෑනේ.

    'අපිට ඉගැන්නුවෙ මොනාද .. ජාවා
    එහෙන්ම් අපී හැම දේම මැරෙන කම් කරන්න ඔනී මොකෙන්ද?.. ජාව වලින්'

    කොකත් ඉගෙන ගන්න එක වටිනවා. ඒ උනාට අපි ඉගෙන ගන්න ඕනි අපි දන්න ටිකෙන් වැඩ තොග පිටින් දාන්න පුලුවන් එකක්.

    නැත්තන් ෆාමසි සිස්ටම් හදලා වර්ටුසා වගේ එකක කබුරපන් ගිහින් ඒක සෝක්. කොමත් උබලා කැමති ස්ටෙබල් ලයිෆ් එකකටනේ.
    python hype එකේ තියෙන්නෙ. Julia වගේ ලැන්ග් එකක් ලගදිම ඕක පාස් කරනව. දන්නවද ඔය බිග් ඩේට ගොඩක් ඒව දුවන්නෙ ජාව වලින් කරපු මිඩ්ල්වෙයාර් වල කියල. එව්ව නැතුව Deeplearing වලින් කරන්න වෙන්නෙ බල්ලො පූසො හොයන එක තමා. GO වලින් තමා ඩොකර් Kubernetes කරල තියෙන්නෙ ඒව නැතුව පයිතන් වලින් විතරක් කරනව නන් ඉතින් ගෙදර තමා තියාගන්න වෙන්නෙ ඔය මොඩල් ට්‍රේන් කරල සර්වර් එහෙම පට්ට ගනන් යනව.

    එහෙම හැම පැත්තටම කොටන්න පුලුවන් කියල ලැන්වේජ් ඩිස්ක්‍රිප්ශන් එකේඑ තිබ්බට සමහර කෙටිලි බම්ප් වෙලා ආපහු මූනෙ වදිනව.

    ලැන්වේජ් කියන්නෙ පිහි වගේ සීන් එකක් පාන් කපන එකෙන් කොස් කපන්නත් බෑ කොස් කපන් එකෙන් පාන් කපන්නත් බෑ. කපන හැටි විතරක් ඉගෙන ගනින් ඊට පස්සෙ වැඩේ හැටියට පිහිය තෝරල කපන්න තියෙන්නෙ.

    අනික බන් ස්ටේබල් කිය්ල ස්ටේටස් එකක් නෑ මේ සොෆ්ට්වෙයාර් ෆීල්ඩ් එකේ හැම වෙලේම අප්ඩේට් වෙවී ඉන්න තියෙන්නෙ.
     
    Last edited:

    Anonymous_Abstract

    Well-known member
  • Aug 7, 2018
    6,036
    4,566
    113
    Messier 87
    mulinma data structures iganaganin, ita passe algorithms, ita passe problem solving, graph theory peththata palayan. language igena gaththata vedak na aduma gane segment tree ekak vath ghanna beri nam. code karanna ona ekekta puluwan eth code karana kota hithin time and space complexity, heap and stack memory allocation mange karala functional programming valin code reduce karala ghanna godak unta ba
     

    Edward Kenway

    Well-known member
  • Jan 8, 2015
    12,350
    13,952
    113
    python hype එකේ තියෙන්නෙ. Julia වගේ ලැන්ග් එකක් ලගදිම ඕක පාස් කරනව. දන්නවද ඔය බිග් ඩේට ගොඩක් ඒව දුවන්නෙ ජාව වලින් කරපු මිඩ්ල්වෙයාර් වල කියල. එව්ව නැතුව Deeplearing වලින් කරන්න වෙන්නෙ බල්ලො පූසො හොයන එක තමා. GO වලින් තමා ඩොකර් Kubernetes කරල තියෙන්නෙ ඒව නැතුව පයිතන් වලින් විතරක් කරනව නන් ඉතින් ගෙදර තමා තියාගන්න වෙන්නෙ ඔය මොඩල් ට්‍රේන් කරල සර්වර් එහෙම පට්ට ගනන් යනව.

    එහෙම හැම පැත්තටම කොටන්න පුලුවන් කියල ලැන්වේජ් ඩිස්ක්‍රිප්ශන් එකේඑ තිබ්බට සමහර කෙටිලි බම්ප් වෙලා ආපහු මූනෙ වදිනව.

    ලැන්වේජ් කියන්නෙ පිහි වගේ සීන් එකක් පාන් කපන එකෙන් කොස් කපන්නත් බෑ කොස් කපන් එකෙන් පාන් කපන්නත් බෑ. කපන හැටි විතරක් ඉගෙන ගනින් ඊට පස්සෙ වැඩේ හැටියට පිහිය තෝරල කපන්න තියෙන්නෙ.

    අනික බන් ස්ටේබල් කිය්ල ස්ටේටස් එකක් නෑ මේ සොෆ්ට්වෙයාර් ෆීල්ඩ් එකේ හැම වෙලේම අප්ඩේට් වෙවී ඉන්න තියෙන්නෙ.

    මූට JS සෙට් වෙයි කියල උඹට හිතෙන්නේ නැද්ද? :rofl: ඕනේ තැනයි එපා තැනයි ඔබ ඔබ ඉන්න පුළුවන්
     

    හෙළයෙක්

    Well-known member
  • Apr 26, 2014
    48,464
    98,395
    113
    මූට JS සෙට් වෙයි කියල උඹට හිතෙන්නේ නැද්ද? :rofl: ඕනේ තැනයි එපා තැනයි ඔබ ඔබ ඉන්න පුළුවන්
    දැන් තව අවුරුදු 2කකට විතර ඕකව පයිතන් වලින් ගලවනව බොරු.
    JS කෝඩ් PHP කෝඩ් එහෙම බලන්න අප්පිරියයි හරියට ලිව්වෙ නැත්තන් හැම තැනම වේරියබල් දාල වනසනව ඉන්දියන් උන් එහෙම නන්. ඒ දෙකෙන් නන් කරපු කොට බාරගන්නෙ 1 ට 10ක් වත් තියල.
     

    Edward Kenway

    Well-known member
  • Jan 8, 2015
    12,350
    13,952
    113
    දැන් තව අවුරුදු 2කකට විතර ඕකව පයිතන් වලින් ගලවනව බොරු.
    JS කෝඩ් PHP කෝඩ් එහෙම බලන්න අප්පිරියයි හරියට ලිව්වෙ නැත්තන් හැම තැනම වේරියබල් දාල වනසනව ඉන්දියන් උන් එහෙම නන්. ඒ දෙකෙන් නන් කරපු කොට බාරගන්නෙ 1 ට 10ක් වත් තියල.

    ඔය දෙකේම ඕන ලබ්බක් දුවනවා නෙ. ලියන උන්ගේ වැරැද්ද ඉතින්.

    2020 PHP හරි JS හරි බල්ලෝ බත් කන්නේ නැති විදිහට ලියනවා කියන්නේ අපරාදයක්
     

    wpmanoj

    Well-known member
  • Nov 18, 2010
    2,630
    6,382
    113
    මම කෝඩින් කරන්න අරන් දැන් දශකෙටත් වැඩියි. වැඩේ පටන් ගත්තෙ php වලින්. ම‌ොකද වෙබ් මැගසින් ඒකක් කරන්න රට වටේම ලංකාවේ පකේ ඩිවෙලොපර් කෙනෙක් හොය හොය ගිහිල්ල ඔක්කොම වගේ වර්ඩ්ප්රෙස් ඒහෙක් මෙහෙක් කරනවා ඇරෙන්න වැඩි දෙයක් දන්නෙ නැති ඒවුන් කියලා උන්ම කිව්වට පස්සෙ. php පට්ට ලේසියි ඉගෙන ගන්න. මෙලෝ මගුලක් දන්නෙ නැති මමත් නිකම්ම වගේ ඉගෙන ගත්තා. ඒ්ත් php වලින් පටන් ගන්න කියල නම් මම ඉගෙන ගන්න ඒකෙක්ට නම් ඒච්චර රෙකමන්ඩ් කරන්නෙ නෑ.

    වැඩියෙන්ම හොද කොඩින් හදා ගන්න වගේම ප්‍රශ්ණ වලට මුහුණ දීල ශාප් වෙන්න නම් "C" ‍‍‍‍‍‍‍‍වලින් පටන් ගන්න ඔ්න. දැන් කියන්න ඒපා C පරණයි, ලැජ්ජ නැද්ද පප්පා ලැන්ග්වේජ් වලට යන්න, OOP වත් නෑනෙ ඔ්යි කියලා.

    කොච්චර පරණ උනත් C කියන්නේ හිතා ගන්න බැරි යෝධයෙක්. වෙන මෙලෝ මලදානයක් ඔ්න නෑ. C හරියට දන්න ඒකාව ජොබ් හොයාගෙන ඒනවා. Freelance කරන ඒකෙක් නම් කරන්න බැරි තරම් වැඩ ඒනවා. විහිළු වැඩ නෙවේ C වලින් ඒන්නේ. අවුරුදු ගණන් ඇදෙන මිලියන බර ගණනන් වැඩ. අනික ඒතනින් c++, c#, php වලට නිකම්ම ස්ටෙප් ඒක තියන්න පුළුවන්. මොකද මේ තුනේම 90% වගේ තියෙන්නේ c කොඩින්ග් ස්ටයිල් ඒක. ඒ් ලැංග්වේජ් හදපු නිර්මාණ ශිල්පියෝ c වලින් වැඩකරපු අය නිසා.

    මම php, java, c#, c++, javascript, lua වගේ ලැංග්වේජ් කීපයක්ම දන්නවා. ඒ්ත් C/C++ වලින් තමයි වැඩ වලින් 90% ක්ම මට ඒන්නේ වගේම වෙන්නේ. අනිත් ඒ්වගෙනුත් වැඩ ඒනවා ඔ්න තරම් ඒ්ත් මම කරන්නේ නෑ. මොකද php, javascript, lua, java වැඩ වලට ගන්න පුළුවන් ඉන්ඩස්ට්‍රියල් මිල ගණන් තියනවා. ඒ්ත් c/c++ වැඩ ලිමිට් නැති වැඩ.

    වැඩියෙන්ම නුවණට හුරු C වලින් පටන් ගනින්.
     
    • Like
    Reactions: u_make_me_sick_

    Anonymous_Abstract

    Well-known member
  • Aug 7, 2018
    6,036
    4,566
    113
    Messier 87
    දැන් කියන්න ඒපා C පරණයි, ලැජ්ජ නැද්ද පප්පා ලැන්ග්වේජ් වලට යන්න, OOP වත් නෑනෙ ඔ්යි කියලා.

    :no::no::no: mama adawenakan dekala na C valata awl kiyapu ekek. computer science podi hari knowlage ekak thiyana ekek dannava C tharam performance denna ba kiyala vena kisi language ekakata. Assembly language valin passe hardware compatible ekama high-level language eka. C valin veda karana kota venama feel ekak enava eka vena kisi language ekakin code karanakota enna na. ethek methek computer science world eka bihivunu supuirima mole dennis ritchie ge nayakathwen bell lab eka develop vunu language ekak. okath ekka balanakota C++ langinvath thiyana ba. C ekka veda karapu ekekta C++ gemak nethi vunata
    C++ valin veda karapu ekekta C gemak. anith eka kohamath OOP slow ban Structural ekka gaththama eth lesi. anith developer la vage nemai godak C++ developers la C amarui kiyala giyapu un eth eththatama Structural patta. anith eka C valata awl kiyanne oya communication vala WordPress, react, angular use karala web develop karana unui podi podi mobile app hadana uni. jiwitheta C ekka veda karala na. 1969 idan ada venakan most demanded language in the world.
     
    • Like
    Reactions: wpmanoj

    uajanath

    Well-known member
  • Apr 1, 2009
    8,437
    1,856
    113
    Metana weradi dewal tikak tiyanawa bro
    Kawadawat eka language ekak igena gena wedak naha eka piligannawa

    Java igena swing app hada hada hitiyoth uba kiyana pharmacy app hadanne
    habai java walin enterprise apps wenama hadanawa, specially backends
    godak Rest services dan nam microservices owa godak java walin liyanawa

    Danata tiyana products thawa awurudu 10k 15k giyath rewrite karanne naha eka nisa loweth Java C# demand eka tiyanawa

    Uba sirawata cloud platform athule weda karanawanam uba Go wage language igenaganna eka hodai, nattam rust :)
    habai python walin enterprise back ends mama danna taramin godak naha

    Python walin ML AI sira weda tikak karaganna puluwan, e wage wedak karana ekek Java OOP concepts igenaganna eka therumak naha
    E paththen yana ekekta, loweth python igenaganna eka hodai. habai always job market eka balana eka hodai ;)

    Math Go igenagatta eth lankawe Go kochchara sira unat jobs naha :P
    instergrame eka liyala tyanne python walin
     

    Anonymous_Abstract

    Well-known member
  • Aug 7, 2018
    6,036
    4,566
    113
    Messier 87
    You can't compare php as its just for web. Yes its easy to learn it as well.
    If we take python vs java as proper high level programing languages

    Java is hard to learn and complex which has other so many benefits.

    Main difference is Python is an interpreted language and Java is a compile language :)


    There are lot of programing language concepts ;) Anyway there is a programing language developed by Sri Lankans called Ballerina
    https://ballerina.io/
    Does the Ballerina enable reactive programming?