Re: [Tutor] Help regarding lists, dictionaries and tuples

2010-11-21 Thread bob gailer

On 11/21/2010 6:29 PM, Robert Sjöblom wrote:

Hi. I'm new at programming and, as some others on this list, am going
through Python Programming for the Absolute Beginner. In the current
chapter (dealing with lists and dictionaries), one of the challenges
is to:

Write a Character Creator program for a role-playing game. The player should be 
given a pool of 30 points to spend on four attributes: Strength, Health, Wisdom, 
and Dexterity. The>player should be able to spend points from the pool on any 
attribute and should also be able to take points from an attribute and put them 
back into the pool.

I don't want a direct answer on how to proceed, but a question that
arose during my thinking of the problem was whether dictionaries can
have integral data in them, like so:
attributes = {"Strength" : 28, "Health" : 12}
or if they have to be:
attributes = {"Strength" : "28", "Health" : "12"}

Ok, I'm clearly thinking in circles here. I used the interpreter to
figure out that both are fine but the first example has integers,
whereas the second has strings. Good to know. What I'm wondering then,
instead, is whether there's a good way to sum up the value of integral
data in a dictionary?


Why would you want to sum them? You start with 30 points in the pool, 
then allocate them to the attributes. The sum will still be 30.



I suppose I could solve the challenge by setting up 4 different
variables and going at it that way, but since the challenge is listed
in a chapter dealing with Lists and Dictionaries (and tuples), I
figure there should be some way to solve it with those tools.



--
Bob Gailer
919-636-4239
Chapel Hill NC

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Help regarding lists, dictionaries and tuples

2010-11-21 Thread Robert Sjöblom
[Snip]
>> I don't want a direct answer on how to proceed, but a question that
>> arose during my thinking of the problem was whether dictionaries can
>> have integral data in them, like so:
>> attributes = {"Strength" : 28, "Health" : 12}
>> or if they have to be:
>> attributes = {"Strength" : "28", "Health" : "12"}
>>
>> Ok, I'm clearly thinking in circles here. I used the interpreter to
>> figure out that both are fine but the first example has integers,
>> whereas the second has strings. Good to know. What I'm wondering then,
>> instead, is whether there's a good way to sum up the value of integral
>> data in a dictionary?
>>
>
> I will point you toward two things. First, the dict class has a method
> called values(). Read the documentation on that, go into your
> interpreter, make some dictionaries, and call the values() method, see
> what comes up.
>
> The second thing is the sum() method. Again, read the documentation on
> it and experiment with it a little. Those two should suffice to answer
> your question.
They did indeed! I did run across values() before sending the message,
but didn't quite get it to work properly -- reading up on it, I
figured out that I've been calling the method completely wrong.

> I always encourage people to play around with their problems in the
> interactive interpreter, discovering what works and what doesn't for
> yourself is often a great way to learn. Combine that with
> http://docs.python.org and you've got some very powerful learning
> tools
Yeah, using the interpreter is very helpful, I've found. I find that
even if I've studied something in the documentation, I need to use the
interpreter to figure out how it actually works. Maybe that will get
better in time, but for now it's a very useful tool in
trial-and-error. I had to try out values() and sum() before I could
understand them fully.

Thanks again, much appreciated.

best regards,
Robert S.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Help regarding lists, dictionaries and tuples

2010-11-21 Thread Hugo Arts
On Mon, Nov 22, 2010 at 12:29 AM, Robert Sjöblom
 wrote:
> Hi. I'm new at programming and, as some others on this list, am going
> through Python Programming for the Absolute Beginner. In the current
> chapter (dealing with lists and dictionaries), one of the challenges
> is to:
>>Write a Character Creator program for a role-playing game. The player should 
>>be given a pool of 30 points to spend on four attributes: Strength, Health, 
>>Wisdom, and Dexterity. The >player should be able to spend points from the 
>>pool on any attribute and should also be able to take points from an 
>>attribute and put them back into the pool.
>
> I don't want a direct answer on how to proceed, but a question that
> arose during my thinking of the problem was whether dictionaries can
> have integral data in them, like so:
> attributes = {"Strength" : 28, "Health" : 12}
> or if they have to be:
> attributes = {"Strength" : "28", "Health" : "12"}
>
> Ok, I'm clearly thinking in circles here. I used the interpreter to
> figure out that both are fine but the first example has integers,
> whereas the second has strings. Good to know. What I'm wondering then,
> instead, is whether there's a good way to sum up the value of integral
> data in a dictionary?
>

