[Hidden-tech] Python vs PHP

Paul Bissex paul at bissex.net
Mon May 4 00:50:41 UTC 2020


Hi Alan,

As you know I'm a "Python guy" so my recommendation won't be a surprise. 
Here are some of my reasons:

* If you want to learn ML you'll very likely use Python anyway. The 
dominant frameworks are in Python. Even people who dislike Python 
begrudgingly use it for ML because of the ecosystem.

* PHP has grown a lot in the past 20 years but it's still not a 
general-purpose language; it's for writing web applications. This bites 
you in specific areas like ML or AWS Lambda support as you've seen already.

* Keeping PHP for the UI and using Python for the back-end can be 
viable, whether as a final architecture or as an intermediary stage in a 
rewrite.

* As your code base grows you may end up wanting things PHP lacks 
(generics, union types, method overloading).

* Python is well known as being easy to pick up -- there are lots of 
stories of startups using it to create an MVP (minimum viable product) 
quickly, then finding that it meets their needs and they don't need to 
rewrite in whatever Real Programming Language they had in mind.

* Python is great on the resume. It's huge in the web application and 
data science areas.

In any case, good luck with your project!

P

On 5/3/20 5:28 PM, Alan Frank via Hidden-discuss wrote:
> I am developing an online version of a commercial tabletop game.  I am 
> doing this for two main reasons--it's an interesting project and I 
> hope to be able to gain and demonstrate skills which will help me get 
> a job as a software developer.
>
> The initial version of the game (which you can see at 
> http://www.8wheels.org/campagne) is written in PHP.  Now that I have 
> it working, I am getting ready to try out various machine learning 
> techniques to improve its play.  These will include using a genetic 
> algorithm, converting the strategy module to use a neural network and 
> training that, and doing lookahead, which is time-consuming, so I will 
> use AWS Lambda to try out various possibilities in parallel.
>
> The question I have is whether to continue with PHP or convert the 
> 1350 lines of code to Python.  The reasons to convert are that Lambda 
> does not have native support for PHP (a perplexing decision) and that 
> many ML packages (particularly pytorch) are written in Python (might 
> it also look better on my resume?).  The reasons not to convert are 
> that it's a fair effort and that I much prefer PHP to Python.  There 
> is also the possibility of keeping the UI portion in PHP and 
> converting the logic to Python.
>
> I'd appreciate any insight or guidance.
>
> --Alan
> _______________________________________________
> Hidden-discuss mailing list - home page: http://www.hidden-tech.net
> Hidden-discuss at lists.hidden-tech.net
>
> You are receiving this because you are on the Hidden-Tech Discussion 
> list.
> If you would like to change your list preferences, Go to the Members
> page on the Hidden Tech Web site.
> http://www.hidden-tech.net/members

-- 
Paul Bissex, software engineer
http://paulbissex.com/
Greenfield MA 01301 USA
413-230-9451




Google

More information about the Hidden-discuss mailing list