What's New On These Pages: February 1995
Next month: March 1995
- Tuesday 28th February
Talked to Graham Lovelace, the editor of ITV's teletext, about the use of
the teletext lottery page 123 for getting the results. I'll have to (snail
mail) write to him to formally ask for permission [because I'm extracting the
numbers from a copyrighted teletext service, even though the numbers themselves
- Monday 27th February
Uploaded results for
Lottery #15. Adjusted cron job timings
for teletext parsing to hopefully catch any slow-returning mail. 5 mail
requests are now sent out, including one at 20.02 instead of 20.05 because
the teletext mail server doesn't seem to start to grab pages until at least 4
minutes after I send the mail. Received complete draw order/ball set/machine
info from Camelot, so typed that into the results data file and created
a new page.
Fixed forms bug when displaying 7 previous
winning numbers in form (the bonus number would cause the next highest winning
number not to appear as a checked box in the form).
- Saturday 25th February
First update was missed by some 7 minutes thanks to the teletext mail server
being sluggish (31 minutes to get back the pages !). Second update at 21.30
caught the info correctly. Exact jackpot pool amount picked up at 23.30,
although the cron job nearly missed it.
- Thursday 23rd February
Posted off a letter
to ITV's teletext editor (he has no e-mail, groan) to explain how I'm using
8 numbers (7 winning numbers and the jackpot prize pool) from their teletext
page 123 to display provisional results between Saturday evening and Monday
morning. I've now taken the plunge and subscribed one set of 6 numbers for
52 weeks using Camelot's subscription service. Reorganised the lottery C
code so that only CGI-related code was in the lottery binary, resulting in
a reduction in the binary size from 48K down to 32K ! The automatic page
generating code is now in a separate binary (called "auto", strangely enough)
and isn't accessible from the WWW server (it's run on my own machine).
Find Out If You've Won ! page,
selecting either of the random number generators and submitting the form will
now generate and display a GIF of the 6 random numbers in the resultant page.
Similarly, choosing to display the 7 (yes, the bonus number is now included)
winning numbers of a previous lottery will now display the appropriate 7-ball
GIF (yes, the same one that's used in the individual lottery pages) in the
returned page. Of course, you'll have to deselect one of the numbers on the
grid if you wish to check their previous winning performance because otherwise
you'll be submitting 7 numbers instead of 6 ! Adjusted the default week range
on the form to span 8 weeks instead of the whole set of lotteries. Updated
the other lottery info page and widened its scope
slightly (removed references to WWW, in case I want to mention FTP, gopher
- Wednesday 22nd February
Split up the
FAQ into three separate documents and also updated their
contents. Remove the words "Provisional" and "Estimated" from the Saturday
evening home page updates if the jackpot pool value obtained from teletext
isn't exactly divisible by 10,000 (devious, eh ?).
- Tuesday 21st February
number selection strategy to make sure at
least one of the numbers isn't in the union set of the most/least
frequent winning numbers.
Was contacted by the author of the ITV's teletext lottery pages and
asked if I could write (by snail-mail !) to the teletext editor explaining what
I was doing with teletext page 123. I don't think it's a copyright issue because
I'm only using 8 numbers from the "fruit machine" sub-page and these numbers
are in the public domain (BBC announces them live on TV and radio for
instance). Hey, maybe I could get teletext to quote my lottery URL :-)
Belatedly discovered that Sky One's teletext has a lottery page (226).
- Monday 20th February
Uploaded the results for
Lottery #14, removing provisional results
info in the process. Added machine name, ball set number and draw order info
the results data file, although this info isn't used (yet) in any pages.
Trimmed all space padding and leading zeros when
converting results data file into C strings. Fixed updating problem mentioned
below. Went on a mad page-splitting frenzy to sort out info that really should
be in individual HTML docs. Yes, this includes
these What's New pages, which are now monthly instead of
quarterly and also have a clickable footer to go to the next or previous
month. Included frequency arrays (both numerical and frequency order) in
CGI binary, rather than calculating them from results each time.
Installed latest ImageMagick binaries, including the handy
montage command which was supposed to generate a transparent gif
directly but it actually doesn't, so I've told the author about this.
After some tests, I discovered that the native ImageMagick format ("miff")
resulted in quicker processing by montage, so the 49 ball bitmaps are now in
miff format prior to being concatenated into a transparent GIF. BTW,
netscape [under HP-UX anyway] seems to badly dither the generated GIF and
ends up chopping off the bottom pixel line :-( It doesn't happen with
mosaic, so it must be a netscape problem.
Added a daily cron job to keep the cache of all generated GIFs below 4MB
(deleting the oldest accessed GIFs if it is). Slightly improved GIF cache
check in CGI program by treating zero-length GIFs [this only happens if montage
failed for some reason] as "bad GIFs" and deleting them before regenerating
them - previously, the program would have used that zero-length GIF and you'd
end up with no balls, literally !
- Sunday 19th February
Same estimated jackpot pool update problem as yesterday - the old Saturday
8.10pm estimate was used instead of the updated one, but the problem has been
fixed now [it was because I hadn't tested 3 separate teletext page sets in my
- Saturday 18th February
Automatic provisional update at 8.10pm was successful, although a minor
mistake on my part meant that the estimated jackpot pool wasn't updated at
8.30pm as I promised (the first estimate at 8.10pm was used instead) - lucky
it didn't change in the 20 minutes gap anyway ! This updating problem has now
been fixed for future provisional updates.
By keeping an eye on the ITV's teletext page
123 during the evening, I was able to discover when they changed the
estimated jackpot pool to an exact one (by about 11pm), so the Sunday cron job
has been moved forward to Saturday at 11.05pm
(hence there will be no Sunday update from next week onwards).
- Friday 17th February
Finally got the montage program to do what I wanted and join up to 6 gifs
together, so the CGI form now generates a single GIF of your numbers and
caches it (I will add something to clear out the cache next week - the
retention period will depend on how fast the cache grows). I contacted the
montage (aka ImageMagick) author and got him to add the ability for montage
to generate a transparent gif, rather than me having to run it through
giftrans (which is why it's a little slow at the moment). I will update
montage next week, so hopefully we should a speed-up in the gif generation.
The lottery C program binaries now have the results pre-compiled into them as
an array of C strings, which means that there are no file operations to read
results any more, resulting in a speed-up of all commands, particularly the
CGI stuff. It also means that the plain text results data file is no longer
visible to the WWW server (thank goodness - I was hoping no-one was going to
steal it and use it for a rival set of pages !), but of course I have to
re-compile the binaries (which I'm doing during constant development anyway)
when a new set of results are added.
I gave in and phoned Camelot to ask them for the following completely
irrelevant information on the draws so far: the machine used to pick the
balls, the draw order of the balls and which ball set was used. They are
sending me the info through the post.
- Thursday 16th February
Added estimate jackpot pool to the provisional results code because ITV's
teletext page 123 has that info in a parseable form too. Added another cron
job for 20.30 on Sunday evening to redo provisional info because by
then teletext will hopefully have a more precise jackpot pool figure. The
individual lottery pages are now semi-automatically generated (only the
Comments section is manual and even that has the average prize calculated
automatically). I have devious code that adjusts the percentages on the
individual page so that they add up to 100% - I'd previously been manually
calculating them, but had got tired of it. Ran
weblint on all the lottery pages and fixed minor errors. Realised that I needed to
anticipate the provisional home page at the weekend by having HTML for the
lottery that takes place the weekend after next - for example, I now have
Lottery #15. Even though you won't see a
home page link for it until this Saturday, you can now get to it from the
- Monday 13th February
Uploaded the results for
Lottery #13. Colours for the
question-marked balls are now rotated for each lottery. Teletext experiment
was a success, so automatic provisional results will appear for
Lottery #14 onwards
at 8.10pm each Saturday night. In fact, I redo the provisional results at
8.30pm as well, just in case teletext was slow updating the pages. The
winning numbers page will not be updated until
the following Monday - only the home page and the gif of the
winning numbers will get provisional updates on Saturday evenings.
- Friday 10th February
Just thought I'd mention that I won £50 on the Premium Bonds this week -
mind you, I've had £14 worth of Bonds for about 20 years now !
Set up a test automatic e-mail to our local teletext mail server for ITV's page
123 - scheduled for 8.30pm on Saturday night. If it works, then I'll put
in a mechanism for Lottery #14 onwards to display the winning numbers from
8.30pm on Saturday evening onwards - the full results will wait until
Monday morning of course. The uncertainty is because I'm not sure if the
Computing Services Department on our campus
disables the teletext mail server over the weekend...
- Monday 6th February
Uploaded the results for
Lottery #12. Updated the
FAQ with yet more esoteric questions.
- Friday 3rd February
John Reynor sent me the remaining missing details from the
Chances Of Winning page, so it's now complete
with probability info to blow the mind ! Added next and previous
links to each individual lottery page - an idea suggested by
Also finally got rid of ThisWeek.html
by moving it into the archive area with an appropriate new name. Added a
gif of question marks on balls to indicate that next Saturday's lottery isn't
- Thursday 2nd February
Added jackpot win info to the
home page. Filled in the ticket sales on each of the
individual lottery pages. Set up a new Info dir and moved half the stuff
from the top level into it to create a cleaner home page. The remaining home
page was re-ordered and "spaced out". Discovered that 40% of the HTTP
traffic to this Web server is purely to these Lottery pages !
Previous month: January 1995