I will point you toward two things. First, the dict class has a method
called values(). Read the documentation on that, go into your
interpreter, make some dictionaries, and call the values() method, see
what comes up.

The second thing is the sum() method. Again, read the documentation on
it and experiment with it a little. Those two should suffice to answer
your question.

I always encourage people to play around with their problems in the
interactive interpreter, discovering what works and what doesn't for
yourself is often a great way to learn. Combine that with
http://docs.python.org and you've got some very powerful learning
tools

Hugo
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Help regarding lists, dictionaries and tuples

2010-11-21 Thread Robert Sjöblom
Hi. I'm new at programming and, as some others on this list, am going
through Python Programming for the Absolute Beginner. In the current
chapter (dealing with lists and dictionaries), one of the challenges
is to:
>Write a Character Creator program for a role-playing game. The player should 
>be given a pool of 30 points to spend on four attributes: Strength, Health, 
>Wisdom, and Dexterity. The >player should be able to spend points from the 
>pool on any attribute and should also be able to take points from an attribute 
>and put them back into the pool.

I don't want a direct answer on how to proceed, but a question that
arose during my thinking of the problem was whether dictionaries can
have integral data in them, like so:
attributes = {"Strength" : 28, "Health" : 12}
or if they have to be:
attributes = {"Strength" : "28", "Health" : "12"}

Ok, I'm clearly thinking in circles here. I used the interpreter to
figure out that both are fine but the first example has integers,
whereas the second has strings. Good to know. What I'm wondering then,
instead, is whether there's a good way to sum up the value of integral
data in a dictionary?

I suppose I could solve the challenge by setting up 4 different
variables and going at it that way, but since the challenge is listed
in a chapter dealing with Lists and Dictionaries (and tuples), I
figure there should be some way to solve it with those tools.

In a somewhat related note: the book gives quite hard challenges, the
coin flip challenge discussed here a few days ago, for example, comes
before the reader learns about for loops.

Thanks in advance, and best regards,
Robert S.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] lists, arrays and saving data

2010-11-21 Thread Corey Richardson



On 11/21/2010 8:12 AM, Chris Begert wrote:

Hi Gurus

I just wrote my first little python program; so yes I'm very new to all this.

The goal in the end is to have a program that shows how the sun moves  from the 
point of view of a given location (i.e. solar paths added to some sort of 
stereographic diagram).

My very first program calculates the height (altitude) and direction of the sun 
(Azimuth) at a specific location during a specific time.

So here's my question (I'm sure its obvious for most of you):

How do I store a years worth of data of angles in an array / list / whatever is 
most useful when using Python?




Well now. You can store altitude and AZ in a tuple, and append that 
tuple to a list called, for example, data. data.append((altitude, AZ)), 
where data = list(). You will probably want to wrap all that calculation 
into a function that takes 6 arguments: longitude, latitude, month, day, 
hour, and minutes, instead of taking that input by hand. That way you 
can put everything into a nice for loop (in theory).

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Simple counter to determine frequencies of words in a document

2010-11-21 Thread Emile van Sebille

On 11/21/2010 8:15 AM Josep M. Fontana said...


  return sorted(word_table.items(), key=lambda item: item[1], reverse=True)



What I don't understand is the syntax of "item : item[1]".


Key defines a lambda function that accepts as a single passed parameter 
named item and returns the element in position [1] thereof.


HTH,

Emile

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] lists, arrays and saving data

2010-11-21 Thread Alan Gauld

"Chris Begert"  wrote


How do I store a years worth of data of angles in an
array / list / whatever is most useful when using Python?


