Beta - Timed 7
Right, timed 7 is up for beta testing, sorry it's taken a while, been extremely busy lately, but hey, who cares, it's up now!
This challenge was created by SwartMumba, have fun and feedback appreciated.
This is a wicked challenge :D. Still working on it, but hopefully il have it beat before long :p
edit - Just a small point of criticism/clarification. If the barcode is invalid, the converting process fails (as it should). Do we just return a blank post value for id? I assume this is an intended part of the challenge? For example, one of my groups of 7 chars was '0001110', which isnt a valid UPC code, so we can just return id as blank and validity as invalid?
I beat the challenge. Yippy! As for how many points I think it is worth, I am not too sure. For one thing, this challenge is harder than the other time challenges and requires more logic and coding.
jjbutler88 wrote: edit - Just a small point of criticism/clarification. If the barcode is invalid, the converting process fails (as it should). Do we just return a blank post value for id? I assume this is an intended part of the challenge? For example, one of my groups of 7 chars was '0001110', which isnt a valid UPC code, so we can just return id as blank and validity as invalid?
You probably have a flaw in your code or you have not realised what sneakyness lies in the challenge. I will test the different input values later - I am busy watching Lord of War. :)
edit: Everything seems to be working.
Swartmumba, can I PM you my code? Im sure ive got it 99% right, I get a 12 digit barcode, and have written a validiy check, and can get a return value like this:
691537227500 invalid id=691537227500&validity=invalid
or
698050430568 valid id=698050430568&validity=valid
Those are in the format barcode, validity, and the post string I am trying to submit (unsuccessfully).
If you received this message, you have completed the challenge, please post in the exclusive membership beta testing forum with feedback, and how many points you think this deserves. Thanks.
Sweet. I would say at least 50, this was a very tricky one to get right, a lot of new concepts for most I should imagine.
edit - Thanks swartmumba, code works every time now, amazing what a single digit can do for a program's success :D
well I believe I got my program working now. But now I have to clean it up to speed it up. Get the 'ran out of time' response. What is the time limit with this challenge btw?
Though 99% of my time is spent in commuications between my computer and HBH's server. Im sure I can improve my code a lot, as pointed out by jjbutler88, but even so I dont know how I can make up much time.
Perhaps I will take it to school and run it from their better connection.
Note: I know no perl what so ever, but im pretty sure this is your starting point:
http://search.cpan.org/~lds/GD-2.41/GD.pm
On that page I can see a function that could be used to decode a barcode….