Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

IBM Cloud Challenge.

by BrowserUk (Patriarch)
on Jul 21, 2015 at 22:07 UTC ( [id://1135723]=perlmeditation: print w/replies, xml ) Need Help??

I just read about an IBM programming challenge to try and entice developers to IBMs Bluemix Cloud development environment.

(Don't bother if you're outside the UK; or if you want to use Perl (it ain't supported :(); or if stupid sign-up processes that don't work annoy you; or ... )

What struck me was that the three programming tasks are, at least notionally, so trivial. It took me less than 5 minutes to write (working, but probably not best) solutions to all three.

(Whether they would pass their test criteria I guess we'll probably never know)

I was also struck by this part of the description:

that you can put together a programme that can run within a time limit or on limited resources rather than just lashing together a hideous brute-force monstrosity. And that you can actually read the questions properly in the first place (a useful start, but one that's often forgotten).

I think it would be interesting to see how the best Perlish solutions we can come up with compare with those other languages that get entered to the competition; when and if they are actually made public.

So have at them. (Don't forget to add <spoiler></spoiler> tags around your attempts.)

I'd post the questions here but I'm not sure it wouldn't be a problem copyright wise?

I'll post my solutions here in a few days.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!

Replies are listed 'Best First'.
Re: IBM Cloud Challenge.
by hdb (Monsignor) on Jul 22, 2015 at 06:41 UTC

    Thanks for pointing this out but - honestly - this whole challenge is utterly pointless. Writing a programme to calculate factorials without any additional requirement (like arbitrary large number or such) is not proving anything. If one knows that the input is between 1 and 15 the best solution is probably a lookup table. And there is an explicit formula that states the solution to two simultaneous equations, so programming a full blown algorithm for solving them is a waste of time as well.

    It looks really like a lure to get people to apply for trial accounts...

      It looks really like a lure to get people to apply for trial accounts...

      Indeed. I guessed that going in; but was interested enough to see what was on offer.

      The trouble is, their sign-up is broken; which kind of defeats their purpose.

      I still think it will be interesting to see what the winning code looks like (they offer Python and Ruby + the usual compilers); and compare with the best Perl could offer.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
      I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!

        BUky wrote:

        The trouble is, their sign-up is broken; which kind of defeats their purpose.

        Ha! That is sooooo characteristic of IBM. To quote a former colleague, "For every 12 people here, 1 of them knows what he's doing."

Re: IBM Cloud Challenge.
by 1nickt (Canon) on Aug 03, 2015 at 01:27 UTC

    I wonder what it says about the whole thing that their content hasn't apparently passed through a proof-reading process.

    For most developers it is a case of when not if they will need to deve +lop ... But how to get starting something ... we will announce a winner, confirming upon one of you the honour and g +lory ... ... the honour and glory of raising the first IBM Bluemix Programming +Competition

    I mean, I'm sure the blurb was written by a register.co.uk hack, not an IBM hacker, but still!

    Anyhow, you can submit any URLs and files, and it's not required to register for BlueMix to submit a solution (I tested), so BrowserUK I say you go for it and send them perl programs that may be disallowed, but not without embarrassing the rest of the field.

    Looking at the rules closely, you get 60 seconds for your program to produce as many answers as possible, so creating enough sample data to profile your solution will itself be a bit of a task.

    The way forward always starts with a minimal test.
      BrowserUK I say you go for it and send them perl programs that may be disallowed, ... Looking at the rules closely, you get 60 seconds for your program to produce as many answers as possible

      We read the rules differently. My reading is that the code will be run under the bluemix environment; and automated. Thus

      1. Any Perl code submitted would simply fail to run and be discarded.
      2. The 60 seconds is a hard time limit.

        If your program fails to produce the required output* within that time; your program will be aborted and any results summarily discarded.

        I expect that the input file will be of fixed size and relatively small; so for all but the most ardent GP solution to problem 2, the run times for most correct solutions will be a matter of milliseconds.

      *From the specificity of the output formatting requirements I suspect that the pass/fail criteria will be judged by a simple text compare of the actual output against the expected.

      Given the lack of interest in this thread; I lost interest also.


      Anyone got any experience of this phone's predecessor?

      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
      In the absence of evidence, opinion is indistinguishable from prejudice.
      I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!
Re: IBM Cloud Challenge.
by 1nickt (Canon) on Aug 02, 2015 at 20:24 UTC

    What struck me was that the three programming tasks are, at least notionally, so trivial.

    Well, they are only giving away a telly . . .

    The way forward always starts with a minimal test.

      The keyword in your quote is "notionally". Whilst the first task is unequivocally trivial; the other two are not necessarily so.

      The prize is (for me) irrelevant; the challenge is what interested me. The wording of the preamble about "brute force" made it so.


      Anyone got any experience of this phone's predecessor?

      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
      In the absence of evidence, opinion is indistinguishable from prejudice.
      I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!

        It's problem two that is the evil, mean, and wicked problem (or maybe I misunderstand it :)

Re: IBM Cloud Challenge.
by trippledubs (Deacon) on Aug 30, 2015 at 16:41 UTC

    Initially I thought that in the change problem they gave you denominations, but the way I read it now seems to mean they give you a list of coins, so that you can't use two of a denomination if they only list it once. In the sample data you don't need more than one coin of each denomination. So that makes the difference if you have say 7,5,2:14 Is that using all coins or two 7s?

    Mojolicious::Lite just shines when it comes to making small encapsulated web apps

    Question 2:

      I think you were right first time:

      The line begins with a comma-separated list of coin denominations available (in pence), followed by a colon, followed by the amount of money (in pence) that needs to be served to the customer.

      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
      In the absence of evidence, opinion is indistinguishable from prejudice.
      I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!
        that makes cents

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://1135723]
Front-paged by Athanasius
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-20 01:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found