The choice of data structure usually depends on how
you plan on accessing/using it. So we can't advise
until we know more about what you plan on doing with it!
The good news it that in Python its usuially easy to
switch between the various options if you think you got
it wrong!

Having said that my guess is that a list of tuples will be
your best starting point. Put all the values for a given time
into a tuple (or maybe a dictionary). Then store the list
of timed values in a list (or another dictionary(keyed by time) )



from datetime import date
import datetime
import math

## geht das einfacher?
from math import sin
from math import cos
from math import degrees
from math import radians
from math import acos


from math import sin,cos,degrees,radians,acos

is easier to type :-)


## Input - später ein drop-down menü
print("Please specify your location")
long = float(input("Longitude in degrees: "))
lati = float(input("Latitude in degrees: "))


If you put this in a function which returns the values you
need it will be easier to convert to a GUI(or web page) later.


month =  int(input("Month: "))
day =  int(input("Day: "))
hour = float(input("Hour: "))
minutes = float(input("Minutes: "))


Are you sure you want to allow floating point hours and minutes?


time = hour + minutes/60


See above comment - what if hours is 1.5 and minutes is 37.3?
Is time sensible?


Nd = datetime.datetime(2010,month,day).timetuple().tm_yday




gdeg = (360/365.25)*(Nd + time/24)
g = math.radians(gdeg)


you imported radians so you don't need the math prefix

D = 
0.396372-22.91327*math.cos(g)+4.02543*math.sin(g)-0.387205*math.cos(2*g)+0.051967*math.sin(2*g)-0.154527*math.cos(3*g) 
+ 0.084798*math.sin(3*g)




Fopr long calculations you might find it easioer to read/antain if you 
put a set of parent around the outside then separate your main terms 
into lines, like this:



D = ( 0.396372-22.91327*math.cos(g) +

4.02543*math.sin(g)-0.387205*math.cos(2*g) +
0.051967*math.sin(2*g)-0.154527*math.cos(3*g) +
0.084798*math.sin(3*g) )

Using symbols for the constants would help too, especially
if there are some standard names you can use, like alpha etc?


##Now calculate the TIME CORRECTION for solar angle:
TC = 
0.004297+0.107029*math.cos(g)-1.837877*sin(g)-0.837378*cos(2*g)-2.340475*sin(2*g)



## Now we can calculate the Solar Hour Angle (SHA)
SHA = (time-12)*15 + long + TC
if SHA > 180:
   SHA = SHA - 360
elif SHA< -180:
   SHA = SHA + 360
else:
   SHA = SHA
print(SHA)


##Now we can calculate the Sun Zenith Angle (SZA):
cosSZA = 
sin(radians(lati))*sin(radians(D))+cos(radians(lati))*cos(radians(D))*cos(radians(SHA))

SZA = degrees(acos(cosSZA))
altitude = 90 - SZA


##To finish we will calculate the Azimuth Angle (AZ):
cosAZ = (sin(radians(D)) - sin(radians(lati)) * cos(radians(SZA))) / 
(cos(radians(lati))*sin(radians(SZA)))

AZ = degrees(acos(cosAZ))


HTH,


--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Simple counter to determine frequencies of words in adocument

2010-11-21 Thread Alan Gauld


"Josep M. Fontana"  wrote


: return sorted(
: word_table.items(), key=lambda item: item[1], reverse=True
: )


By the way, I know what a lambda function is and I read about the 
key

parameter in sorted() but I don't understand very well what
"key=lambda item: item[1]" does.

...

What I don't understand is the syntax of "item : item[1]".


OK,
So you know that a lambda is an anonymous function and

g = lambda x: f(x)

can be rewritten as:

def g(x):
   return f(x)

So in your case you could have done:

def getSecond(item):
return item[1]

return sorted( word_table.items(), key=getSecond, reverse=True)

So reverse engineering that we get

lambda item: item[1]

item is the parameter of the anonymous function.
and item[1] is the return value. (The colon separates parameter
from return value)

