Php or Python or both?

  • (5 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • 5

71 Replies - 3076 Views - Last Post: 17 October 2017 - 11:46 PM

#31 ArtificialSoldier  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1830
  • View blog
  • Posts: 5,761
  • Joined: 15-January 14

Re: Php or Python or both?

Posted 31 August 2017 - 11:18 AM

Quote

That is broken because if used as directed, PHP creates confusing and difficult code.

That's a pretty misleading statement. First, I'm not sure that this one use case is "used as directed." It's an option, not a directive. Further, PHP does not create code. Programmers create code. Even further, it's only as confusing as you want to make it. The Hello World example you pointed to in the manual is neither confusing nor difficult. If something is complex enough that you would have whole large chunks of code interleaved, you'll consistently see people here say to pull that apart. Where is the line between whether or not the code should be separated? I don't know, but you know it when you see it. The bottom line is that this is up to the programmer, and it's complete crap to constantly bring up this point like it's some negative aspect of PHP. You're just hand-waving here, it's a non-issue.

Quote

Interleaved code is a complexity multiplier.

More hand-waving. You're suggesting that this increases complexity:

<div class="page_counter"><?php echo file_get_contents('counter.txt'); ?></div>

Imagine that's inside a complete page. There's, what, maybe 40 characters there to include the contents of a text file counter, one of the small number of use cases that PHP was originally used for. That's not a "complexity multiplier", if you want to multiply complexity then come up with a nice Python script that includes a bunch of other packages and templates in order to get a single piece of dynamic content on an otherwise static page. Again, PHP is only as complex as you make it. If you're arguing that it inevitably produces complex code, that does not say good things about your own abilities. Again, it's all just hand-waving, it's not an issue.

Quote

it gets even better when you use the traditional "compose your SQL on the fly as a bunch of strings and pray" technique within this mess

When you say "traditional", you're talking about the stuff that was deprecated back in 2004, right? I hope the crux of your hatred for PHP doesn't revolve around things that no one is forced to do, and things that should have been out of use for 10+ years. One might think you're just hand-waving to try to justify your out of date bias.

Quote

but please tell me you've got an ORM now, right?

Jon, I'm going to assume that's a rhetorical question, because surely you are not trying to shit-talk PHP based on incredibly outdated ideas of what's available, and you would never ask me to do your research for you.

Quote

Think separation of concerns: <insert strawman here> But PHP apparently doesn't know about clean code.

PHP doesn't "know" anything, Jon. Programming languages are not intelligent, and computers are not intelligent. Programmers are intelligent. If you are incapable of producing clean PHP code, that's on you pal.

Quote

PHP should have been abandoned when the need for the triple-equal was discovered

That's just stupid. This is not even close to a fatal flaw. Whoops, it looks like my kid has a heart defect that might cause problems in the middle of its life. Sure, there's a simple procedure to fix that, but let's just kill the kid and try again. Makes perfect sense.

I spent about 15 minutes trying to find out when the identity operator was added to PHP. I can't find any information on that, I did find an old article from 2005 showing the difference, but even though that was shortly after PHP 5 was released it didn't make any mention of PHP versions. I don't know if it was added in PHP 5, 4, or even earlier, but this argument is older than middle-school kids. Again, it is a non-issue. Your insistence on clinging to old outdated arguments isn't doing you any favors.

Quote

a structure that acts like one and can turn into the other without warning is a brain-damaged structure, and amounts to a very clever tool for sabotaging the code of anyone foolish enough to use the language.
It's funny, Art, I think I remember you fielding a question about exactly this design failure a while back.

Traditionally this is the point where a reference is requested.

Quote

To me, design implies forethought and intention. PHP shows no evidence of this

You're just going to double-down on the false statements, then. You're literally trying to claim that the PHP core developers are working without any kind of design, like you're seriously making that claim and not just being facetious? What do you want them to do, run everything by you before they approve anything? What do you think happens, they just reach some arbitrary point where everyone is at a decent stopping point and say "OK, everyone stop, let's call this the next version." You don't think they have any kind of roadmap or anything like that? Are you really sticking to that claim? Do you think it's going to help your credibility? You're already suggesting that PHP does not have tools that it does, and that things that people did over a decade ago are still standard best practice, and you're going to double-down on a claim which is ridiculous on its face. That's not helping your case.

Quote

but even this article ,https://wiki.python....oin/PythonVsPhp leaves the question open.

It's always going to be an open question. If any one thing was obviously better than its competitors, then it wouldn't have any competitors. That goes for programming languages or anything else.

Quote

Do it in PHP, in django, and in rails.

If application frameworks are considered, as they should be, then there are several frameworks for PHP to consider. In particular, CakePHP has been around for 12 years or so, and Laravel has been popular recently.

Quote

given that this is the closest I come to a religious conviction

That's a reasonable comparison. Deeply-held beliefs, based more on mythology than evidence, unlikely to ever think you're wrong, that kind of thing.
Was This Post Helpful? 0
  • +
  • -

#32 jon.kiparsky  Icon User is offline

  • Chinga la migra
  • member icon


Reputation: 10686
  • View blog
  • Posts: 18,304
  • Joined: 19-March 11

Re: Php or Python or both?

Posted 31 August 2017 - 11:49 AM

View PostArtificialSoldier, on 31 August 2017 - 01:18 PM, said:

Deeply-held beliefs, based more on mythology than evidence, unlikely to ever think you're wrong, that kind of thing.


Well, more experience than mythology, but yeah. I've been there, I've done that, I've spent the paychecks, and I'll never write a line of PHP again, for any money. That shit's toxic.

Anyway, we're going around in circles here. If you really want to understand where I'm coming from, go port one of your PHP sites to django. It'll take about a weekend. Then come back tell me how much you prefer PHP.
Was This Post Helpful? 0
  • +
  • -

#33 ArtificialSoldier  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1830
  • View blog
  • Posts: 5,761
  • Joined: 15-January 14

Re: Php or Python or both?

Posted 31 August 2017 - 12:17 PM

Our "site" has several MB of code, I'm thinking it's going to take more than a weekend. It took me almost a year working alone to design and develop the initial PHP version (although that time also includes all of the Javascript front-end - the main admin Javascript file itself is 1.3MB, and it still makes a lot of calls to the server to retrieve dynamic JSON), but at this point I have a team to help.

I'm not trying to argue that PHP is the best out there, or anything like that. I'm saying that my own experience, and my salary, is proof that PHP is not dead, and I don't think it's even dying. It's getting better, it's not like it's devolving. You keep wanting to claim that it's already dead, but PHP is not Abe Vigoda. It's growing and maturing like every other language out there, and its tools are improving. Even though I'd like to get into development with other languages, in the meantime the only server-side language our company uses is PHP. Our platform is used by international companies operating on 6 continents, we have all 96 government departments in Arizona, we have military clients, we have non-profits, and we have mom-&-pops. PHP runs all of it, and the language and our platform are continually improving. It is not dead, this is real-world use, and we are serious developers.
Was This Post Helpful? 0
  • +
  • -

#34 jon.kiparsky  Icon User is offline

  • Chinga la migra
  • member icon


Reputation: 10686
  • View blog
  • Posts: 18,304
  • Joined: 19-March 11

Re: Php or Python or both?

Posted 31 August 2017 - 01:01 PM

Okay, a weekend was a bit of an exaggeration, I'll grant you that. But I have to say, me and two other spare-time developers were able to port a pretty complex PHP project that we'd been struggling with in a surprisingly short time. Got an MVP up and running in a few weeks, which is not bad for a side project, grabbing time when life and work allowed, and especially considering that none of us had ever done any django before. Hell, one of the team had never done any python, and she was fully productive in week two.

All I'm saying is, if you give django or rails a try some time you might find it's a little easier to see where I'm coming from.
Was This Post Helpful? 0
  • +
  • -

#35 ArtificialSoldier  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1830
  • View blog
  • Posts: 5,761
  • Joined: 15-January 14

Re: Php or Python or both?

Posted 31 August 2017 - 01:14 PM

If you want to say that Python and Django are better than PHP, I'm not going to argue with you. If you want to say that PHP is dead, then I'll argue. Maybe I'm just autistic, but if you make a claim like that then I'm going to assume you're serious and I'll argue.
Was This Post Helpful? 0
  • +
  • -

#36 jon.kiparsky  Icon User is offline

  • Chinga la migra
  • member icon


Reputation: 10686
  • View blog
  • Posts: 18,304
  • Joined: 19-March 11

Re: Php or Python or both?

Posted 31 August 2017 - 01:55 PM

I'm just saying that maybe you'll think a little different once you've splashed around in some different puddles a bit.
Was This Post Helpful? 0
  • +
  • -

#37 ssraj  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 23
  • Joined: 02-December 15

Re: Php or Python or both?

Posted 31 August 2017 - 09:33 PM

PHP and Python both are productive platforms. As the matter of fact, these both languages are totally different. Along with syntax, the application of using these platforms is a huge difference. PHP is mainly used for the web development purposes and Python is used for desktop, gaming framework, web development and many other. In your website, if you want responsive results or you want to make a real time website than you can choose node.js.
Node.js is electrifying when it comes to server side operations. It gives a good performance in various database activities. When you are developing a website, Node.js can be used along with the PHP language.
Was This Post Helpful? 0
  • +
  • -

#38 nesir28  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 35
  • Joined: 11-August 17

Re: Php or Python or both?

Posted 01 September 2017 - 01:07 AM

Quote

If you want my best and final advice, I would suggest that you try building the same website three times. It should be something VERY simple, with the most token back-end requirements imaginable. For example, a simple blogging site or something. Users can create accounts, sign in, create articles, and comment on other people's articles. Do it in PHP, in django, and in rails. See which you like best.

You'll learn more from this exercise in a few weeks than from reading my rantings for a year, I promise you that.


i Have been following this thread closely but lurking as i am way out of my depth compared to you guys but this to me is probably the best approach to finding my answer.

Even if i dont understand much of what you guys said , i does not mean i have learnt nothing. Its taught me i have a long way to go infact. Kinda of put my ego in the right spot if you know what i mean. Which is always a good thing.

Thank you to everybody who participated in this. I appreciate the time and effort.
Was This Post Helpful? 0
  • +
  • -

#39 msesen  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 19
  • Joined: 03-January 17

Re: Php or Python or both?

Posted 06 October 2017 - 03:25 PM

Whoever is saying Php is dead at this time/moment is clearly don't know shit about web development. Also talking about Pyhton and Ruby, those are not pure web development languages but are only popular because of the frameworks used.

The fact that most of the web is powered by Php as of today is your biggest clue as what to learn if you're new to web development. Php can be both used by hobbyists and professionals because it's easy to learn and flexible. I have developed simple Php websites, and work as a full-time backend developer using the Zend Framework 2-3. Also, the last time i checked there were plenty of jobs available, and always will be for the foreseeable future because Php is actively maintained, there are lots of active frameworks (micro/full) and it's open source.

So if anyone is saying that Php is dead/obsolete, i wouldn't even bother reading their next line or listen to their next sentence.
Was This Post Helpful? 0
  • +
  • -

#40 ArtificialSoldier  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1830
  • View blog
  • Posts: 5,761
  • Joined: 15-January 14

Re: Php or Python or both?

Posted 06 October 2017 - 03:43 PM

Shhhh, you'll wake the beast.
Was This Post Helpful? 1
  • +
  • -

#41 jon.kiparsky  Icon User is offline

  • Chinga la migra
  • member icon


Reputation: 10686
  • View blog
  • Posts: 18,304
  • Joined: 19-March 11

Re: Php or Python or both?

Posted 06 October 2017 - 05:46 PM

View PostArtificialSoldier, on 06 October 2017 - 05:43 PM, said:

Shhhh, you'll wake the beast.


Meh, nothing new there. Nothing to argue with - he's wrong out of the box, why bother?

I mean:

Quote

Also talking about Pyhton and Ruby, those are not pure web development languages but are only popular because of the frameworks used.


What can you say to that? You just laugh and get on with your life.
Was This Post Helpful? 0
  • +
  • -

#42 msesen  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 19
  • Joined: 03-January 17

Re: Php or Python or both?

Posted 06 October 2017 - 05:51 PM

Oh really, Python and Ruby are general purpose languages, not a server side. Remove the frameworks and lets see how you can compete with Php.

Exactly, you just get on with your life.

This post has been edited by andrewsw: 06 October 2017 - 10:57 PM
Reason for edit:: Removed previous quote, just press REPLY

Was This Post Helpful? 0
  • +
  • -

#43 jon.kiparsky  Icon User is offline

  • Chinga la migra
  • member icon


Reputation: 10686
  • View blog
  • Posts: 18,304
  • Joined: 19-March 11

Re: Php or Python or both?

Posted 06 October 2017 - 07:10 PM

Quote

Oh really, Python and Ruby are general purpose languages, not a server side. Remove the frameworks and lets see how you can compete with Php.


Okay, this is novel.

How exactly does being a well-designed general-purpose language with effective frameworks count as a negative in your view? I mean, I make my living as a web developer using a language that I can turn around and use for heavy-duty math and scientific computing, natural-language processing, writing dev ops scripts, or talking to a theatrical sound and lighting rig.

I'm not seeing the down side of this. Honestly, what's wrong with a powerful and flexible tool? Why is a more useful language less good than a less useful language?
Was This Post Helpful? 0
  • +
  • -

#44 msesen  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 19
  • Joined: 03-January 17

Re: Php or Python or both?

Posted 06 October 2017 - 07:33 PM

I never said it's a negativity. It was only a counter argument against you stating that Php is dead, and Php was built for the web from ground up. For example, why would you want to use a framework if you only need is some simple CRUD operations with user authentication? I have seen your other posts in other topics regarding Php, and yet for some reason you carry on like everyone else in the world is wrong about Php (which majority of websites are built with, as well as most new startups use Php) and you are right.

To say Php is dead is a foolish statement! Because you had bad experience with it does NOT mean it's a dead technology. You're more than welcome to discuss it's weaknesses or things you don't like about it, but please do NOT state that it's dead, because that is NOT correct. None of these technologies are dead. But if you must know, the future is going to be all about Javascript

As a final note, I also make my living working as a web developer backend and frontend.

This post has been edited by andrewsw: 06 October 2017 - 10:59 PM
Reason for edit:: Removed previous quote, just press REPLY

Was This Post Helpful? 0
  • +
  • -

#45 jon.kiparsky  Icon User is offline

  • Chinga la migra
  • member icon


Reputation: 10686
  • View blog
  • Posts: 18,304
  • Joined: 19-March 11

Re: Php or Python or both?

Posted 06 October 2017 - 09:12 PM

Still not seeing your point. Why is it better to have a language which is built around a specific domain? You seem to take this as somehow basic, but I don't see what the advantage is. I prefer clean and modular design, which means I really want to kick domain-specific aspects of the language out of the core.

Quote

For example, why would you want to use a framework if you only need is some simple CRUD operations with user authentication?


Well, in well-designed languages, there's no reason not to use libraries. Well-designed languages support libraries and make it easy to bring them in to solve problems. The fact that you see libraries as a thing that we shouldn't want to use suggests that PHP is not a well-designed language in this respect.

Quote

To say Php is dead is a foolish statement!


Okay, as you like. I'm not really interested in repeating myself here, you can re-read the thread if you want my views on this.
Was This Post Helpful? 0
  • +
  • -

  • (5 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • 5