Page 1 of 2 [ 17 posts ]  Go to page 1, 2  Next

PM
Veteran
Veteran

User avatar

Joined: 14 Oct 2010
Age: 34
Gender: Male
Posts: 1,466
Location: Southeastern United States

12 Apr 2012, 8:17 am

I downloaded Python recently and I wanted to ask what would be some good uses for it. I'm new at programming so excuse my noobiness

Is this a good language to learn as a first language?

Are there any good bots that could be written to automate any menial software tasks?


_________________
Who knows what evil lurks in the hearts of men?


Anomalia21
Butterfly
Butterfly

User avatar

Joined: 10 Jan 2012
Age: 32
Gender: Male
Posts: 10

12 Apr 2012, 10:16 am

It's a good language to begin with as it has simple syntax and it's quite powerful. It's much slower than C or C++, but you can code in less time.

You can use it for general software, web applications and you can write with it non-critical parts of a larger program in C or C++, and infact this is a frequent use of it.



pete1061
Veteran
Veteran

User avatar

Joined: 12 Nov 2011
Age: 54
Gender: Male
Posts: 1,766
Location: Portland, OR

13 Apr 2012, 8:49 am

Python is slow and different in structure from real languages.

Go with C/C++, or Java as a first language.

Python is the new "basic", it's a noob language.


_________________
Your Aspie score: 172 of 200
Your neurotypical (non-autistic) score: 35 of 200
You are very likely an Aspie
Diagnosed in 2005


UnLoser
Veteran
Veteran

User avatar

Joined: 28 Mar 2012
Gender: Male
Posts: 655

13 Apr 2012, 3:56 pm

As a beginner programmer myself, my insight is limited, but here's what I think: Python could be considered a good language for beginners, given that it's easier to learn and work with than more typical languages like C. I started with Python as my first programming language, and was able to transition to C++ without much trouble. You'll still learn the foundations of programming with Python, and I don't see why Python has to be only for "noobs". It's a powerful language.



Ancalagon
Veteran
Veteran

User avatar

Joined: 25 Dec 2007
Age: 45
Gender: Male
Posts: 2,302

13 Apr 2012, 7:52 pm

Python is a very good beginner language. It is going to be somewhat slower than a language like C (which is more closely tied to the machine), but that's only execution speed, whereas not having to deal with some of the low-level details can help you code faster.

Programmer time is usually more valuable than processor time, so that's usually a good tradeoff. I've programmed in BASIC, and I've read other people's programs in BASIC, and python is very definitely not the new BASIC.


_________________
"A dead thing can go with the stream, but only a living thing can go against it." --G. K. Chesterton


Burzum
Veteran
Veteran

User avatar

Joined: 26 Apr 2011
Age: 33
Gender: Male
Posts: 1,205

14 Apr 2012, 1:55 am

PM wrote:
I downloaded Python recently and I wanted to ask what would be some good uses for it

I mainly use it for small and simple things that aren't time critical in execution, or as a scripting language for large projects that are written in C++ or whatever.

PM wrote:
Is this a good language to learn as a first language?

It's okay. You won't learn any lower level concepts though.


pete1061 wrote:
Python is the new "basic", it's a noob language.

Explain.



AngelKnight
Veteran
Veteran

User avatar

Joined: 3 May 2011
Age: 48
Gender: Male
Posts: 749
Location: This is not my home; I'm just passing through

14 Apr 2012, 4:06 pm

Burzum wrote:
PM wrote:
Is this a good language to learn as a first language?

It's okay. You won't learn any lower level concepts though.

A number are missing; you don't end up dealing directly with "bare-metal" as much as you would with a language like C (or C++ written a certain way). There are still pretty good things in there that are arguably harder in C or C++ like proper higher-order functional programming and continuations-that-won't-break-your-mind (see Python generator functions).

There was an earlier statement about Python being a noob language. Only thing comes to mind to that is: everyone was a noob. May as well start somewhere. I agree that some somewheres are better than others, I guess I rank them differently.



