By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,818 Members | 1,223 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,818 IT Pros & Developers. It's quick & easy.

Want to learn a language - is Python right?

P: n/a
Hi Group,

I am not an experienced programmer at all. I've learned html and css
well enough to hand-write simple websites. I'm now looking to move to
the next step. Initially, I'd like to do 3 things:

1) Generate web pages
This one's fairly obvious maybe.

2) Create a simplified translation package specific to my line of work:
The principle: French vocabulary is found in spreadsheet column A,
English equivalents in column B. The program selects the content of A1,
"bonjour", searches through the usually Word or Powerpoint document
and replaces all examples by "hi", then moves on to A2, etc.,
looping till the end, when I come back and start to work.

3) Help me learn Estonian.
I wrote a couple of rules in Excel. The idea was to create a
self-completion quiz where I must type the exact form of the word
(Estonian is a declension language like Latin, but with 14 cases
instead of 6) in the corresponding box.
If I get it right, I get a Y, if I get it wrong, I get an N.
If I can't remember, I type *, ** or *** to get the first to third
letter
If that doesn't help, I type ? and get the entire answer.
The table below gives an approximate picture. The Ans. on the right
should be invisible.

Word Case1 Case2 Case3 CaseN Yes/No Clue Ans.1 Ans.2 Ans.3 Ans.N
River jõgi jõe jõge jõgesid Y jõgi jõe jõge jõgesid
Cabbage kapsas kapsa ** kapsaid ka kapsas kapsa kapsast kapsaid
Shirt ? särk särk särgi särki särke
Bread leiv N leib leiva leiba leibu

I'm looking for ways of developing the method, making it easier to
use, record right and wrong answers, and randomly re-present
troublesome words.

Is Python the sort of language that will let me do this sort of thing
(whether *I* can actually do it is another question :) )?

Best regards,

Aziz

Jul 19 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
"Aziz McTang" <Az********@gmail.com> writes:
1) Generate web pages
This one's fairly obvious maybe.
You might find this easier to do with PHP. Python is better in a deep
way, but for web pages, that advantage only becomes real when you're
doing complicated sites. Simple stuff is easier to do with PHP
despite that language's flaws.
2) Create a simplified translation package specific to my line of work:
This is a lot harder than it sounds and you're better off using a
canned program for it.
3) Help me learn Estonian.
I wrote a couple of rules in Excel. ...
Is Python the sort of language that will let me do this sort of thing
(whether *I* can actually do it is another question :) )?


Yes, Python is a good choice for that type of program, though whether
that's a good way to learn a natural language (like Estonian) is a
different matter.
Jul 19 '05 #2

P: n/a
Hi Paul,

Thanks for your input.

As usual, hearing some answers helps formulate the question...

What I'm looking for is more to learn one good, comprehensive
programming language well than several approximately on an ad hoc
basis. What I also failed to mention is the desire to develop my
presently limited computer skills a lot further.

So although your answer to 1 suggests I'd be using a steam-roller to
kill a fly, if I do need to go further (or ask other people to help and
still understand what's going on: one site I may want to develop later
involves a number of languages including Japanese as well as audio) I
won't have to re-learn another program. Is this right?

As to 2, I have yet to find a canned program that does what I want, and
so far every programmer I've asked to write it has said "hey that's
easy" then escaped, never to be heard of again.

And 3: good! Actually, having learned half a dozen languages, I can
vouch for it being an excellent way to acquire and consolidate
vocabulary. Talking to (or, rather, understanding) the natives is
another kettle of fish!

Thanks again!

Any new slants from yourself or others are welcome.

Aziz

Jul 19 '05 #3

P: n/a
Aziz McTang wrote:
Hi Paul,

Thanks for your input.

As usual, hearing some answers helps formulate the question...

What I'm looking for is more to learn one good, comprehensive
programming language well than several approximately on an ad hoc
basis. What I also failed to mention is the desire to develop my
presently limited computer skills a lot further.

So although your answer to 1 suggests I'd be using a steam-roller to
kill a fly, if I do need to go further (or ask other people to help and
still understand what's going on: one site I may want to develop later
involves a number of languages including Japanese as well as audio) I
won't have to re-learn another program. Is this right?

As to 2, I have yet to find a canned program that does what I want, and
so far every programmer I've asked to write it has said "hey that's
easy" then escaped, never to be heard of again.

And 3: good! Actually, having learned half a dozen languages, I can
vouch for it being an excellent way to acquire and consolidate
vocabulary. Talking to (or, rather, understanding) the natives is
another kettle of fish!

Thanks again!

Any new slants from yourself or others are welcome.

Aziz


You can use CherryPy for creating a Python-esque web application. Never buy
into the fluff that says Python is not as good as PHP for web apps! PHP is
still too Perl-Like (meaning old and useless)! Python is the choice of a
new generation baby!!! :) JK...

For your vocab program, Python is actually perfect. This could even go for
apps that require some Unicode and other Internationalization snafus (like
right-to-left characters and Cyrillic typesets).

