Live data from Hacker News

PHP Addiction

marco.org

11–20 of 320 posts

Re: PHP Addiction

#11
Its benefits are vastly outweighed by its negatives for me. I've made things in PHP before but if I ever do it again, it will be too soon. Sounds like a nasty addiction.

Re: PHP Addiction

#12
post #7

I'll sound like a broken record, but I'm convinced Flask is the perfect transition. It's built for smaller web apps, and rapid prototyping. The system of mapping endpoints to functions is incredibly intuitive -- if you've used Python before, learning Flask is incredibly easy.

I love Flask: You just do things the way you want, written in Python. You're free to make your own (potentially stupid :P) decisions.

Re: PHP Addiction

#13
That's one of the problems with the now-famous Fractal blog, I think: It was a joy to read in the sense that being a Python programmer, it only heightened my appreciation of the achievement that languages like Python and Ruby represent. It's what conscious, determined design gets you and what mistakes they managed to avoid.

But it's preaching to the choir. If you've never seen anything other than PHP, you won't understand two thirds of the list or why they're problems. (How do we communicate effectively what makes other languages better to someone with no reference frame other than PHP itself?

Re: PHP Addiction

#14
Disclaimer: I'm a Rails programmer for work and hobby.

Interested in learning something that isn't PHP to code your web applications in? Ok. You have a ton of options and this is a very exciting time to be a web developer.

Do you want to lean towards stability and proven concepts and work within a full application structure? Look at Django and Rails.

Do you want to serve up responses from a simple script without a lot of extra pieces? Look at Sinatra and Flask.

Do you want to get in on the cutting edge and don't mind forging some of the path yourself? Look at Node.js and Meteor.

Got a high level decision made? Sweet. Now compare the primary languages between your choices (forget the framework for now). After a few minutes looking at each, which reads better to you? Feel free to go on gut instinct here: there are no wrong choices.

You've now made a choice for your next learning target. Now: don't spend years. Don't worry about knowing everything about the framework and the language. Google for "X tutorial" and follow the first link that looks reasonable and current. Do that tutorial. Now you have some bearings within the framework and have some idea of how it thinks.

Now. Pick something you want to build (a todo list is popular now, it used to be a blog or a wiki). Build it. You will make mistakes. You will be confused. Google for answers (if you're in Node.js or Meteor you will have trouble here) or hack until you get something working.

Throw what you built up on github and ask others to check it out. Build something else. Repeat.

If you are already a decent programmer with a good grasp of the web and how HTTP works: you will pick up any of these frameworks well enough to work in it in a month or so. In six months you'll be well advanced: especially if there are good books available for the framework/language you are working in.

Have fun!

Re: PHP Addiction

#15
post #7

I'll sound like a broken record, but I'm convinced Flask is the perfect transition. It's built for smaller web apps, and rapid prototyping. The system of mapping endpoints to functions is incredibly intuitive -- if you've used Python before, learning Flask is incredibly easy.

i'm on PHP now as well. I would probably choose Bottle simply because it runs on Python 3 while Flask does not. I would go with Flask otherwise.

Re: PHP Addiction

#16
post #14

Disclaimer: I'm a Rails programmer for work and hobby. Interested in learning something that isn't PHP to code your web applications in? Ok. You have a ton of options and this is a very exciting time to be a web developer. Do you want to lean towards stability and proven concepts and work within a full application structure? Look at Django and Rails. Do you want to serve up responses from a simple script without a lo…

Do you want to provide an application that anyone can run and easily deploy on their own server with as little configuration as possible?

Oh.

I hate PHP as much as anyone (of course), but that's what it does.

Re: PHP Addiction

#18
post #14

Disclaimer: I'm a Rails programmer for work and hobby. Interested in learning something that isn't PHP to code your web applications in? Ok. You have a ton of options and this is a very exciting time to be a web developer. Do you want to lean towards stability and proven concepts and work within a full application structure? Look at Django and Rails. Do you want to serve up responses from a simple script without a lo…

Do you want to provide an application that anyone can run and easily deploy on their own server with as little configuration as possible? Oh. I hate PHP as much as anyone (of course), but that's what it does.

So Java then?

Re: PHP Addiction

#19
post #4
post #3

i have been a PHP programmer from college. Switching to python was the best decision i made.i'm just in love with python.

x3 - it's far simpler to learn due to consistency, more powerful to do both low & high level programming and a pleasure to work with. Just as simple to setup for web as php. Not real reason to be in knee deep php mess.

As easy as PHP in what sense? That Python is basically part of all OS' now or as easy as putting in in a .php file and uploading it to your server?

I severely doubt it's as easy as the latter. I'd like to see an article that explains in less than 140 chars how to deploy a simple app as Hello World to the web in Python without the use of a framework like Django or Flask.

Edit: In the amount of chars Twitter accepts, here's how to get Hello World going in PHP.

sudo apt-get install php5 && echo '' > /var/www/index.php

85 characters. I'm done. Now let's see this done in Python... Ruby... Any other popular language this quickly.

Re: PHP Addiction

#20
Ah, but that's the whole joy of it! Although I have a large enterprise-type code base in Visual Basic/Access Basic, I am still trying to nudge my next project into Python because I love learning new things!

Same with my distro - I am currently using Mint, but that may change, when my next boot hard drive fails.

Even with VBA, where I had done much of the work using DAO (started in 2005 with what I already knew) I am now trying to make the next changes using ADODB. The benefit being it will be easier to shift the back end to MySQL (or any other ODBC-compliant flavor) and have more then one language used in different front ends.

Ah, the learning! My joy in life.... And these days, thankfully little tuition required.

Post reply on HN