This could be good....
...so many here shout how amazing their skills are and how everyone else does it so badly. Now time to see.
Calling all you programmers out there! We have a simple challenge for you – and if you win, you bag yourself a rather smart Smart TV. Read on to find out how you can get involved... Sign up for a trial account with IBM Bluemix. Actually do this now! Check out the competition questions here. Implement and publish your three …
This post has been deleted by its author
This post has been deleted by its author
This post has been deleted by its author
I looked through old posts where they were more commonly used.
Crap! Had a feeling it'd be something along those lines. Bugger that for a game of soldiers.
...it took a long time to track down posts that used them.
Don't suppose you feel like posting a nice list then?!
:O)
This post has been deleted by its author
What's the point? Just so that everyone can post with old icons manually?
Pretty much. Nostalgia I suppose. Could brighten the place up a bit if anyone takes an interest. I fancy the subset we're permitted to play with now is getting a bit stale.
I don't suppose it could hurt to splaff 'em into the forum proper and see if there's any interest... if you feel inclined...
If people are really, really interested, I'll post the source to the Acme Splaffer. I'm surprised nobody else has written one, it's hardly difficult.
Hell no! For Christ's sake don't do it. Not that! NOoooooo.........
*spits*
Bluemix supports several programming languages including Java, Node.js, Go, PHP, Python, Ruby Sinatra, Ruby on Rails and can be extended to support other languages such as Scala through the use of buildpacks.
The competition doesn't appear to mandate a specific language.
This post has been deleted by its author
Left-pondian here, so I won't be participating. But in general, this is exactly the kind of thing that would get me engaged - give me a chance to stroke the ol' ego and dangle something shiny in front of me at the same time. I heartily encourage more companies to spend their advertising dollars this way.
(I learned Java under similar circumstances and have no regrets even though all I got out of it was a t-shirt ('participant'). Oh, and later on a career.)
This contest is NO contest. Has nothing to do with programming, skills, etc...
This is simply IBM marketing and propaganda around their (less than successful) cloud offerings.
Anybody want to take and make this into a *real* contest without the IBMisms?
I don't think there's a scruple left inside of IBM.
...one way to tell me I should stop reading The Register now I've retired. I just can't summon up the enthusiasm to do this sort of thing any more.
The data entry format suggests that the problems were first written back in the day when you submitted them on punch cards or paper tape. Not that this is a bad thing, as the younger generation perhaps needs to know that the first step in writing a program is not to design the UI or select the protocol.
I found this helpful some years ago:
Hmm....I'm still struggling mightily to find a supplier of the 1s and 0s that I'm told code is made of. And where is the tank on the computer that you pour them into?
I believe that traditionally the 1s and 0s are 'fed' into the computer rather than poured. Try looking for some sort of orifice with teeth?
This post has been deleted by its author
Just post your solutions to the problems here, written in your language of choice, if you feel the need to prove anything..
Written in C++11. Input is only sanitized as much as the questions specified. Command line only because I can't be arsed implementing a GUI. Probably not that efficient.
FYI el reg competition organizers; if 90% of your programming challenge is string manipulation then you have created a boring challenge.
This post has been deleted by its author
Blah blah blah... <paraphrase> coding is better done in the cloud due to the time it takes to set up the IDE </paraphrase>...
My eyeballs nearly caught fire as they screeched to a halt over that. I've known some seriously bad developers in my time but I can't think of any so bad that they couldn't even make their IDE compile a simple application. I think a lot more time would be wasted trying out different language and development environments that sitting down in front of a regular IDE and just getting on with some work. And what happens when the cloud IDE doesn't support some weird and wonderful plugin you want for Eclipse? etc etc
I'm not saying this idea hasn't got legs but the justification after the mid-article heading is just crazy talk. You'll pry my IDE out of my cold dead hands. Now I'm off to take part and show off my leet mad coding skills, or something like that.
This post has been deleted by its author
This post has been deleted by its author
That would be tracing, translating, and debugging RPCs. You haven't experienced "cloud" computing until you've dealt with fixed length RPCs using binary records, SOAP, Java RMI, JSON REST, Protocol Buffers, and my favorite of "I wrote this one night while drunk" which is usually some form of "put the file here then wait for a new file there."
if (($ego > 100)) && (($gullibility_regarding_IBM > 1000)); then
echo "Yay let me do it OMG LOL!" | sell_your_soul_to_the_cloud > /dev/null 2>&1
else
while [ $had_enough_yet? != "true" ]; do
echo "meh whatever dude..."
done
fi
<Buggrit where's my sandals gone...>
"Anyone who writes a math function for this, and not a switch statement using precalculated results has lost."
I'm assuming that the point was to eliminate everybody who started off
public static int factorial(int n){................ or its equivalent.
However, in Python ordinary ints are automatically promoted to bigints when needed, so a simple recursive factorial function will do the job perfectly and occupies less space than a switch statement. Code length (and possibility of mistyping a number) versus execution time and memory? You tell me.
This post has been deleted by its author
That won't solve the problem because you then have to convert the output to a CR-terminated string, which takes rather more work in assembler.
Also it is CPU-dependent because you will need a 64 bit by 64 bit multiply. Factorials get big very quickly.
"They wanted my first name, last name, phone number, email, password, password, security question, security answer."
Really, Mr. Michael Mouse, disposable@yahoo.com, PAYG burner SIM, Pass1word, pass1word, Mother's maiden name, Schicklgrueber, I don't see the problem.
This post has been deleted by its author
This post has been deleted by its author
The size of the input file is not specified, so it could be arbitrarily long. We are also told that the input is entirely validated (i.e. it is a number that has a !, or it is #).
In terms of space, therefore, potentially the most efficient way to do this is to calculate the factorials on the fly but store each result that is calculated for reuse. Thus if the input file doesn't include all the numbers from 1 to 15, we don't do as much calculating.
To deal with arbitrarily long input files the output stream and the input stream need to be independent, so the program looks like this:
1. Start program.
2. Listen on input stream. If a # is received, close.
3. Otherwise read the number and check if the factorial is already calculated.
5. If not, calculate factorial, store in the calculated lookup.
4. Output it on the output stream with a trailing CR.
5. Go to 2.
or
1. Start program.
2. Listen on input stream. If a # is received, close.
3. Otherwise switch on the number and output the result on the output stream with a trailing CR.
4. Go to 2.
The second version could be easily implemented in a PIC with serial input and serial output, because it uses no arithmetic at all. Why you might want to I have no idea.