Smartgambler
Pro-Punter

Go Back   OZmium Sports Betting and Horse Racing Forums > Public Forums > Horse Race Betting Systems
User Name
Password
Register FAQ Search Today's Posts Mark all topics as read

To advertise on these
forums, e-mail us.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10th April 2011, 12:11 PM
wesmip1 wesmip1 is offline
Member
 
Join Date: Sep 2005
Posts: 1,601
Default Learn to Code Your Own Horse Racing Database - Lesson 2

Lesson 2:

Another lesson of basics but they need to be covered. This lesson is very important. It will take you through doing simple maths and manipulating the data. It will also give you a few conditional statements and looping constructs so that you can do things with the data. Conditional statements are very important as you will use these for developing ratings. For example If Horse1 finished first last start then give it a rating of 100 else give it a rating of 10. Looping will be very important as it allows you to use the same code for a group of things. For example loop through and apply the rating statement above for horses 1 to 10.

For this lesson you are going to need to :

1.If you haven't done Lesson 1 then go do it at http://www.propun.com.au/racing_for...243&postcount=1

2. Go to http://download.oracle.com/javase/t...epts/index.html and read the information. This page will give you an idea on how the principles behind coding in java work. It will introduce you into Object oriented programming and what an Object is and how you use it.

3. Read through and do the exercises for http://download.oracle.com/javase/t...olts/index.html. This is going to introduce you to some of the basics on programming including variables, types and simple maths. It will then take you through some simple control logi such as if-then-else and while statements.

4. Time to reinforce your understanding and do a couple of exercises. Firstly define 2 variables with a number. Call these variables horseRating1 and horseRating2. Print these to the screen.

5. Change the above program to determine the assessed odds based on the ratings. For example if horseRating1 = 50 and horseRating2 = 50 then the assessed odds of both horses should be $2.00. To determine the assessed odds use 1/rating. Output these value to the screen.

6. Change the above program to hold the ratings in an array. Output the results.

7. Change the above program to use a if-then-else statement to determine the horse with the highest rating. Output only the horse with the highest rating.

8. Create a new program that will take a number and add 1 to it in a while loop. Each time it increases by 1 output the results to the screen. Start at 0 and increase the number to 20.

9. Change the above program to do this with a for statement.

10. Change the above program to use a break when the number gets to 10. Make sure you understand how the break works and the output only counts to 10.


That should take a while for those new to programming. There are some very important concepts in these weeks lesson. If you can do all of the above you are half way there and will be at the start of creating your own database.

It won't be long till we get into the specifics of coding our own database.
Reply With Quote
  #2  
Old 11th April 2011, 07:13 PM
mattio mattio is offline
Member
 
Join Date: Jan 2011
Posts: 268
Default

Gee wes, you may have scared off some people after lesson 2. I tried to code several times but I just don't have the patience to try and learn it so I found someone who could
Reply With Quote
  #3  
Old 11th April 2011, 07:46 PM
moeee moeee is offline
Suspended
 
Join Date: Jan 1970
Location: Melbourne
Posts: 5,359
Default

Quote:
Originally Posted by wesmip1

It won't be long till we get into the specifics of coding our own database.


I'm having trouble getting motivated and putting in the hard yards.
Could you tell me what is at the end of the rainbow?

I know how to Program in Basic, and a little on how to Program in EXCEL, but neither of these has made me rich, or even better off for having known it.

I've missed the reason for the Lessons.
How is this database used?
Is it for testing systems?
Reply With Quote
  #4  
Old 11th April 2011, 08:22 PM
wesmip1 wesmip1 is offline
Member
 
Join Date: Sep 2005
Posts: 1,601
Default

moeeee,

Once you know how to code properly you can do anything you want.

At the end of the day you will have a fully functioning database of form that you can run systems, staking plans, ratings, etc across. The tools learned here will enable you to do this for horse raicng, greyhounds, harness, rugby league, afl, etc. Anything you can collect stats on you can create a databse for.

Once you have the database you are a mile above the average punter as you can test which things work or don't work.

Of course you can pay someone to code it for you but then you would not be able to adapt the code to try new things. Coding it yourself you learn how to adapt with changing times.
Reply With Quote
  #5  
Old 11th April 2011, 08:25 PM
wesmip1 wesmip1 is offline
Member
 
Join Date: Sep 2005
Posts: 1,601
Default

Quote:
Originally Posted by mattio
Gee wes, you may have scared off some people after lesson 2. I tried to code several times but I just don't have the patience to try and learn it so I found someone who could

Maybe I did but if I can help a couple of people who stick it out then it might be worthwhile. I didn't want to waste 20 lessons teachngs the basics and you have a week to do it all. Should only take 1 day of reading and a couple of nights playing with the code to do this if your a beginnner. If your experienced in any language this shouldn't take you more then an hour.
Reply With Quote
  #6  
Old 12th April 2011, 07:55 AM
aussielongboat aussielongboat is offline
Member
 
Join Date: Nov 2010
Posts: 259
Smile to wesmip1;

good morning wesmip1:
Re racing and sports data.
I read recently in another post that you could help with some past R&S data – I cannot find the actual post.
However - I am also in the process of building a racing and sports form data base in excel
This has been going since December 1 2010.
However I need to back fill some of my data.
Would it be possible for you to assist me with some missing data?
If you could oblige and if you have the data – this is what I am after in field order – as CSV file would be fine. I can then import in.
The field order is not important.
DATE, HORSE,BRR, FORM, COND, CONS, BP, JOCK, JC, Jrat, Trat, RFS, DLS, 12m rating, CarAPM, 12mAPM, 12m API, Car W, Car P, Car S, Car W%, Car P%, 12m W, 12m P, 12m S, 12m W%, 12m P%, career best rtg, bl3, weight, distance, track condition

my email address is gperfrem@gmail.com






Thanks also for the data base lessons - they are great -


cheers


Aussie.

Last edited by aussielongboat : 12th April 2011 at 07:56 AM. Reason: addition
Reply With Quote
  #7  
Old 12th April 2011, 09:39 AM
The Elk The Elk is offline
Member
 
Join Date: Sep 2008
Posts: 28
Default

Hi Wesmip,
I applaud your endeavours to help others on this forum and hopefully not too many negative or sidetrack postings clutter your learning threads.

I am not a java person, but I will be following with interest - and have the knowledge to code new thoughts/ideas that I am sure I can learn from you into VB2010

cheers
Reply With Quote
  #8  
Old 12th April 2011, 07:06 PM
wesmip1 wesmip1 is offline
Member
 
Join Date: Sep 2005
Posts: 1,601
Default

Quote:


However - I am also in the process of building a racing and sports form data base in excel

excel is so limiting but I have some (not all) of the data you are asking for. I'll be in contact soon.

TheElk,

VB2010 is an ok language to use. The latter lessons might be useful when we get into design rather then basics.
Reply With Quote
  #9  
Old 12th April 2011, 07:20 PM
aussielongboat aussielongboat is offline
Member
 
Join Date: Nov 2010
Posts: 259
Default to wesmip1;

thanks wesmip1,
much appreciated,

cheers

aussie
Reply With Quote
  #10  
Old 19th April 2011, 12:57 PM
moeee moeee is offline
Suspended
 
Join Date: Jan 1970
Location: Melbourne
Posts: 5,359
Default 2nd thoughts?

Lesson 3 must be surely due soon.

Not that I managed Lesson 2, but perhaps Lesson 3 could reinstil interest and get me motivated to go back and have another go at 2.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump



All times are GMT +10. The time now is 12:56 AM.


Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
©2008 OZmium Pty. Ltd. All rights reserved . ACN 091184655