Python vs PHP For Beginning Programmers

preview_player
Показать описание
If you are trying to decide which language to learn and are considering Python or PHP, probably the biggest challenge in picking a language is weighing the difficulty of the language vs. the value it brings you as an employee.
Рекомендации по теме
Комментарии
Автор

Thanks for video. Appreciate effort made to keep it simple.

Also appreciate many of the comments others have submitted. I'll probably start out with php and pick up sql, then progress to one of the other languages ( Python, C++ and maybe java ).

I like the idea if quick development for my particular needs initially.

Thanks again.

Thankful_n_Grateful
Автор

My two cents, PHP will eventually die down to something rarely used, but that's no reason not to learn it. If you want to design websites and you're more comfortable with PHP than Python, than go that route. There's no reason to use Python if you would rather use PHP. In the job-market of web design, there is no incentive to learn Python over PHP (other than the explosive Django market that occasionally bursts). 

On the other hand, if you intend on learning other programming languages later on, it may be more beneficial to learn Python for a couple of reasons:

1. Because of Python's strict syntax, it's very difficult to write 'bad code' in Python. Learning Python will develop at least some habits that are good to carry to other languages that don't necessarily carry the same restrictions.

2. Python more closely resembles the way the C and C++ works and it's easier to communicate Python functions and Objects to C++. However, PHP can also translate to learning C and C++, just not as easily.

3. Python is designed as a general purpose language that can be used for just about anything with little hassle. Argue whatever you want, PHP was intended for and is primarily used for website programming.

4. It's easier to go from Python to PHP than the reverse. Likewise, it's easy to learn Ruby, Perl, Lua, and other scripting languages if Python was your first language.

So the questions you should ask yourself is:
What do I intend to program?
Do I intend to learn other languages later?
What are the dominating languages in the job market I'd like to get into?

Answer these questions, and Python and PHP may not even be on your agenda.

rufuguru
Автор

Found video very helpful. Haven't coded since I was 13 (QBasic & some C). I have a few different websites and decided it would be good to start back coding. I narrowed my choice down to Python & PHP. I was leaning toward php because I love Drupal (and occasionally cheat on her with WP) but Python seems to be better for moving to other languages. Watching this video made realize that I'm more concerned with function than form and PHP is the best choice for me. Thanks.

MakinItMag
Автор

PHP is practically a templating system. For doing Rapid development and prototyping PHP is great. You can mock up front and back end, logging is easy, and the code doesn't have to "work" to execute the parts that do. It will "run" until it breaks. It also is very loose in variable typing so you can build stuff with no error checking to and be rigid on the inputs and sort it out later. so yes.

BrandonWirtz
Автор

123IGRACH Javascript and PHP are both scripting languages by definition. Also Javascript is not front-end, it is executed in the background of the users web browser. Any output that you see is either Javascript controlling the web browsers behaviour or it's just the front-end being changed by Javascript.

Front-end would be HTML for front-end coding and CSS for style configuration.

In programming terms, PHP and Javascript are in both the Business Logic and Presentation Logic layers, even though Javascript is executed clientside and PHP is executed serverside, they are still in the same layer(s). Where as HTML would be the output of the Presentation Logic layer, aka Front-End.

juggy
Автор

The time it takes to learn a language varies by user. I ported a bunch of python code to Go which I had never used in 3 days. It was faster than my python, and about the same lines of code. A guy from Google looked at the code, in two hours he rewrote it, it was 1/4th as many lines of code and ran slower. So which of us was more Proficient?

BrandonWirtz
Автор

Facebook is based in PHP (via hiphop). Every language has issues, but it's up to the developer to write efficient clean code. 

I love python, but majority of my work is in PHP and I follow strict standards, declarations and follow the latest stable PHP standards. So, it comes down to the developers discipline.

MichaelMikhjian
Автор

What about C++ as an starting point? Is it too difficult, too complex or is it a good foundation for other languages?

JulioJurkevicz
Автор

The Linux/Windows and FreeBSD/OSX analogy is a perfect one inrespect to drivers and hardware -- not sure where you're confused.




AskAboutAI
Автор

@thepokekid01 Wow for a starting language?! I didn't know that was even a normal choice, it's so strange to me to pick either. Wouldn't it be more normal to do something like Basic, C, or Java? (3post in under 3 mins, I should probably wait until the video ends... before pressing "post")

thepokekid
Автор

AVGN, i love these videos but i love your video game reviews much better. Do those please

bigmike
Автор

Kids learn to make small text based games, and do math, and a lot more. The program I started turns out more John Hopkins and MIT acceptances than any other private school in the US.

Just because it doesn't work for you, doesn't mean that it won't work for others. You teach programming young and it becomes as natural as english.

BrandonWirtz
Автор

Hi! Would you recommend starting in Python or PHP to write a facebook app on Heroku for a beginner?

Also, can you write iPhone apps that integrate with Facebook in Python/or PHP? I'm working on a project that requires me to do both, so can I pick one language to learn (eg Python) and write a Facebook app and Integrated iPhone app in Python? If not, what language would you recommend for me?

samanthastuart
Автор

I didn't make it as clear as I should have, because the comparison is against PHP, yes web. Django/Jinja does make python more PHP like, but you aren't really doing python if you get heavy in to frame works. Like the people who say they Are RAILS programmers when they are Ruby programmers.

I use both PHP and Python about equally. I can do Rapid Dev in PHP a LOT faster, and with fewer lines of code usually. But Python scales better, and I can do "More"

BrandonWirtz
Автор

I'm starting with C#. Is that a good thing to start with?

fabC-official
Автор

It is not a bad choice. it is C like, but with training wheels. You can build "real" apps, and get "real" jobs based off of it. It teaches you Dot Net programming which is useful for Desktop Apps, and Some Server stuff, but is less used for Web than other languages. But yes I think it is a good choice.

BrandonWirtz
Автор

Setting up a web server via WSGI, setting up a route handler.

BrandonWirtz
Автор

PHP is currently a language with many features. when used by a good professional can do incredible things.

gessegoncalves
Автор

PHP works directly within HTML?!?!  Wow I guess I missed when mod-php was no longer needed.  Don't eat the lead based paint children.

Streamweaver
Автор

Its because it's base framework was designed for server-side coding.

All as you really do (in the real world) of game/graphics development is juggle a bunch of objects in C++/C#/Java/etc storing vertex information and pass it to DirectX or OpenGL in the appropriate manner. Game logic is just types storing boolean, integer or strings of information. Pretty standard stuff behind graphics.

If someone really took the effort to make a PHP API for a graphics library, PHP could be used.

naycnay
welcome to shbcf.ru