kxmode
Supporting Member
Supporting Member

User avatar

Joined: 14 Oct 2007
Gender: Male
Posts: 2,613
Location: In your neighborhood, knocking on your door. :)

14 Apr 2012, 4:20 pm

PM wrote:
I downloaded Python recently and I wanted to ask what would be some good uses for it. I'm new at programming so excuse my noobiness

Is this a good language to learn as a first language?

Are there any good bots that could be written to automate any menial software tasks?


Python is great for IT people. It lets them create scripts to do really complex tasks. For example the script remotely checks for new database exports as zip files. The script acknowledges there's one. It then downloads the file, unpacks the zip, unpacks the tarball inside, test integrity of the database export, and then import it into final database.

If you have no need to do this sort of stuff I would recommend learning another language. Here's a list of what you should learn based on category.

Web

PHP - Quickly becoming an industry standard. It's free and there are countless resources online to help you learn. What makes PHP so important is many blog platforms - WordPress, Drupal, and so forth - are powered by this language.
ASP.NET - A robust language by Microsoft that is capable of creating more than web sites.
JAVA - A very powerful language by Oracle that is capable of more than web applications. You can also create games.
JQUERY - A modern JavaScipt platform that delivers JavaScript like performance on any website without needing to learn JavaScript.

Gaming

C++ / C# - If you want to learn how to program games these two are the industry standards.
Unity script - A new language developed by Unity. What makes this language so powerful is Unity can produce your games across a wide range of platforms (e.g. Apple, Microsoft, iPhones, Android, and so forth) with minimal effort.

If you would like to see a wide range of code snippets in various programming languages check out
http://snipt.net/



FMX
Veteran
Veteran

User avatar

Joined: 16 Mar 2012
Gender: Male
Posts: 1,319

15 Apr 2012, 5:50 pm

Yes, I would definitely say Python is a good language to learn first - and you don't have to stop using it when you become more experienced either, because it is powerful and productive. If you later want to learn lower-level concepts then I'd recommend C, because it's basically "machine-independent assembler" - you have to deal with pointers all the time and that's an important concept to understand. If you just want to learn another language, not necessarily lower-level, then C# is a good one. Without wanting to start any "language holy wars", I would not recommend Java or PHP, especially as first languages.



RazorEddie
Veteran
Veteran

User avatar

Joined: 18 Jan 2012
Age: 54
Gender: Male
Posts: 610

15 Apr 2012, 6:24 pm

In my opinion it doesn't really matter what language you learn. The concepts are transferable between different languages. Python is relatively slow to execute but in most cases that does not matter. Unless you are doing heavy maths or data processing it will be fast enough. C/C++ is very powerful and you can pull clever tricks with pointers but you can also very easily shoot yourself in the foot. Many modern languages do their best to avoid the low level pointer stuff for this very reason. It adds extra overhead but if it makes your program more stable and easier to debug the tradeoff is well worth it.


_________________
I stopped fighting my inner demons. We're on the same side now.


pete1061
Veteran
Veteran

User avatar

Joined: 12 Nov 2011
Age: 54
Gender: Male
Posts: 1,766
Location: Portland, OR

15 Apr 2012, 8:57 pm

Of course, any language with the standard set of control structures are capable of very complex algorithms.

I just don't like python because it is a slow, interpreted language that doesn't follow much of the standard "c" type structure that so many of the other mainstream languages follow.

I like my curly brackets, that dang tab structure in python is awkward.
It really only good as a scripting language. I would never pay money for something written in python.

I personally recommend java as a good learning language. It's simpler than C++, but still useful in the professional world.

I still contend that Python is a noob language, though non-noobs may find legitimate complex uses for it.
But it still ranks on the same level with VB or Lua.


_________________
Your Aspie score: 172 of 200
Your neurotypical (non-autistic) score: 35 of 200
You are very likely an Aspie
Diagnosed in 2005


Ancalagon
Veteran
Veteran

User avatar

Joined: 25 Dec 2007
Age: 45
Gender: Male
Posts: 2,302

