PDA

View Full Version : Best languge to learn with in Ubuntu? Python or PHP?



mathewb1
January 8th, 2009, 11:09 AM
Hi all,

Im wondering where the best place to start with programming would be? (Broad question I know).

I worked in IT for years as a BA/Tester/Documenter, and had to write simple scripts in PERL. Moved away from that and have now started working as a primary techer.

When i worked in IT I was able to read quite complex code other people had written and understand what they were trying to do, the structures and abstractions seem to jump out of the page at me. When i try to write stuff however (like "hello world" in C++) it takes me hours (literally!).

I was thinking maybe starting with Python or PHP, for n other reason than they are popular and are able to fit in nicley with some HTML pages im building.

Thoughts? Ideas?

Thanks,
MathewB.

mike_g
January 8th, 2009, 11:12 AM
Well, Python would make a better general purpose language.

ghostdog74
January 8th, 2009, 11:47 AM
.. Able to fit in nicley with some html pages im building.
php.

joshmuffin
January 8th, 2009, 11:50 AM
Python is easy with easy syntax, php is apparently easier.
I've only used python but I love it.
If you do decide python download "snake wrangling for kids"
It's a pdf guide, there's a version written for Linux.

Mickeysofine1972
January 8th, 2009, 11:51 AM
Well I would agree with both of the previous responses, HOWEVER :D

If your wanting to develop stand alone apps then Python is my choice, but for web apps PHP

Well thats my 2p anyway :D

Mike

mike_g
January 8th, 2009, 12:27 PM
>>.. Able to fit in nicley with some html pages im building.
php.
I would have reccomended PHP for websites too, but as I havent used python for web development yet I dident.

Kilon
January 8th, 2009, 01:11 PM
Hi all,

Im wondering where the best place to start with programming would be? (Broad question I know).

I worked in IT for years as a BA/Tester/Documenter, and had to write simple scripts in PERL. Moved away from that and have now started working as a primary techer.

When i worked in IT I was able to read quite complex code other people had written and understand what they were trying to do, the structures and abstractions seem to jump out of the page at me. When i try to write stuff however (like "hello world" in C++) it takes me hours (literally!).

I was thinking maybe starting with Python or PHP, for n other reason than they are popular and are able to fit in nicley with some HTML pages im building.

Thoughts? Ideas?

Thanks,
MathewB.

Well What About a middle solution ?

I use Jython and I think it will be a good start for you. On one hand you have the simplicity of Python and on the other the Power of JAVA. Jython is Python which can run like JAVA and even call any JAVA libraries you may want. JAVA has always invested greatly on the Internet so , you will find loads of documentation and source code. I have just started using jython and I must say I am very impressed.

Of course they are going to be people who will say that python is equally if not better with Internet as well. So it is a matter of choice.

But you do not loose anything by trying Jython and see if you like it.

Sprut1
January 8th, 2009, 02:13 PM
Learn both

emobrad
January 8th, 2009, 02:19 PM
Learn both

^^^^ This.

It's all up to your personal choice. Python if you want more standalone programs, and PHP if you want to develop web apps. But both languages would be good to know.

pmasiar
January 8th, 2009, 03:37 PM
Python is excellent general-purpose language (more organized than PHP) and with Django, you can create web apps as easy as with PHP, and they will be better structured and maintainable than average PHP code.

Python has added positive that is is excellent language for beginners (better than PHP - so you can ignore HTML at start), so you can teach it to kids. And for really young kids (who are not proficient readers/typers) there is GameMaker (on Windows) - a GUI tool to write games with no coding at all. And if you really want to, you can join GameBaker project - creating a clone of GameMaker, based on Pygame library.

See wiki in my sig for links and training tasks.

drubin
January 8th, 2009, 05:05 PM
Python is excellent general-purpose language (more organized than PHP) and with Django, you can create web apps as easy as with PHP, and they will be better structured and maintainable than average PHP code.

Nicely put... Php because of it loosely structure is bad for a beginner programmer as it doesn't encourage good coding practises.

drubin
January 8th, 2009, 05:08 PM
Python is excellent general-purpose language (more organized than PHP) and with Django, you can create web apps as easy as with PHP, and they will be better structured and maintainable than average PHP code.

Nicely put... Php because of it loosely structure is bad for a beginner programmer as it doesn't encourage good coding practises.

EDIT:
Not too sure if this is going through or not.

drubin
January 8th, 2009, 05:23 PM
Python is excellent general-purpose language (more organized than PHP) and with Django, you can create web apps as easy as with PHP, and they will be better structured and maintainable than average PHP code.

Nicely put... Php because of it loosely structure is bad for a beginner programmer as it doesn't encourage good coding practises.

EDIT:
Not too sure if this is going through or not.

mathewb1
January 9th, 2009, 01:54 AM
Thankyou all for your help.

It looks like I'll be learning both.

Im especially interested in that Gamemaker App (as I teach primary children) some thats something else I'll have to invest some time in :)

Slainte,
MathewB.

mike_g
January 9th, 2009, 02:39 AM
Thank you so much drubin, that last one finally sank in. I feel enlightened now \\:D/

tiyowan
January 9th, 2009, 03:46 AM
I've been learning Python for a couple of days now. I really like its syntax. Very clean.

I do use PHP regularly, but personally I would think it would be better if one started off with Python instead of PHP.

Badly written code is difficult to debug, but for some reason I find this is especially true of PHP.

But then again, the first programming language I learned was C, so my perception of "difficulty" is somewhat, um, skewed. ;)

CptPicard
January 9th, 2009, 04:31 AM
In recent weeks I have been involved in a startup that for some strange reason implements the website in PHP so I have been essentially forced to actually take a closer look at the language, and frankly it has confirmed all the feelings I had about it before...

I really wish PHP just went the way of the dodo already. Not only is Python cleaner, but also it is much more logical and consistent, even while its abstractions are very generic and powerful. This is such a good thing... PHP is an awful mess in comparison, and even more so, when it is being embedded into HTML.

I also tend to believe that a really good general purpose language is a good language in most specialized contexts too... even in web apps I fail to see what PHP has exactly over Python.

Sprut1
January 9th, 2009, 07:01 AM
Here's a guide about the basics of python which I use time to time:
http://www.poromenos.org/tutorials/python

Edit: I need to learn english....