> Once you gain familiarity with the lists and dicts, you can try 
> out

> collections, as suggested by Peter Otten.

The problem is that I'm using version 2.6.1. I have a Mac and I am
using a package called NLTK to process natural language.


Thats no problem. 2.6 is a recent version of Puython, I see
no reason to change Python version for now. You can run other
python versions on the Mac alongside your default install but
for now you have no good reason to do so. Keep life simple :-)

HTH,

--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] lists, arrays and saving data

2010-11-21 Thread Emile van Sebille

On 11/21/2010 5:12 AM Chris Begert said...

Hi Gurus

I just wrote my first little python program; so yes I'm very new to all this.

The goal in the end is to have a program that shows how the sun moves  from the 
point of view of a given location (i.e. solar paths added to some sort of 
stereographic diagram).

My very first program calculates the height (altitude) and direction of the sun 
(Azimuth) at a specific location during a specific time.

So here's my question (I'm sure its obvious for most of you):

How do I store a years worth of data of angles in an array / list / whatever is 
most useful when using Python?




I would look at moving the calculation part into a function that accepts 
as input the location, date and time parameters and returns the results. 
 Then you could write a loop to build the list for the locations and 
date ranges of interest.  Your choice for data persistence would depend 
in part on how the data is to be used and how much there is.  Take a 
look at the options python comes with at 
http://docs.python.org/py3k/library/persistence.html but for small data 
sets building the data on the fly may be sufficient as creating a full 
year of data at ten minute intervals takes thee seconds on my PC.


Below is how I refactored things.

Emile


-

import datetime, time
from math import sin
from math import cos
from math import degrees
from math import radians
from math import acos

def getLocation():
print("Please specify your location")
long = float(input("Longitude in degrees: "))
lati = float(input("Latitude in degrees: "))
return long,lati

def getAltAZ (long,lati,month,day,hour,minutes):
time = hour + minutes/60
Nd = datetime.datetime(2010,month,day).timetuple().tm_yday
gdeg = (360/365.25)*(Nd + time/24)
g = radians(gdeg)
D = 
0.396372-22.91327*cos(g)+4.02543*sin(g)-0.387205*cos(2*g)+0.051967*sin(2*g)-0.154527*cos(3*g) 
+ 0.084798*sin(3*g)
TC = 
0.004297+0.107029*cos(g)-1.837877*sin(g)-0.837378*cos(2*g)-2.340475*sin(2*g)

SHA = (time-12)*15 + long + TC
if SHA > 180: SHA = SHA - 360
elif SHA< -180: SHA = SHA + 360
cosSZA = 
sin(radians(lati))*sin(radians(D))+cos(radians(lati))*cos(radians(D))*cos(radians(SHA))

SZA = degrees(acos(cosSZA))
altitude = 90 - SZA
cosAZ = (sin(radians(D)) - sin(radians(lati)) * cos(radians(SZA))) 
/ (cos(radians(lati))*sin(radians(SZA)))

AZ = degrees(acos(cosAZ))
return altitude,AZ

def prepFullYear(long,lati, interval=10):
return [getAltAZ(long,lati,*time.localtime(t+ii)[1:5]) for ii in 
range(0,60*24*365,interval)]


if __name__ == '__main__':
t = time.time()
fy = prepFullYear(100,30)
print (time.time()-t)





___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Simple counter to determine frequencies of words in a document

2010-11-21 Thread python
> it is difficult for me not to be profuse in my thanks because you guys really 
> go beyond the call of duty. I love this list. The responses in this list most 
> of the times don't just address the problem at hand but are also useful in a 
> more
general sense and help people become better programmers. So, thanks for
all the good advice as well as helping me solve the particular problem I
had.

Not the OP, but a big +1 from me!

Malcolm
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Simple counter to determine frequencies of words in a document

2010-11-21 Thread Josep M. Fontana
Martin, Alan, col speed and everybody that helped: I think I'm going
to stop because I'm repeating myself but it is difficult for me not to
be profuse in my thanks because you guys really go beyond the call of
duty. I love this list. The responses in this list most of the times
don't just address the problem at hand but are also useful in a more
general sense and help people become better programmers. So, thanks
for all the good advice as well as helping me solve the particular
problem I had.