If you're looking for one programming language then you should consider the
idea that no one language can do it all (although Python comes close in my
biased opinion). Python is not for memory management, writing device
drivers and the like.

As far as needing something for web apps, CherryPy is great -- just learn
Python first. PHP is good but it has fallen out of favor with me though
there are a ton of people out there who think it is the greatest thing
since sliced bread.

Take a look at the Python tutorial: http://docs.python.org/tut/tut.html.

Good luck,

Harlin Seritt
Jul 19 '05 #4

P: n/a
"Aziz McTang" <Az********@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Hi Paul,

Thanks for your input.

As usual, hearing some answers helps formulate the question...

What I'm looking for is more to learn one good, comprehensive
programming language well than several approximately on an ad hoc
basis. What I also failed to mention is the desire to develop my
presently limited computer skills a lot further.


You have received some good advice. There are strong tools to support
localization, but they are not inexpensive. They might be lower cost than
developing your own. However, your goal to develop your programming skills
is also a cost to be considered. Are you interested in developing an open
source localization tool?

A consideration for web applications is who will be maintaining the code.
If these are all your own and no one else will ever work on them, then use
any tool you like. Coding them in x86 assembly language would increase your
computer knowledge, but we both know that is not the right tool for this
task.
Jul 19 '05 #5

P: n/a
Python will help you as a novice for these reasons:

1. Help you to learn programming concepts and develop good habits.
2. Powerful Standard Library to help you do more advanced things.
3. Smooth, shallow learning curve, e.g. hello world is:

print "Hello World"

So you can do simple things in python with minimal learning.

4. Excellent, friendly, patient, helpful user base.
5. Code is inherently more maintainable than other languages.
6. comp.lang.python

In short, you have come to the right place. I have used many programming
languages (C, Java, Fortran, Python, Perl, just to name the more famous ones)
and python takes the cake as a general purpose programming language.

By the way, ignore any posts talking about speed of execution. This is
generally a non-issue for new programmers. If you want your code to run
faster, buy a faster computer.

James

On Monday 20 June 2005 07:47 am, Aziz McTang wrote:
What I'm looking for is more to learn one good, comprehensive
programming language well than several approximately on an ad hoc
basis. What I also failed to mention is the desire to develop my
presently limited computer skills a lot further.


--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/
Jul 19 '05 #6

P: n/a
On Mon, 20 Jun 2005 17:23:27 -0700, James Stroud wrote:
By the way, ignore any posts talking about speed of execution. This is
generally a non-issue for new programmers. If you want your code to run
faster, buy a faster computer.


Oooh, red rag to a bull.

Not everybody can afford to buy a faster computer to try to make their
sort function run as quickly as Python's built-in sort.

def newbie_sort(s):
"""Sort lines of string s, considering that speed of
execution is a non-issue.
"""
# split s into lines
L = []
while "\n" in s:
p = s.find("\n")
L = L + [s[0:p]]
s = s[p+1:]
L = L + [s]
# sort the lines
for passes_remaining in range(len(L)-1, 0, -1):
for p in range(passes_remaining):
if L[p] > L[p+1]:
temp = L[p]
L[p] = L[p+1]
L[p+1] = temp
# re-join the lines back into a single string
s = L[0]
del L[0]
for line in L:
s = s + "\n" + line
return s
def better_sort(s):
"""Sort lines of string s the right way.
"""
L = s.split("\n")
L.sort()
return "\n".join(L)
The first function, newbie_sort, is good for only one thing: to be a
horrible example of how inefficient and slow Python can be. It is also
remarkably similar to a lot of my early Python programs.

I think a better way of putting what James tried to get across is, don't
be too concerned about writing fast code until you have learnt the
basics of the language. Get the code WORKING first, and FAST second.

(And frequently, the best way to get it working is also the best way to
have it run fast.)

--
Steven.

Jul 19 '05 #7

P: n/a
Aziz McTang wrote:
What I'm looking for is more to learn one good, comprehensive
programming language well than several approximately on an ad hoc
basis. What I also failed to mention is the desire to develop my
presently limited computer skills a lot further.


I've programmed in perhaps 20 languages ranging from the famous to the
obscure, from 1950s to 1990s design. Python is my favorite. It's a
great language for beginners but advanced programmers do not outgrow
it. It has powerful features but simple, sensible syntax, so you spend
little time fighting the language itself and more time fighting the
problem you're trying to solve. It's open source so cost of entry is
zero, it runs on many platforms, and it has a active, helpful user
community. And coding in Python is fun!

Python is a great first lanuguage but keep an open mind to _someday_
learning more languages. As someone else mentioned in this thread, no
language is right for all jobs. And knowing languages built on
different paradigms (e.g., Prolog, Lisp, assembly languages) provides
new insights into the art of programming.

Cheers,
Steve

Jul 19 '05 #8

P: n/a
Hi Everyone,
Thanks for all the helpful advice. Downloaded 2.4.1 and already have an
inkling of some of the things it can do. Time to start learning!
ATB
Aziz

Jul 19 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.