15 Apr 2012, 11:41 pm

pete1061 wrote:
I still contend that Python is a noob language, though non-noobs may find legitimate complex uses for it.
But it still ranks on the same level with VB or Lua.

I think you're confusing 'close to the machine' or 'compiled' with 'serious'. There are some things compiled languages are going to be better at, and there are some things that interpreted languages are going to be better at. Sometimes you have to pick the right tool for the job.


_________________
"A dead thing can go with the stream, but only a living thing can go against it." --G. K. Chesterton


Oodain
Veteran
Veteran

User avatar

Joined: 30 Jan 2011
Age: 34
Gender: Male
Posts: 5,022
Location: in my own little tamarillo jungle,

16 Apr 2012, 1:04 am

Ancalagon wrote:
pete1061 wrote:
I still contend that Python is a noob language, though non-noobs may find legitimate complex uses for it.
But it still ranks on the same level with VB or Lua.

I think you're confusing 'close to the machine' or 'compiled' with 'serious'. There are some things compiled languages are going to be better at, and there are some things that interpreted languages are going to be better at. Sometimes you have to pick the right tool for the job.


QFT


_________________
//through chaos comes complexity//

the scent of the tamarillo is pungent and powerfull,
woe be to the nose who nears it.


Evinceo
Deinonychus
Deinonychus

User avatar

Joined: 13 Apr 2012
Age: 32
Gender: Male
Posts: 392

16 Apr 2012, 2:31 pm

What's python good for? Writing slow programs quickly. It's well suited to writing throwaway programs, or experimenting with algorithms. Python is a decent first language.

You can also use it for math homework, if you've got any.



FMX
Veteran
Veteran

User avatar

Joined: 16 Mar 2012
Gender: Male
Posts: 1,319

16 Apr 2012, 7:31 pm

Slow does not mean "throwaway". I actually used Python professionally in a company that at first insisted on using C++ for a certain internal system. Their reason was the same perception of performance: it must be fast. But how fast is "fast"? Well, it only needed to be run once per day and the C++ program ran in something like 30 seconds - but it was huge and complicated to maintain. Eventually it was completely rewritten in Python. The Python version took perhaps 60 seconds. Users didn't even realise we replaced it until we told them! But when the business found out they can now have changes made in a day instead of a week they were very happy to put up with the "slow" program.



Ancalagon
Veteran
Veteran

User avatar

Joined: 25 Dec 2007
Age: 45
Gender: Male
Posts: 2,302

16 Apr 2012, 8:05 pm

FMX wrote:
Slow does not mean "throwaway". I actually used Python professionally in a company that at first insisted on using C++ for a certain internal system. Their reason was the same perception of performance: it must be fast. But how fast is "fast"? Well, it only needed to be run once per day and the C++ program ran in something like 30 seconds - but it was huge and complicated to maintain. Eventually it was completely rewritten in Python. The Python version took perhaps 60 seconds. Users didn't even realise we replaced it until we told them! But when the business found out they can now have changes made in a day instead of a week they were very happy to put up with the "slow" program.

This reminds me of a really great story from the early days of computing. There was a project to build software to handle the complicated ways that parts interacted in a car -- for example, if the car had air conditioning and power steering, then some of the parts had to be different than if only one or the other option was selected. The project was for a car company, and they had a big team who had been working on it for a while, but the system was so buggy it would tell you that you needed 5 wheels and no doors most of the time.

So they called in some hotshot outside consultant, but by the time he got there, they had just decided to cancel the project for cost reasons. On the way back on the plane, he figured out a way to solve the problem using interpretive techniques rather than the nest of hardcoded if statements in a compiled language that they had been using.

They had a meeting with this guy and the old team, and the guy showed them that the software worked. The old team's lead programmer asked how long it took to run.
"Just over a minute."
"Well, *my* code runs in 30 seconds."
"Yes, but your code *doesn't work*."


_________________
"A dead thing can go with the stream, but only a living thing can go against it." --G. K. Chesterton