Discussion:
[Tutor] League Secretary Application
Stephen Nelson-Smith
2015-05-30 12:32:09 UTC
Permalink
Hello,

I'm the league secretary for a table tennis league. I have to generate a
weekly results report, league table, and player averages, from results
cards which arrive by post or email.

The data is of the form:

Division: 1
Week: 7
Home: Some Team
Away: Different Team
Player A: Fred Bloggs
Player B: Nora Batty
Player X: Jim Smith
Player Y: Edna Jones
A vs X: 3-0
B vs Y: 3-2
A vs Y: 3-0
B vs X: 3-2
Doubles: 3-1

From this I can calculate the points allocated to teams and produce a table.

I've not done any real python for about 6 years, but figured it'd be fun to
design and write something that would take away the time and error issues
associated with generating this manually. Sure I could build a
spreadsheet, but this seems more fun.

I'm currently thinking through possible approaches, from parsing results
written in, eg YAML, to a menu-driven system, to a web app. I'm generally
in favour of the simplest thing that could possibly work, but I am
conscious that there's a lot of room for data entry error and thus
validation, if I just parse a file, or make a CLI. OTOH I have never ever
written a web app, with forms etc.

There's no time constraint here - this is merely for fun, and to make my
life easier.

Any thoughts?

S.
_______________________________________________
Tutor maillist - ***@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Stephen Nelson-Smith
2015-05-30 16:08:54 UTC
Permalink
Hullo,
2. How do you receive your data now? Do you want to change this,
perhaps extend the capabilities -- i.e. let people send an sms
with results to your cell phone? Or limit the capabilities ("Stop
phoning me with this stuff! Use the webpage!) How you get your
data is very relevant to the design.
I get a physical card, or a photograph of the same. It'd be possible in
the future to get people to use a website or a phone app, but for now, I
enter the data from the cards, manually.
3. After you have performed your calculation and made a table, what
do you do with it? Email it to members? Publish it in a
weekly dead-tree newspaper? Post it to a website? What you
want to do with it once you have it is also very relevant to the
design.
ATM I send an email out, and someone else takes that data and publishes it
on a website.

S.
_______________________________________________
Tutor maillist - ***@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Joel Goldstick
2015-05-30 17:17:39 UTC
Permalink
On Sat, May 30, 2015 at 12:08 PM, Stephen Nelson-Smith
Post by Stephen Nelson-Smith
Hullo,
2. How do you receive your data now? Do you want to change this,
perhaps extend the capabilities -- i.e. let people send an sms
with results to your cell phone? Or limit the capabilities ("Stop
phoning me with this stuff! Use the webpage!) How you get your
data is very relevant to the design.
I get a physical card, or a photograph of the same. It'd be possible in
the future to get people to use a website or a phone app, but for now, I
enter the data from the cards, manually.
3. After you have performed your calculation and made a table, what
do you do with it? Email it to members? Publish it in a
weekly dead-tree newspaper? Post it to a website? What you
want to do with it once you have it is also very relevant to the
design.
ATM I send an email out, and someone else takes that data and publishes it
on a website.
S.
Take a look at django. The tutorial takes a couple of hours and gives
you a good feel for whether it would suit you.

You could say its overkill, but it makes it very easy to do CRUD stuff
with validation built in. Displaying the results would be very easy
as well. You could have your data providers input the data directly
https://docs.djangoproject.com/en/1.8/intro/tutorial01/
--
Joel Goldstick
http://joelgoldstick.com
_______________________________________________
Tutor maillist - ***@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Alan Gauld
2015-05-30 18:09:20 UTC
Permalink
Post by Stephen Nelson-Smith
3. After you have performed your calculation and made a table, what
do you do with it? Email it to members? Publish it in a
weekly dead-tree newspaper? Post it to a website? What you
want to do with it once you have it is also very relevant to the
design.
ATM I send an email out, and someone else takes that data and publishes it
on a website.
You showed us sample input but what exactly does the output look like?

In any data based program you should try to separate the
presentation from the processing. So what does the output
data look like(in content terms)? It might seem self evident
to you because you are doing this already but it isn't so
obvious to us.

Once we know what the output data looks like we can decide
how to present it (web table, excel spreadsheet, CSV file,
PDF, whatever...)
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


_______________________________________________
Tutor maillist - ***@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Continue reading on narkive:
Loading...