Let me address some particular points you've made:

On Sun, Nov 21, 2010 at 12:01 AM, Martin A. Brown  wrote:

>  : It turns out that matters of efficiency appear to be VERY
>  : important in this case. The example in my message was a very

> Efficiency is best addressed first and foremost, not by hardware,
> but by choosing the correct data structure and algorithm for
> processing the data.  You have more than enough hardware to deal
> with this problem,

Yes indeed. Now that I fixed the code following your advice and
Alan's, it took a few seconds for the script to run and yield the
desired results. Big sigh of relief: my investment in a powerful
computer was not in vain.


> This is far afield from the question of word count, but may be
> useful someday.
>
> The beauty of a multiple processors is that you can run independent
> processes simultaneously (I'm not talking about multitasking).

>  http://docs.python.org/library/threading.html
>  http://www.devshed.com/c/a/Python/Basic-Threading-in-Python/
>  http://www.dabeaz.com/python/GIL.pdf

VERY useful information, thanks!

> OK, on to your code.
>
>  : def countWords(wordlist):
>  :     word_table = {}
>  :     for word in wordlist:
>  :         count = wordlist.count(word)
>  :         print "word_table[%s] = %s" % (word,word_table.get(word,''))
>  :         word_table[word] = count
>
> Problem 1:  You aren't returning anything from this function.
>  Add:
>       return word_table

Sorry, since I had a lot of comments on my code (I'm learning and I
want to document profusely everything I do so that I don't have to
reinvent the wheel every time I try to do something) and before
posting it here I did a lot of deleting. Unintentionally I deleted the
following line (suggested in Steve's original message) that contained
the return:

 return sorted(word_table.items(), key=lambda item: item[1], reverse=True)

Even adding this, though, the process was taking too long and I had to
kill it. When I fixed my mistake in Peter Otten's code (see below)
everything worked like a charm.

By the way, I know what a lambda function is and I read about the key
parameter in sorted() but I don't understand very well what
"key=lambda item: item[1]" does. It has to do with taking the value
'1' as term for comparison, I guess, since this returns an ordered
list according to the number of times a word appears in the text going
from the most frequent to the less frequent and reverse=True is what
changes the order in which is sorted. What I don't understand is the
syntax of "item : item[1]".


>  : def countWords2(wordlist): #as proposed by Peter Otten
>  :     word_table = {}
>  :     for word in wordlist:
>  :         if word in word_table:
>  :             word_table[word] += 1
>  :         else:
>  :             word_table[word] = 1
>  :         count = wordlist.count(word)
>  :         word_table[word] = count
>  :     return sorted(
>  :                   word_table.items(), key=lambda item: item[1], 
> reverse=True
>  :                   )
>
> In the above, countWords2, why not omit these lines:
>
>  :         count = wordlist.count(word)
>  :         word_table[word] = count

Sorry this was my mistake and it is what was responsible for the
script hanging. This is the problem with cutting and pasting code and
not revising what you copied. I took Steve's code as the basis and
tried to modify it with Peter's code but then I forgot to delete these
two lines that were in Steve's code. Since it worked with the test I
did with the light file, I didn't even worry to check it. Live and
learn.


> Let try a (bit of a labored) analogy of your problem.  To
> approximate your algorithm.
>
>  I have a clear tube with gumballs of a variety of colors.
>  I open up one end of the tube, and mark where I'm starting.



This is what I said at the beginning. This little analogy was
pedagogically very sound. Thanks! I really appreciate (and I hope
others will do as well) your time.


> Once you gain familiarity with the lists and dicts, you can try out
> collections, as suggested by Peter Otten.

The problem is that I'm using version 2.6.1. I have a Mac and I am
using a package called NLTK to process natural language. I tried to
install newer versions of Python on the Mac but the result was a mess.
The modules of NLTK worked well with the default Python installation
but not with the newer versions I installed. They recommend not to
delete the default version of Python in the Mac because it might be
used by

[Tutor] lists, arrays and saving data

2010-11-21 Thread Chris Begert
Hi Gurus

I just wrote my first little python program; so yes I'm very new to all this.

The goal in the end is to have a program that shows how the sun moves  from the 
point of view of a given location (i.e. solar paths added to some sort of 
stereographic diagram).

My very first program calculates the height (altitude) and direction of the sun 
(Azimuth) at a specific location during a specific time.

So here's my question (I'm sure its obvious for most of you):

How do I store a years worth of data of angles in an array / list / whatever is 
most useful when using Python?


Thanks in advance for your answers. 

Cheers
Chris


BTW,Here's what I wrote:

## http://answers.google.com/answers/threadview/id/782886.html
## Das Programm berechnet die Höhe und Richtung der Sonne zu einer bestimmten 
Zeit für einen bestimmten Ort
## Die Formeln sind vor der obigen webseite und sollten geprüft werden.
## Ist die Equation of Time genauer?

from datetime import date
import datetime
import math

## geht das einfacher?
from math import sin
from math import cos
from math import degrees
from math import radians
from math import acos

## Input - später ein drop-down menü
print("Please specify your location")
long = float(input("Longitude in degrees: "))
lati = float(input("Latitude in degrees: "))

## Das wird später mal ne range basierend auf dem Ort
month =  int(input("Month: "))
day =  int(input("Day: "))
hour = float(input("Hour: "))
minutes = float(input("Minutes: "))

## Berechnung der Nummer des Tages
time = hour + minutes/60
Nd = datetime.datetime(2010,month,day).timetuple().tm_yday

 
## this is the fractional year
gdeg = (360/365.25)*(Nd + time/24)
g = math.radians(gdeg)


## SOLAR DECLINATION
## Follows the calculation of the declination of the sun, again you an use a 
table or a formula
##"Table of the Declination of the Sun": 
http://www.wsanford.com/~wsanford/exo/sundials/DEC_Sun.html
## Or use the following formula:
D = 
0.396372-22.91327*math.cos(g)+4.02543*math.sin(g)-0.387205*math.cos(2*g)+0.051967*math.sin(2*g)-0.154527*math.cos(3*g)
 + 0.084798*math.sin(3*g)


##Now calculate the TIME CORRECTION for solar angle:
TC = 
0.004297+0.107029*math.cos(g)-1.837877*sin(g)-0.837378*cos(2*g)-2.340475*sin(2*g)


## Now we can calculate the Solar Hour Angle (SHA)
SHA = (time-12)*15 + long + TC
if SHA > 180:
SHA = SHA - 360
elif SHA< -180:
SHA = SHA + 360
else:
SHA = SHA
print(SHA)


##Now we can calculate the Sun Zenith Angle (SZA):
cosSZA = 
sin(radians(lati))*sin(radians(D))+cos(radians(lati))*cos(radians(D))*cos(radians(SHA))
SZA = degrees(acos(cosSZA))
altitude = 90 - SZA


##To finish we will calculate the Azimuth Angle (AZ):
cosAZ = (sin(radians(D)) - sin(radians(lati)) * cos(radians(SZA))) / 
(cos(radians(lati))*sin(radians(SZA)))
AZ = degrees(acos(cosAZ))


print("Altitude: ", altitude)
print("Azimuth: ",AZ)
-- 
GMX DSL Doppel-Flat ab 19,99 €/mtl.! Jetzt auch mit 
gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] JOB AD PROJECT

2010-11-21 Thread Knacktus

Am 21.11.2010 04:34, schrieb delegb...@dudupay.com:

Hi People,
I am afraid only Alan has said something to me. Is it that solution would never 
come or u guys are waiting to gimme the best?

I agree with what Alan wrote. Your project sounds like real challenge 
even for experienced developers. Even for a team of experienced developers.


You need both deep knowlegde of certain areas and broad knowledge of 
programming, databases and networking/communication. Of course you don't 
get the knowlegde if you don't start to develope a system. But if you 
start with too much and too complex things the risk is that you get 
stuck. There's a saying: "You've got so much in your mouth that you 
can't chew anymore." (And you realise it only when it has happened ;-))


To avoid that risk of suddenly being buried in complexitiy and not 
knowing what to do and where to move next, I'd recommend to follow a 
step by step learning path:


With your project in mind, plan 3-5 smaller projects. Each project has 
one of the key technologies for your final project as focus. For example:


1) Create a Django site where users can register and unregister. 2 or 3 
simple web forms. Nothing more. You'll learn all the database stuff and 
Django basics.

2) Build a system that handles SMS communication.
3) Build some a nice html+JS websites.
...
...

Then you can tackle the last and most challenging task, which is to 
design your overall system: Infrastructure, layers and your 
business-logic modules/classes.


Go in small steps! That will also keep your motivation up as you get 
feedback after each step.


HTH,

Jan


Please help.
Sent from my BlackBerry wireless device from MTN

-Original Message-
From: "Alan Gauld"
Sender: tutor-bounces+delegbede=dudupay@python.org
Date: Sat, 20 Nov 2010 09:00:52
To:
Subject: Re: [Tutor] JOB AD PROJECT


  wrote


I have done some extensive reading on python.
i want to design a classifieds site for jobs.


Have you done any extensive programming yet?
Reading alone will be of limited benefit and jumping into
a faurly complex web project before you have the basics
mastered will be a painful experience.

I'm assuming you have at least some experience of
web programming in other languages for you to take
such a bold step?



I am taking this as my first project and would appreciate any help.
I am looking in the direction of python, maybe django.


The choice of tools is fine, but its a big task for a first
ever Python project!

HTH,




___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] JOB AD PROJECT

2010-11-21 Thread Alan Gauld


 wrote 

I am afraid only Alan has said something to me. 
Is it that solution would never come or u guys 
are waiting to gimme the best?


I think we are waiting for a specific question.

I said that your technology choice was OK for the project.

What else do you want to know.
You say you've done a lot of reading - but you don't say what?
The python tutorial? Any other tutorials? The Python cookbook?
You mention Django - have you read the introductory tutorial 
material there?


You haven't really asked us anything much yet.

Alan G.

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] JOB AD PROJECT

2010-11-21 Thread mhw
(Apologies for TP-ing)

I'd second Alan's comments about not taking this as a first piece of work.

Otherwise, Django seems a good choice - reasonably simple to get started, and 
well documented. This is the Python tutor list, so sort of assumes you are 
doing it in Python.

This list tends to work best with "how do I do X?", or even better "I've 
written X, but it doesn't work/ doesn't work well enough"

If you are going to use Django, then you should join their mailing list.

HTH,

Matt
Sent from my BlackBerry® wireless device

-Original Message-
From: delegb...@dudupay.com
Sender: tutor-bounces+mhw=doctors.net...@python.org
Date: Sun, 21 Nov 2010 03:34:29 
To: 
Reply-To: delegb...@dudupay.com
Subject: Re: [Tutor] JOB AD PROJECT

Hi People,
I am afraid only Alan has said something to me. Is it that solution would never 
come or u guys are waiting to gimme the best?

Please help. 
Sent from my BlackBerry wireless device from MTN

-Original Message-
From: "Alan Gauld" 
Sender: tutor-bounces+delegbede=dudupay@python.org
Date: Sat, 20 Nov 2010 09:00:52 
To: 
Subject: Re: [Tutor] JOB AD PROJECT


 wrote

> I have done some extensive reading on python.
> i want to design a classifieds site for jobs.

Have you done any extensive programming yet?
Reading alone will be of limited benefit and jumping into
a faurly complex web project before you have the basics
mastered will be a painful experience.

I'm assuming you have at least some experience of
web programming in other languages for you to take
such a bold step?


> I am taking this as my first project and would appreciate any help.
> I am looking in the direction of python, maybe django.

The choice of tools is fine, but its a big task for a first
ever Python project!

HTH,


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor